From 462fdd34535c090706e59ce3ffb4aa51bc29a034 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 29 Nov 2007 18:16:10 +0000 Subject: ** Part of fix for bug #271551 2007-11-29 Milan Crha ** Part of fix for bug #271551 * mail/evolution-mail.schemas.in: New key "/apps/evolution/mail/composer/current_folder". * composer/e-msg-composer.h: (e_msg_composer_set_attach_path), (e_msg_composer_get_attach_path): * composer/e-msg-composer.c: (e_msg_composer_set_attach_path), (e_msg_composer_get_attach_path): Functions to set/get attach path to both composer and editor. * composer/e-msg-composer.c: (prepare_engine): Set last used path right after creation of the engine. * composer/e-msg-composer-select-file.c: (get_selector), (select_file_response), (select_attach_response): Using new functions. * composer/listener.c: (impl_event): Store new file path when received event about its change. * composer/e-msg-composer.c: (set_signature_gui): Leak fix. Note: update your GtkHtml to revision 8636 and above. svn path=/trunk/; revision=34613 --- composer/e-msg-composer-select-file.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'composer/e-msg-composer-select-file.c') diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c index 4cf92a661e..f0e5b767c9 100644 --- a/composer/e-msg-composer-select-file.c +++ b/composer/e-msg-composer-select-file.c @@ -58,9 +58,9 @@ get_selector(struct _EMsgComposer *composer, const char *title, guint32 flags) GtkWidget *selection; GtkWidget *showinline = NULL; GList *icon_list; - char *path; + const char *path; - path = g_object_get_data ((GObject *) composer, "attach_path"); + path = e_msg_composer_get_attach_path (composer); if (flags & SELECTOR_MODE_SAVE) selection = gtk_file_chooser_dialog_new (title, @@ -120,7 +120,8 @@ select_file_response(GtkWidget *selector, guint response, struct _EMsgComposer * name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector)); path = g_path_get_dirname (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector))); - g_object_set_data_full ((GObject *) composer, "attach_path", path, g_free); + e_msg_composer_set_attach_path (composer, path); + g_free (path); func(composer, name); } @@ -172,7 +173,8 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer g_free (filename); } if (path) - g_object_set_data_full ((GObject *) composer, "attach_path", path, g_free); + e_msg_composer_set_attach_path (composer, path); + g_free (path); func(composer, names, gtk_toggle_button_get_active(showinline)); -- cgit v1.2.3