Top | ![]() |
![]() |
![]() |
![]() |
ThunarVfsJob * | thunar_vfs_job_launch () |
void | thunar_vfs_job_cancel () |
gboolean | thunar_vfs_job_cancelled () |
ThunarVfsJobResponse | ask | No Hooks |
ThunarVfsJobResponse | ask-replace | No Hooks |
void | error | No Hooks |
void | finished | No Hooks |
void | info-message | No Hooks |
gboolean | infos-ready | No Hooks |
void | new-files | No Hooks |
void | percent | No Hooks |
ThunarVfsJob *
thunar_vfs_job_launch (ThunarVfsJob *job
);
This functions schedules job
to be run as soon
as possible, in a separate thread.
void
thunar_vfs_job_cancel (ThunarVfsJob *job
);
Attempts to cancel the operation currently
performed by job
. Even after the cancellation
of job
, it may still emit signals, so you
must take care of disconnecting all handlers
appropriately if you cannot handle signals
after cancellation.
gboolean
thunar_vfs_job_cancelled (const ThunarVfsJob *job
);
Checks whether job
was previously cancelled
by a call to thunar_vfs_job_cancel()
.
“ask”
signalThunarVfsJobResponse user_function (ThunarVfsJob *job, gchar *message, ThunarVfsJobResponse choices, gpointer user_data)
The message
is garantied to contain valid UTF-8.
job |
a ThunarVfsJob. |
|
message |
question to display to the user. |
|
choices |
a combination of ThunarVfsInteractiveJobResponses. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“ask-replace”
signalThunarVfsJobResponse user_function (ThunarVfsJob *job, ThunarVfsInfo *src_info, ThunarVfsInfo *dst_info, gpointer user_data)
Emitted to ask the user whether the destination file should be replaced by the source file.
job |
a ThunarVfsJob. |
|
src_info |
the ThunarVfsInfo of the source file. |
|
dst_info |
the ThunarVfsInfo of the destination file, that may be replaced with the source file. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 0.8.1
“error”
signalvoid user_function (ThunarVfsJob *job, gpointer error, gpointer user_data)
Emitted whenever an error occurs while executing the
job
.
job |
a ThunarVfsJob. |
|
error |
a GError describing the cause. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“finished”
signalvoid user_function (ThunarVfsJob *job, gpointer user_data)
This signal will be automatically emitted once the
job
finishes its execution, no matter whether job
completed successfully or was cancelled by the
user.
Flags: No Hooks
“info-message”
signalvoid user_function (ThunarVfsJob *job, gchar *message, gpointer user_data)
This signal is emitted to display information about the
job
. Examples of messages are "Preparing..." or
"Cleaning up...".
The message
is garantied to contain valid UTF-8, so
it can be displayed by GtkWidgets out of the
box.
job |
a ThunarVfsJob. |
|
message |
information to be displayed about |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“infos-ready”
signalgboolean user_function (ThunarVfsJob *job, gpointer info_list, gpointer user_data)
This signal is used by ThunarVfsJobs returned by
the thunar_vfs_listdir()
function whenever there's a bunch
of ThunarVfsInfos ready. This signal is garantied
to be never emitted with an info_list
parameter of NULL
.
To allow some further optimizations on the handler-side,
the handler is allowed to take over ownership of the
info_list
, i.e. it can reuse the infos
list and just replace
the data elements with it's own objects based on the
ThunarVfsInfos contained within the info_list
(and
of course properly unreffing the previously contained infos).
If a handler takes over ownership of info_list
it must return
TRUE
here, and no further handlers will be run. Else, if
the handler doesn't want to take over ownership of infos
,
it must return FALSE
, and other handlers will be run. Use
this feature with care, and only if you can be sure that
you are the only handler connected to this signal for a
given job!
job |
a ThunarVfsJob. |
|
info_list |
a list of ThunarVfsInfos. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“new-files”
signalvoid user_function (ThunarVfsJob *job, gpointer path_list, gpointer user_data)
This signal is emitted by the job
right before the job
is terminated
and informs the application about the list of created files in path_list
.
path_list
contains only the toplevel path items, that were specified by
the application on creation of the job
.
job |
a ThunarVfsJob. |
|
path_list |
a list of ThunarVfsPaths that were created by |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“percent”
signalvoid user_function (ThunarVfsJob *job, gdouble percent, gpointer user_data)
This signal is emitted to present the state of the overall progress.
The percent
value is garantied to be in the
range 0.0 to 100.0.
job |
a ThunarVfsJob. |
|
percent |
the percentage of completeness. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks