Page 1 of 1

GTK+ PDA interface fix

Posted: 04 Apr 2006 18:04
by fredyd
Hi,

here's a fix to make the PDA interface actually work.

fred

Code: Select all

--- vlc-0.8.4a/modules/gui/pda/pda_callbacks.c~ 2005-12-11 22:36:19.000000000 +0100 +++ vlc-0.8.4a/modules/gui/pda/pda_callbacks.c 2006-04-04 17:29:53.000000000 +0200 @@ -442,7 +442,7 @@ p_intf->p_sys->b_slider_free = 1; vlc_mutex_unlock( &p_intf->change_lock ); - return TRUE; + return FALSE; } @@ -455,7 +455,7 @@ p_intf->p_sys->b_slider_free = 0; vlc_mutex_unlock( &p_intf->change_lock ); - return TRUE; + return FALSE; } void SliderMove(GtkRange *range, GtkScrollType scroll, gpointer user_data) --- vlc-0.8.4a/modules/gui/pda/pda.c~ 2005-12-11 22:36:19.000000000 +0100 +++ vlc-0.8.4a/modules/gui/pda/pda.c 2006-04-04 17:41:06.000000000 +0200 @@ -445,8 +445,6 @@ } /* Manage the slider */ -#if 0 -#define p_area p_input->p_selected_area if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) { /* Manage the slider for CPU_CAPABILITY_FPU hardware */ @@ -461,7 +459,7 @@ /* Update the value */ p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = - ( 100. * p_area->i_tell ) / p_area->i_size; + ( 100. * var_GetTime( p_intf->p_sys->p_input, "time" ) ) / var_GetTime( p_intf->p_sys->p_input, "length" ); g_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed" ); } @@ -495,7 +493,7 @@ /* Update the value */ p_intf->p_sys->p_adj->value = p_intf->p_sys->i_adj_oldvalue = - ( 100 * p_area->i_tell ) / p_area->i_size; + ( 100 * var_GetTime( p_intf->p_sys->p_input, "time" ) ) / var_GetTime( p_intf->p_sys->p_input, "length" ); g_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed" ); } @@ -515,8 +513,6 @@ } } } -#undef p_area -#endif } vlc_mutex_unlock( &p_input->object_lock ); }
[/code]

Posted: 04 Apr 2006 20:23
by The DJ
although i really appreciate the contribution, Could you please provide some explenation, especially on the first part of this patch?

I don't know this code at all, so any evaluation needs to be done based on what you can tell me. Also please consider posting to vlc-devel @videolan .org
We prefer it to have patches submitted to the devel mailinglist, because it's less likely they will get lost.

Posted: 04 Apr 2006 22:14
by dionoea
Applied by jpsaman. Thanks
(see https://trac.videolan.org/vlc/changeset/15092 )