aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view-menu.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-05-31 14:22:23 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-05-31 14:22:23 +0800
commitc6d835a949f3d5a917c1b2f3c39d0226514adde9 (patch)
treeb9d27c3d207118c58f7d500d84a522f222bb6320 /shell/e-shell-view-menu.c
parent64e74a631c44364553aac9d4aff2e5cb83f3e81b (diff)
downloadgsoc2013-evolution-c6d835a949f3d5a917c1b2f3c39d0226514adde9.tar
gsoc2013-evolution-c6d835a949f3d5a917c1b2f3c39d0226514adde9.tar.gz
gsoc2013-evolution-c6d835a949f3d5a917c1b2f3c39d0226514adde9.tar.bz2
gsoc2013-evolution-c6d835a949f3d5a917c1b2f3c39d0226514adde9.tar.lz
gsoc2013-evolution-c6d835a949f3d5a917c1b2f3c39d0226514adde9.tar.xz
gsoc2013-evolution-c6d835a949f3d5a917c1b2f3c39d0226514adde9.tar.zst
gsoc2013-evolution-c6d835a949f3d5a917c1b2f3c39d0226514adde9.zip
Initialize the toggle items in the View menu when creating them, so
that they start up in the correct state. Deactivate the current control when displaying an empty error page. Removed some crufty debugging messages. svn path=/trunk/; revision=3310
Diffstat (limited to 'shell/e-shell-view-menu.c')
-rw-r--r--shell/e-shell-view-menu.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index 4526f5e6f3..8b4bf6c9af 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -175,8 +175,6 @@ command_toggle_folder_bar (BonoboUIHandler *uih,
EShellViewSubwindowMode mode;
gboolean show;
- puts (path);
-
shell_view = E_SHELL_VIEW (data);
show = bonobo_ui_handler_menu_get_toggle_state (uih, path);
@@ -200,7 +198,6 @@ command_toggle_shortcut_bar (BonoboUIHandler *uih,
shell_view = E_SHELL_VIEW (data);
show = bonobo_ui_handler_menu_get_toggle_state (uih, path);
- g_print ("%s -- %d\n", path, show);
if (show)
mode = E_SHELL_VIEW_SUBWINDOW_STICKY;
@@ -369,6 +366,10 @@ static GnomeUIInfo menu [] = {
};
+/* FIXME these must match the corresponding setup in the GnomeUIInfo and this sucks sucks. */
+#define SHORTCUT_BAR_TOGGLE_PATH "/View/Show shortcut bar"
+#define FOLDER_BAR_TOGGLE_PATH "/View/Show folder bar"
+
void
e_shell_view_menu_setup (EShellView *shell_view)
{
@@ -386,8 +387,15 @@ e_shell_view_menu_setup (EShellView *shell_view)
gtk_signal_connect (GTK_OBJECT (shell_view), "shortcut_bar_mode_changed",
GTK_SIGNAL_FUNC (shortcut_bar_mode_changed_cb),
- "");
- gtk_signal_connect (GTK_OBJECT (shell_view), "shortcut_bar_mode_changed",
+ SHORTCUT_BAR_TOGGLE_PATH);
+ gtk_signal_connect (GTK_OBJECT (shell_view), "folder_bar_mode_changed",
GTK_SIGNAL_FUNC (folder_bar_mode_changed_cb),
- "");
+ FOLDER_BAR_TOGGLE_PATH);
+
+ /* Initialize the toggles. Yeah, this is, well, yuck. */
+
+ folder_bar_mode_changed_cb (shell_view, e_shell_view_get_folder_bar_mode (shell_view),
+ FOLDER_BAR_TOGGLE_PATH);
+ shortcut_bar_mode_changed_cb (shell_view, e_shell_view_get_shortcut_bar_mode (shell_view),
+ SHORTCUT_BAR_TOGGLE_PATH);
}