[Xfce4-commits] <ristretto:ristretto-0.0> Set important hint on leave-fullscreen toolbar item

Stephan Arts noreply at xfce.org
Sun Oct 23 19:14:55 CEST 2011


Updating branch refs/heads/ristretto-0.0
         to 1e586ea0c33bed9d55245b85a508bc277da099ee (commit)
       from c75595516827f2c6fc5552e81335088a3af7da48 (commit)

commit 1e586ea0c33bed9d55245b85a508bc277da099ee
Author: Stephan Arts <stephan at xfce.org>
Date:   Thu Apr 30 09:35:17 2009 +0200

    Set important hint on leave-fullscreen toolbar item

 ChangeLog              |    3 +++
 src/main_window.c      |   11 +++++++++--
 src/main_window_ui.xml |    2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1f87082..f235304 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
 	* src/main_window.c
 	  src/main_window_ui.xml: Add 'fullscreen-toolbar' with controls when in
 	  fullscreen-mode.
+	* src/main_window.c
+	  src/main_window_ui.xml: Set is_important hint on 'leave-fullscreen'
+	  toolitem.
 
 2009-04-28  Stephan Arts <stephan at xfce.org>
 
diff --git a/src/main_window.c b/src/main_window.c
index a719125..1c8a409 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -239,7 +239,9 @@ static GtkActionEntry action_entries[] =
                 N_ ("_About"),
                 NULL,
                 N_ ("Display information about ristretto"),
-                G_CALLBACK (cb_rstto_main_window_about), }
+                G_CALLBACK (cb_rstto_main_window_about), },
+/* Misc */
+  { "leave-fullscreen", GTK_STOCK_LEAVE_FULLSCREEN, N_ ("Leave _Fullscreen"), NULL, NULL, G_CALLBACK (cb_rstto_main_window_fullscreen), }
 };
 
 static const GtkToggleActionEntry toggle_action_entries[] =
@@ -280,7 +282,7 @@ rstto_main_window_init (RsttoMainWindow *window)
 {
     GtkAccelGroup   *accel_group;
     GValue          show_toolbar_val = {0,}, window_width = {0, }, window_height = {0, };
-    GtkWidget       *separator, *back, *forward;
+    GtkWidget       *separator, *back, *forward, *leave_fullscreen;
     GtkWidget       *main_vbox = gtk_vbox_new (FALSE, 0);
     GtkRecentFilter *recent_filter;
 
@@ -364,6 +366,11 @@ rstto_main_window_init (RsttoMainWindow *window)
     forward = gtk_ui_manager_get_widget (window->priv->ui_manager, "/main-toolbar/forward");
     gtk_tool_item_set_is_important (GTK_TOOL_ITEM (forward), TRUE);
     
+    /* Make the leave-fullscreen toolitem important,
+     * when it is, the label is shown when the toolbar style is 'both-horizontal'
+     */
+    leave_fullscreen = gtk_ui_manager_get_widget (window->priv->ui_manager, "/fullscreen-toolbar/leave-fullscreen");
+    gtk_tool_item_set_is_important (GTK_TOOL_ITEM (leave_fullscreen), TRUE);
 
     window->priv->picture_viewer = rstto_picture_viewer_new ();
     window->priv->p_viewer_s_window = gtk_scrolled_window_new (NULL, NULL);
diff --git a/src/main_window_ui.xml b/src/main_window_ui.xml
index af1d990..2b0aa4a 100644
--- a/src/main_window_ui.xml
+++ b/src/main_window_ui.xml
@@ -76,6 +76,6 @@
         <placeholder name="placeholder-slideshow" />
         <toolitem action="forward"/>
         <separator name="separator-1"/>
-        <toolitem action="fullscreen"/>
+        <toolitem action="leave-fullscreen"/>
     </toolbar>
 </ui>


More information about the Xfce4-commits mailing list