[vlc-commits] commit: Qt4: change messages-dialog to use msg_SubscriptionSetVerbosity ( Ilkka Ollakka )

git at videolan.org git at videolan.org
Wed Jul 14 20:40:48 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Jul 13 19:57:16 2010 +0300| [ef39893fa2ea4ab5c479d166679f792343cc320d] | committer: Ilkka Ollakka 

Qt4: change messages-dialog to use msg_SubscriptionSetVerbosity

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

 modules/gui/qt4/dialogs/messages.cpp |   12 ++++++++----
 modules/gui/qt4/dialogs/messages.hpp |    1 +
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index d105a1e..614db13 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -147,6 +147,8 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
     CONNECT( mainTab, currentChanged( int ),
              this, updateTab( int ) );
     CONNECT(vbobjectsEdit, editingFinished(), this, updateConfig());
+    CONNECT( verbosityBox, valueChanged( int ),
+             this, changeVerbosity( int ) );
 
     /* General action */
     readSettings( "Messages", QSize( 600, 450 ) );
@@ -156,6 +158,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
     cbData = new msg_cb_data_t;
     cbData->self = this;
     sub = msg_Subscribe( p_intf->p_libvlc, MsgCallback, cbData );
+    changeVerbosity( verbosityBox->value() );
 }
 
 MessagesDialog::~MessagesDialog()
@@ -165,6 +168,11 @@ MessagesDialog::~MessagesDialog()
     delete cbData;
 };
 
+void MessagesDialog::changeVerbosity( int verbosity )
+{
+    msg_SubscriptionSetVerbosity( sub , verbosity );
+}
+
 void MessagesDialog::updateTab( int index )
 {
     /* Second tab : modules tree */
@@ -223,10 +231,6 @@ void MessagesDialog::updateConfig()
 
 void MessagesDialog::sinkMessage( msg_item_t *item )
 {
-    if ((item->i_type == VLC_MSG_WARN && verbosityBox->value() < 1)
-     || (item->i_type == VLC_MSG_DBG && verbosityBox->value() < 2 ))
-        return;
-
     /* Copy selected text to the clipboard */
     if( messages->textCursor().hasSelection() )
         messages->copy();
diff --git a/modules/gui/qt4/dialogs/messages.hpp b/modules/gui/qt4/dialogs/messages.hpp
index 762adb8..d1e0e34 100644
--- a/modules/gui/qt4/dialogs/messages.hpp
+++ b/modules/gui/qt4/dialogs/messages.hpp
@@ -64,6 +64,7 @@ private slots:
     void clearOrUpdate();
     bool save();
     void updateConfig();
+    void changeVerbosity( int );
 private:
     void clear();
     void updateTree();



More information about the vlc-commits mailing list