Commit Graph

190 Commits

Author SHA1 Message Date
Guy Harris 4dd48721ee Rename cf_get_comment() to reflect what comment it gets.
Change-Id: Id3b0430a1d462b29833259462536ed4cb0424f77
Reviewed-on: https://code.wireshark.org/review/22662
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-17 03:49:33 +00:00
Roland Knall ee699eb720 Qt: Move all utility widgets to widgets subdirectory
Move all utility widgets to the widgets subdirectory and
add separate source_group for their files

Correct some alphabetization in ui/qt/CMakeLists.txt noticed
during compare.

Change-Id: I2d664edc2b32f126438fb673ea53a5ae94cd43d1
Reviewed-on: https://code.wireshark.org/review/22531
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-11 21:30:29 +00:00
Stig Bjørlykke 578f2a15bb Qt: Restore multi custom column width and align
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-22 15:57:12 +00:00
Stig Bjørlykke be4dbf840b Qt: Turn off auto scroll when going to a packet
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-20 02:26:04 +00:00
Jeff Morriss 4e46352657 Don't scroll back to the selected frame when we get name resolution updates.
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-06-20 02:24:31 +00:00
Peter Wu 691d803037 Qt: Prevent moving other columns on drag and drop
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-20 15:06:19 +00:00
Guy Harris 357cfd3b03 A bunch of "{Mac} OS X" -> "macOS" changes.
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-04-05 19:16:22 +00:00
Stig Bjørlykke f22964da50 Qt: Fix goto next/prev packet toolbar buttons
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-03 19:35:28 +00:00
Gerald Combs 8e76cfbf54 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>
2017-03-03 05:02:14 +00:00
Gerald Combs e150235ef1 Qt: Optionally restore our selected packet when thawing.
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-13 22:01:59 +00:00
Guy Harris 9e9b5ecc0c Move the declaration of packet_list_select_last_row() to ui/gtk/packet_list.h.
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-12 21:12:58 +00:00
Gerald Combs eb1307a099 Mark routines GTK+ only.
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-12 20:37:10 +00:00
D. Ulis 128246bffb Do not set Qt Window focus when highlighting rows
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-12-12 19:26:36 +00:00
Stig Bjørlykke 5b4ca98a54 Qt: Optimized setColumnVisibility() usage
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-22 07:59:43 +00:00
Stig Bjørlykke 6bedad69b6 Qt: Hide columns after setting widths
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-17 20:18:05 +00:00
Gilbert Ramirez e8e193694a Qt: Option to copy bytes to clipboard as Escaped String
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-09-15 04:13:59 +00:00
Gerald Combs 422c0f45d4 Qt: Make the packet map work with Qt 5.7.
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-28 19:12:32 +00:00
Gerald Combs c664f72f36 Qt: Clear the packet list selection before freezing it.
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-22 05:00:17 +00:00
Martin Kaiser e3289a8794 qt: reset the column sorting when a new file is loaded
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-20 01:24:23 +00:00
Gerald Combs 34cacfc6a6 Qt: Fix a Windows version check.
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-13 19:26:35 +00:00
Gerald Combs aaba30a3a9 Qt: Draw a border around inactive+selected packet list items.
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-12 17:15:09 +00:00
Michael Mann 887b203083 Don't copy details of hidden columns.
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-06-05 10:02:06 +00:00
Gerald Combs a748eac808 Qt: Make sure we redraw the far overlay.
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-05 15:46:45 +00:00
Martin Kaiser 90eea14044 qt: don't declare dp_ratio for Qt < 5.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-05-01 14:16:54 +00:00
Gerald Combs b3e70f9a7e Qt: Refactor the packet list scroll bar.
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-28 17:18:41 +00:00
Alexis La Goutte 6d197f742f packet_list: fix Called C++ object pointer is null found by Clang Analyzer
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-08 06:12:24 +00:00
Peter Wu fd4808fbec Qt: Remember selected item in packet tree
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-04-02 21:17:35 +00:00
Gerald Combs bb48c859c9 Qt: Normalize timerEvents
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-03-21 22:10:21 +00:00
Stig Bjørlykke b5ac91399c Qt: Select matching tree item and bytes in Find Packet
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-23 18:30:48 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
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-24 03:41:28 +00:00
Michael Mann 1fed5fef9a Add HTTP Follow stream
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>
2016-01-03 13:36:18 +00:00
Michael Mann 5e4bbcda98 Refactor GUI dependencies out of color_filters.[ch] and move it to epan 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-28 18:33:41 +00:00
Michal Labedzki 9bb3f6be4c Qt: Add missing multi-field column validation
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-20 08:21:02 +00:00
Stig Bjørlykke e73fc7e51e Qt: Removed applyRecentColumnWidths from recentFilesRead
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-13 18:50:53 +00:00
Stig Bjørlykke 5133221a19 Qt: Apply recent column widths when columns changed
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-12 22:15:39 +00:00
michal.orynicz 2f2c8788a9 Fix crash caused by nullptr in packet_list
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-08 12:26:12 +00:00
Gerald Combs 5f00849b97 Qt: Set the packet list width when we apply recent column widths.
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-07 13:58:18 +00:00
Gerald Combs bdf8034fb1 Qt: Disable setStretchLastSection in the packet list.
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-12-03 05:17:19 +00:00
Pascal Quantin df83e45084 Qt: fix "go to packet" broken by g56625dd
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-28 07:44:25 +00:00
Pascal Quantin 56625dd456 Qt: remove automatic horizontal scrolling when selecting a row
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-27 18:49:53 +00:00
Pascal Quantin 62b03da49a Fix display of bytes as EBCDIC
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-27 18:39:09 +00:00
Stig Bjørlykke f5b816d4c9 Qt: Check zero recent column width
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-27 05:29:08 +00:00
Stig Bjørlykke 4980d505f2 Qt: Use correct column width when switching profile
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-26 17:16:51 +00:00
Stig Bjørlykke 9601a4f724 Qt: Save preferences when hide/show columns
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-24 19:13:45 +00:00
Stig Bjørlykke 9851bed7a4 Qt: Fix column resolve names
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-23 20:35:23 +00:00
Stig Bjørlykke 7324555c1f Qt: Fixed more column issues when changing profile.
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-23 17:02:41 +00:00
Pascal Quantin 17e088ba0e Qt: save columns position before freezing
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-11-22 17:29:06 +00:00
Gerald Combs 9f8d00c174 Add preferences for related packets and the scroll bar minimap.
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-27 23:28:56 +00:00
Gerald Combs a0113a5eb3 Qt: fix time shift
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-19 17:41:12 +00:00
João Valverde c00420efa2 Move utf8_entities.h to wsutil
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-10-05 14:34:53 +00:00