diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2005-08-02 12:39:21 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2005-08-02 12:39:21 +0800 |
commit | 1e6a4ea3eeabc099a96602f93d04086eaf691287 (patch) | |
tree | 935410de9d7583c8c6bf3ca76edc34e5e227e79e /mail | |
parent | 09741a2eb5188392855e96538cf957e492f38c3d (diff) | |
download | gsoc2013-evolution-1e6a4ea3eeabc099a96602f93d04086eaf691287.tar gsoc2013-evolution-1e6a4ea3eeabc099a96602f93d04086eaf691287.tar.gz gsoc2013-evolution-1e6a4ea3eeabc099a96602f93d04086eaf691287.tar.bz2 gsoc2013-evolution-1e6a4ea3eeabc099a96602f93d04086eaf691287.tar.lz gsoc2013-evolution-1e6a4ea3eeabc099a96602f93d04086eaf691287.tar.xz gsoc2013-evolution-1e6a4ea3eeabc099a96602f93d04086eaf691287.tar.zst gsoc2013-evolution-1e6a4ea3eeabc099a96602f93d04086eaf691287.zip |
Fixed a bug where the last path is not preserved well.
2005-08-02 Srinivasa Ragavan <sragavan@novell.com>
* em-utils.c: (emu_get_save_filesel) (emu_save_part_response)
(emu_save_messages_response) Fixed a bug where the last path is not
preserved well.
svn path=/trunk/; revision=29950
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/em-utils.c | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index ac1d83c66e..05c7d88561 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2005-08-02 Srinivasa Ragavan <sragavan@novell.com> + + * em-utils.c: (emu_get_save_filesel) (emu_save_part_response) + (emu_save_messages_response) Fixed a bug where the last path is not + preserved well. + 2005-08-01 Not Zed <NotZed@Ximian.com> * em-subscribe-editor.c (sub_fill_level): always process all nodes diff --git a/mail/em-utils.c b/mail/em-utils.c index a432bed390..300e68fb0f 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -356,14 +356,15 @@ emu_get_save_filesel (GtkWidget *parent, const char *title, const char *name, Gt } static void -emu_update_save_path(const char *filename) +emu_update_save_path(const char *filename, gboolean path) { - char *dir = g_path_get_dirname(filename); + char *dir = path ? filename : g_path_get_dirname(filename); GConfClient *gconf = gconf_client_get_default(); gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", dir, NULL); g_object_unref(gconf); - g_free(dir); + if (!path) + g_free(dir); } static gboolean @@ -405,7 +406,7 @@ emu_save_part_response(GtkWidget *filesel, int response, CamelMimePart *part) if (!emu_can_save((GtkWindow *)filesel, path)) return; - emu_update_save_path(path); + emu_update_save_path(path, FALSE); /* FIXME: popup error if it fails? */ mail_save_part(part, path, NULL, NULL); } @@ -457,7 +458,7 @@ emu_save_parts_response (GtkWidget *filesel, int response, GSList *parts) path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); #endif - emu_update_save_path(path); + emu_update_save_path(path, TRUE); for ( selected = parts; selected != NULL; selected = selected->next) { const char *file_name; @@ -575,7 +576,7 @@ emu_save_messages_response(GtkWidget *filesel, int response, struct _save_messag if (!emu_can_save((GtkWindow *)filesel, path)) return; - emu_update_save_path(path); + emu_update_save_path(path, FALSE); mail_save_messages(data->folder, data->uids, path, NULL, NULL); data->uids = NULL; } |