thunar-dialogs

thunar-dialogs

Functions

Description

Functions

thunar_dialogs_show_create ()

gchar *
thunar_dialogs_show_create (gpointer parent,
                            const gchar *content_type,
                            const gchar *filename,
                            const gchar *title);

Displays a Thunar create dialog with the specified parameters that asks the user to enter a name for a new file or folder.

The caller is responsible to free the returned filename using g_free() when no longer needed.

Parameters

parent

a GdkScreen, a GtkWidget or NULL.

 

content_type

the content type of the file or folder to create.

 

filename

the suggested filename or NULL.

 

title

the dialog title.

 

Returns

the filename entered by the user or NULL if the user cancelled the dialog.


thunar_dialogs_show_rename_file ()

ThunarJob *
thunar_dialogs_show_rename_file (gpointer parent,
                                 ThunarFile *file);

Displays the Thunar rename dialog for a single file rename.

Parameters

parent

a GtkWidget on which the error dialog should be shown, or a GdkScreen if no GtkWidget is known. May also be NULL, in which case the default GdkScreen will be used.

 

file

the ThunarFile we're going to rename.

 

Returns

The ThunarJob responsible for renaming the file or NULL if there was no renaming required.


thunar_dialogs_show_about ()

void
thunar_dialogs_show_about (GtkWindow *parent,
                           const gchar *title,
                           const gchar *format,
                           ...);

Displays the Thunar about dialog with format as main text.

Parameters

parent

the parent GtkWindow or NULL.

 

title

the software title.

 

format

the printf()-style format for the main text in the about dialog.

 

...

argument list for the format .

 

thunar_dialogs_show_error ()

void
thunar_dialogs_show_error (gpointer parent,
                           const GError *error,
                           const gchar *format,
                           ...);

Displays an error dialog on widget using the format as primary message and optionally displaying error as secondary error text.

If widget is not NULL and widget is part of a GtkWindow, the function makes sure that the toplevel window is visible prior to displaying the error dialog.

Parameters

parent

a GtkWidget on which the error dialog should be shown, or a GdkScreen if no GtkWidget is known. May also be NULL, in which case the default GdkScreen will be used.

 

error

a GError, which gives a more precise description of the problem or NULL.

 

format

the printf()-style format for the primary problem description.

 

...

argument list for the format .

 

thunar_dialogs_show_job_ask ()

ThunarJobResponse
thunar_dialogs_show_job_ask (GtkWindow *parent,
                             const gchar *question,
                             ThunarJobResponse choices);

Utility function to display a question dialog for the ThunarJob::ask signal.

Parameters

parent

the parent GtkWindow or NULL.

 

question

the question text.

 

choices

possible responses.

 

Returns

the ThunarJobResponse.


thunar_dialogs_show_job_ask_replace ()

ThunarJobResponse
thunar_dialogs_show_job_ask_replace (GtkWindow *parent,
                                     ThunarFile *src_file,
                                     ThunarFile *dst_file);

Asks the user whether to replace the destination file with the source file identified by src_file .

Parameters

parent

the parent GtkWindow or NULL.

 

src_file

the ThunarFile of the source file.

 

dst_file

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

 

Returns

the selected ThunarJobResponse.


thunar_dialogs_show_job_error ()

void
thunar_dialogs_show_job_error (GtkWindow *parent,
                               GError *error);

Utility function to display a message dialog for the ThunarJob::error signal.

Parameters

parent

the parent GtkWindow or NULL.

 

error

the GError provided by the ThunarJob.

 

thunar_dialogs_show_insecure_program ()

gboolean
thunar_dialogs_show_insecure_program (gpointer parent,
                                      const gchar *title,
                                      ThunarFile *file,
                                      const gchar *command);