[Xfce4-commits] <parole:ochosi/audiobox> Only show audiobox if audio-only and visualizations are disabled.

Sean Davis noreply at xfce.org
Thu Nov 29 00:28:03 CET 2012


Updating branch refs/heads/ochosi/audiobox
         to 8c20b1c36f45b528653ed5b90a8ec2dc435d951b (commit)
       from e11ff431848a619df268c21c52530fb543e3157e (commit)

commit 8c20b1c36f45b528653ed5b90a8ec2dc435d951b
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Nov 28 18:27:04 2012 -0500

    Only show audiobox if audio-only and visualizations are disabled.

 src/gst/parole-gst.c |   12 ++++++++++++
 src/gst/parole-gst.h |    1 +
 src/parole-player.c  |    6 ++++--
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index 0b310fb..b74c6a1 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -2520,6 +2520,18 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
 }
 
 gboolean
+gst_get_has_vis( ParoleGst *gst )
+{
+    gboolean has_vis;
+    
+    g_object_get (G_OBJECT (gst->priv->conf),
+		  "vis-enabled", &has_vis,
+		  NULL);
+		  
+    return has_vis;
+}
+
+gboolean
 gst_get_has_video( ParoleGst *gst )
 {
 	gboolean playing_video;
diff --git a/src/gst/parole-gst.h b/src/gst/parole-gst.h
index a5e1208..1102de1 100644
--- a/src/gst/parole-gst.h
+++ b/src/gst/parole-gst.h
@@ -146,6 +146,7 @@ void 			parole_gst_set_cursor_visible 	(ParoleGst *gst,
 							 
 GList *			gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name);
 
+gboolean		gst_get_has_vis( ParoleGst *gst );
 gboolean		gst_get_has_video( ParoleGst *gst );
 
 void			gst_set_current_audio_track( ParoleGst *gst, gint track_no );
diff --git a/src/parole-player.c b/src/parole-player.c
index fa8c3a0..ba15f4f 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -828,8 +828,10 @@ parole_player_update_languages (ParolePlayer *player, ParoleGst *gst)
 static void
 parole_player_show_audiobox (ParolePlayer *player)
 {
-    /* Only show the audiobox if we're sure there's no video playing */
-    if (!gst_get_has_video( PAROLE_GST(player->priv->gst) ))
+    /* Only show the audiobox if we're sure there's no video playing and 
+       visualizations are disabled. */
+    if (!gst_get_has_video ( PAROLE_GST(player->priv->gst) ) &&
+        !gst_get_has_vis   ( PAROLE_GST(player->priv->gst) ) )
     {
 	gtk_widget_show(player->priv->audiobox);
 	gtk_widget_hide_all(player->priv->eventbox_output);


More information about the Xfce4-commits mailing list