Commit Graph

26 Commits

Author SHA1 Message Date
Alexis La Goutte 0ebbb60279 Byte view text (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I507b27bbf3c2877517cc9613ada1b182becfa98f
Reviewed-on: https://code.wireshark.org/review/7495
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-02 19:02:24 +00:00
Gerald Combs 3e5c0bffa2 Qt: Fix packet detail and byte view scrolling
Make sure we call scrollToByte ByteViewText::setFieldHighlight.
Explicitly scroll to our selected QTreeWidgetItem in
ByteViewText::mousePressEvent.

Bug: 11013
Change-Id: I0a6381f6760ed48a4f496be8a06b1e56faa5a05b
Reviewed-on: https://code.wireshark.org/review/7416
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-02-26 17:22:43 +00:00
Gerald Combs 451f7f04d5 Qt: Better protocol highlight colors.
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-29 00:16:01 +00:00
Gerald Combs 84f0ce4e23 Qt: Add bits display support to the byte view.
Add todo items for showing and hiding the offset, hex/bits, and
ASCII/EBCDIC sections and adding UTF-8 support.

Change-Id: Ia40faf3f939ef1a8fca6fac827057bd89045482a
Reviewed-on: https://code.wireshark.org/review/4949
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-27 17:33:05 +00:00
Gerald Combs 1c159818fd Qt: ByteViewText hover information.
When the user hovers over a byte view field, highlight it and show a
description in the status bar.

Add a "byte" status bar context and fix a label stack pop bug.

Keep proto_find_field_from_offset from matching generated items.
Otherwise hovering and selecting finds things like GeoIP entries and
checksum validation information. This affects the GTK+ UI as well.

Change-Id: Ic81c0d8159510a72d30c41f961807d8a48d05e16
Reviewed-on: https://code.wireshark.org/review/4943
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-27 02:05:13 +00:00
Gerald Combs 155c939bb9 Use better theme-derived colors. Switch back to AlternateBase for
protocol-level highlighting.

Change-Id: I3de3442885b93093c3a4f5341080713a2039cd4c
Reviewed-on: https://code.wireshark.org/review/4933
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-26 00:30:57 +00:00
Gerald Combs 1a45f1848f More offset color adjustments.
Change-Id: I52cf406443988624fb0e4a9e180963c599c8b91d
Reviewed-on: https://code.wireshark.org/review/4928
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-25 20:06:35 +00:00
Gerald Combs 3d2ec1613b Qt: ByteViewText fixups.
Calculate our X coordinate using floating point arithmetic. This should
hopefully fix the wierd subpixel text shifting for some font sizes.

Add alpha blending convenience routines to ColorUtils. Use them to
create the offset colors. The button color palette wasn't working very
well under Ubuntu.

Use QFontMetricsF::lineSpacing for our line height.

Note that we don't support the BOLD gui.hex_dump_highlight_style
preference. Leave a hint for anyone wishing to do so. Comment out
related code for now.

Change-Id: Ief77c9c8d00e05560cae6ecd781bd309027f6f5a
Reviewed-on: https://code.wireshark.org/review/4927
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-25 19:39:36 +00:00
Gerald Combs ceff4edbf0 Qt: Refactor ByteViewText.
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-10-24 22:58:46 +00:00
Gerald Combs 31e86998fb Qt: Add zoom and column resize actions.
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-09-23 22:32:53 +00:00
Hadriel Kaplan a6809ce9aa Fix bytes view pane showing non-ASCII chars
The bytes view pane in Qt is showing non-ASCII characters in the right-hand
side.  That's because the code is using isprint(), which is locale specific
and frequently includes non-ascii charscters such as the copyright symbol and
such. I wouldn't care, except some of those non-ASCII characters affects
the font height and makes it looks sloppy (the display output is set to a
fixed *width* font, but not fixed height font apparently).

Change-Id: Idd471c5fb769d3d67aa08bc507d168e686d48098
Reviewed-on: https://code.wireshark.org/review/548
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-07 13:05:39 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Evan Huus ced8abb125 Reduce the scope of one variable definition slightly.
svn path=/trunk/; revision=46361
2012-12-03 23:15:59 +00:00
Gerald Combs ad4dc9dfcd Add a comment about improving performance.
svn path=/trunk/; revision=45956
2012-11-06 23:49:26 +00:00
Gerald Combs 8865f925c2 Fix our offset calculation.
svn path=/trunk/; revision=45954
2012-11-06 22:17:06 +00:00
Gerald Combs 32074376ac Show the byte view when we select a packet. Update some method and
variable names.

svn path=/trunk/; revision=45953
2012-11-06 21:49:16 +00:00
Gerald Combs 101e9755c7 Try to speed up rendering.
svn path=/trunk/; revision=45841
2012-10-30 22:25:37 +00:00
Gerald Combs 12dfeadbbf Get rid of a couple of unused variables. Other minor cleanup.
svn path=/trunk/; revision=45839
2012-10-30 20:24:08 +00:00
Gerald Combs 0a28fb8f6a Update the Qt byte view widget to reflect the recent changes in the GTK+
byte view.

Move the packet_char_enc enum from packet.h to frame_data.h. Make the
encoding flag a packet_char_enc and make it one bit.

Get rid of the "cfile" global in a few places. C++-ize some of the font
code. Clean up some variable names.

svn path=/trunk/; revision=45838
2012-10-30 19:21:24 +00:00
Alexis La Goutte 42ace71553 Add modelines for Qtshark file
svn path=/trunk/; revision=44766
2012-09-04 08:18:31 +00:00
Jörg Mayer 11b1de0cdf Fixes for warnings: unused-but-set-variable
svn path=/trunk/; revision=44628
2012-08-23 10:30:37 +00:00
Gerald Combs 2b21eff0d9 Add automatic tree expansion. Get rid of some unnecessary void * casts.
Fix a couple of compilation warnings.

svn path=/trunk/; revision=44587
2012-08-19 20:47:11 +00:00
Gerald Combs bc1b0fd21d Try not to print funny characters.
svn path=/trunk/; revision=43685
2012-07-12 23:39:25 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Gerald Combs 41c54f9e5d Remove or mark unused variables.
svn path=/trunk/; revision=40599
2012-01-20 00:01:53 +00:00
Gerald Combs 23a520237b Add initial support for Qt along with a "ui" subdirectory.
svn path=/trunk/; revision=40378
2012-01-04 22:13:01 +00:00