From 86ecfc50539ddef82205551c11a6a13b135bbab4 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 7 Nov 2009 12:44:44 -0500 Subject: Convert some "Save As" actions to run asynchronously. This introduces e-shell-utils for miscellaneous utility functions that integrate with the shell or shell settings. First function is e_shell_run_save_dialog(), which automatically remembers the selected folder in the file chooser dialog. Also, kill some redundant save dialog functions, as well as some write-this-string-to-disk functions that block. --- e-util/e-dialog-utils.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'e-util/e-dialog-utils.c') diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c index 952d73f303..df0d8f5129 100644 --- a/e-util/e-dialog-utils.c +++ b/e-util/e-dialog-utils.c @@ -72,38 +72,6 @@ e_notice (gpointer parent, GtkMessageType type, const gchar *format, ...) gtk_widget_destroy (dialog); } -gchar * -e_file_dialog_save (GtkWindow *parent, - const gchar *title, - const gchar *fname) -{ - GtkWidget *dialog; - gchar *filename = NULL; - gchar *uri; - - g_return_val_if_fail (GTK_IS_WINDOW (parent), NULL); - - dialog = e_file_get_save_filesel ( - parent, title, fname, GTK_FILE_CHOOSER_ACTION_SAVE); - - if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK) - goto exit; - - uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog)); - - if (e_file_can_save (GTK_WINDOW (dialog), uri)) { - e_file_update_save_path ( - gtk_file_chooser_get_current_folder_uri ( - GTK_FILE_CHOOSER (dialog)), TRUE); - filename = uri; /* FIXME This looks wrong. */ - } - -exit: - gtk_widget_destroy (dialog); - - return filename; -} - /** * e_file_get_save_filesel: * @parent: parent window -- cgit