thunar-dialogs: Thunar Internal Functions Reference Manual

## thunar-dialogs thunar-dialogs |

## Functions

gchar * | thunar_dialogs_show_create ()
ThunarJob * | thunar_dialogs_show_rename_file ()
void | thunar_dialogs_show_about ()
void | thunar_dialogs_show_error ()
ThunarJobResponse | thunar_dialogs_show_job_ask ()
ThunarJobResponse | thunar_dialogs_show_job_ask_replace ()
gboolean | thunar_dialogs_show_insecure_program ()
gint | thunar_dialog_confirm_close_split_pane_tabs ()
gint | thunar_dialog_ask_execute ()
void | thunar_dialog_show_launcher_props ()

## 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,
                                     ThunarOperationLogMode log_mode);

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,
                                         gboolean multiple_files);

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_insecure_program ()

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

### thunar_dialog_confirm_close_split_pane_tabs ()

    gint
    thunar_dialog_confirm_close_split_pane_tabs
                                   (GtkWindow *parent);

Runs a dialog to ask the user whether they want to close a split pane with multiple tabs

#### Parameters

parent | transient parent of the dialog, or `NULL`. | [allow-none]

#### Returns

GTK_RESPONSE_CANCEL if cancelled, GTK_RESPONSE_CLOSE if the user wants to close all tabs of the other split pane

### thunar_dialog_ask_execute ()

    gint
    thunar_dialog_ask_execute (const ThunarFile *file,
                               gpointer parent,
                               gboolean allow_open,
                               gboolean single_file);

Shows a dialog where the user is asked if and how he wants to run the executable script.

#### Parameters

file | a ThunarFile pointer |
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. |
allow_open | if set, the "Open" button is visible. |
single_file | if set, the file name is visible in dialog message. Otherwise there is generic message about selected files. |

#### Returns

One of ThunarFileAskExecuteResponse enum value.

### thunar_dialog_show_launcher_props ()

    void
    thunar_dialog_show_launcher_props (ThunarFile *launcher,
                                       gpointer parent);

Calls the exo-desktop-item-edit command to edit the properties of a .desktop file. A dialog with the current properties will appear.

#### Parameters

launcher | a ThunarFile. |
parent | a GdkScreen, a GtkWidget or `NULL`. If `NULL` is passed then the default screen will be used. |