[vlc-devel] commit: intf_UserWarn: remove dead code ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Mar 5 22:20:55 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar  5 23:20:42 2009 +0200| [91082b5bd5c3555a5c2974811c471a1a3d3e938b] | committer: Rémi Denis-Courmont 

intf_UserWarn: remove dead code

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

 include/vlc_interface.h                 |    3 ---
 modules/gui/macosx/interaction.m        |    6 ------
 modules/gui/qt4/dialogs/errors.cpp      |    4 ++--
 modules/gui/qt4/dialogs/errors.hpp      |    2 +-
 modules/gui/qt4/dialogs/interaction.cpp |    7 -------
 src/interface/interaction.c             |   23 -----------------------
 src/libvlccore.sym                      |    1 -
 7 files changed, 3 insertions(+), 43 deletions(-)

diff --git a/include/vlc_interface.h b/include/vlc_interface.h
index 4f2574e..8007c26 100644
--- a/include/vlc_interface.h
+++ b/include/vlc_interface.h
@@ -236,7 +236,6 @@ struct interaction_dialog_t
 #define DIALOG_PSZ_INPUT_OK_CANCEL  0x08
 #define DIALOG_BLOCKING_ERROR       0x10
 #define DIALOG_NONBLOCKING_ERROR    0x20
-#define DIALOG_WARNING              0x40
 #define DIALOG_USER_PROGRESS        0x80
 #define DIALOG_INTF_PROGRESS        0x100
 
@@ -282,8 +281,6 @@ enum
 
 #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_UserWarn( a, c, d, e... ) __intf_UserWarn( VLC_OBJECT(a),c,d, ## e )
-VLC_EXPORT( int, __intf_UserWarn,( vlc_object_t*, const char*, const char*, ...) LIBVLC_FORMAT( 3, 4 ) );
 #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 **) );
 #define intf_UserYesNo( a, b, c, d, e, f ) __intf_UserYesNo( VLC_OBJECT(a),b,c, d, e, f )
diff --git a/modules/gui/macosx/interaction.m b/modules/gui/macosx/interaction.m
index 819a4d5..eab3fb8 100644
--- a/modules/gui/macosx/interaction.m
+++ b/modules/gui/macosx/interaction.m
@@ -182,12 +182,6 @@
         [[[[VLCMain sharedInstance] getInteractionList] getErrorPanel]
         addError: o_title withMsg: o_description];
     }
-    else if( p_dialog->i_flags & DIALOG_WARNING )
-    {
-        msg_Dbg( p_intf, "addition to non-blocking warning panel received" );
-        [[[[VLCMain sharedInstance] getInteractionList] getErrorPanel]
-            addWarning: o_title withMsg: o_description];
-    }
     else if( p_dialog->i_flags & DIALOG_YES_NO_CANCEL )
     {
         msg_Dbg( p_intf, "yes-no-cancel-dialog requested" );
diff --git a/modules/gui/qt4/dialogs/errors.cpp b/modules/gui/qt4/dialogs/errors.cpp
index d8c785e..b49a097 100644
--- a/modules/gui/qt4/dialogs/errors.cpp
+++ b/modules/gui/qt4/dialogs/errors.cpp
@@ -72,10 +72,10 @@ void ErrorsDialog::addError( QString title, QString text )
     add( true, title, text );
 }
 
-void ErrorsDialog::addWarning( QString title, QString text )
+/*void ErrorsDialog::addWarning( QString title, QString text )
 {
     add( false, title, text );
-}
+}*/
 
 void ErrorsDialog::add( bool error, QString title, QString text )
 {
diff --git a/modules/gui/qt4/dialogs/errors.hpp b/modules/gui/qt4/dialogs/errors.hpp
index afa14ac..002cc3d 100644
--- a/modules/gui/qt4/dialogs/errors.hpp
+++ b/modules/gui/qt4/dialogs/errors.hpp
@@ -44,7 +44,7 @@ public:
     virtual ~ErrorsDialog() {};
 
     void addError( QString, QString );
-    void addWarning( QString, QString );
+    /*void addWarning( QString, QString );*/
 private:
     ErrorsDialog( QWidget *parent, intf_thread_t * );
     static ErrorsDialog *instance;
diff --git a/modules/gui/qt4/dialogs/interaction.cpp b/modules/gui/qt4/dialogs/interaction.cpp
index 8500491..c2cfeb8 100644
--- a/modules/gui/qt4/dialogs/interaction.cpp
+++ b/modules/gui/qt4/dialogs/interaction.cpp
@@ -61,13 +61,6 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf,
                  qfu( p_dialog->psz_title ), qfu( p_dialog->psz_description ) );
         i_ret = QMessageBox::AcceptRole;
     }
-    else if( p_dialog->i_flags & DIALOG_WARNING )
-    {
-        if( config_GetInt( p_intf, "qt-error-dialogs" ) != 0 )
-            ErrorsDialog::getInstance( p_intf )->addWarning(
-                qfu( p_dialog->psz_title ),qfu( p_dialog->psz_description ) );
-        i_ret = QMessageBox::AcceptRole;
-    }
     else if( p_dialog->i_flags & DIALOG_YES_NO_CANCEL )
     {
         p_dialog->i_status = SENT_DIALOG;
diff --git a/src/interface/interaction.c b/src/interface/interaction.c
index eb7d3c7..0191175 100644
--- a/src/interface/interaction.c
+++ b/src/interface/interaction.c
@@ -125,29 +125,6 @@ int __intf_UserFatal( vlc_object_t *p_this, bool b_blocking,
 }
 
 /**
- * Helper function to send a warning, which is always shown non-blocking
- *
- * \param p_this     Parent vlc_object
- * \param psz_title  Title for the dialog
- * \param psz_format The message to display
- * \return           VLC_SUCCESS or VLC_EGENERIC
- */
-int __intf_UserWarn( vlc_object_t *p_this,
-                     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;
-
-    p_new->i_flags = DIALOG_WARNING;
-
-    return DialogFireForget( p_new );
-}
-
-/**
  * Helper function to ask a yes-no-cancel question
  *
  * \param p_this           Parent vlc_object
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index fa68c97..d46ecb0 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -202,7 +202,6 @@ __intf_UserFatal
 intf_UserHide
 __intf_UserLoginPassword
 __intf_UserStringInput
-__intf_UserWarn
 __intf_UserYesNo
 IsUTF8
 libvlc_InternalAddIntf




More information about the vlc-devel mailing list