aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/proto_tree.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-04-07Qt: Remember exact position of selected item in treePeter Wu1-3/+45
When switching between packets, the first field at a level would be selected. This is annoying if you have similarly structured trees (like TLVs or text labels). Combined with something like bug 13533, this causes erratic jumping. Fix this by incorporating the level position in the path. Change-Id: I998853ce899fffc69dd4932902508141325c35a4 Ping-Bug: 13533 Reviewed-on: https://code.wireshark.org/review/20799 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-31Qt: do not expand collapsed trees when switching packetsPeter Wu1-2/+9
Scenario: user selects a field, collapsed tha parent tree and selects the next packet. Before this patch, the tree would be expanded again, selecting the child. After this patch, the tree will not be expanded, instead selecting the tree node that got collapsed. Change-Id: I7968fca1056a937cf3b399afb6f3089c2d199067 Reviewed-on: https://code.wireshark.org/review/20801 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-01-12Qt: Remove unneccessary Q_DECLARE_METATYPERoland Knall1-11/+13
Remove unnecessary Q_DECLARE_METATYPE macros and replace calls to QVariant conversions with VariantPointer where necessary Change-Id: Ia4690590095f930bf94644197de7fa30b00ee7ec Reviewed-on: https://code.wireshark.org/review/19611 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-11-28Qt: fix heap-use-after-free when double-clicking a packet numberPeter Wu1-4/+2
On double-clicking a packet number, the current field item is invalidated by goToPacket. Skip the URL since a field can either have a URL or a frame number (but not both). Change-Id: I58e5445fa74071fa0fd203df77ebdecdd1478d31 Reviewed-on: https://code.wireshark.org/review/18971 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-20Officially require Qt 4.8 or newerPeter Wu1-4/+0
Since v2.3.0rc0-1002-g1cd2255, Qt 4.8 became mandatory, reflect this in the version requirements. This will not affect a lot of distributions (RHEL and SLES only had Qt 4.6). For a more complete list of supported platforms, see https://wiki.wireshark.org/Development/Support_library_version_tracking While at it, correct some other minimum versions in documentation. Change-Id: I11f2dfba72c75429f6838404a81ed3b3dc302d5f Reviewed-on: https://code.wireshark.org/review/18314 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-15Qt: Option to copy bytes to clipboard as Escaped StringGilbert Ramirez1-0/+3
Some users need to copy the bytes to a Python script for sending out through a raw socket. While they can modify a plain hex dump, having Wireshark copy directly as a Python string makes their work easier. This format also works with Bash, so it is called "Escaped String". E.g.: "\x55\xb5\xd4\x67\x03" Change-Id: I0b6a5eb2e348f686397afda76095aaa2fb85c18d Reviewed-on: https://code.wireshark.org/review/17696 Petri-Dish: Gilbert Ramirez <gram@alumni.rice.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-02Qt: remove unneeded check (CID 1159309).Dario Lombardo1-1/+1
fi has already been checked in line 51. Change-Id: Idd4d09a35ef1d4897479538979debd708e2cfe5b Reviewed-on: https://code.wireshark.org/review/16246 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-08Apply the prefix operator to iterators.Jaap Keuter1-4/+4
Prefix operators are supposed to be more efficient with iterators, so lets use them instead of postfix operators. Change-Id: I3090e4954c5cb67db47c88e2874b1a8ac52aa2cd Reviewed-on: https://code.wireshark.org/review/15546 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-10Have fvalue_to_string_repr always return an (wmem) allocated buffer.Michael Mann1-2/+2
Previous patches converted all fvalue_to_string_repr calls to expect an allocated buffer (and not a passed in one). Now changing signature to force an allocated buffer. Added wmem in case that can be taken advantage of within epan (and since the function signature was changing anyway). Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b Reviewed-on: https://code.wireshark.org/review/15343 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-02Qt: Remember selected item in packet treePeter Wu1-0/+40
Previously, changing a packet in the packet list would lose the currently selected field item in the packet tree. After this patch, this issue no longer occurs because the selected field is focussed again. The approach is to remember the header field ID on the path from a field to its root. Limitations of the current simple approach is that multiple fields/trees under a tree might result in the wrong selection. This is better than nothing though. This patch greatly helps analyzing a capture file which has the same format, except that I need to check a data source for decrypted data. Previously I would have to scroll down and select the field to see the data source which also made it impossible to quickly switch between packets and compare them. Change-Id: Ic113ca9245fd9faa10f91182794c50cfde8d10f4 Reviewed-on: https://code.wireshark.org/review/14697 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-03-28Qt: Make conversation menu items static.Gerald Combs1-1/+0
Add a ConversationAction and ColorizeAction classes which respectively handle conversation filtering and colorization. Move conversation menu initialization to initConversationMenus and call it once at startup. This keeps us from leaking quite a bit of memory each time we select a packet or proto tree item. Bug: 12044 Change-Id: I32e8cedaba08a419d5da6a7a9db31c910909f450 Reviewed-on: https://code.wireshark.org/review/14516 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-15Qt: Make sure the proto tree handles all of its timers.Gerald Combs1-0/+2
Call QTreeWidget::timerEvent from ProtoTree::timerEvent, otherwise we turn into the candy factory episode in I Love Lucy. Do the equivalent in WirelessFrame while we're here. Neither QFrame or QWidget use timers, but there's no guarantee that this will be the case in the future. Bug: 12258 Change-Id: I3cb0096fe2ed87176fec8d7361260b5388d75530 Reviewed-on: https://code.wireshark.org/review/14470 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jim Young <jim.young.ws@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-11Qt: Defer proto tree column content resizing.Gerald Combs1-8/+51
Try to avoid the following call graph: ProtoTree::expandAll ... ProtoTree::expand ... QTreeView::resizeColumnToContents QTreeView::resizeColumnToContents calls sizeHintForColumn, which iterates over a number of items (default 1000). Calling it from ProtoTree::expand can lead to excessive wheel-spinning. Add a single-shot timer for resizeColumnToContents. This is similar to what QTreeView does internally when columns are resized. Bug: 12228 Change-Id: I7b50c1486b3a25817efae58efbb8c9e961dbdab0 Reviewed-on: https://code.wireshark.org/review/14411 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-23Qt: Select matching tree item and bytes in Find PacketStig Bjørlykke1-0/+13
Highlight the matching tree item and matching packet bytes when doing a Find Packet. Added cf->search_len to correctly highlight the matching bytes when doing a regex search. Bug: 12157 Change-Id: I84fbdb9b43be4355e24aff3cf5f8850f1119e2bf Reviewed-on: https://code.wireshark.org/review/14086 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-08Qt: Add Show Packet Bytes DialogStig Bjørlykke1-0/+2
Show selected packet bytes as ASCII, HTML, Image, ISO 8859-1, Raw or UTF-8. Images supported are what's supported by QImage, and HTML supported is what's supported by QTextEdit. Change-Id: I96fc5c5d222c5389078576463cf78d82cf55528d Reviewed-on: https://code.wireshark.org/review/13807 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-13Qt: Show the horizontal scrollbar in the packet detail.Gerald Combs1-0/+8
Call resizeColumnToContents when we fill, clear, expand, or contract items. This make sure the horizontal scrollbar shows up instead of eliding items. A commonly suggested solution is to call header()->setSectionResizeMode(QHeaderView::ResizeToContents) followed by header()->setStretchLastSection(false). This makes the scroll bar show up when the tree is wider than the window, but when the column is narrower than the window we end up with unused white space on the right. Change-Id: I5896f6048385bed27858f0ac676b29a1bf1255cd Reviewed-on: https://code.wireshark.org/review/13265 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-03Add HTTP Follow streamMichael Mann1-0/+1
This automatically detects and decompresses HTTP along a TCP stream through the use of taps. Bug: 3528 Change-Id: I8ab832d509700d0da8eabf3c3e514d8511c598d3 Reviewed-on: https://code.wireshark.org/review/13009 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-26Qt: Use "" for empty QString const reference.Stig Bjørlykke1-5/+4
Change-Id: I686eadc865ae38433c3795450aeca8582a74d2c8 Reviewed-on: https://code.wireshark.org/review/10535 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-15Eliminate proto_tree_add_text from odds and ends.Michael Mann1-5/+4
A few calls in the epan directory and comments in the ui directory Change-Id: Ia8f8830ac6909ab94d3a03283bfd173456bc9718 Reviewed-on: https://code.wireshark.org/review/10492 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-08Qt: Fixed a resource leak in updateSelectionStatusStig Bjørlykke1-2/+3
Avoid passing a reference to a allocated QString, which will never be deleted. This fixes a 16 Bytes leak each time an element is selected or deselected in the packet tree. Change-Id: If0d7482bf505fda8802dd58e8d1841b7da6b6294 Reviewed-on: https://code.wireshark.org/review/10393 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-18Qt: Reload widgets using prefs when reloading Lua pluginsStig Bjørlykke1-0/+5
Widgets using prefs must be closed because the prefs may have been free'd when reloading Lua plugins. Change-Id: I4b79b7aff18d7923c77a9eb05acadc29b156edbf Reviewed-on: https://code.wireshark.org/review/10108 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-01More packet detail context menu items.Gerald Combs1-4/+6
Add the wiki and field reference items to the packet detail context menu. Add the "Go To Linked Packet" item in the Go menu and packet detail context menu. Use "Linked Packet" instead of "Packet Reference" and "Corresponding Packet". Remove more pending item comments. Change-Id: I66c40f71738f0996690f4818a546520ea0747088 Reviewed-on: https://code.wireshark.org/review/9841 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30Add Colorize to the packet detail menu.Gerald Combs1-16/+2
Change-Id: Idaac0b52e6e4534f40e13839e6dbce2408ca6bfa Reviewed-on: https://code.wireshark.org/review/9831 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30More context menu updates.Gerald Combs1-6/+12
Add "Follow" and "Export Packet Bytes" to the packet detail context menu. Remove duplicate SCTP menu. Remove redunant action text. Change-Id: If69815dc774806e267fbd71aa390b0af6f3b0d14 Reviewed-on: https://code.wireshark.org/review/9829 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30Add a missing menu item.Gerald Combs1-11/+1
Add "Copy as Filter" to the packet list context menu. Remove completed item comments. Change-Id: I1e2d9ebcff2fb36918d3e7525690cfb105cb1b13 Reviewed-on: https://code.wireshark.org/review/9826 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30Packet list and detail context menu updates.Gerald Combs1-8/+31
Add some missing items to the packet list and detail "Copy" context menus. Don't nest the "Copy" items so deeply. Add YAML to the supported summary formats. Note that "Copy as Binary" copies to the clipboard as application/octet-stream, which is a) arguably correct, and b) not very useful. Fixes welcome. Enable and disable packet detail context menu items from a set of booleans similar to the packet list. Change-Id: Iaa931c766aa476c33f27de089e5c4dbaf9ce74d6 Ping-Bug: 9320 Bug: 10831 Reviewed-on: https://code.wireshark.org/review/9825 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-27Fixup packet list context menu behavior.Gerald Combs1-5/+5
Add logic to setMenusForSelectedPacket for setting the enabled states for the "Apply As" and "Prepare A" actions. Update the PacketList context menu code to fill in the right filter at the right time. Exit out of setMenusForSelectedTreeRow if the packet list has focus so that we don't clobber the enabled states of various actions. Take the "Apply As" and "Prepare A" context menu titles from their main window counterparts. Remove actionApply_as_Filter and actionPrepare_a_Filter. Remove completed to-do items. Change-Id: I8f6f538bb7786d8df02a999f3b449dfde640e847 Reviewed-on: https://code.wireshark.org/review/9810 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-24Fix the Copy menu placement in the ProtoTree context menu.Gerald Combs1-2/+2
Change-Id: I8e967000b769918af2c0fb3dae22b3d36be07647 Reviewed-on: https://code.wireshark.org/review/9765 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-23Fix QCocoaMenu errors.Gerald Combs1-16/+15
In PacketList and ProtoTree, create our own QMenus instead of stealing actions from the main window. This only fixes the errors listed in bug 10890. Add "to do" items for other bugs. Bug: 10890 Change-Id: I1c7ce8e4b863de95b2836e0cdcfb25824fe21edd Reviewed-on: https://code.wireshark.org/review/9760 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-07Starting to get rid of Q_UNUSED declarations for unused function parameters.Joerg Mayer1-3/+1
The official C++ way is to leave out the variable name instead. This has the advantage to be reliable: In one case a variable declared unused was later used. Change-Id: I1c96636f7fa7a621d1594d1e9cacaec75c561faa Reviewed-on: https://code.wireshark.org/review/9532 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-18Add a preferences editor frame.Gerald Combs1-0/+2
This replaces the single preference editor dialog in the GTK+ UI. Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5 Reviewed-on: https://code.wireshark.org/review/8966 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-17Qt: Add protocol preferences menus.Gerald Combs1-2/+18
Add protocol preferences in the packet list and packet detail context menus. Note that we need a PreferencesEditorFrame in the main window for editing numeric and string preferences. For now we just show the prefs dialog. Change-Id: Ice0cc8e9bc25963cc14aa47698f042f2a73088d8 Reviewed-on: https://code.wireshark.org/review/8957 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-29Qt: Add Conversation Filter sub menuAlexis La Goutte1-0/+10
Apply conversation filters using the new color_dissector_filters.[ch] from g1f03180. Change-Id: I2e535bb3d5b95fd26226422daf9f83c452a95e3c Reviewed-on: https://code.wireshark.org/review/3558 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15Qt: Implement "Apply as Column" for packet contextRoland Knall1-1/+6
Implement the same functionality for "Apply as Column" as it exists in the GTK version of Wireshark. Especially for the context menu in the packet view panel. Change-Id: Id25b7797616ff3b3acf7aa920395516c8a4e9bf9 Reviewed-on: https://code.wireshark.org/review/7604 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-13Qt: Don't set ProtoTree::uniformRowHeights.Gerald Combs1-13/+12
Some packet detail items contain multiple lines. Show them, which duplicates the GTK+ UI behavior. Add a note about adding a custom item delegate if this affects performance. Make item labels QStrings while we're here. Bug: 10225 Change-Id: Ia39320028ecff5fe7fa3e4c09ff37405986b7f6e Reviewed-on: https://code.wireshark.org/review/8445 Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-08Expert Info dialog.Gerald Combs1-14/+27
Show all expert messages in a combined view. Group top-level items by a (severity, group, protocol) tuple. Let the user enable and disable messages via a check menu. Add ProtoTree::goToField and expert_info_t.hf_index. Use them to jump to what we hope is the afflicted item. Enable the context menu only if the user has selected a packet item. Add a free-form search field that matches expert summaries. This differs from the GTK+ version but hopefully provides a smoother workflow. Bug: 10931 Change-Id: Ia12cb7c27cdea1634fa2798fb7e4c1b23bd16ad2 Reviewed-on: https://code.wireshark.org/review/8294 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-13Qt: Add option to copy all visible item or selected tree items in Packet ↵Michal Labedzki1-0/+2
Details pane The idea is allow to copy data from GUI by user, what is currently case only for tshark. The first option copy every item from Packet Details that are expanded (visibled). The second option do the same but start on currently selected item/tree. (let think about protocols like BT SDP where there is a lot of recursive subtrees) Change-Id: I19c925d21293ceb8af2167c7d2c1b1b36507124e Reviewed-on: https://code.wireshark.org/review/8047 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-09ProtoTree: Fix crashes.Gerald Combs1-2/+3
Don't dereference a null pointer. Remove g_assert()s copied from ui/gtk. This fixes problems mentioned in bug 11044 but not the bug itself. Change-Id: Iab75ab5cc6a184c8145a094b1c529a634e3c1c0d Ping-Bug: 11044 Reviewed-on: https://code.wireshark.org/review/7610 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05Qt: Add extra related packet indicator types.Gerald Combs1-3/+4
Add the ability to set frame number types: none, request, or response. Use the types to draw different related packet indicators in the packet list. Track the conversation in PacketListRecord. Use it to draw dashed lines for unrelated frames. Set frame number types for DNS and ICMP. Instead of drawing a transparent QImage, alpha blend our foreground color and draw directly in our painter. Blend more toward the foreground color. Add FRAMENUM_TYPE to checkAPIs. Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214 Reviewed-on: https://code.wireshark.org/review/7436 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-21Qt: Fix for QT < 4.8Michal Labedzki1-0/+4
QApplication::queryKeyboardModifiers() was introduced in 4.8. Try to be compatibile with my old Qt 4.7.2. Change-Id: Ie4abdd397cf2f10bb50132b09fed198d30425ee7 Reviewed-on: https://code.wireshark.org/review/7289 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-13Qt: Allow shift-double-clicking on a frame link.Gerald Combs1-1/+5
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>
2015-02-12Qt: Add the "new packet" window^Wdialog^Wwindow.Gerald Combs1-47/+56
Allow persistence across files. Preserve the use of "window" even though we're really a dialog. Update ByteViewTab and ProtoTree to support multiple instances. Remove the need for a cast in frame_data. Add more forward declarations. Change-Id: I50d3d9d1455b8ecc158a37218f9e41fe696d5ae2 Reviewed-on: https://code.wireshark.org/review/7086 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-04Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field ↵Michael Mann1-1/+1
type. These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter. FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter. Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type. Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values. Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9 Reviewed-on: https://code.wireshark.org/review/6098 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-04Qt: Dynamic languagesMichal Labedzki1-13/+27
- get language as soon as possible (before creating any Qt objects) to make all translations working - dynamic list of supported languages - runtime change of GUI language (no need to restart application) - add flags icons support - search for *.qm languages in buildin resources, then data dir called "languages" (main directory in sources or /usr/share/wireshark/languages), then user directory (UNIX: ~/.wireshark/languages); "languages" directory should contains files wireshark_xx.qm where xx is language code (en, en_GB, etc.), and optional xx.svg for flag icon - try to fix some untranslated manually-created UI items (need manual reset text of those components) Change-Id: I62ca8a8cddce47cec9dbcad6b0bd68b6cfd92229 Reviewed-on: https://code.wireshark.org/review/5041 Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-10-29Qt: Better protocol highlight colors.Gerald Combs1-1/+2
Use the "Window" palette colors for protocol-level highlighting. Change-Id: Ife55d70041aa12110a00782d790be0d747b32562 Reviewed-on: https://code.wireshark.org/review/4979 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-26Use better theme-derived colors. Switch back to AlternateBase forGerald Combs1-2/+1
protocol-level highlighting. Change-Id: I3de3442885b93093c3a4f5341080713a2039cd4c Reviewed-on: https://code.wireshark.org/review/4933 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-24Qt: Refactor ByteViewText.Gerald Combs1-1/+2
Instead of subclassing QTextEdit and filling it with the entire contents of our tvbuff, subclass QAbstractScrollArea and draw text by hand only when needed. The new code should be *much* faster. Some code based on QHexView by Even Teran (https://code.google.com/p/qhexview/). To do: - Finish the bit view implementation. Change-Id: Ie44de6870d80711cd44324521a17ab76bcefe5e5 Reviewed-on: https://code.wireshark.org/review/4922 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23Qt: Add zoom and column resize actions.Gerald Combs1-5/+11
Plumb signals and slots for changing the text size in the main window. Remove the bold font code from WiresharkApplication. It was only used in ByteViewText. Adjust the icons a bit. Bug: When we change the font preferences the packet list stops drawing cached strings. I haven't been able to track down the cause. Change-Id: I609d740c9f26265628fa4b7de1b75b0e56651387 Reviewed-on: https://code.wireshark.org/review/4269 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-15Qt: Disable main menu items that don't do anything.Gerald Combs1-1/+1
The functionality associated with Capture → Capture Filters, Analyze → Display Filters, Analyze → Display Filter Macros, and Analyze → Apply As Column haven't been implemented yet. Disable each menu item for now so that we don't play tricks on our users. Follow our current action naming convention. Rename "Apply as Column" to "Create a Column". Change-Id: I01901db05adc897d877f6a0a699e3049b0149b4a Reviewed-on: https://code.wireshark.org/review/3629 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>