[vlc-commits] Qt: message dialog, use the update button and fix the build
Jean-Baptiste Kempf
git at videolan.org
Sun Sep 16 19:33:23 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Sep 16 19:32:56 2012 +0200| [0c9fa0fa43b93267dfdf86cc7092bf7c7cb544be] | committer: Jean-Baptiste Kempf
Qt: message dialog, use the update button and fix the build
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c9fa0fa43b93267dfdf86cc7092bf7c7cb544be
---
modules/gui/qt4/dialogs/messages.cpp | 13 +++++++------
modules/gui/qt4/dialogs/messages.hpp | 4 +---
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index 109331f..03bf6f9 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -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") );
}
diff --git a/modules/gui/qt4/dialogs/messages.hpp b/modules/gui/qt4/dialogs/messages.hpp
index a9732f6..503cb81 100644
--- a/modules/gui/qt4/dialogs/messages.hpp
+++ b/modules/gui/qt4/dialogs/messages.hpp
@@ -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
};
More information about the vlc-commits
mailing list