+static void
+ev_window_sidebar_visibility_changed_cb (EvSidebar *ev_sidebar, GParamSpec *pspec,
+ EvWindow *ev_window)
+{
+ GtkAction *action;
+ gboolean visible;
+
+ visible = GTK_WIDGET_VISIBLE (ev_sidebar);
+
+ /* In fullscreen mode the sidebar is not visible,
+ * but we don't want to update the chrome
+ */
+ if (ev_window->priv->fullscreen_mode)
+ return;
+
+ action = gtk_action_group_get_action (ev_window->priv->action_group, "ViewSidebar");
+
+ g_signal_handlers_block_by_func
+ (action, G_CALLBACK (ev_window_view_sidebar_cb), ev_window);
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible);
+ g_signal_handlers_unblock_by_func
+ (action, G_CALLBACK (ev_window_view_sidebar_cb), ev_window);
+
+ update_chrome_flag (ev_window, EV_CHROME_SIDEBAR,
+ GCONF_CHROME_SIDEBAR, visible);
+}
+