[Xfce4-commits] <parole:master> Add option to hide the menubar to the context-menu

Simon Steinbeiss noreply at xfce.org
Fri Oct 11 11:52:27 CEST 2013


Updating branch refs/heads/master
         to d7594d0c7bd9cf706e36b8beb9055ded57e020a0 (commit)
       from 080c0cc842363c01880d8ebc91be73ceb6ff1cd5 (commit)

commit d7594d0c7bd9cf706e36b8beb9055ded57e020a0
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Mon Sep 16 22:24:28 2013 +0200

    Add option to hide the menubar to the context-menu

 src/parole-player.c |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/parole-player.c b/src/parole-player.c
index d6f70bc..f2c21f2 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -153,7 +153,7 @@ void        parole_player_toggle_playlist_action_cb (GtkAction *action,
                                                      
 void        parole_player_fullscreen_action_cb      (GtkAction *action, 
                                                      ParolePlayer *player);
-                             
+
 void        parole_player_seekf_cb                  (GtkWidget *widget, 
                                                      ParolePlayer *player, 
                                                      gdouble seek);
@@ -2003,6 +2003,11 @@ void parole_player_fullscreen_action_cb (GtkAction *action, ParolePlayer *player
     parole_player_full_screen (player, !player->priv->full_screen);
 }
 
+void parole_player_hide_menubar_cb (GtkWidget *widget, ParolePlayer *player)
+{
+    gtk_widget_set_visible(player->priv->menu_bar, !gtk_widget_get_visible(player->priv->menu_bar));
+}
+
 static void
 parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time)
 {
@@ -2035,6 +2040,16 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
     mi = gtk_action_create_menu_item(player->priv->media_fullscreen_action);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
 
+    /*
+     * Un/Hide menubar
+     */
+    mi = gtk_check_menu_item_new_with_label(gtk_widget_get_visible(player->priv->menu_bar) ? _("Hide menubar") : _("Show menubar"));
+    g_signal_connect (mi, "activate",
+        G_CALLBACK (parole_player_hide_menubar_cb), player);
+    gtk_widget_show (mi);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+
+
     g_signal_connect_swapped (menu, "selection-done",
                               G_CALLBACK (gtk_widget_destroy), menu);
     


More information about the Xfce4-commits mailing list