ThunarJob

ThunarJob

Functions

Signals

ThunarJobResponse ask No Hooks
ThunarJobResponse ask-replace No Hooks
gboolean files-ready No Hooks
void frozen No Hooks
void new-files No Hooks
void unfrozen No Hooks

Object Hierarchy

    GObject
    ╰── ExoJob
        ╰── ThunarJob
            ├── ThunarDeepCountJob
            ├── ThunarSimpleJob
            ╰── ThunarTransferJob

Description

Functions

thunar_job_set_total_files ()

void
thunar_job_set_total_files (ThunarJob *job,
                            GList *total_files);

thunar_job_set_pausable ()

void
thunar_job_set_pausable (ThunarJob *job,
                         gboolean pausable);

thunar_job_is_pausable ()

gboolean
thunar_job_is_pausable (ThunarJob *job);

thunar_job_pause ()

void
thunar_job_pause (ThunarJob *job);

thunar_job_resume ()

void
thunar_job_resume (ThunarJob *job);

thunar_job_freeze ()

void
thunar_job_freeze (ThunarJob *job);

thunar_job_unfreeze ()

void
thunar_job_unfreeze (ThunarJob *job);

thunar_job_is_paused ()

gboolean
thunar_job_is_paused (ThunarJob *job);

thunar_job_is_frozen ()

gboolean
thunar_job_is_frozen (ThunarJob *job);

thunar_job_processing_file ()

void
thunar_job_processing_file (ThunarJob *job,
                            GList *current_file,
                            guint n_processed);

thunar_job_ask_create ()

ThunarJobResponse
thunar_job_ask_create (ThunarJob *job,
                       const gchar *format,
                       ...);

thunar_job_ask_overwrite ()

ThunarJobResponse
thunar_job_ask_overwrite (ThunarJob *job,
                          const gchar *format,
                          ...);

thunar_job_ask_delete ()

ThunarJobResponse
thunar_job_ask_delete (ThunarJob *job,
                       const gchar *format,
                       ...);

thunar_job_ask_replace ()

ThunarJobResponse
thunar_job_ask_replace (ThunarJob *job,
                        GFile *source_path,
                        GFile *target_path,
                        GError **error);

thunar_job_ask_skip ()

ThunarJobResponse
thunar_job_ask_skip (ThunarJob *job,
                     const gchar *format,
                     ...);

thunar_job_ask_no_size ()

gboolean
thunar_job_ask_no_size (ThunarJob *job,
                        const gchar *format,
                        ...);

thunar_job_files_ready ()

gboolean
thunar_job_files_ready (ThunarJob *job,
                        GList *file_list);

thunar_job_new_files ()

void
thunar_job_new_files (ThunarJob *job,
                      const GList *file_list);

Signal Details

The “ask” signal

ThunarJobResponse
user_function (ThunarJob        *job,
               char             *message,
               ThunarJobResponse choices,
               gpointer          user_data)

The message is garantied to contain valid UTF-8.

Parameters

job

a ThunarJob.

 

message

question to display to the user.

 

choices

a combination of ThunarJobResponses.

 

user_data

user data set when the signal handler was connected.

 

Returns

the selected choice.

Flags: No Hooks


The “ask-replace” signal

ThunarJobResponse
user_function (ThunarJob  *job,
               ThunarFile *src_file,
               ThunarFile *dst_file,
               gpointer    user_data)

Emitted to ask the user whether the destination file should be replaced by the source file.

Parameters

job

a ThunarJob.

 

src_file

the ThunarFile of the source file.

 

dst_file

the ThunarFile of the destination file, that may be replaced with the source file.

 

user_data

user data set when the signal handler was connected.

 

Returns

the selected choice.

Flags: No Hooks


The “files-ready” signal

gboolean
user_function (ThunarJob *job,
               gpointer   file_list,
               gpointer   user_data)

This signal is used by ThunarJobs returned by the thunar_io_jobs_list_directory() function whenever there's a bunch of ThunarFiles ready. This signal is garantied to be never emitted with an file_list parameter of NULL.

To allow some further optimizations on the handler-side, the handler is allowed to take over ownership of the file_list , i.e. it can reuse the infos list and just replace the data elements with it's own objects based on the ThunarFiles contained within the file_list (and of course properly unreffing the previously contained infos). If a handler takes over ownership of file_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!

Parameters

job

a ThunarJob.

 

file_list

a list of ThunarFiles.

 

user_data

user data set when the signal handler was connected.

 

Returns

TRUE if the handler took over ownership of file_list , else FALSE.

Flags: No Hooks


The “frozen” signal

void
user_function (ThunarJob *job,
               gpointer   user_data)

This signal is emitted by the job right after the job is being frozen.

Parameters

job

a ThunarJob.

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks


The “new-files” signal

void
user_function (ThunarJob *job,
               gpointer   file_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 file_list . file_list contains only the toplevel file items, that were specified by the application on creation of the job .

Parameters

job

a ThunarJob.

 

file_list

a list of GFiles that were created by job .

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks


The “unfrozen” signal

void
user_function (ThunarJob *job,
               gpointer   user_data)

This signal is emitted by the job right after the job is being unfrozen.

Parameters

job

a ThunarJob.

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks