aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-backend.h1
-rw-r--r--shell/e-shell-window-actions.c9
-rw-r--r--shell/test/e-test-shell-backend.c1
3 files changed, 10 insertions, 1 deletions
diff --git a/shell/e-shell-backend.h b/shell/e-shell-backend.h
index ad1b1294fb..8a6fd7a47e 100644
--- a/shell/e-shell-backend.h
+++ b/shell/e-shell-backend.h
@@ -108,6 +108,7 @@ struct _EShellBackendClass {
const gchar *aliases;
const gchar *schemes;
gint sort_order;
+ const gchar *preferences_page;
/* Methods */
void (*start) (EShellBackend *shell_backend);
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index e01aeb1b7b..9616e97740 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -20,6 +20,7 @@
*/
#include "e-shell-window-private.h"
+#include "e-preferences-window.h"
#include <e-util/e-dialog-utils.h>
#include <e-util/e-error.h>
@@ -905,8 +906,12 @@ action_preferences_cb (GtkAction *action,
{
EShell *shell;
GtkWidget *preferences_window;
+ EShellView *shell_view;
+ EShellBackend *shell_backend;
shell = e_shell_window_get_shell (shell_window);
+ shell_view = e_shell_window_get_shell_view (shell_window, e_shell_window_get_active_view (shell_window));
+ shell_backend = shell_view ? e_shell_view_get_shell_backend (shell_view) : NULL;
preferences_window = e_shell_get_preferences_window (shell);
gtk_window_set_transient_for (
@@ -917,7 +922,9 @@ action_preferences_cb (GtkAction *action,
GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_present (GTK_WINDOW (preferences_window));
- /* FIXME Switch to a page appropriate for the current view. */
+ if (shell_backend && E_SHELL_BACKEND_GET_CLASS (shell_backend)->preferences_page) {
+ e_preferences_window_show_page (E_PREFERENCES_WINDOW (preferences_window), E_SHELL_BACKEND_GET_CLASS (shell_backend)->preferences_page);
+ }
}
/**
diff --git a/shell/test/e-test-shell-backend.c b/shell/test/e-test-shell-backend.c
index 6a6c03bddd..58fe1aa17f 100644
--- a/shell/test/e-test-shell-backend.c
+++ b/shell/test/e-test-shell-backend.c
@@ -183,6 +183,7 @@ test_shell_backend_class_init (ETestShellBackendClass *class)
shell_backend_class->aliases = "monkey";
shell_backend_class->schemes = "";
shell_backend_class->sort_order = 100;
+ shell_backend_class->preferences_page = NULL;
shell_backend_class->start = test_shell_backend_start;
shell_backend_class->migrate = test_shell_backend_migrate;
}