summaryrefslogtreecommitdiff
path: root/ui/qt/main_window.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-07-29 12:09:28 -0700
committerGerald Combs <gerald@wireshark.org>2015-07-29 22:38:43 +0000
commitd6f59cd10f966cfbe7fce4146f314acd59c84bd2 (patch)
tree0f15b8cebd5f1429128014491d64ca763406ac1d /ui/qt/main_window.cpp
parenta03a43bd320ceeaae9f2dfa2f15213dced579d17 (diff)
downloadwireshark-d6f59cd10f966cfbe7fce4146f314acd59c84bd2.tar.gz
Main menu and packet list menu updates.
Enable and disable packet list-relasted menu items in one place. Add "Colorize Conversation" items to the packet list context menu. In the GTK+ UI we tend to disable entire menus, which makes their items inaccessible. Try not to do that in the Qt UI so that menu items are always visible even if they're disabled. Remove commented items which are now complete. Change-Id: I69b878b45334bf88014694b1bf016278fa55a94b Reviewed-on: https://code.wireshark.org/review/9819 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/main_window.cpp')
-rw-r--r--ui/qt/main_window.cpp40
1 files changed, 4 insertions, 36 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index c91ec7020a..5610ec4fc7 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -230,8 +230,6 @@ MainWindow::MainWindow(QWidget *parent) :
setTitlebarForCaptureFile();
setMenusForCaptureFile();
setForCapturedPackets(false);
- setMenusForSelectedPacket();
- setMenusForSelectedTreeRow();
setMenusForFileSet(false);
interfaceSelectionChanged();
loadWindowGeometry();
@@ -350,6 +348,10 @@ MainWindow::MainWindow(QWidget *parent) :
main_welcome_ = main_ui_->welcomePage;
+ // Packet list and proto tree must exist before these are called.
+ setMenusForSelectedPacket();
+ setMenusForSelectedTreeRow();
+
initShowHideMainWidgets();
initTimeDisplayFormatMenu();
initTimePrecisionFormatMenu();
@@ -477,8 +479,6 @@ MainWindow::MainWindow(QWidget *parent) :
this, SLOT(setMenusForSelectedPacket()));
connect(packet_list_, SIGNAL(packetDissectionChanged()),
this, SLOT(redissectPackets()));
- connect(packet_list_, SIGNAL(packetSelectionChanged()),
- this, SLOT(setMenusForFollowStream()));
connect(packet_list_, SIGNAL(showColumnPreferences(PreferencesDialog::PreferencesPane)),
this, SLOT(showPreferencesDialog(PreferencesDialog::PreferencesPane)));
connect(packet_list_, SIGNAL(showProtocolPreferences(QString)),
@@ -1797,38 +1797,6 @@ void MainWindow::setTitlebarForCaptureInProgress()
// Menu state
-void MainWindow::setMenusForFollowStream()
-{
- gboolean is_tcp = FALSE, is_udp = FALSE;
-
- if (!capture_file_.capFile())
- return;
-
- if (!capture_file_.capFile()->edt)
- return;
-
- main_ui_->actionAnalyzeFollowTCPStream->setEnabled(false);
- main_ui_->actionAnalyzeFollowUDPStream->setEnabled(false);
- main_ui_->actionAnalyzeFollowSSLStream->setEnabled(false);
-
- proto_get_frame_protocols(capture_file_.capFile()->edt->pi.layers, NULL, &is_tcp, &is_udp, NULL, NULL, NULL);
-
- if (is_tcp)
- {
- main_ui_->actionAnalyzeFollowTCPStream->setEnabled(true);
- }
-
- if (is_udp)
- {
- main_ui_->actionAnalyzeFollowUDPStream->setEnabled(true);
- }
-
- if ( epan_dissect_packet_contains_field(capture_file_.capFile()->edt, "ssl") )
- {
- main_ui_->actionAnalyzeFollowSSLStream->setEnabled(true);
- }
-}
-
/* Enable or disable menu items based on whether you have a capture file
you've finished reading and, if you have one, whether it's been saved
and whether it could be saved except by copying the raw packet data. */