]> git.sesse.net Git - vlc/commitdiff
Qt4: change messages-dialog to use msg_SubscriptionSetVerbosity
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 13 Jul 2010 16:57:16 +0000 (19:57 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Wed, 14 Jul 2010 18:37:54 +0000 (21:37 +0300)
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.hpp

index d105a1ee1a097d06b153dfb241f8af1855b7e21c..614db1379e26e8601979893a2aed1584e4bf1289 100644 (file)
@@ -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();
index 762adb80d08b6e3d159f052775bc8e4c470eb356..d1e0e340af90dd209516230f1d2c675a46fb9ee0 100644 (file)
@@ -64,6 +64,7 @@ private slots:
     void clearOrUpdate();
     bool save();
     void updateConfig();
+    void changeVerbosity( int );
 private:
     void clear();
     void updateTree();