From 8d8e4ac1c23905892a42b779188c852fdead7f5f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 7 Jan 2009 18:23:46 +0000 Subject: Tweak the EShell API. Disable File -> Close Window when there's only one window. Replace EMMessageBrowser with EMailBrowser. svn path=/branches/kill-bonobo/; revision=37009 --- mail/e-mail-shell-module.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (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 aef48d2636..1185e13575 100644 --- a/mail/e-mail-shell-module.c +++ b/mail/e-mail-shell-module.c @@ -687,10 +687,13 @@ mail_shell_module_prepare_for_offline_cb (EShell *shell, EActivity *activity, EShellModule *shell_module) { - GtkWidget *parent; + GList *shell_windows; + GtkWidget *parent = NULL; gboolean synchronize = FALSE; - parent = e_shell_get_focused_window (shell); + shell_windows = e_shell_get_shell_windows (shell); + if (shell_windows != NULL) + parent = GTK_WIDGET (shell_windows->data); if (e_shell_get_network_available (shell)) synchronize = em_utils_prompt_user ( @@ -871,7 +874,7 @@ e_shell_module_init (GTypeModule *type_module) mail_shell_module_init_preferences (shell); g_object_get ( - e_shell_get_settings (shell), + e_shell_get_shell_settings (shell), "mail-enable-search-folders", &enable_search_folders, NULL); if (enable_search_folders) -- cgit v1.2.3