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 | |
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')
-rw-r--r-- | mail/ChangeLog | 15 | ||||
-rw-r--r-- | mail/component-factory.c | 4 | ||||
-rw-r--r-- | mail/mail-local.c | 24 | ||||
-rw-r--r-- | mail/mail-mt.c | 4 |
4 files changed, 41 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 694fe38f0d..6178c131f2 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,18 @@ +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. + 2001-07-20 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (filter_folder_filter): Don't expunge the source diff --git a/mail/component-factory.c b/mail/component-factory.c index 5074cbfabf..039cacd7df 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -300,6 +300,7 @@ xfer_folder (EvolutionShellComponent *shell_component, CORBA_exception_free (&ev); } +#if 0 static void populate_folder_context_menu (EvolutionShellComponent *shell_component, BonoboUIComponent *uic, @@ -317,6 +318,7 @@ populate_folder_context_menu (EvolutionShellComponent *shell_component, bonobo_ui_component_set_translate (uic, EVOLUTION_SHELL_COMPONENT_POPUP_PLACEHOLDER, popup_xml, NULL); } +#endif static char * get_dnd_selection (EvolutionShellComponent *shell_component, @@ -671,7 +673,7 @@ component_fn (BonoboGenericFactory *factory, void *closure) create_folder, remove_folder, xfer_folder, - populate_folder_context_menu, + /*populate_folder_context_menu*/NULL, get_dnd_selection, NULL); 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)); diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 18a5c34723..da004630f7 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -60,6 +60,8 @@ static pthread_cond_t mail_msg_cond = PTHREAD_COND_INITIALIZER; pthread_t mail_gui_thread; +static void mail_msg_destroy(EThread *e, EMsg *msg, void *data); + void *mail_msg_new(mail_msg_op_t *ops, EMsgPort *reply_port, size_t size) { struct _mail_msg *msg; @@ -257,7 +259,7 @@ mail_msgport_replied(GIOChannel *source, GIOCondition cond, void *d) if (m->ops->reply_msg) m->ops->reply_msg(m); mail_msg_check_error(m); - mail_msg_destroy(m); + mail_msg_destroy(NULL, m, NULL); } return TRUE; |