aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-select-file.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-30 02:16:10 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-30 02:16:10 +0800
commit462fdd34535c090706e59ce3ffb4aa51bc29a034 (patch)
treef185944f5bcd1141178027dcbf82b2c1ab6f2329 /composer/e-msg-composer-select-file.c
parent4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f (diff)
downloadgsoc2013-evolution-462fdd34535c090706e59ce3ffb4aa51bc29a034.tar
gsoc2013-evolution-462fdd34535c090706e59ce3ffb4aa51bc29a034.tar.gz
gsoc2013-evolution-462fdd34535c090706e59ce3ffb4aa51bc29a034.tar.bz2
gsoc2013-evolution-462fdd34535c090706e59ce3ffb4aa51bc29a034.tar.lz
gsoc2013-evolution-462fdd34535c090706e59ce3ffb4aa51bc29a034.tar.xz
gsoc2013-evolution-462fdd34535c090706e59ce3ffb4aa51bc29a034.tar.zst
gsoc2013-evolution-462fdd34535c090706e59ce3ffb4aa51bc29a034.zip
** Part of fix for bug #271551
2007-11-29 Milan Crha <mcrha@redhat.com> ** 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
Diffstat (limited to 'composer/e-msg-composer-select-file.c')
-rw-r--r--composer/e-msg-composer-select-file.c10
1 files changed, 6 insertions, 4 deletions
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));