summaryrefslogtreecommitdiff
path: root/ui/qt/main_window_slots.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-03-01 10:03:17 -0600
committerAnders Broman <a.broman58@gmail.com>2017-03-03 05:02:14 +0000
commit8e76cfbf54c209336d3aaf7e613e309675eebf38 (patch)
treed58d1c11d6a264b0d06cd37fbea0b092c3aaccb6 /ui/qt/main_window_slots.cpp
parentbc56801319ba30b6d83f336ec1d793b3a0ab016a (diff)
downloadwireshark-8e76cfbf54c209336d3aaf7e613e309675eebf38.tar.gz
Qt: Add selection history navigation.
Add the ability to move back and forth in the packet selection history similar to GTK+. Update the documentation accordingly. Change-Id: If1fdc1e59b240c0588c292dc0f7f0a5f083c30e1 Reviewed-on: https://code.wireshark.org/review/20320 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r--ui/qt/main_window_slots.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index a90d59e82d..cefcd27b2b 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -1192,6 +1192,10 @@ void MainWindow::setMenusForSelectedPacket()
bool have_frames = false;
/* A frame is selected */
bool frame_selected = false;
+ /* A visible packet comes after this one in the selection history */
+ bool next_selection_history = false;
+ /* A visible packet comes before this one in the selection history */
+ bool previous_selection_history = false;
/* We have marked frames. (XXX - why check frame_selected?) */
bool have_marked = false;
/* We have a marked frame other than the current frame (i.e.,
@@ -1220,6 +1224,8 @@ void MainWindow::setMenusForSelectedPacket()
if (capture_file_.capFile()) {
frame_selected = capture_file_.capFile()->current_frame != NULL;
+ next_selection_history = packet_list_->haveNextHistory();
+ previous_selection_history = packet_list_->havePreviousHistory();
have_frames = capture_file_.capFile()->count > 0;
have_marked = frame_selected && capture_file_.capFile()->marked_count > 0;
another_is_marked = have_marked &&
@@ -1266,6 +1272,8 @@ void MainWindow::setMenusForSelectedPacket()
main_ui_->actionEditTimeShift->setEnabled(have_frames);
main_ui_->actionGoGoToLinkedPacket->setEnabled(false);
+ main_ui_->actionGoNextHistoryPacket->setEnabled(next_selection_history);
+ main_ui_->actionGoPreviousHistoryPacket->setEnabled(previous_selection_history);
main_ui_->actionAnalyzeAAFSelected->setEnabled(have_filter_expr);
main_ui_->actionAnalyzeAAFNotSelected->setEnabled(have_filter_expr);