From 402e44d0efae06e58df1ba7c7d4db119d5896eb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 8 Mar 2009 12:18:51 +0200 Subject: [PATCH] Remove intf_UserYesNo --- include/vlc_interface.h | 2 -- modules/gui/qt4/dialogs/interaction.cpp | 10 ------ src/interface/interaction.c | 48 +------------------------ src/libvlccore.sym | 1 - 4 files changed, 1 insertion(+), 60 deletions(-) diff --git a/include/vlc_interface.h b/include/vlc_interface.h index 4e85c63846..b11f328693 100644 --- a/include/vlc_interface.h +++ b/include/vlc_interface.h @@ -279,8 +279,6 @@ enum * Exported symbols ***************************************************************************/ -#define intf_UserYesNo( a, b, c, d, e, f ) __intf_UserYesNo( VLC_OBJECT(a),b,c, d, e, f ) -VLC_EXPORT( int, __intf_UserYesNo,( vlc_object_t*, const char*, const char*, const char*, const char*, const char*) ); #define intf_UserStringInput( a, b, c, d ) __intf_UserStringInput( VLC_OBJECT(a),b,c,d ) VLC_EXPORT( int, __intf_UserStringInput,(vlc_object_t*, const char*, const char*, char **) ); diff --git a/modules/gui/qt4/dialogs/interaction.cpp b/modules/gui/qt4/dialogs/interaction.cpp index 71b46a974f..6038f707f6 100644 --- a/modules/gui/qt4/dialogs/interaction.cpp +++ b/modules/gui/qt4/dialogs/interaction.cpp @@ -86,16 +86,6 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf, progressBar->setOrientation( Qt::Horizontal ); layout->addWidget( progressBar ); } - else if( p_dialog->i_flags & DIALOG_PSZ_INPUT_OK_CANCEL ) - { - dialog = new QWidget; layout = new QVBoxLayout( dialog ); - layout->setMargin( 2 ); - description = new QLabel( qfu( p_dialog->psz_description ) ); - layout->addWidget( description ); - - inputEdit = new QLineEdit; - layout->addWidget( inputEdit ); - } else { msg_Err( p_intf, "Unknown dialog type %i", p_dialog->i_flags ); diff --git a/src/interface/interaction.c b/src/interface/interaction.c index dfbff7f078..fbb141b70b 100644 --- a/src/interface/interaction.c +++ b/src/interface/interaction.c @@ -83,50 +83,6 @@ static int DialogSend( interaction_dialog_t * ); p_new->psz_returned[0] = NULL; \ p_new->psz_returned[1] = NULL -#define FORMAT_DESC \ - va_start( args, psz_format ); \ - if( vasprintf( &p_new->psz_description, psz_format, args ) == -1 ) \ - return VLC_EGENERIC; \ - va_end( args ) - -static inline int DialogFireForget( interaction_dialog_t *d ) -{ - int ret = DialogSend( d ); - if( ret == VLC_EGENERIC ) - DialogDestroy( d ); - return ret; -} - -/** - * Helper function to ask a yes-no-cancel question - * - * \param p_this Parent vlc_object - * \param psz_title Title for the dialog - * \param psz_description A description - * \param psz_default caption for the default button - * \param psz_alternate caption for the alternate button - * \param psz_other caption for the optional 3rd button (== cancel) - * \return Clicked button code - */ -int __intf_UserYesNo( vlc_object_t *p_this, - const char *psz_title, - const char *psz_description, - const char *psz_default, - const char *psz_alternate, - const char *psz_other ) -{ - DIALOG_INIT( TWOWAY, VLC_EGENERIC ); - - p_new->psz_title = strdup( psz_title ); - p_new->psz_description = strdup( psz_description ); - p_new->i_flags = DIALOG_YES_NO_CANCEL; - p_new->psz_default_button = strdup( psz_default ); - p_new->psz_alternate_button = strdup( psz_alternate ); - p_new->psz_other_button = psz_other ? strdup( psz_other ) : NULL; - - return DialogFireForget( p_new ); -} - /** * Helper function to create a dialogue showing a progress-bar with some info * @@ -391,9 +347,7 @@ static void DialogDestroy( interaction_dialog_t *p_dialog ) { free( p_dialog->psz_title ); free( p_dialog->psz_description ); - free( p_dialog->psz_default_button ); free( p_dialog->psz_alternate_button ); - free( p_dialog->psz_other_button ); vlc_object_release( p_dialog->p_parent ); free( p_dialog ); } @@ -406,7 +360,7 @@ static int DialogSend( interaction_dialog_t *p_dialog ) intf_thread_t *p_intf; if( ( p_dialog->p_parent->i_flags & OBJECT_FLAGS_NOINTERACT ) - || !config_GetInt( p_interaction, "interact" ) ) + || !config_GetInt( p_dialog->p_parent, "interact" ) ) return VLC_EGENERIC; p_interaction = InteractionGet( p_dialog->p_parent ); diff --git a/src/libvlccore.sym b/src/libvlccore.sym index e59faea7ea..c93a159390 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -202,7 +202,6 @@ intf_RunThread intf_StopThread intf_UserHide __intf_UserStringInput -__intf_UserYesNo IsUTF8 libvlc_InternalAddIntf libvlc_InternalCleanup -- 2.39.2