diff options
author | Peter Williams <peterw@ximian.com> | 2001-07-21 03:15:04 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-07-21 03:15:04 +0800 |
commit | fcce65ec8a149ca8f578e76ce6afd675edff196b (patch) | |
tree | 59ba77ca320e8de6f6d29a9c69961f5cbdd30448 /mail/mail-local.c | |
parent | 78cdb79e5a9f464ede40ea1caa373cf46e24de4b (diff) | |
download | gsoc2013-evolution-fcce65ec8a149ca8f578e76ce6afd675edff196b.tar.gz gsoc2013-evolution-fcce65ec8a149ca8f578e76ce6afd675edff196b.tar.zst gsoc2013-evolution-fcce65ec8a149ca8f578e76ce6afd675edff196b.zip |
Fix DanW's fix. Pass the right arguments to mail_msg_destroy.
2001-07-20 Peter Williams <peterw@ximian.com>
* mail-mt.c (mail_msgport_replied): Fix DanW's fix. Pass the right
arguments to mail_msg_destroy.
* component-factory.c (component_fn): Don't populate the context
menu; our only action didn't even work.
(populate_folder_context_menu): Removed. ChangeFolderProperties
needs a FolderBrowser which we don't have. It didn't even work
before.
* mail-local.c (mail_local_reconfigure_folder): Bring the creation
of the hash table to the beginning to prevent warnings. Complain
if the mailbox is non-local.
svn path=/trunk/; revision=11266
Diffstat (limited to 'mail/mail-local.c')
-rw-r--r-- | mail/mail-local.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/mail/mail-local.c b/mail/mail-local.c index 7399a9e073..b8bc94947b 100644 --- a/mail/mail-local.c +++ b/mail/mail-local.c @@ -49,6 +49,7 @@ #include "evolution-shell-component.h" #include "evolution-storage-listener.h" +#include "gal/widgets/e-gui-utils.h" #include "e-util/e-path.h" #include "camel/camel.h" @@ -971,11 +972,29 @@ mail_local_reconfigure_folder (FolderBrowser *fb) return; } + if (!reconfigure_folder_hash) + reconfigure_folder_hash = g_hash_table_new (g_direct_hash, g_direct_equal); + if ((gd = g_hash_table_lookup (reconfigure_folder_hash, fb->folder))) { /* FIXME: raise this dialog?? */ return; } - + + /* check if we can work on this folder */ + name = strchr (fb->uri, '/'); + if (name) { + while (*name == '/') + name++; + /* we just want to see if it's NULL or not */ + name = (char *) g_hash_table_lookup (local_store->folders, name); + } + + if (name == NULL) { + e_notice (NULL, GNOME_MESSAGE_BOX_WARNING, + _("You cannot change the format of a non-local folder.")); + return; + } + m = mail_msg_new (&reconfigure_folder_op, NULL, sizeof (*m)); store = camel_folder_get_parent_store (fb->folder); @@ -1002,9 +1021,6 @@ mail_local_reconfigure_folder (FolderBrowser *fb) gtk_signal_connect (GTK_OBJECT (gd), "clicked", reconfigure_clicked, m); gtk_object_unref (GTK_OBJECT (gui)); - if (!reconfigure_folder_hash) - reconfigure_folder_hash = g_hash_table_new (g_direct_hash, g_direct_equal); - g_hash_table_insert (reconfigure_folder_hash, (gpointer) fb->folder, (gpointer) gd); gnome_dialog_run_and_close (GNOME_DIALOG (gd)); |