Commit 24fcfe47 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - IM. cosmetic.

parent 047552b0
...@@ -171,8 +171,8 @@ void InputManager::customEvent( QEvent *event ) ...@@ -171,8 +171,8 @@ void InputManager::customEvent( QEvent *event )
if( !p_input || p_input->b_die || p_input->b_dead ) if( !p_input || p_input->b_die || p_input->b_dead )
return; return;
if( ( type != PositionUpdate_Type && type != ItemRateChanged_Type ) if( ( type != PositionUpdate_Type && type != ItemRateChanged_Type ) &&
&& ( i_input_id != ple->i_id ) ) ( i_input_id != ple->i_id ) )
return; return;
if( type != PositionUpdate_Type ) if( type != PositionUpdate_Type )
msg_Dbg( p_intf, "New Event: type %i", type ); msg_Dbg( p_intf, "New Event: type %i", type );
...@@ -205,54 +205,54 @@ void InputManager::customEvent( QEvent *event ) ...@@ -205,54 +205,54 @@ void InputManager::customEvent( QEvent *event )
void InputManager::UpdatePosition() void InputManager::UpdatePosition()
{ {
/* Update position */ /* Update position */
int i_length, i_time; /* Int is enough, since we store seconds */ int i_length, i_time; /* Int is enough, since we store seconds */
float f_pos; float f_pos;
i_length = var_GetTime( p_input , "length" ) / 1000000; i_length = var_GetTime( p_input , "length" ) / 1000000;
i_time = var_GetTime( p_input , "time") / 1000000; i_time = var_GetTime( p_input , "time") / 1000000;
f_pos = var_GetFloat( p_input , "position" ); f_pos = var_GetFloat( p_input , "position" );
emit positionUpdated( f_pos, i_time, i_length ); emit positionUpdated( f_pos, i_time, i_length );
} }
void InputManager::UpdateTitle() void InputManager::UpdateTitle()
{ {
/* Update navigation status */ /* Update navigation status */
vlc_value_t val; val.i_int = 0; vlc_value_t val; val.i_int = 0;
var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val, NULL ); var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
if( val.i_int > 0 ) if( val.i_int > 0 )
{ {
val.i_int = 0; val.i_int = 0;
var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val, NULL ); var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val, NULL );
emit navigationChanged( (val.i_int > 0) ? 1 : 2 ); emit navigationChanged( (val.i_int > 0) ? 1 : 2 );
} }
else else
{ {
emit navigationChanged( 0 ); emit navigationChanged( 0 );
} }
} }
void InputManager::UpdateStatus() void InputManager::UpdateStatus()
{ {
/* Update playing status */ /* Update playing status */
vlc_value_t val; val.i_int = 0; vlc_value_t val; val.i_int = 0;
var_Get( p_input, "state", &val ); var_Get( p_input, "state", &val );
if( i_old_playing_status != val.i_int ) if( i_old_playing_status != val.i_int )
{ {
i_old_playing_status = val.i_int; i_old_playing_status = val.i_int;
emit statusChanged( val.i_int ); emit statusChanged( val.i_int );
} }
} }
void InputManager::UpdateRate() void InputManager::UpdateRate()
{ {
/* Update Rate */ /* Update Rate */
int i_new_rate = var_GetInteger( p_input, "rate"); int i_new_rate = var_GetInteger( p_input, "rate");
if( i_new_rate != i_rate ) if( i_new_rate != i_rate )
{ {
i_rate = i_new_rate; i_rate = i_new_rate;
/* Update rate */ /* Update rate */
emit rateChanged( i_rate ); emit rateChanged( i_rate );
} }
} }
void InputManager::UpdateMeta() void InputManager::UpdateMeta()
...@@ -394,10 +394,8 @@ void InputManager::telexGotoPage( int page ) ...@@ -394,10 +394,8 @@ void InputManager::telexGotoPage( int page )
void InputManager::telexToggle( bool b_enabled ) void InputManager::telexToggle( bool b_enabled )
{ {
int i_page = 0; int i_page = b_enabled ? 100 : 0 ;
if( b_enabled )
i_page = 100;
telexGotoPage( i_page ); telexGotoPage( i_page );
} }
......
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