Commit 213725df authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/gtk/gnome.c, modules/gui/gtk/gtk.c: small change to the slider behaviour.
parent c66372f3
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc * gnome.c : Gnome plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -451,9 +451,9 @@ static void Manage( intf_thread_t *p_intf ) ...@@ -451,9 +451,9 @@ static void Manage( intf_thread_t *p_intf )
* finished dragging the slider. * finished dragging the slider.
* Beware, the hack below is needed by the dvdplay plugin! */ * Beware, the hack below is needed by the dvdplay plugin! */
else if( p_intf->p_sys->b_slider_free 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; off_t i_seek = ( newvalue * p_area->i_size ) / 100;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc * gtk.c : Gtk+ plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -464,7 +464,9 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -464,7 +464,9 @@ static int Manage( intf_thread_t *p_intf )
* finished dragging the slider. * finished dragging the slider.
* Beware, the hack below is needed by the dvdplay plugin! */ * Beware, the hack below is needed by the dvdplay plugin! */
else if( p_intf->p_sys->b_slider_free 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. )
{ {
off_t i_seek = ( newvalue * p_area->i_size ) / 100; off_t i_seek = ( newvalue * p_area->i_size ) / 100;
...@@ -472,6 +474,7 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -472,6 +474,7 @@ static int Manage( intf_thread_t *p_intf )
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
input_Seek( p_input, i_seek, INPUT_SEEK_SET ); input_Seek( p_input, i_seek, INPUT_SEEK_SET );
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
}
/* Update the old value */ /* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue; p_intf->p_sys->f_adj_oldvalue = newvalue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment