summaryrefslogtreecommitdiff
path: root/ui/qt/packet_list.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-06-22Qt: Restore multi custom column width and alignStig Bjørlykke1-3/+1
Put custom column field settings in quotes in the recent file to support multi custom columns which contains space. Otherwise the space will be removed in prefs_get_string_list() and the field will not match when reading the recent file. Change-Id: Ic6e2b1e02d68970a4e11fbecbe55a7b10f8b10dd Reviewed-on: https://code.wireshark.org/review/22349 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-20Qt: Turn off auto scroll when going to a packetStig Bjørlykke1-1/+16
When going to a packet (first, last, next, prev and specific) during capture we must turn off auto scroll to let the packet be shown in the packet list. Change-Id: If1c615eb4d422c3b4c0418114064f7a4a0b75b35 Reviewed-on: https://code.wireshark.org/review/22244 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-20Don't scroll back to the selected frame when we get name resolution updates.Jeff Morriss1-4/+11
With live or large capture files and asynchronous name resolution this can cause serious scrolling issues as the name resolutions come in. Bug: 12074 Change-Id: I1a5cca410c0608927b32e9e7107885370caf14d7 Reviewed-on: https://code.wireshark.org/review/22245 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-20Qt: Prevent moving other columns on drag and dropPeter Wu1-1/+35
This workaround prevents moving around other columns during drag and drop and also transfers the sorting order to the new position. Bug: 13183 Ping-Bug: 13540 Change-Id: I4609c63557bf3abf06ba417ac1b40cac22a82abc Reviewed-on: https://code.wireshark.org/review/21022 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-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris1-2/+2
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X 10.0", for example. It was "Mac OS X" until 10.8 (although 10.7 was sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS X" from 10.8 to 10.11. Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3 Reviewed-on: https://code.wireshark.org/review/20933 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-03Qt: Fix goto next/prev packet toolbar buttonsStig Bjørlykke1-4/+6
Use bitwise AND to check if a modifier bit is set. Also changed from MetaModifier to AltModifier to match the comment and the modifier key used in "Next/Previous Packet in History". Change-Id: I89072a1dfdd14a2beb7344a672cbc18a3ace8924 Reviewed-on: https://code.wireshark.org/review/20359 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-03-03Qt: Add selection history navigation.Gerald Combs1-2/+79
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>
2016-12-13Qt: Optionally restore our selected packet when thawing.Gerald Combs1-3/+16
Stash the current row when we freeze the packet list. Make it possible to restore it when thawing. Do so when the layout changes and when we move a column. Change-Id: I44cfb8bafcd4d49a46e1c89bf47aecf5ac139773 Reviewed-on: https://code.wireshark.org/review/19222 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-12-12Move the declaration of packet_list_select_last_row() to ui/gtk/packet_list.h.Guy Harris1-9/+0
It's GTK+-only, so it shouldn't be in ui/ui_util.h. Get rid of the unused Qt packet list implementation of it. Change-Id: Ia9f8fe2209939dff5244e6948c36f29509340f68 Reviewed-on: https://code.wireshark.org/review/19226 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-12Mark routines GTK+ only.Gerald Combs1-0/+1
Mark packet_list_select_last_row and cf_goto_bottom_frame GTK+ only. Change-Id: I158814c2fa8c5fa8021b7156dded0945535c978a Reviewed-on: https://code.wireshark.org/review/19223 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-12-12Do not set Qt Window focus when highlighting rowsD. Ulis1-2/+0
Bug: 11890 Change-Id: I372f096c1ac0e483bf49cf95831e3df43621a642 Reviewed-on: https://code.wireshark.org/review/19209 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-22Qt: Optimized setColumnVisibility() usageStig Bjørlykke1-8/+0
Setting column visibility (show/hide columns) is only needed when columns has changed and when show/hide from column popup menu. Change-Id: Ia33d6fccab44443c453921fc2629bbf1d22efd01 Reviewed-on: https://code.wireshark.org/review/17781 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-09-17Qt: Hide columns after setting widthsStig Bjørlykke1-1/+1
In columnsChanged() the visibility must be set after setting the width to avoid that setting width overwrites visibility. This should fix hidden columns displayed during first capture. Bug: 12377 Change-Id: Idbbf36b014724970775c34b0c08803de9b006742 Reviewed-on: https://code.wireshark.org/review/17755 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-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-06-28Qt: Make the packet map work with Qt 5.7.Gerald Combs1-1/+1
It's not safe to assume that the overlay scroll bar range is equal(ish) to the number of packets. Adjust our arithmetic accordingly. Change-Id: Ic8cc8a746bdd2bdc6771794303e95a810bc3d1d2 Reviewed-on: https://code.wireshark.org/review/16186 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-06-22Qt: Clear the packet list selection before freezing it.Gerald Combs1-0/+2
Call selectionModel()->clear() before removing our model. This will hopefully make sure we don't end up with an invalid selection in selectionChanged(). Clear the selection model before clearing the model while we're here. Change-Id: I1007eeaa480afa0fb31dafc15a49ca6c247b30c8 Reviewed-on: https://code.wireshark.org/review/16062 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: Kenny Root <kenny@the-b.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-20qt: reset the column sorting when a new file is loadedMartin Kaiser1-0/+1
Bug: 12541 Change-Id: I75656d4027dd39e1f97c4bcd38e0dea6fe2de297 Reviewed-on: https://code.wireshark.org/review/16002 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-13Qt: Fix a Windows version check.Gerald Combs1-1/+1
Fetch the version using QSysInfo::windowsVersion. Ping-Bug: 12010 Change-Id: If63c576ec4f56f34b76f320cdd927bee427c8cb7 Reviewed-on: https://code.wireshark.org/review/15876 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-06-12Qt: Draw a border around inactive+selected packet list items.Gerald Combs1-0/+59
Try to make inactive+selected packet list items more visible by drawing a border around them. Make an exception for Windows 7 and Vista if a theme is active. Bug: 12010 Change-Id: I974069dda92588b80772f577f319569751ff3347 Reviewed-on: https://code.wireshark.org/review/15816 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-06-05Don't copy details of hidden columns.Michael Mann1-1/+3
Bug: 11788 Change-Id: I3f4df884d98903222de8a340de6a08e680687b0a Reviewed-on: https://code.wireshark.org/review/15727 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-05Qt: Make sure we redraw the far overlay.Gerald Combs1-4/+6
Make sure we redraw the far overlay image when we unmark all packets. Change-Id: Ib94af9029ee5c0a8e29a27c3b8aa8c84608fb9f6 Reviewed-on: https://code.wireshark.org/review/15266 Petri-Dish: Gerald Combs <gerald@wireshark.org> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-05-01qt: don't declare dp_ratio for Qt < 5.1Martin Kaiser1-1/+1
this avoids warnings about unused variables Change-Id: I0ee033f90c1387615ffc167161e53f4293d89763 Reviewed-on: https://code.wireshark.org/review/15195 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-04-28Qt: Refactor the packet list scroll bar.Gerald Combs1-73/+40
Split OverlayScrollBar into parent and child scroll bar widgets. This gives us two packet list scroll bars: a packet map, which draws and operates on nearby packets and a normal scroll bar. The packet map is drawn to the left of the child scroll bar. This gives us more room to draw and doesn't obscure the scroll bar itself (which is a problem on newer versions of Windows). When the user clicks on a portion of the map, scroll to that part of the packet list. Draw marked packet ticks over the normal scroll bar. Marked & ignored are on the left, time references are on the right. To do: - Borrow more from packet fence and graph something (packet size? time delta?) Change-Id: Ie952fcbd98fd0e047200f2279cb63227feabf5b1 Reviewed-on: https://code.wireshark.org/review/15046 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-04-08packet_list: fix Called C++ object pointer is null found by Clang AnalyzerAlexis La Goutte1-1/+1
Change-Id: Ie1a16973e94f09eeacea770936f9a9b4ab82b01d Reviewed-on: https://code.wireshark.org/review/14838 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-02Qt: Remember selected item in packet treePeter Wu1-0/+2
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-21Qt: Normalize timerEventsGerald Combs1-11/+12
Make our timerEvent code more consistent. Make sure we use timer IDs and that we call our base class timerEvent everywhere. Change-Id: Ib67daa459a8a2f9b67487c3952b7b35c7f162f7e Reviewed-on: https://code.wireshark.org/review/14480 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/+24
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-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-2/+2
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-12-28Refactor GUI dependencies out of color_filters.[ch] and move it to epan ↵Michael Mann1-2/+1
directory. This also moved color.h into color_filters.h Change-Id: Ic19e27aa1b3ec67e764aa7ee8bbef7b1187bb12e Reviewed-on: https://code.wireshark.org/review/12831 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-12-20Qt: Add missing multi-field column validationMichal Labedzki1-2/+2
GTK already has it, but Qt forgot about it, so multi-field custom column works ok if previously saved in GTK-shark. Invalid validation prevent from modifying and saving multi-field custom column in Qt version. While at it, rename "custom field" to "custom fields" to ensure we think about multi-field custom column. Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb Reviewed-on: https://code.wireshark.org/review/12685 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-13Qt: Removed applyRecentColumnWidths from recentFilesReadStig Bjørlykke1-3/+7
Adjusting column widths from recent settings is only needed when columns has changed. Don't recreate the columns when changing timestamp options or name resolution, only reset columns. Change-Id: I4c9a9f63c34542935dd282188d98b2b5b013c5f3 Reviewed-on: https://code.wireshark.org/review/12579 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-12-12Qt: Apply recent column widths when columns changedStig Bjørlykke1-1/+1
When changing columns in the preferences or when removing a column from the packet list header menu we need to apply recent column widths to preserve the remaining columns widths. Change-Id: Ie5c074722424b5cee31af3b6953ab1b026ba7fa5 Reviewed-on: https://code.wireshark.org/review/12575 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-08Fix crash caused by nullptr in packet_listmichal.orynicz1-2/+2
Fix crash caused by nullptr returned from proto_registrar_get_byname in packet_list.cpp Change-Id: If8324bf7c926585e964a11b27817f73d444beec4 Reviewed-on: https://code.wireshark.org/review/11558 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>
2015-12-07Qt: Set the packet list width when we apply recent column widths.Gerald Combs1-17/+9
Instead of messing with stretchLastSection, simply widen the packet list to the sum of our column widths. Do this whenever recent column widths are applied instead of only when the packet list is shown. Bug: 11849 Ping-Bug: 11738 Change-Id: If8f8c9a89da08387bbce38c663bbbe1d8f7e649a Reviewed-on: https://code.wireshark.org/review/12455 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-03Qt: Disable setStretchLastSection in the packet list.Gerald Combs1-0/+18
QTreeView sets the stretchLastSection property of its header by default. In our case this means that if the sum of our recent column widths exceeds the width of the packet list viewport QHeaderView will shrink the last column to fit. Disable setStretchLastSection. We want its behavior when our columns are too narrow so check for that in ::showEvent and temporarily enable it there. Bug: 11738 Change-Id: Ia4aad63e4f4bf899891bcebb7032dc5ebeb74cc7 Reviewed-on: https://code.wireshark.org/review/12392 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-11-28Qt: fix "go to packet" broken by g56625ddPascal Quantin1-1/+7
Keeping auto scroll is required to update the row displayed. Instead catch the mouse event and stop auto scroll only during that time. Change-Id: Ibc5b0a4115192fc3e01e63c82e67761e5aed9d3b Reviewed-on: https://code.wireshark.org/review/12235 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27Qt: remove automatic horizontal scrolling when selecting a rowPascal Quantin1-1/+2
QTreeView automatically scrolls so as to show as much as possible the content of the selected column. Let's get rid of that. Rename PacketList::setAutoScroll() so that it does not overload QAbstractItemView::setAutoscroll() Change-Id: I09fb54f9b31c3025efddce6a4e709baaf107702d Reviewed-on: https://code.wireshark.org/review/12225 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27Fix display of bytes as EBCDICPascal Quantin1-1/+1
MSVC compiler does not support properly setting an enum being part of a bit field. For example the following code: pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; changes pinfo->fd->flags.encoding from 0x0 to 0xfffffffe instead of 0x1 Let's put back an unsigned int definition (like it is in master-1.12 branch) and add explicit casts where required Bug: 11787 Change-Id: Idae0140fb6c172f1b3dbf10baefc8cfb00128f4c Reviewed-on: https://code.wireshark.org/review/12220 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27Qt: Check zero recent column widthStig Bjørlykke1-22/+27
Hidden columns may have been stored with zero width, so ensure we always check for this when fetching. Change-Id: I625c05adccaf2d81198fdeeccf7feeb9a9eb82c2 Reviewed-on: https://code.wireshark.org/review/12196 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26Qt: Use correct column width when switching profileStig Bjørlykke1-4/+20
QTreeView::setColumnHidden() saves column width on hide and restores column width on show. When switching from a profile with hidden columns to a profile where this columns are shown we get a sectionResized() signal with the saved width from the old profile, initiated from columnsChanged() -> setColumnVisibility(). We must avoid setting this as a new column width because this is recent values from a old column layout. In other cases we use setColumnVisibility() we don’t need to set a new column width either, because we store the column width ourself. Don't store column width when hiding column (new_width == 0). Restore column width when showing column because profiles may have changed the packet_list layout. Change-Id: I7e89c3477402ec6d621cd2015ee74b086f60d6cb Reviewed-on: https://code.wireshark.org/review/12111 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-11-24Qt: Save preferences when hide/show columnsStig Bjørlykke1-0/+6
To preserve the hide/show column settings between switching profiles the settings have to be saved. Change-Id: I6f72b2980be149676e1c1099a604c8c6d0d995bf Reviewed-on: https://code.wireshark.org/review/12109 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23Qt: Fix column resolve namesStig Bjørlykke1-0/+4
Reset columns when resolve names column menu item is toggled, and save preferences to preserve the setting. We should probably have functions to redraw only one column. Change-Id: I52dce8d104ab9bedd11edc5d200ab85154243cb5 Reviewed-on: https://code.wireshark.org/review/12077 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23Qt: Fixed more column issues when changing profile.Stig Bjørlykke1-2/+10
When changing profile without a loaded capture file we have to rebuild cap_file_->cinfo when a capture is loaded. Bug: 11493 Change-Id: I9b561a360236056c104cfdb478b855fa550325e2 Reviewed-on: https://code.wireshark.org/review/12068 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-11-22Qt: save columns position before freezingPascal Quantin1-0/+1
It allows to restore them properly in thaw() Bug: 11737 Change-Id: Ibee6ee701ab64019ee03666c652c232770b3bb74 Reviewed-on: https://code.wireshark.org/review/11999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-10-27Add preferences for related packets and the scroll bar minimap.Gerald Combs1-10/+33
Add gui.packet_list_show_related and gui.packet_list_show_minimap. Show_related enables and disables the related packet delegate. Show_minimap enables and disables the minimap. Start calling it the "intelligent scroll bar" since that's the best suggestion for a name I've seen so far. Leave them out of the Appearance preference pane for now. Change-Id: I5869c446fda5c8e62d6b1e49a74d63ba3b117b0f Reviewed-on: https://code.wireshark.org/review/11332 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-10-19Qt: fix time shiftGerald Combs1-6/+17
Add a timeShifted signal to TimeShiftDialog and use it to update the packet list and model. Add drawCurrentPacket to PacketList so that we can do a more thorough job of redrawing the current packet and tree. Bug: 11575 Change-Id: I960d8cdbf6872e3f71007cb4d2bbd5457f268257 Reviewed-on: https://code.wireshark.org/review/11068 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-05Move utf8_entities.h to wsutilJoão Valverde1-1/+1
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0 Reviewed-on: https://code.wireshark.org/review/10786 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-30qt: warn when jumping to an invalid packet numberPeter Wu1-0/+1
I was confused when double-clicking a packet number did not work. It turns out that the display filter was hiding the destination. Check the packet number for sanity, just like GTK+ does. Change-Id: If50b2a3091a468f880b42fd2385f1b74c30d2f2b Reviewed-on: https://code.wireshark.org/review/10700 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-09-23Qt: Always make the packet list row heights uniform.Gerald Combs1-15/+15
In tests here using GTK+ 2.24 and 3.10, GtkTreeView handles multi-line items by adjusting the height for all rows, but only after the number of multi-line items exceeds some sort of threshold. For a packet capture which contains a few DNS packets and a lot of TCP packets, if I change "Standard query" to "Standard\nquery" in packet-dns.c I get single-height packet list items. If I change "[TCP segment of a reassembled PDU]" to "[TCP segment of a\nreassembled PDU]" in packet-tcp.c (which results in more multi-line column strings) I get double-height packet list items. The current Qt code initially sets the uniformRowHeights property then falls back to variable row heights if we run across a multi-line column string. This adds a lot of logic which can impact other functionality (e.g. column widths) and recalculating row heights is painfully slow for large numbers of packets. Instead of trying to manage variable row heights, always enable uniformRowHeights. Track the maximum newline count and trigger a row height adjustment when it changes. This mimics the GTK+ UI behavior, although it should be more reliable. Note that we need to adjust some numbers in RelatedPacketDelegate. Change-Id: I289e963b6f00338c4374e602fa3fc83d04554519 Ping-Bug: 11515 Ping-Bug: 10924 Reviewed-on: https://code.wireshark.org/review/10628 Reviewed-by: Gerald Combs <gerald@wireshark.org>