diff options
author | Milan Crha <mcrha@redhat.com> | 2009-09-30 02:10:35 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-09-30 02:10:35 +0800 |
commit | 0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee (patch) | |
tree | 7037654f86303ba2a05498ffa7c8a741d8e94bf4 /shell | |
parent | a0d0dd604b52dfa4d2a2f5378ee384292dfde5cd (diff) | |
download | gsoc2013-evolution-0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee.tar gsoc2013-evolution-0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee.tar.gz gsoc2013-evolution-0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee.tar.bz2 gsoc2013-evolution-0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee.tar.lz gsoc2013-evolution-0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee.tar.xz gsoc2013-evolution-0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee.tar.zst gsoc2013-evolution-0ed3ee1fa3b1f9f0735358fe66ba35f44e7c70ee.zip |
Bug #596753 - Autocompletion addressbooks not remembered
And select page in Edit->Preferences based on the active view.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell-backend.h | 1 | ||||
-rw-r--r-- | shell/e-shell-window-actions.c | 9 | ||||
-rw-r--r-- | shell/test/e-test-shell-backend.c | 1 |
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; } |