diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-dialog-utils.c | 26 | ||||
-rw-r--r-- | e-util/e-dialog-utils.h | 2 |
2 files changed, 14 insertions, 14 deletions
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c index ecf9e7ec1e..a97d2c936f 100644 --- a/e-util/e-dialog-utils.c +++ b/e-util/e-dialog-utils.c @@ -344,29 +344,29 @@ e_file_dialog_save_folder (const char *title) * no signals connected and is not shown. **/ GtkWidget * -e_file_get_save_filesel (GtkWidget *parent, const char *title, const char *name, GtkFileChooserAction action) +e_file_get_save_filesel (GtkWindow *parent, const char *title, const char *name, GtkFileChooserAction action) { GtkWidget *filesel; char *uri; - filesel = gtk_file_chooser_dialog_new (title, - NULL, - action, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - (action == GTK_FILE_CHOOSER_ACTION_OPEN) ? GTK_STOCK_OPEN:GTK_STOCK_SAVE, GTK_RESPONSE_OK, - NULL); + g_return_val_if_fail (GTK_IS_WINDOW (parent), NULL); + + filesel = gtk_file_chooser_dialog_new ( + title, parent, action, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + (action == GTK_FILE_CHOOSER_ACTION_OPEN) ? + GTK_STOCK_OPEN : GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK); gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filesel), FALSE); - if (parent) - e_dialog_set_transient_for((GtkWindow *)filesel, parent); - - uri = e_file_get_save_path(); + uri = e_file_get_save_path (); - gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (filesel), uri); + gtk_file_chooser_set_current_folder_uri ( + GTK_FILE_CHOOSER (filesel), uri); if (name && name[0]) - gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filesel), name); + gtk_file_chooser_set_current_name ( + GTK_FILE_CHOOSER (filesel), name); g_free (uri); diff --git a/e-util/e-dialog-utils.h b/e-util/e-dialog-utils.h index 9d594122e2..9e6e7992c1 100644 --- a/e-util/e-dialog-utils.h +++ b/e-util/e-dialog-utils.h @@ -43,7 +43,7 @@ char *e_file_dialog_save (const char *title, const char *fname) char *e_file_dialog_save_folder (const char *title); -GtkWidget * e_file_get_save_filesel (GtkWidget *parent, const char *title, const char *name, GtkFileChooserAction action); +GtkWidget * e_file_get_save_filesel (GtkWindow *parent, const char *title, const char *name, GtkFileChooserAction action); gboolean e_file_can_save(GtkWindow *parent, const char *uri); gboolean e_file_check_local(const char *name); |