diff options
-rw-r--r-- | modules/calendar/e-memo-shell-backend.c | 18 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-backend.c | 18 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 2 | ||||
-rw-r--r-- | shell/e-shell.c | 4 | ||||
-rw-r--r-- | shell/main.c | 7 |
5 files changed, 28 insertions, 21 deletions
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index 9642528b78..6c6a36491c 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -62,7 +62,7 @@ static gpointer parent_class; static GType memo_shell_backend_type; static void -memo_module_ensure_sources (EShellBackend *shell_backend) +memo_shell_backend_ensure_sources (EShellBackend *shell_backend) { /* XXX This is basically the same algorithm across all modules. * Maybe we could somehow integrate this into EShellBackend? */ @@ -361,8 +361,8 @@ static GtkActionEntry source_entries[] = { }; static gboolean -memo_module_handle_uri_cb (EShellBackend *shell_backend, - const gchar *uri) +memo_shell_backend_handle_uri_cb (EShellBackend *shell_backend, + const gchar *uri) { EShell *shell; CompEditor *editor; @@ -500,8 +500,8 @@ exit: } static void -memo_module_window_created_cb (EShellBackend *shell_backend, - GtkWindow *window) +memo_shell_backend_window_created_cb (EShellBackend *shell_backend, + GtkWindow *window) { const gchar *module_name; @@ -562,15 +562,17 @@ memo_shell_backend_constructed (GObject *object) shell_backend = E_SHELL_BACKEND (object); shell = e_shell_backend_get_shell (shell_backend); - memo_module_ensure_sources (shell_backend); + memo_shell_backend_ensure_sources (shell_backend); g_signal_connect_swapped ( shell, "handle-uri", - G_CALLBACK (memo_module_handle_uri_cb), shell_backend); + G_CALLBACK (memo_shell_backend_handle_uri_cb), + shell_backend); g_signal_connect_swapped ( shell, "window-created", - G_CALLBACK (memo_module_window_created_cb), shell_backend); + G_CALLBACK (memo_shell_backend_window_created_cb), + shell_backend); } static void diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c index 500dd30423..59a87e653c 100644 --- a/modules/calendar/e-task-shell-backend.c +++ b/modules/calendar/e-task-shell-backend.c @@ -64,7 +64,7 @@ static gpointer parent_class; static GType task_shell_backend_type; static void -task_module_ensure_sources (EShellBackend *shell_backend) +task_shell_backend_ensure_sources (EShellBackend *shell_backend) { /* XXX This is basically the same algorithm across all modules. * Maybe we could somehow integrate this into EShellBackend? */ @@ -363,8 +363,8 @@ static GtkActionEntry source_entries[] = { }; static gboolean -task_module_handle_uri_cb (EShellBackend *shell_backend, - const gchar *uri) +task_shell_backend_handle_uri_cb (EShellBackend *shell_backend, + const gchar *uri) { EShell *shell; CompEditor *editor; @@ -508,8 +508,8 @@ exit: } static void -task_module_window_created_cb (EShellBackend *shell_backend, - GtkWindow *window) +task_shell_backend_window_created_cb (EShellBackend *shell_backend, + GtkWindow *window) { const gchar *module_name; @@ -570,15 +570,17 @@ task_shell_backend_constructed (GObject *object) shell_backend = E_SHELL_BACKEND (object); shell = e_shell_backend_get_shell (shell_backend); - task_module_ensure_sources (shell_backend); + task_shell_backend_ensure_sources (shell_backend); g_signal_connect_swapped ( shell, "handle-uri", - G_CALLBACK (task_module_handle_uri_cb), shell_backend); + G_CALLBACK (task_shell_backend_handle_uri_cb), + shell_backend); g_signal_connect_swapped ( shell, "window-created", - G_CALLBACK (task_module_window_created_cb), shell_backend); + G_CALLBACK (task_shell_backend_window_created_cb), + shell_backend); } static void diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 80922ce304..2d6e1a9779 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -395,7 +395,7 @@ mail_shell_backend_handle_uri_cb (EShell *shell, } else handled = FALSE; - return TRUE; + return handled; } /* Helper for mail_shell_backend_prepare_for_[off|on]line_cb() */ diff --git a/shell/e-shell.c b/shell/e-shell.c index 8e05980623..4dd72e3747 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1294,7 +1294,9 @@ unique: /* Send a message to the other Evolution process. */ unique_app_send_message (app, UNIQUE_OPEN, data); unique_message_data_free (data); - return 0; + /* As far as we're concerned, all URIs have been handled. */ + + return g_strv_length (uris); } /** diff --git a/shell/main.c b/shell/main.c index 43edb73606..5adae2ecb1 100644 --- a/shell/main.c +++ b/shell/main.c @@ -247,9 +247,10 @@ idle_cb (gchar **uris) /* These calls do the right thing when another Evolution * process is running. */ - if (uris != NULL && *uris != NULL) - e_shell_handle_uris (shell, uris); - else + if (uris != NULL && *uris != NULL) { + if (e_shell_handle_uris (shell, uris) == 0) + gtk_main_quit (); + } else e_shell_create_shell_window (shell, requested_view); /* If another Evolution process is running, we're done. */ |