From 5a1c48696363e3f3c7ffe11bdffdcad6557f811a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 20 Jan 2009 04:33:23 +0000 Subject: Untangle some circular dependencies with the composer. Addressbook and calendar no longer depend on the mailer. svn path=/branches/kill-bonobo/; revision=37107 --- mail/e-mail-shell-module.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mail/e-mail-shell-module.c') diff --git a/mail/e-mail-shell-module.c b/mail/e-mail-shell-module.c index 96d7a5ebbd..214c09bc28 100644 --- a/mail/e-mail-shell-module.c +++ b/mail/e-mail-shell-module.c @@ -553,6 +553,18 @@ exit: return !camel_application_is_exiting; } +static void +mail_shell_module_event_new_editor_cb (EShell *shell, + GtkWindow *editor, + EShellModule *shell_module) +{ + if (!E_IS_MSG_COMPOSER (editor)) + return; + + /* Integrate the new composer into the mail module. */ + em_configure_new_composer (E_MSG_COMPOSER (editor)); +} + static void mail_shell_module_notify_online_mode_cb (EShell *shell, GParamSpec *pspec, @@ -830,6 +842,11 @@ e_shell_module_init (GTypeModule *type_module) folder_tree_model = em_folder_tree_model_new (shell_module); + g_signal_connect ( + shell, "event::new-editor", + G_CALLBACK (mail_shell_module_event_new_editor_cb), + shell_module); + g_signal_connect ( shell, "notify::online-mode", G_CALLBACK (mail_shell_module_notify_online_mode_cb), -- cgit v1.2.3