[Xfce4-commits] [apps/parole] 04/07: Round down hours in goto-position dialog

noreply at xfce.org noreply at xfce.org
Mon Jun 9 02:49:20 CEST 2014


This is an automated email from the git hooks/post-receive script.

bluesabre pushed a commit to branch master
in repository apps/parole.

commit fe4b681e0bb5d835eca62bd453d7cf1ca60d9e5c
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Tue Mar 18 19:40:39 2014 +0100

    Round down hours in goto-position dialog
---
 src/parole-player.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/parole-player.c b/src/parole-player.c
index 20155db..cf68591 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -2685,23 +2685,19 @@ on_goto_position_clicked (GtkWidget *w, ParolePlayer *player)
     vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
     gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG(dialog))), vbox, TRUE, TRUE, 0);
     gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
-    //gtk_widget_show (vbox);
     
     hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
     gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
-    //gtk_widget_show (hbox);
     
     label = gtk_label_new (_("Position:"));
     gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
     gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
-    //gtk_widget_show (label);
     
     /* Get the stream length and set that as maximum */
     adjustment = gtk_range_get_adjustment (GTK_RANGE (player->priv->range));
     duration = gtk_adjustment_get_upper (adjustment);
 
-    // FIXME: Always round the hrs down
-    spin_hrs = gtk_spin_button_new_with_range (0, duration / 3600, 1);
+    spin_hrs = gtk_spin_button_new_with_range (0, (int) ( duration/3600 ), 1);
     spin_mins = gtk_spin_button_new_with_range (0, 59, 1);
     spin_secs = gtk_spin_button_new_with_range (0, 59, 1);
     gtk_box_pack_start (GTK_BOX (hbox), spin_hrs, FALSE, FALSE, 0);
@@ -2714,10 +2710,7 @@ on_goto_position_clicked (GtkWidget *w, ParolePlayer *player)
     if ( duration < 60 )
         gtk_widget_set_sensitive (GTK_WIDGET (spin_mins), FALSE);
     if ( duration = 0 )
-    {
         gtk_widget_set_sensitive (GTK_WIDGET (spin_secs), FALSE);
-        gtk_label_set_text (GTK_LABEL (label), _("This stream isn't searchable."));
-    }
     
     /* Should the player always be paused when opening up that dialog? */
     //parole_gst_pause (PAROLE_GST (player->priv->gst));

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list