[Xfce4-commits] <parole:master> Hide time labels if live streaming.

Christoph Mende noreply at xfce.org
Mon Jul 23 01:25:30 CEST 2012


Updating branch refs/heads/master
         to 58ef72695403b9453793aa3ad0171eb0aeab36d6 (commit)
       from 7a1e153e5bd3789e92786b2007c48ba8c013d000 (commit)

commit 58ef72695403b9453793aa3ad0171eb0aeab36d6
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Jul 11 13:34:20 2012 -0400

    Hide time labels if live streaming.

 src/parole-player.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/parole-player.c b/src/parole-player.c
index 1a419e5..1db5296 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -671,26 +671,25 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
     
     player->priv->internal_range_change = TRUE;
     if ( live || duration == 0)
-	parole_player_change_range_value (player, 0);
+    {
+		parole_player_change_range_value (player, 0);
+		gtk_widget_set_visible( player->priv->label_duration, FALSE );
+		gtk_widget_set_visible( player->priv->label_elapsed, FALSE );
+	}
     else 
-	gtk_range_set_range (GTK_RANGE (player->priv->range), 0, duration);
-	
-	/* Added duration here.*/
+    {
+		gtk_range_set_range (GTK_RANGE (player->priv->range), 0, duration);
+		gtk_widget_set_visible( player->priv->label_duration, TRUE );
+		gtk_widget_set_visible( player->priv->label_elapsed, TRUE );
+	}
+
 	if ( duration != 0)
 	{
 	    gchar dur_text[128];
 	    get_time_string (dur_text, duration);
-	    /*text = g_strdup_printf ("%s %s/%s", 
-				    state == PAROLE_MEDIA_STATE_PAUSED ? _("Paused") : _("Playing"), 
-				    pos_text, 
-				    dur_text);*/
+
 	    gtk_label_set_text (GTK_LABEL (player->priv->label_duration), dur_text);
 	}
-	/*if ( text )
-	{
-	    
-	    g_free (text);
-	}*/
 	
     player->priv->internal_range_change = FALSE;
     


More information about the Xfce4-commits mailing list