Commit 0c9fa0fa authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Qt: message dialog, use the update button and fix the build

parent f7c5ce41
......@@ -112,9 +112,6 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
pldebugTree->headerItem()->setText( 4, "Item flags" );
pldebugTree->setColumnCount( 5 );
pldebugTabLayout->addWidget( pldebugTree );
QPushButton *pldebugUpdateButton = new QPushButton( "Update" );
pldebugTabLayout->addWidget( pldebugUpdateButton );
BUTTONACT( pldebugUpdateButton, updatePLTree() );
#endif
tabChanged(0);
......@@ -320,14 +317,18 @@ void MessagesDialog::updateOrClear()
ui.modulesTree->clear();
buildTree( NULL, VLC_OBJECT( p_intf->p_libvlc ) );
}
else
else if( ui.mainTab->currentIndex() == 0 )
ui.messages->clear();
#ifndef NDEBUG
else
updatePLTree();
#endif
}
void MessagesDialog::tabChanged( int i )
{
updateButton->setIcon( i == 1 ? QIcon(":/update") : QIcon(":/toolbar/clear") );
updateButton->setToolTip( i == 1 ? qtr("Update the tree")
updateButton->setIcon( i != 0 ? QIcon(":/update") : QIcon(":/toolbar/clear") );
updateButton->setToolTip( i != 0 ? qtr("Update the tree")
: qtr("Clear the messages") );
}
......
......@@ -67,9 +67,6 @@ private slots:
void updateOrClear();
void tabChanged( int );
void filterMessages();
#ifndef NDEBUG
void updatePLTree();
#endif
private:
void buildTree( QTreeWidgetItem *, vlc_object_t * );
......@@ -79,6 +76,7 @@ private:
QMutex messageLocker;
#ifndef NDEBUG
QTreeWidget *pldebugTree;
void updatePLTree();
#endif
};
......
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