diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-12-03 19:58:55 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-12-03 19:58:55 +0000 |
commit | 9e67335ea81f5ef4ab011259e0fdb07a1135f831 (patch) | |
tree | 1eaa80dfa1c080d299167feb4b3cfe23e7002db9 /ui/qt/main_welcome.cpp | |
parent | cef4af718cc42c7054b8ab82cb005f00d93f8b92 (diff) |
Update the interface list to reflect the recent interface name changes.
Allow multiple interface selections. Make sure we update the packet list
properly in a couple of places.
Use the right callback+signal to update capture statistics in the status
bar. Remove the global cfile from the main_statusbar.cpp
Add the version to the main window.
svn path=/trunk/; revision=46350
Diffstat (limited to 'ui/qt/main_welcome.cpp')
-rw-r--r-- | ui/qt/main_welcome.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp index 1a105c7586..679a849707 100644 --- a/ui/qt/main_welcome.cpp +++ b/ui/qt/main_welcome.cpp @@ -51,15 +51,12 @@ MainWelcome::MainWelcome(QWidget *parent) : // QGridLayout *grid = new QGridLayout(this); // QVBoxLayout *column; // QLabel *heading; -#ifdef Q_WS_MAC - InterfaceTree *iface_tree; -#endif welcome_ui_->setupUi(this); + + welcome_ui_->mainWelcomeBanner->setText("Wireshark<br><small>" VERSION "</small>"); + task_list_ = welcome_ui_->taskList; -#ifdef Q_WS_MAC - iface_tree = welcome_ui_->interfaceTree; -#endif recent_files_ = welcome_ui_->recentList; setStyleSheet(QString( @@ -103,7 +100,7 @@ MainWelcome::MainWelcome(QWidget *parent) : #ifdef Q_WS_MAC recent_files_->setAttribute(Qt::WA_MacShowFocusRect, false); welcome_ui_->taskList->setAttribute(Qt::WA_MacShowFocusRect, false); - iface_tree->setAttribute(Qt::WA_MacShowFocusRect, false); + welcome_ui_->interfaceTree->setAttribute(Qt::WA_MacShowFocusRect, false); #endif task_list_->setStyleSheet( @@ -138,6 +135,8 @@ MainWelcome::MainWelcome(QWidget *parent) : connect(wsApp, SIGNAL(updateRecentItemStatus(const QString &, qint64, bool)), this, SLOT(updateRecentFiles())); connect(wsApp, SIGNAL(appInitialized()), this, SLOT(destroySplashOverlay())); connect(task_list_, SIGNAL(itemSelectionChanged()), this, SLOT(showTask())); + connect(welcome_ui_->interfaceTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), + this, SLOT(interfaceDoubleClicked(QTreeWidgetItem*,int))); connect(recent_files_, SIGNAL(itemActivated(QListWidgetItem *)), this, SLOT(openRecentItem(QListWidgetItem *))); updateRecentFiles(); @@ -166,6 +165,15 @@ void MainWelcome::showTask() { welcome_ui_->taskStack->setCurrentIndex(task_list_->currentRow()); } +void MainWelcome::interfaceDoubleClicked(QTreeWidgetItem *item, int column) +{ + Q_UNUSED(column); + + if (item) { + emit startCapture(); + } +} + void MainWelcome::updateRecentFiles() { QString itemLabel; QListWidgetItem *rfItem; |