[evolution] Bug 741857 - Doesn't close after mailto: message sent
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 741857 - Doesn't close after mailto: message sent
- Date: Thu, 12 Feb 2015 14:35:43 +0000 (UTC)
commit e7b4a14f7e4b559defc97e5ac03d3871cb7d6aad
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 12 15:36:50 2015 +0100
Bug 741857 - Doesn't close after mailto: message sent
shell/e-shell.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 40e9832..94611d9 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -146,6 +146,15 @@ shell_notify_online_cb (EShell *shell)
e_passwords_set_online (online);
}
+static void
+shell_window_removed_cb (EShell *shell)
+{
+ g_return_if_fail (E_IS_SHELL (shell));
+
+ if (!gtk_application_get_windows (GTK_APPLICATION (shell)))
+ e_shell_quit (shell, E_SHELL_QUIT_LAST_WINDOW);
+}
+
static gboolean
shell_window_delete_event_cb (GtkWindow *window,
GdkEvent *event,
@@ -1261,6 +1270,10 @@ shell_constructed (GObject *object)
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_shell_parent_class)->constructed (object);
+
+ g_signal_connect (
+ object, "window-removed",
+ G_CALLBACK (shell_window_removed_cb), NULL);
}
static void
@@ -2428,6 +2441,11 @@ e_shell_quit (EShell *shell,
if (g_application_get_is_remote (G_APPLICATION (shell)))
goto remote;
+ /* Last Window reason can be used multiple times;
+ this is to not ask for a forced quit. */
+ if (reason == E_SHELL_QUIT_LAST_WINDOW && shell->priv->preparing_for_quit != NULL)
+ return TRUE;
+
if (!shell_request_quit (shell, reason))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]