Commit ef39893f authored by Ilkka Ollakka's avatar Ilkka Ollakka

Qt4: change messages-dialog to use msg_SubscriptionSetVerbosity

parent 14d8d88c
...@@ -147,6 +147,8 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) ...@@ -147,6 +147,8 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
CONNECT( mainTab, currentChanged( int ), CONNECT( mainTab, currentChanged( int ),
this, updateTab( int ) ); this, updateTab( int ) );
CONNECT(vbobjectsEdit, editingFinished(), this, updateConfig()); CONNECT(vbobjectsEdit, editingFinished(), this, updateConfig());
CONNECT( verbosityBox, valueChanged( int ),
this, changeVerbosity( int ) );
/* General action */ /* General action */
readSettings( "Messages", QSize( 600, 450 ) ); readSettings( "Messages", QSize( 600, 450 ) );
...@@ -156,6 +158,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) ...@@ -156,6 +158,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
cbData = new msg_cb_data_t; cbData = new msg_cb_data_t;
cbData->self = this; cbData->self = this;
sub = msg_Subscribe( p_intf->p_libvlc, MsgCallback, cbData ); sub = msg_Subscribe( p_intf->p_libvlc, MsgCallback, cbData );
changeVerbosity( verbosityBox->value() );
} }
MessagesDialog::~MessagesDialog() MessagesDialog::~MessagesDialog()
...@@ -165,6 +168,11 @@ MessagesDialog::~MessagesDialog() ...@@ -165,6 +168,11 @@ MessagesDialog::~MessagesDialog()
delete cbData; delete cbData;
}; };
void MessagesDialog::changeVerbosity( int verbosity )
{
msg_SubscriptionSetVerbosity( sub , verbosity );
}
void MessagesDialog::updateTab( int index ) void MessagesDialog::updateTab( int index )
{ {
/* Second tab : modules tree */ /* Second tab : modules tree */
...@@ -223,10 +231,6 @@ void MessagesDialog::updateConfig() ...@@ -223,10 +231,6 @@ void MessagesDialog::updateConfig()
void MessagesDialog::sinkMessage( msg_item_t *item ) 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 */ /* Copy selected text to the clipboard */
if( messages->textCursor().hasSelection() ) if( messages->textCursor().hasSelection() )
messages->copy(); messages->copy();
......
...@@ -64,6 +64,7 @@ private slots: ...@@ -64,6 +64,7 @@ private slots:
void clearOrUpdate(); void clearOrUpdate();
bool save(); bool save();
void updateConfig(); void updateConfig();
void changeVerbosity( int );
private: private:
void clear(); void clear();
void updateTree(); void updateTree();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment