[Xfce4-commits] <parole:master> Move the sidebar-toggle to the View-menu
Christoph Mende
noreply at xfce.org
Mon Jul 23 01:25:15 CEST 2012
Updating branch refs/heads/master
to 4a2aff94b658b2b611d6228b937a553dad98ca7a (commit)
from 82683fd7bab0ba224b2c908e76b9c1e4e54cbb52 (commit)
commit 4a2aff94b658b2b611d6228b937a553dad98ca7a
Author: Simon Steinbeiss <ochosi at xfce.org>
Date: Wed Jul 11 03:54:36 2012 +0200
Move the sidebar-toggle to the View-menu
data/interfaces/parole.ui | 12 ++++++++++--
src/parole-player.c | 24 +++++-------------------
2 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index 8b5b8e3..9393765 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -180,6 +180,14 @@
<child type="submenu">
<object class="GtkMenu" id="menu2">
<property name="visible">True</property>
+ <child>
+ <object class="GtkMenuItem" id="show-hide-list">
+ <property name="label" translatable="yes">Hide playlist</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="parole_player_show_hide_playlist"/>
+ </object>
+ </child>
<child>
<object class="GtkMenuItem" id="menuitem1">
<property name="visible">True</property>
@@ -648,7 +656,7 @@
<property name="position">2</property>
</packing>
</child>
- <child>
+ <!--<child>
<object class="GtkButton" id="show-hide-list">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -664,7 +672,7 @@
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
- </child>
+ </child>-->
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/parole-player.c b/src/parole-player.c
index 819e67d..d5c5a24 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -125,7 +125,7 @@ gboolean parole_player_delete_event_cb (GtkWidget *widget,
GdkEvent *ev,
ParolePlayer *player);
-void parole_player_show_hide_playlist (GtkButton *button,
+void parole_player_show_hide_playlist (GtkMenuItem *widget,
ParolePlayer *player);
/*Menu items callbacks*/
@@ -315,36 +315,22 @@ void ratio_20_9_toggled_cb (GtkWidget *widget, ParolePlayer *player)
NULL);
}
-void parole_player_show_hide_playlist (GtkButton *button, ParolePlayer *player)
+void parole_player_show_hide_playlist (GtkMenuItem *widget, ParolePlayer *player)
{
- GtkWidget *img;
gboolean visible;
- g_object_get (G_OBJECT (player->priv->show_hide_playlist),
- "image", &img,
- NULL);
-
visible = GTK_WIDGET_VISIBLE (player->priv->playlist_nt);
if ( !visible )
{
- g_object_set (G_OBJECT (img),
- "stock", GTK_STOCK_GO_FORWARD,
- NULL);
-
gtk_widget_show_all (player->priv->playlist_nt);
- gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->show_hide_playlist), _("Hide playlist"));
+ gtk_menu_item_set_label (GTK_MENU_ITEM (player->priv->show_hide_playlist), _("Hide playlist"));
}
else
- {
- g_object_set (G_OBJECT (img),
- "stock", GTK_STOCK_GO_BACK,
- NULL);
-
+ {
gtk_widget_hide_all (player->priv->playlist_nt);
- gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->show_hide_playlist), _("Show playlist"));
+ gtk_menu_item_set_label (GTK_MENU_ITEM (player->priv->show_hide_playlist), _("Show playlist"));
}
- g_object_unref (img);
}
typedef enum
More information about the Xfce4-commits
mailing list