aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-window-actions.c')
-rw-r--r--shell/e-shell-window-actions.c9
1 files changed, 8 insertions, 1 deletions
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);
+ }
}
/**