aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window-private.c
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-03-03 18:36:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-03-14 09:53:16 +0800
commit19eea41c74154855cb68ee3a1fb41e2ec136b764 (patch)
tree4c638c63b1bdca7a2352795c1da0e30fc5b14e7e /shell/e-shell-window-private.c
parent3d95369f38b22dea1fc22bb3f2cf306ae82aed9d (diff)
downloadgsoc2013-evolution-19eea41c74154855cb68ee3a1fb41e2ec136b764.tar.gz
gsoc2013-evolution-19eea41c74154855cb68ee3a1fb41e2ec136b764.tar.zst
gsoc2013-evolution-19eea41c74154855cb68ee3a1fb41e2ec136b764.zip
clean up the 'express' mode hooks for UI Managers and start to
extend them to plugins - use a simple one-off boolean on the UI Manager instead of exhaustively trying to propagate this information everywhere.
Diffstat (limited to 'shell/e-shell-window-private.c')
-rw-r--r--shell/e-shell-window-private.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index d380d25021..32d870563a 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -220,8 +220,6 @@ e_shell_window_private_init (EShellWindow *shell_window)
EShellWindowPrivate *priv = shell_window->priv;
GHashTable *loaded_views;
GArray *signal_handler_ids;
- GtkAccelGroup *accel_group;
- guint merge_id;
loaded_views = g_hash_table_new_full (
g_str_hash, g_str_equal,
@@ -249,19 +247,8 @@ e_shell_window_private_init (EShellWindow *shell_window)
e_shell_window_add_action_group (shell_window, "lockdown-print-setup");
e_shell_window_add_action_group (shell_window, "lockdown-save-to-disk");
- merge_id = gtk_ui_manager_new_merge_id (priv->ui_manager);
- priv->custom_rule_merge_id = merge_id;
-
- merge_id = gtk_ui_manager_new_merge_id (priv->ui_manager);
- priv->gal_view_merge_id = merge_id;
-
gtk_window_set_title (GTK_WINDOW (shell_window), _("Evolution"));
- e_shell_window_actions_init (shell_window);
-
- accel_group = gtk_ui_manager_get_accel_group (priv->ui_manager);
- gtk_window_add_accel_group (GTK_WINDOW (shell_window), accel_group);
-
g_signal_connect_swapped (
priv->ui_manager, "connect-proxy",
G_CALLBACK (shell_window_connect_proxy_cb), shell_window);
@@ -275,6 +262,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
EShell *shell;
GConfBridge *bridge;
GtkAction *action;
+ GtkAccelGroup *accel_group;
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
GtkBox *box;
@@ -282,6 +270,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
GtkWidget *widget;
GtkWindow *window;
GObject *object;
+ guint merge_id;
const gchar *key;
const gchar *id;
@@ -292,6 +281,23 @@ e_shell_window_private_constructed (EShellWindow *shell_window)
e_shell_watch_window (shell, window);
+ e_load_ui_manager_set_express (priv->ui_manager,
+ e_shell_get_express_mode (shell));
+
+ /* Defer actions and menu merging until we have set express mode */
+
+ e_shell_window_actions_init (shell_window);
+
+ accel_group = gtk_ui_manager_get_accel_group (priv->ui_manager);
+ gtk_window_add_accel_group (GTK_WINDOW (shell_window), accel_group);
+
+ merge_id = gtk_ui_manager_new_merge_id (priv->ui_manager);
+ priv->custom_rule_merge_id = merge_id;
+
+ merge_id = gtk_ui_manager_new_merge_id (priv->ui_manager);
+ priv->gal_view_merge_id = merge_id;
+
+
/* Construct window widgets. */
widget = gtk_vbox_new (FALSE, 0);