[vlc-devel] commit: Remove intf_UserYesNo ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Mar 8 11:38:11 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar  8 12:18:51 2009 +0200| [402e44d0efae06e58df1ba7c7d4db119d5896eb2] | committer: Rémi Denis-Courmont 

Remove intf_UserYesNo

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=402e44d0efae06e58df1ba7c7d4db119d5896eb2
---

 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 insertions(+), 60 deletions(-)

diff --git a/include/vlc_interface.h b/include/vlc_interface.h
index 4e85c63..b11f328 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 71b46a9..6038f70 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 dfbff7f..fbb141b 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 e59faea..c93a159 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




More information about the vlc-devel mailing list