aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-21 02:36:34 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-21 02:36:34 +0800
commit62f9c59af9400350069ddfcd2327760e81e5ab70 (patch)
tree068169e3ac7484d8c60b99e85ae4c8004b1409aa /shell
parenta456e6897ff482271440fd01f14c0819d7d9b871 (diff)
downloadgsoc2013-evolution-62f9c59af9400350069ddfcd2327760e81e5ab70.tar
gsoc2013-evolution-62f9c59af9400350069ddfcd2327760e81e5ab70.tar.gz
gsoc2013-evolution-62f9c59af9400350069ddfcd2327760e81e5ab70.tar.bz2
gsoc2013-evolution-62f9c59af9400350069ddfcd2327760e81e5ab70.tar.lz
gsoc2013-evolution-62f9c59af9400350069ddfcd2327760e81e5ab70.tar.xz
gsoc2013-evolution-62f9c59af9400350069ddfcd2327760e81e5ab70.tar.zst
gsoc2013-evolution-62f9c59af9400350069ddfcd2327760e81e5ab70.zip
Bug 621210 - Can't get the shell back after closing it
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index ec61d50ede..5c00277253 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -666,6 +666,35 @@ shell_constructed (GObject *object)
}
static UniqueResponse
+shell_message_handle_activate (EShell *shell,
+ UniqueMessageData *data)
+{
+ GList *watched_windows;
+ GdkScreen *screen;
+
+ screen = unique_message_data_get_screen (data);
+ watched_windows = e_shell_get_watched_windows (shell);
+
+ /* Present the first EShellWindow, if found. */
+ while (watched_windows != NULL) {
+ GtkWindow *window = GTK_WINDOW (watched_windows->data);
+
+ if (E_IS_SHELL_WINDOW (window)) {
+ gtk_window_set_screen (window, screen);
+ gtk_window_present (window);
+ return UNIQUE_RESPONSE_OK;
+ }
+
+ watched_windows = g_list_next (watched_windows);
+ }
+
+ /* No EShellWindow found, so create one. */
+ e_shell_create_shell_window (shell, NULL);
+
+ return UNIQUE_RESPONSE_OK;
+}
+
+static UniqueResponse
shell_message_handle_new (EShell *shell,
UniqueMessageData *data)
{
@@ -731,7 +760,7 @@ shell_message_received (UniqueApp *app,
switch (command) {
case UNIQUE_ACTIVATE:
- break; /* use the default behavior */
+ return shell_message_handle_activate (shell, data);
case UNIQUE_NEW:
return shell_message_handle_new (shell, data);