]> git.sesse.net Git - vlc/commitdiff
* modules/gui/gtk/gnome.c, modules/gui/gtk/gtk.c: small change to the slider behaviour.
authorGildas Bazin <gbazin@videolan.org>
Mon, 10 Mar 2003 18:17:19 +0000 (18:17 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 10 Mar 2003 18:17:19 +0000 (18:17 +0000)
modules/gui/gtk/gnome.c
modules/gui/gtk/gtk.c

index d701a9994974d06ced2eaeebbe462efe32096073..cec52f6a8b5412ab93740f02f9aeeedfdcb1ca5f 100644 (file)
@@ -2,7 +2,7 @@
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.12 2003/03/07 00:53:09 gbazin Exp $
+ * $Id: gnome.c,v 1.13 2003/03/10 18:17:19 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -451,9 +451,9 @@ static void Manage( intf_thread_t *p_intf )
                  * finished dragging the slider.
                  * Beware, the hack below is needed by the dvdplay plugin! */
                 else if( p_intf->p_sys->b_slider_free
-                /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue <= 100.) )
+                /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue < 100.) )
                 {
-                    if( newvalue > 0. && newvalue < 100. )
+                    if( newvalue >= 0. && newvalue < 100. )
                     {
                         off_t i_seek = ( newvalue * p_area->i_size ) / 100;
 
index a4825b126e9ad6255f257d1a7e3c652be32e76b5..436f4ecde468e48a3da1a04fd81558388ae3842c 100644 (file)
@@ -2,7 +2,7 @@
  * gtk.c : Gtk+ plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: gtk.c,v 1.17 2003/03/07 00:53:09 gbazin Exp $
+ * $Id: gtk.c,v 1.18 2003/03/10 18:17:19 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -464,14 +464,17 @@ static int Manage( intf_thread_t *p_intf )
                  * finished dragging the slider.
                  * Beware, the hack below is needed by the dvdplay plugin! */
                 else if( p_intf->p_sys->b_slider_free
-                /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue <= 100.) )
+                /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue < 100.) )
                 {
-                    off_t i_seek = ( newvalue * p_area->i_size ) / 100;
-
-                    /* release the lock to be able to seek */
-                    vlc_mutex_unlock( &p_input->stream.stream_lock );
-                    input_Seek( p_input, i_seek, INPUT_SEEK_SET );
-                    vlc_mutex_lock( &p_input->stream.stream_lock );
+                    if( newvalue >= 0. && newvalue < 100. )
+                    {
+                        off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+
+                        /* release the lock to be able to seek */
+                        vlc_mutex_unlock( &p_input->stream.stream_lock );
+                        input_Seek( p_input, i_seek, INPUT_SEEK_SET );
+                        vlc_mutex_lock( &p_input->stream.stream_lock );
+                    }
 
                     /* Update the old value */
                     p_intf->p_sys->f_adj_oldvalue = newvalue;