diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/Makefile.am | 4 | ||||
-rw-r--r-- | mail/e-mail-shell-module.c | 35 | ||||
-rw-r--r-- | mail/mail-folder-cache.c | 2 |
3 files changed, 29 insertions, 12 deletions
diff --git a/mail/Makefile.am b/mail/Makefile.am index 2f44ada1ff..09f26f5d56 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -161,8 +161,10 @@ libevolution_module_mail_la_LIBADD = \ $(top_builddir)/widgets/table/libetable.la \ $(top_builddir)/widgets/text/libetext.la \ $(top_builddir)/widgets/misc/libemiscwidgets.la \ + $(top_builddir)/mail/importers/libevolution-mail-importers.la \ $(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la \ - $(top_builddir)/mail/importers/libevolution-mail-importers.la + $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la \ + $(SMIME_LIBS) # plugin mail api #mailinclude_HEADERS = \ diff --git a/mail/e-mail-shell-module.c b/mail/e-mail-shell-module.c index b7aa7a68c1..493cbfff63 100644 --- a/mail/e-mail-shell-module.c +++ b/mail/e-mail-shell-module.c @@ -459,21 +459,30 @@ mail_shell_module_init_preferences (void) } static gboolean -mail_shell_module_handle_uri (EShellModule *shell_module, - const gchar *uri) +mail_shell_module_handle_uri_cb (EShell *shell, + const gchar *uri, + EShellModule *shell_module) { /* FIXME */ return FALSE; } static void -mail_shell_module_window_created (EShellModule *shell_module, - EShellWindow *shell_window) +mail_shell_module_window_weak_notify_cb (EShell *shell, + GObject *where_the_object_was) +{ + g_signal_handlers_disconnect_by_func ( + shell, mail_shell_module_new_mail_cb, + where_the_object_was); +} + +static void +mail_shell_module_window_created_cb (EShell *shell, + EShellWindow *shell_window, + EShellModule *shell_module) { - EShell *shell; const gchar *module_name; - shell = e_shell_module_get_shell (shell_module); module_name = G_TYPE_MODULE (shell_module)->name; e_shell_window_register_new_item_actions ( @@ -487,6 +496,10 @@ mail_shell_module_window_created (EShellModule *shell_module, g_signal_connect_swapped ( shell, "event::new-mail", G_CALLBACK (mail_shell_module_new_mail_cb), shell_window); + + g_object_weak_ref ( + G_OBJECT (shell_window), (GWeakNotify) + mail_shell_module_window_weak_notify_cb, shell); } static EShellModuleInfo module_info = { @@ -532,13 +545,15 @@ e_shell_module_init (GTypeModule *type_module) folder_tree_model = em_folder_tree_model_new (shell_module); - g_signal_connect_swapped ( + g_signal_connect ( shell, "handle-uri", - G_CALLBACK (mail_shell_module_handle_uri), shell_module); + G_CALLBACK (mail_shell_module_handle_uri_cb), + shell_module); - g_signal_connect_swapped ( + g_signal_connect ( shell, "window-created", - G_CALLBACK (mail_shell_module_window_created), shell_module); + G_CALLBACK (mail_shell_module_window_created_cb), + shell_module); mail_config_init (); mail_msg_init (); diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 8f85f3f521..49479faa7a 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -198,7 +198,7 @@ real_flush_updates (EShellModule *shell_module) t->name = em_folder_tree_model_get_folder_name (model, up->store, up->full_name); if (t->new > 0) - e_shell_event (shell, "new-mail"); + e_shell_event (shell, "new-mail", NULL); /** @Event: folder.changed * @Title: Folder changed |