[Xfce4-commits] <ristretto:master> Set no_show_all on show-nav-toolbar menuitem
Stephan Arts
noreply at xfce.org
Mon Oct 17 17:04:03 CEST 2011
Updating branch refs/heads/master
to ec91654968091e7ce188d66acd4fd86a7b24a26a (commit)
from c368a511c2025671e7b68485eb5192aef023677f (commit)
commit ec91654968091e7ce188d66acd4fd86a7b24a26a
Author: Stephan Arts <stephan at xfce.org>
Date: Mon Oct 17 17:04:19 2011 +0200
Set no_show_all on show-nav-toolbar menuitem
src/main_window.c | 57 +++++++++++++++++++++++++++++++---------------------
1 files changed, 34 insertions(+), 23 deletions(-)
diff --git a/src/main_window.c b/src/main_window.c
index b86b62e..f9e90f4 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -603,6 +603,7 @@ rstto_main_window_init (RsttoMainWindow *window)
gtk_widget_set_no_show_all (window->priv->toolbar, TRUE);
gtk_widget_set_no_show_all (window->priv->image_list_toolbar, TRUE);
gtk_widget_set_no_show_all (window->priv->thumbnailbar, TRUE);
+ gtk_widget_set_no_show_all ( gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-menu/view-menu/show-nav-toolbar"), TRUE);
rstto_main_window_set_navigationbar_position (window, navigationbar_position);
@@ -630,29 +631,6 @@ rstto_main_window_init (RsttoMainWindow *window)
"play",
GTK_UI_MANAGER_TOOLITEM,
FALSE);
- if ( TRUE == rstto_settings_get_boolean_property (window->priv->settings_manager, "merge-toolbars"))
- {
- gtk_ui_manager_add_ui (
- window->priv->ui_manager,
- window->priv->toolbar_fullscreen_merge_id,
- "/file-toolbar/placeholder-fullscreen",
- "fullscreen",
- "fullscreen",
- GTK_UI_MANAGER_TOOLITEM,
- FALSE);
- }
- else
- {
- gtk_ui_manager_add_ui (
- window->priv->ui_manager,
- window->priv->toolbar_fullscreen_merge_id,
- "/navigation-toolbar/placeholder-fullscreen",
- "fullscreen",
- "fullscreen",
- GTK_UI_MANAGER_TOOLITEM,
- FALSE);
- }
-
/**
* Retrieve the last window-size from the settings-manager
* and make it the default for this window
@@ -732,6 +710,38 @@ rstto_main_window_init (RsttoMainWindow *window)
g_signal_connect(G_OBJECT(window->priv->vpaned_top), "accept-position", G_CALLBACK(cb_rstto_main_window_vpaned_pos_changed), window);
g_signal_connect(G_OBJECT(window->priv->vpaned_bottom), "accept-position", G_CALLBACK(cb_rstto_main_window_vpaned_pos_changed), window);
+ if ( TRUE == rstto_settings_get_boolean_property (window->priv->settings_manager, "merge-toolbars"))
+ {
+ gtk_ui_manager_add_ui (
+ window->priv->ui_manager,
+ window->priv->toolbar_fullscreen_merge_id,
+ "/file-toolbar/placeholder-fullscreen",
+ "fullscreen",
+ "fullscreen",
+ GTK_UI_MANAGER_TOOLITEM,
+ FALSE);
+ gtk_widget_hide (
+ gtk_ui_manager_get_widget (
+ window->priv->ui_manager,
+ "/main-menu/view-menu/show-nav-toolbar"));
+ }
+ else
+ {
+ gtk_ui_manager_add_ui (
+ window->priv->ui_manager,
+ window->priv->toolbar_fullscreen_merge_id,
+ "/navigation-toolbar/placeholder-fullscreen",
+ "fullscreen",
+ "fullscreen",
+ GTK_UI_MANAGER_TOOLITEM,
+ FALSE);
+ gtk_widget_show (
+ gtk_ui_manager_get_widget (
+ window->priv->ui_manager,
+ "/main-menu/view-menu/show-nav-toolbar"));
+ }
+
+
g_signal_connect (
G_OBJECT(window->priv->settings_manager),
"notify::merge-toolbars",
@@ -1376,6 +1386,7 @@ rstto_main_window_update_buttons (RsttoMainWindow *window)
gtk_ui_manager_get_widget (
window->priv->ui_manager,
"/main-menu/view-menu/show-nav-toolbar"));
+
if ( GTK_WIDGET_VISIBLE (window) )
{
/* Do not make the widget visible when in
More information about the Xfce4-commits
mailing list