aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-10-07 23:13:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-10-07 23:14:55 +0800
commit993cfc00e95f057e02e0e31914193b20a1f51d34 (patch)
tree8a5772199c4bd830b78503636bacb7a2e19acca7 /shell/e-shell-window-actions.c
parent54de40109d1b90653d611dea99bae7a9d689be63 (diff)
downloadgsoc2013-evolution-993cfc00e95f057e02e0e31914193b20a1f51d34.tar.gz
gsoc2013-evolution-993cfc00e95f057e02e0e31914193b20a1f51d34.tar.zst
gsoc2013-evolution-993cfc00e95f057e02e0e31914193b20a1f51d34.zip
Shell cleanup.
Diffstat (limited to 'shell/e-shell-window-actions.c')
-rw-r--r--shell/e-shell-window-actions.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 9616e97740..3eb25e23b5 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -908,10 +908,10 @@ action_preferences_cb (GtkAction *action,
GtkWidget *preferences_window;
EShellView *shell_view;
EShellBackend *shell_backend;
+ EShellBackendClass *shell_backend_class;
+ const gchar *view_name;
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 (
@@ -922,9 +922,16 @@ action_preferences_cb (GtkAction *action,
GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_present (GTK_WINDOW (preferences_window));
- 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);
- }
+ view_name = e_shell_window_get_active_view (shell_window);
+ shell_view = e_shell_window_get_shell_view (shell_window, view_name);
+
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
+ shell_backend_class = E_SHELL_BACKEND_GET_CLASS (shell_backend);
+
+ if (shell_backend_class->preferences_page != NULL)
+ e_preferences_window_show_page (
+ E_PREFERENCES_WINDOW (preferences_window),
+ shell_backend_class->preferences_page);
}
/**