diff options
author | Dan Winship <danw@src.gnome.org> | 2002-04-05 04:02:48 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-04-05 04:02:48 +0800 |
commit | b064051f5ff3c148c54c9fc11efc6078fea8157c (patch) | |
tree | e7ab4c6ec2f313cd03e0f22d0e9562a3056239e2 /mail/mail-callbacks.c | |
parent | 54ddaa6e4852542cf37cfb32fa6bfcec92a2dd0d (diff) | |
download | gsoc2013-evolution-b064051f5ff3c148c54c9fc11efc6078fea8157c.tar.gz gsoc2013-evolution-b064051f5ff3c148c54c9fc11efc6078fea8157c.tar.zst gsoc2013-evolution-b064051f5ff3c148c54c9fc11efc6078fea8157c.zip |
Make the drafts and sent folder buttons be EvolutionFolderSelectorButtons.
* mail-account-gui.c (mail_account_gui_new): Make the drafts and
sent folder buttons be EvolutionFolderSelectorButtons. Remove the
code to deal with drafts_folder_name and sent_folder_name, since
they were only used to construct the button and aren't needed now.
(mail_account_gui_save): Remove drafts/sent name references.
(mail_account_gui_destroy): Likewise
(folder_selected): Handle the "selected" signal on the folder
selector button by updating the URI in the MailAccountGui.
(mail_account_gui_folder_selector_button_new): Glade custom widget
constructor.
* mail-callbacks.c (transfer_msg): Update for
evolution_shell_client_user_select_folder change.
* message-browser.c (transfer_msg): Likewise. (Sigh. Why is this
cut+pasted?)
* mail-config.glade: Make the drafts/sent folder buttons custom
widgets.
* mail-config.c (account_copy): Remove drafts/sent folder name
handling.
(account_destroy): Likewise.
(config_read): Likewise.
(mail_config_write): Likewise.
* Mail.idl (MailConfig:Account): remove drafts_folder_name and
sent_folder_name.
svn path=/trunk/; revision=16353
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r-- | mail/mail-callbacks.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 2f4f6b695a..2f45924595 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1410,38 +1410,35 @@ transfer_msg_done (gboolean ok, void *data) static void transfer_msg (FolderBrowser *fb, gboolean delete_from_source) { - const char *allowed_types[] = { "mail", "vtrash", NULL }; + static const char *allowed_types[] = { "mail", "vtrash", NULL }; extern EvolutionShellClient *global_shell_client; - char *uri, *physical, *path, *desc; - static char *last = NULL; + GNOME_Evolution_Folder *folder; + static char *last_uri = NULL; GPtrArray *uids; + char *desc; if (FOLDER_BROWSER_IS_DESTROYED (fb)) return; - if (last == NULL) - last = g_strdup (""); + if (last_uri == NULL) + last_uri = g_strdup (""); if (delete_from_source) desc = _("Move message(s) to"); else desc = _("Copy message(s) to"); - uri = NULL; - physical = NULL; evolution_shell_client_user_select_folder (global_shell_client, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (fb))), - desc, last, - allowed_types, &uri, &physical); - if (!uri) + desc, last_uri, allowed_types, + &folder); + if (!folder) return; - path = strchr (uri, '/'); - if (path && strcmp (last, path) != 0) { - g_free (last); - last = g_strdup_printf ("evolution:%s", path); + if (strcmp (last_uri, folder->evolutionUri) != 0) { + g_free (last_uri); + last_uri = g_strdup (folder->evolutionUri); } - g_free (uri); uids = g_ptr_array_new (); message_list_foreach (fb->message_list, enumerate_msg, uids); @@ -1449,12 +1446,13 @@ transfer_msg (FolderBrowser *fb, gboolean delete_from_source) if (delete_from_source) { gtk_object_ref (GTK_OBJECT (fb)); mail_transfer_messages (fb->folder, uids, delete_from_source, - physical, 0, transfer_msg_done, fb); + folder->physicalUri, 0, + transfer_msg_done, fb); } else { mail_transfer_messages (fb->folder, uids, delete_from_source, - physical, 0, NULL, NULL); + folder->physicalUri, 0, NULL, NULL); } - g_free(physical); + CORBA_free (folder); } void |