aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-06-12 15:10:02 -0700
committerAnders Broman <a.broman58@gmail.com>2016-06-13 13:14:38 +0000
commit8b6ea372c1ba66667a985d3f90d3daef131bb1ed (patch)
tree726e0508ee84ff3c2cd495eb27f4ede79edc76bd /ui
parent6ff19fff9daa7bae8769a2d2504ab7ae48ac4087 (diff)
Qt: Make the capture filter read-only only in main welcome.
As noted in gb7897dd, CaptureFilterCombo needs to be read-only until the app is initialized. Move the code to do so to MainWelcome, otherwise the capture filter entry in CaptureInterfacesDialog starts out read-only and stays that way. Disable / enable the entire CaptureFilterCombo instead of setting its lineEdit read-only status, which provides a stronger visual indicator. Change-Id: Ic7bf5b5631b861ecf4dc8cca67beb5bf4ed27510 Reviewed-on: https://code.wireshark.org/review/15859 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/capture_filter_combo.cpp3
-rw-r--r--ui/qt/main_welcome.cpp6
2 files changed, 6 insertions, 3 deletions
diff --git a/ui/qt/capture_filter_combo.cpp b/ui/qt/capture_filter_combo.cpp
index d3f98ca74b..89dcdc4fdc 100644
--- a/ui/qt/capture_filter_combo.cpp
+++ b/ui/qt/capture_filter_combo.cpp
@@ -87,7 +87,7 @@ CaptureFilterCombo::CaptureFilterCombo(QWidget *parent, bool plain) :
connect(wsApp, SIGNAL(appInitialized()), this, SLOT(rebuildFilterList()));
connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(rebuildFilterList()));
- lineEdit()->setReadOnly(true);
+ rebuildFilterList();
clearEditText();
}
@@ -118,7 +118,6 @@ void CaptureFilterCombo::rebuildFilterList()
insertItem(0, (const gchar *) li->data);
}
lineEdit()->blockSignals(false);
- lineEdit()->setReadOnly(false);
}
/*
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp
index c3adfa7f93..6001639d39 100644
--- a/ui/qt/main_welcome.cpp
+++ b/ui/qt/main_welcome.cpp
@@ -65,9 +65,11 @@ MainWelcome::MainWelcome(QWidget *parent) :
{
welcome_ui_->setupUi(this);
+ recent_files_ = welcome_ui_->recentList;
+
welcome_ui_->interfaceTree->resetColumnCount();
- recent_files_ = welcome_ui_->recentList;
+ welcome_ui_->captureFilterComboBox->setEnabled(false);
setStyleSheet(QString(
"MainWelcome {"
@@ -248,6 +250,8 @@ void MainWelcome::appInitialized()
// Trigger interfacesUpdated.
welcome_ui_->interfaceTree->selectedInterfaceChanged();
+ welcome_ui_->captureFilterComboBox->setEnabled(true);
+
delete splash_overlay_;
splash_overlay_ = NULL;
}