summaryrefslogtreecommitdiff
path: root/ui/qt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-07-09 10:29:21 -0700
committerGerald Combs <gerald@wireshark.org>2015-07-09 17:33:59 +0000
commitfdd07c4d3a5e7d83e235957dc731502770e709f1 (patch)
treeeb3454528118a7b0d6bbbe776e412c0953d559eb /ui/qt
parentd36930e2d4a5118023182fd8ac3237e546436c87 (diff)
downloadwireshark-fdd07c4d3a5e7d83e235957dc731502770e709f1.tar.gz
Make sure we uncheck the "Find Packet" action.
Make sure we uncheck the "Find Packet" action when we're done finding packets. Make the "Go To Packet" action checkable and ensure that it's properly checked an unchecked as well. Change-Id: I979cabfd950ec4807ebcd40664b44b600557cf48 Reviewed-on: https://code.wireshark.org/review/9577 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/accordion_frame.h5
-rw-r--r--ui/qt/main_window.cpp5
-rw-r--r--ui/qt/main_window.ui3
-rw-r--r--ui/qt/search_frame.h2
4 files changed, 14 insertions, 1 deletions
diff --git a/ui/qt/accordion_frame.h b/ui/qt/accordion_frame.h
index 5d7a5fca61..37d3e00016 100644
--- a/ui/qt/accordion_frame.h
+++ b/ui/qt/accordion_frame.h
@@ -35,6 +35,11 @@ public:
void animatedHide();
signals:
+ void visibilityChanged(bool visible);
+
+protected:
+ virtual void hideEvent(QHideEvent *) { emit visibilityChanged(false); }
+ virtual void showEvent(QShowEvent *) { emit visibilityChanged(true); }
private:
int frame_height_;
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 16297ec08a..660a6c2aaa 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -288,12 +288,17 @@ MainWindow::MainWindow(QWidget *parent) :
this, SLOT(showPreferencesDialog(QString)));
main_ui_->goToFrame->hide();
+ connect(main_ui_->goToFrame, SIGNAL(visibilityChanged(bool)),
+ main_ui_->actionGoGoToPacket, SLOT(setChecked(bool)));
+
// XXX For some reason the cursor is drawn funny with an input mask set
// https://bugreports.qt-project.org/browse/QTBUG-7174
main_ui_->searchFrame->hide();
connect(main_ui_->searchFrame, SIGNAL(pushFilterSyntaxStatus(const QString&)),
main_ui_->statusBar, SLOT(pushTemporaryStatus(const QString&)));
+ connect(main_ui_->searchFrame, SIGNAL(visibilityChanged(bool)),
+ main_ui_->actionEditFindPacket, SLOT(setChecked(bool)));
main_ui_->columnEditorFrame->hide();
main_ui_->preferenceEditorFrame->hide();
diff --git a/ui/qt/main_window.ui b/ui/qt/main_window.ui
index b0d238bffb..f2bc6687e6 100644
--- a/ui/qt/main_window.ui
+++ b/ui/qt/main_window.ui
@@ -910,6 +910,9 @@
</property>
</action>
<action name="actionGoGoToPacket">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
<property name="text">
<string>Go to Packet...</string>
</property>
diff --git a/ui/qt/search_frame.h b/ui/qt/search_frame.h
index 3bc96a2f2c..e515a57096 100644
--- a/ui/qt/search_frame.h
+++ b/ui/qt/search_frame.h
@@ -51,7 +51,7 @@ signals:
void pushFilterSyntaxStatus(const QString&);
protected:
- void keyPressEvent(QKeyEvent *event);
+ virtual void keyPressEvent(QKeyEvent *event);
private:
void updateWidgets();