Commit 68f500ce authored by Clément Stenac's avatar Clément Stenac

Better fix

parent e536ea5c
...@@ -564,11 +564,13 @@ void DialogsProvider::OnInteraction( wxCommandEvent& event ) ...@@ -564,11 +564,13 @@ void DialogsProvider::OnInteraction( wxCommandEvent& event )
break; break;
case INTERACT_UPDATE: case INTERACT_UPDATE:
p_wxdialog = (InteractionDialog*)(p_dialog->p_private); p_wxdialog = (InteractionDialog*)(p_dialog->p_private);
p_wxdialog->Update(); if( p_wxdialog)
p_wxdialog->Update();
break; break;
case INTERACT_HIDE: case INTERACT_HIDE:
p_wxdialog = (InteractionDialog*)(p_dialog->p_private); p_wxdialog = (InteractionDialog*)(p_dialog->p_private);
p_wxdialog->Hide(); if( p_wxdialog )
p_wxdialog->Hide();
p_dialog->i_status = HIDDEN_DIALOG; p_dialog->i_status = HIDDEN_DIALOG;
break; break;
case INTERACT_DESTROY: case INTERACT_DESTROY:
......
...@@ -203,7 +203,7 @@ static void Run( services_discovery_t *p_sd ) ...@@ -203,7 +203,7 @@ static void Run( services_discovery_t *p_sd )
int i_state = var_GetInteger( p_input, "state" ); int i_state = var_GetInteger( p_input, "state" );
if( i_state == PLAYING_S ) if( i_state == PLAYING_S )
{ {
float f_pos = (float)(p_sys->p_item->i_children)* 100.0 / float f_pos = (float)(p_sys->p_item->i_children)* 2 *100.0 /
(float)(p_sys->i_limit); (float)(p_sys->i_limit);
intf_UserProgressUpdate( p_sd, i_dialog_id, "Downloading", intf_UserProgressUpdate( p_sd, i_dialog_id, "Downloading",
f_pos ); f_pos );
...@@ -215,6 +215,6 @@ static void Run( services_discovery_t *p_sd ) ...@@ -215,6 +215,6 @@ static void Run( services_discovery_t *p_sd )
p_sys->b_dialog = VLC_FALSE; p_sys->b_dialog = VLC_FALSE;
intf_UserHide( p_sd, i_dialog_id ); intf_UserHide( p_sd, i_dialog_id );
} }
msleep( 100000 ); msleep( 10000 );
} }
} }
...@@ -228,6 +228,7 @@ void intf_InteractionManage( playlist_t *p_playlist ) ...@@ -228,6 +228,7 @@ void intf_InteractionManage( playlist_t *p_playlist )
new->pp_widgets = NULL; \ new->pp_widgets = NULL; \
new->psz_title = NULL; \ new->psz_title = NULL; \
new->psz_description = NULL; \ new->psz_description = NULL; \
new->p_private = NULL; \
new->i_id = 0; \ new->i_id = 0; \
new->i_flags = 0; \ new->i_flags = 0; \
new->i_status = NEW_DIALOG; new->i_status = NEW_DIALOG;
...@@ -375,8 +376,7 @@ void __intf_UserProgressUpdate( vlc_object_t *p_this, int i_id, ...@@ -375,8 +376,7 @@ void __intf_UserProgressUpdate( vlc_object_t *p_this, int i_id,
vlc_mutex_lock( &p_interaction->object_lock ); vlc_mutex_lock( &p_interaction->object_lock );
p_dialog = intf_InteractionGetById( p_this, i_id ); p_dialog = intf_InteractionGetById( p_this, i_id );
if( !p_dialog || p_dialog->i_status == NEW_DIALOG if( !p_dialog )
|| p_dialog->i_status == HIDING_DIALOG )
{ {
vlc_mutex_unlock( &p_interaction->object_lock ) ; vlc_mutex_unlock( &p_interaction->object_lock ) ;
return; return;
...@@ -466,8 +466,7 @@ void __intf_UserHide( vlc_object_t *p_this, int i_id ) ...@@ -466,8 +466,7 @@ void __intf_UserHide( vlc_object_t *p_this, int i_id )
vlc_mutex_lock( &p_interaction->object_lock ); vlc_mutex_lock( &p_interaction->object_lock );
p_dialog = intf_InteractionGetById( p_this, i_id ); p_dialog = intf_InteractionGetById( p_this, i_id );
if( !p_dialog || p_dialog->i_status == NEW_DIALOG if( !p_dialog )
|| p_dialog->i_status == HIDING_DIALOG )
{ {
vlc_mutex_unlock( &p_interaction->object_lock ); vlc_mutex_unlock( &p_interaction->object_lock );
return; return;
......
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