diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-02-13 08:36:53 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-02-13 17:30:26 +0000 |
commit | 936f685af5e42b8faa01ae24aac6b71c47950b6f (patch) | |
tree | 166a628914ae37072336810e6c2254cba2665676 | |
parent | 4d5bdf4256cc723db5e55d1c49eca187b47186aa (diff) |
Qt: Allow shift-double-clicking on a frame link.
You can open a new packet window in the GTK+ UI by holding down the
shift key and double-clicking on a frame link in the protocol tree. Add
this behavior to the Qt UI. Document the different ways of opening a new
packet window and update the image.
Change-Id: I55caf6cc8089a6c305fafd47b4870e7c69dbfb10
Reviewed-on: https://code.wireshark.org/review/7101
Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rwxr-xr-x[-rw-r--r--] | docbook/wsug_graphics/ws-packet-sep-win.png | bin | 20759 -> 28764 bytes | |||
-rw-r--r-- | docbook/wsug_src/WSUG_chapter_work.asciidoc | 17 | ||||
-rw-r--r-- | ui/qt/main_window.cpp | 2 | ||||
-rw-r--r-- | ui/qt/packet_list.cpp | 2 | ||||
-rw-r--r-- | ui/qt/proto_tree.cpp | 6 | ||||
-rw-r--r-- | ui/qt/proto_tree.h | 3 |
6 files changed, 23 insertions, 7 deletions
diff --git a/docbook/wsug_graphics/ws-packet-sep-win.png b/docbook/wsug_graphics/ws-packet-sep-win.png Binary files differindex bc28c6cbd4..21739a4c4d 100644..100755 --- a/docbook/wsug_graphics/ws-packet-sep-win.png +++ b/docbook/wsug_graphics/ws-packet-sep-win.png diff --git a/docbook/wsug_src/WSUG_chapter_work.asciidoc b/docbook/wsug_src/WSUG_chapter_work.asciidoc index c297dda10a..71b281ee5f 100644 --- a/docbook/wsug_src/WSUG_chapter_work.asciidoc +++ b/docbook/wsug_src/WSUG_chapter_work.asciidoc @@ -30,16 +30,25 @@ You can also select and view packets the same way while Wireshark is capturing if you selected ``Update list of packets in real time'' in the ``Capture Preferences'' dialog box. -In addition, you can view individual packets in a separate window as shown in -<<ChWorkPacketSepView>>. Do this by selecting the packet in which you are -interested in the packet list pane, and then select menu:View[Show Packet in New -Window]. This allows you to easily compare two or even more packets. +In addition you can view individual packets in a separate window as shown in +<<ChWorkPacketSepView>>. You can do this by double-clicking on an item in the +packet list or by selecting the packet in which you are interested in the packet +list pane and selecting menu:View[Show Packet in New Window]. This allows you to +easily compare two or more packets, even across multiple files. [[ChWorkPacketSepView]] .Viewing a packet in a separate window image::wsug_graphics/ws-packet-sep-win.png[] +Along with double-clicking the packet list and using the main menu there are a +number of other ways to open a new packet window: + +- Hold down the shift key and double-click on a frame link in the packet + details. +- From <<PacketListPopupMenuTable>>. +- From <<PacketDetailsPopupMenuTable>>. + [[ChWorkDisplayPopUpSection]] === Pop-up menus diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index b212e704e8..7db42d879b 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -393,6 +393,8 @@ MainWindow::MainWindow(QWidget *parent) : main_ui_->statusBar, SLOT(pushFieldStatus(QString&))); connect(proto_tree_, SIGNAL(protoItemSelected(field_info *)), this, SLOT(setMenusForSelectedTreeRow(field_info *))); + connect(proto_tree_, SIGNAL(openPacketInNewWindow(bool)), + this, SLOT(openPacketDialog(bool))); connect(byte_view_tab_, SIGNAL(byteFieldHovered(QString&)), main_ui_->statusBar, SLOT(pushByteStatus(QString&))); diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index ae039e95ab..d2a9e7ef80 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -433,7 +433,7 @@ PacketList::PacketList(QWidget *parent) : void PacketList::setProtoTree (ProtoTree *proto_tree) { proto_tree_ = proto_tree; - connect(proto_tree_, SIGNAL(goToFrame(int)), this, SLOT(goToPacket(int))); + connect(proto_tree_, SIGNAL(goToPacket(int)), this, SLOT(goToPacket(int))); connect(proto_tree_, SIGNAL(relatedFrame(int)), this, SLOT(addRelatedFrame(int))); } diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp index 2fa24e39af..8b40452c6b 100644 --- a/ui/qt/proto_tree.cpp +++ b/ui/qt/proto_tree.cpp @@ -455,7 +455,11 @@ void ProtoTree::itemDoubleClick(QTreeWidgetItem *item, int column) { fi = item->data(0, Qt::UserRole).value<field_info *>(); if(fi->hfinfo->type == FT_FRAMENUM) { - emit goToFrame(fi->value.value.uinteger); + if (QApplication::queryKeyboardModifiers() & Qt::ShiftModifier) { + emit openPacketInNewWindow(true); + } else { + emit goToPacket(fi->value.value.uinteger); + } } if(FI_GET_FLAG(fi, FI_URL) && IS_FT_STRING(fi->hfinfo->type)) { diff --git a/ui/qt/proto_tree.h b/ui/qt/proto_tree.h index 66426f4aef..e10fa67d8d 100644 --- a/ui/qt/proto_tree.h +++ b/ui/qt/proto_tree.h @@ -51,7 +51,8 @@ private: signals: void protoItemSelected(QString &); void protoItemSelected(field_info *); - void goToFrame(int); + void openPacketInNewWindow(bool); + void goToPacket(int); void relatedFrame(int); public slots: |