| Thunar-VFS Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
#include <thunar-vfs/thunar-vfs.h> enum ThunarVfsJobResponse; ThunarVfsJob; ThunarVfsJob * thunar_vfs_job_launch (ThunarVfsJob *job); void thunar_vfs_job_cancel (ThunarVfsJob *job); gboolean thunar_vfs_job_cancelled (const ThunarVfsJob *job);
"ask" : Run Last / No Hooks "ask-replace" : Run Last / No Hooks "error" : No Hooks "finished" : No Hooks "info-message" : No Hooks "infos-ready" : No Hooks "new-files" : No Hooks "percent" : No Hooks
typedef enum /*< flags >*/
{
THUNAR_VFS_JOB_RESPONSE_YES = 1 << 0,
THUNAR_VFS_JOB_RESPONSE_YES_ALL = 1 << 1,
THUNAR_VFS_JOB_RESPONSE_NO = 1 << 2,
THUNAR_VFS_JOB_RESPONSE_CANCEL = 1 << 3,
THUNAR_VFS_JOB_RESPONSE_NO_ALL = 1 << 4,
THUNAR_VFS_JOB_RESPONSE_RETRY = 1 << 5,
} ThunarVfsJobResponse;
Possible responses for the ThunarVfsJob::ask signal.
ThunarVfsJob * thunar_vfs_job_launch (ThunarVfsJob *job);
This functions schedules job to be run as soon
as possible, in a separate thread.
|
a ThunarVfsJob. |
Returns : |
a pointer to job.
|
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.
|
a ThunarVfsJob. |
gboolean thunar_vfs_job_cancelled (const ThunarVfsJob *job);
Checks whether job was previously cancelled
by a call to thunar_vfs_job_cancel().
|
a ThunarVfsJob. |
Returns : |
TRUE if job is cancelled.
|
"ask" signalThunarVfsJobResponseuser_function (ThunarVfsJob *job, gchar *message, ThunarVfsJobResponse choices, gpointer user_data) : Run Last / No Hooks
The message is garantied to contain valid UTF-8.
|
a ThunarVfsJob. |
|
question to display to the user. |
|
a combination of ThunarVfsInteractiveJobResponses. |
|
user data set when the signal handler was connected. |
Returns : |
the selected choice. |
"ask-replace" signalThunarVfsJobResponseuser_function (ThunarVfsJob *job, ThunarVfsInfo *src_info, ThunarVfsInfo *dst_info, gpointer user_data) : Run Last / No Hooks
Emitted to ask the user whether the destination file should be replaced by the source file.
|
a ThunarVfsJob. |
|
the ThunarVfsInfo of the source file. |
|
the ThunarVfsInfo of the destination file, that may be replaced with the source file. |
|
user data set when the signal handler was connected. |
Returns : |
the selected choice. |
Since 0.8.1
"error" signalvoid user_function (ThunarVfsJob *job, gpointer error, gpointer user_data) : No Hooks
Emitted whenever an error occurs while executing the
job.
|
a ThunarVfsJob. |
|
a GError describing the cause. |
|
user data set when the signal handler was connected. |
"finished" signalvoid user_function (ThunarVfsJob *job, gpointer user_data) : No Hooks
This signal will be automatically emitted once the
job finishes its execution, no matter whether job
completed successfully or was cancelled by the
user.
|
a ThunarVfsJob. |
|
user data set when the signal handler was connected. |
"info-message" signalvoid user_function (ThunarVfsJob *job, gchar *message, gpointer user_data) : No Hooks
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.
|
a ThunarVfsJob. |
|
information to be displayed about job.
|
|
user data set when the signal handler was connected. |
"infos-ready" signalgboolean user_function (ThunarVfsJob *job, gpointer info_list, gpointer user_data) : No Hooks
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!
|
a ThunarVfsJob. |
|
a list of ThunarVfsInfos. |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the handler took over ownership of
info_list, else FALSE.
|
"new-files" signalvoid user_function (ThunarVfsJob *job, gpointer path_list, gpointer user_data) : No Hooks
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.
|
a ThunarVfsJob. |
|
a list of ThunarVfsPaths that were created by job.
|
|
user data set when the signal handler was connected. |
"percent" signalvoid user_function (ThunarVfsJob *job, gdouble percent, gpointer user_data) : No Hooks
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.
|
a ThunarVfsJob. |
|
the percentage of completeness. |
|
user data set when the signal handler was connected. |