Commit f6d917cb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove __intf_UserFatal

parent 28b1a8ac
...@@ -279,8 +279,6 @@ enum ...@@ -279,8 +279,6 @@ enum
* Exported symbols * Exported symbols
***************************************************************************/ ***************************************************************************/
#define intf_UserFatal( a, b, c, d, e... ) __intf_UserFatal( VLC_OBJECT(a),b,c,d, ## e )
VLC_EXPORT( int, __intf_UserFatal,( vlc_object_t*, bool, const char*, const char*, ...) LIBVLC_FORMAT( 4, 5 ) );
#define intf_UserLoginPassword( a, b, c, d, e... ) __intf_UserLoginPassword( VLC_OBJECT(a),b,c,d,e) #define intf_UserLoginPassword( a, b, c, d, e... ) __intf_UserLoginPassword( VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT( int, __intf_UserLoginPassword,( vlc_object_t*, const char*, const char*, char **, char **) ); VLC_EXPORT( int, __intf_UserLoginPassword,( vlc_object_t*, const char*, const char*, char **, char **) );
#define intf_UserYesNo( a, b, c, d, e, f ) __intf_UserYesNo( VLC_OBJECT(a),b,c, d, e, f ) #define intf_UserYesNo( a, b, c, d, e, f ) __intf_UserYesNo( VLC_OBJECT(a),b,c, d, e, f )
......
...@@ -97,33 +97,6 @@ static inline int DialogFireForget( interaction_dialog_t *d ) ...@@ -97,33 +97,6 @@ static inline int DialogFireForget( interaction_dialog_t *d )
return ret; return ret;
} }
/**
* Send an error message, both in a blocking and non-blocking way
*
* \param p_this Parent vlc_object
* \param b_blocking Is this dialog blocking or not?
* \param psz_title Title for the dialog
* \param psz_format The message to display
* \return VLC_SUCCESS or VLC_EGENERIC
*/
int __intf_UserFatal( vlc_object_t *p_this, bool b_blocking,
const char *psz_title,
const char *psz_format, ... )
{
va_list args;
DIALOG_INIT( ONEWAY, VLC_EGENERIC );
p_new->psz_title = strdup( psz_title );
FORMAT_DESC;
if( b_blocking )
p_new->i_flags = DIALOG_BLOCKING_ERROR;
else
p_new->i_flags = DIALOG_NONBLOCKING_ERROR;
return DialogFireForget( p_new );
}
/** /**
* Helper function to ask a yes-no-cancel question * Helper function to ask a yes-no-cancel question
* *
...@@ -468,7 +441,8 @@ static int DialogSend( interaction_dialog_t *p_dialog ) ...@@ -468,7 +441,8 @@ static int DialogSend( interaction_dialog_t *p_dialog )
interaction_t *p_interaction; interaction_t *p_interaction;
intf_thread_t *p_intf; intf_thread_t *p_intf;
if( p_dialog->p_parent->i_flags & OBJECT_FLAGS_NOINTERACT ) if( ( p_dialog->p_parent->i_flags & OBJECT_FLAGS_NOINTERACT )
|| !config_GetInt( p_interaction, "interact" ) )
return VLC_EGENERIC; return VLC_EGENERIC;
p_interaction = InteractionGet( p_dialog->p_parent ); p_interaction = InteractionGet( p_dialog->p_parent );
...@@ -489,15 +463,8 @@ static int DialogSend( interaction_dialog_t *p_dialog ) ...@@ -489,15 +463,8 @@ static int DialogSend( interaction_dialog_t *p_dialog )
} }
p_dialog->p_interface = p_intf; p_dialog->p_interface = p_intf;
if( config_GetInt( p_interaction, "interact" ) ||
p_dialog->i_flags & DIALOG_BLOCKING_ERROR ||
p_dialog->i_flags & DIALOG_NONBLOCKING_ERROR )
{
vlc_value_t val;
p_dialog->i_action = INTERACT_NEW; p_dialog->i_action = INTERACT_NEW;
val.p_address = p_dialog; var_SetAddress( p_dialog->p_interface, "interaction", p_dialog );
var_Set( p_dialog->p_interface, "interaction", val );
/* Check if we have already added this dialog */ /* Check if we have already added this dialog */
vlc_mutex_lock( &p_interaction->lock ); vlc_mutex_lock( &p_interaction->lock );
...@@ -523,27 +490,15 @@ static int DialogSend( interaction_dialog_t *p_dialog ) ...@@ -523,27 +490,15 @@ static int DialogSend( interaction_dialog_t *p_dialog )
p_dialog->i_return = DIALOG_CANCELLED; p_dialog->i_return = DIALOG_CANCELLED;
p_dialog->i_status = ANSWERED_DIALOG; p_dialog->i_status = ANSWERED_DIALOG;
} }
}
p_dialog->i_flags |= DIALOG_GOT_ANSWER; p_dialog->i_flags |= DIALOG_GOT_ANSWER;
vlc_cond_signal( &p_interaction->wait ); vlc_cond_signal( &p_interaction->wait );
vlc_mutex_unlock( &p_interaction->lock ); vlc_mutex_unlock( &p_interaction->lock );
vlc_object_release( p_interaction ); vlc_object_release( p_interaction );
if( p_dialog->i_type == INTERACT_DIALOG_TWOWAY )
return p_dialog->i_return; return p_dialog->i_return;
}
else else
{
/* Pretend we already retrieved the "answer" */
p_dialog->i_flags |= DIALOG_GOT_ANSWER;
vlc_cond_signal( &p_interaction->wait );
vlc_mutex_unlock( &p_interaction->lock );
vlc_object_release( p_interaction );
return VLC_SUCCESS; return VLC_SUCCESS;
}
}
else
{
vlc_object_release( p_interaction );
return VLC_EGENERIC;
}
} }
static void* InteractionLoop( void *p_this ) static void* InteractionLoop( void *p_this )
......
...@@ -198,7 +198,6 @@ intf_ProgressIsCancelled ...@@ -198,7 +198,6 @@ intf_ProgressIsCancelled
intf_ProgressUpdate intf_ProgressUpdate
intf_RunThread intf_RunThread
intf_StopThread intf_StopThread
__intf_UserFatal
intf_UserHide intf_UserHide
__intf_UserLoginPassword __intf_UserLoginPassword
__intf_UserStringInput __intf_UserStringInput
......
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