Commit Graph

47 Commits

Author SHA1 Message Date
João Valverde 8fa4a440a8 GTK: Remove packet editor
Removes limited experimental feature for deprecated UI.

Change-Id: Ib3ccfae89dd2a674ebbde346a442fa1cf6587f26
Reviewed-on: https://code.wireshark.org/review/24563
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-24 05:13:42 +00:00
Michael Mann ee7f9c33f6 Pacify GTK checkAPIs.pl warnings.
Add "Wireshark" macros to old-gtk-compat.h for GTK APIs that have been deprecated.
The macros are setup by version number to limit their proliferation (not that I
suspect much development will really be done there since GTK is deprecated).
Just want to make buildbots happy for the time being.

Change-Id: I095f850065166a0bc2e2456fb2e886ab64fdd97d
Reviewed-on: https://code.wireshark.org/review/16635
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-24 20:03:29 +00:00
Pascal Quantin 47a4c8f395 Qt: use recent.gui_bytes_view preference to remember bits / byte view
While we are at it, let's centralize bytes_view_type definition

Bug: 11903
Change-Id: I606c779a8efaea668db1b440d3ae0336e6e3fc67
Reviewed-on: https://code.wireshark.org/review/12706
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>
2015-12-18 06:46:46 +00:00
Stig Bjørlykke e1ed7598ee Removed local definitions of offsetof().
The offsetof() macro is an ANSI C library feature.

Change-Id: I2ac91b0b4c94c6f6baf14133b076fdc5ed2e182b
Reviewed-on: https://code.wireshark.org/review/12707
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-12-18 05:49:45 +00:00
Anders 360a7ec9ae G_STRUCT_OFFSET gives warnings turned errors with MSVC2015,
use offsetof if defined or define it ourselfs as done in other
places in our code base.

Change-Id: Ia1c72c9648336e93ba8c14d4bc0371d782835370
Reviewed-on: https://code.wireshark.org/review/8735
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>
2015-06-03 10:44:16 +00:00
Bill Meier bfde04b845 ui/gtk/*.c: Add editor modelines; As needed: Fix indentation
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753
Reviewed-on: https://code.wireshark.org/review/7138
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-15 19:02:30 +00:00
Gerald Combs e11d7ef08f Fix diagnostics macros and squelch a gcc warning.
Both clang and gcc define __GNUC__. Make sure we account for that when
defining diagnostic macros.

Use DIAG_OFF + DIAG_ON to suppress gcc -pedantic warnings about
frame_data.

Get rid of packet_char_enc casts.

Change-Id: Idbcc61bcdb35c1d20f185461c69451dcdf73bae9
Reviewed-on: https://code.wireshark.org/review/7106
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-02-14 19:46:42 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Daniel Mack ed0b19b94b Make boolean bitmask type 64-bit wide
There are protocols out there that have 64-bit wide bit mask fields, so
make the internal representation and bitfield decoders 64-bit aware.

For this, the ws_ctz() fallback and bits_count_ones() have to be tweaked
slightly.

Change-Id: I19237b954a69c9e6c55864f281993c1e8731a233
Reviewed-on: https://code.wireshark.org/review/4158
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-12 14:15:12 +00:00
Guy Harris 6a9c924460 Move the XXX-to-UTF-8 loops to routines in epan/charsets.c.
This moves a bunch of character set knowledge into epan/charsets.c.

Change-Id: Ieb79dcaac9753c77703af756b666ad2ca9385d9e
Reviewed-on: https://code.wireshark.org/review/1339
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-25 08:32:06 +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
Jakub Zawadzki 746ee39329 Drop isprint.h use g_ascii_isprint() when this include hack was enabled.
svn path=/trunk/; revision=54327
2013-12-21 15:01:45 +00:00
Bill Meier e442680f48 gtk_widget_modify_font() has been renamed to gtk_widget_override_font() in GTK3
svn path=/trunk/; revision=50915
2013-07-26 16:19:00 +00:00
Jakub Zawadzki 0426c05d49 packet-editor: Allow focus for byteview, it should fix problems with field hexeditor not getting key-press-event.
Generally it should be also safe for builds without packet-editor, just in case ifdef it.

svn path=/trunk/; revision=50172
2013-06-26 17:15:25 +00:00
Evan Huus 50bc11bc14 One more fix for the protocol grey highlighting.
svn path=/trunk/; revision=50100
2013-06-21 00:49:35 +00:00
Jakub Zawadzki 2bd2bfb416 Yet another fix, put spaces in insensitive or normal state.
svn path=/trunk/; revision=50099
2013-06-21 00:42:19 +00:00
Jakub Zawadzki 1b69a2b3c8 Highlight protocol bytes in grey, idea stolen from qtshark
svn path=/trunk/; revision=50095
2013-06-20 23:28:35 +00:00
Jakub Zawadzki a12ee2e673 Fix 'Misaligned columns in hex dump pane' [1]
Old code was broken for all pango version < 1.20

[1] http://www.wireshark.org/lists/wireshark-dev/201306/msg00015.html

svn path=/trunk/; revision=49848
2013-06-08 18:57:49 +00:00
Balint Reczey 6974bcecb1 Don't call gtk_widget_unregister_window() in bytes_view_unrealize() after GTK+ 3.8.0
to prevent double invocation causing crash.

This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8604 .
The patch is from Jakub Zawadzki.

svn path=/trunk/; revision=49655
2013-05-31 20:57:07 +00:00
Balint Reczey c7501cbf67 Use gtk_widget_register_window() and gtk_widget_unregister_window()
instead of deprecated gdk_window_set_user_data() for GTK+ 3 >= 3.8

svn path=/trunk/; revision=49633
2013-05-30 16:42:32 +00:00
Jaap Keuter 42c71a3261 Follow up on bug 8416.
Remove C++ incompatibilities in GTK+ 3 code.

svn path=/trunk/; revision=48606
2013-03-28 06:36:44 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Anders Broman 5147d6cffa Use explicit casts.
svn path=/trunk/; revision=48187
2013-03-08 07:09:39 +00:00
Alexis La Goutte 25e3c84c01 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=46968
2013-01-06 14:51:00 +00:00
Bill Meier 4dacdedbe7 Fix several [-Wshadow] warnings;
Also: Do some minor whitespace and formatting changes.

svn path=/trunk/; revision=46185
2012-11-25 21:07:07 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jakub Zawadzki 045b5b03ce Fix bug #7520: Byteview related Glib-GObject-Critical msgs during GTK2 Wireshark startup
Put generated, with *proper* types version of marshaler (VOID:OBJECT,OBJECT) inside bytes_view.c
It was also only blocker of #undef GTK_DISABLE_DEPRECATED, so remove it.

XXX generated version of marshaler looks portable, but it'd be best to generate it using
glib-genmarshal during compilation.

svn path=/trunk/; revision=43947
2012-07-23 20:24:36 +00:00
Jakub Zawadzki 5b7e9a9152 BytesView: use "view" class (GtkTextView) instead of "entry" (GtkEntry) one.
Cheat a little and always make BytesView focused to make render blue-highlight instead of grey /inactive/ one.

XXX, we should have our own BytesView class and allow user define his own style in css.

svn path=/trunk/; revision=43859
2012-07-20 13:59:57 +00:00
Jakub Zawadzki 642861a4e1 Fix bug #7502
In gtk3 upper value of adjustment can't be smaller than page_size.
Otherwise strange things happens ;-)

svn path=/trunk/; revision=43856
2012-07-20 11:59:20 +00:00
Anders Broman 42cb0dd606 Remove unused variable.
svn path=/trunk/; revision=43826
2012-07-19 13:10:17 +00:00
Jakub Zawadzki 58d106382a Use define instead of string constant.
svn path=/trunk/; revision=43824
2012-07-19 12:49:42 +00:00
Jakub Zawadzki 3c80b32e54 BytesView: use GtkStyleContext for gtk-3 (bug #7502)
svn path=/trunk/; revision=43823
2012-07-19 12:41:44 +00:00
Jakub Zawadzki dce9b3baec BytesView: Support for gtk3 scrollbar.
svn path=/trunk/; revision=43821
2012-07-19 11:03:54 +00:00
Jörg Mayer 83a22a220a Now it compiles with 2.24 - hopefuly it will even work
svn path=/trunk/; revision=43767
2012-07-17 14:52:42 +00:00
Jörg Mayer 6bd20171ef Bring compilation with gtk 2.24 one step further (not yet working)
svn path=/trunk/; revision=43766
2012-07-17 14:33:06 +00:00
Jakub Zawadzki 42f423fcce - Restore optimization of drawing only lines in clipping area
- Fix compilation for < gtk-2.14

svn path=/trunk/; revision=43745
2012-07-16 09:56:53 +00:00
Jakub Zawadzki 009a1a3614 Compilation fixes for gtk-3.x + for gtk-2.x use clipping region not area.
svn path=/trunk/; revision=43744
2012-07-16 09:18:33 +00:00
Jakub Zawadzki 7a2ba09d14 - Make it compile gtk-2.24 with GSEAL_ENABLE enabled
- ->draw for gtk-3.x (NOT TESTED!!!)

svn path=/trunk/; revision=43743
2012-07-16 08:35:04 +00:00
Jakub Zawadzki aaa4688e3a Some gtk-3.0 fixes.
svn path=/trunk/; revision=43742
2012-07-16 07:26:00 +00:00
Guy Harris 7736e72e1d <gtk/gtkmarshal.h> doesn't appear to be necessary, at least with GTK+
2.24.5.  Remove the include of it.

Get rid of duplicate #undefs of GTK_DISABLE_DEPRECATED and GSEAL_ENABLE
- nothing in config.h should depend on them.

Make at least some of the changes that

	http://developer.gnome.org/gtk3/stable/ch24s02.html#id1459694

and

	http://developer.gnome.org/gtk3/stable/ch24s02.html#id1459754

seem to indicate we need to make for GTK+ 3.

svn path=/trunk/; revision=43739
2012-07-16 02:42:44 +00:00
Guy Harris 95060ffa5d The CMake builds in the Ubuntu buildbot appear to be building with GTK+
3; if so, that might indicate that GTK+ 3 doesn't have gtkmarshal.h. 
Try not attempting to include it with GTK+ 3.x - if that causes other
failures, well, I guess that means that, when building the BytesView
widget under GTK+ 3, we can't use the gtk_marshal_ functions....

svn path=/trunk/; revision=43737
2012-07-16 01:54:32 +00:00
Guy Harris 268520b707 For the encoding and format, use the enum types.
Add some comments.

svn path=/trunk/; revision=43736
2012-07-16 01:49:01 +00:00
Jakub Zawadzki 19c7ee7ae2 Fix some gseal warnings.
svn path=/trunk/; revision=43734
2012-07-15 21:57:08 +00:00
Guy Harris 3408bf4038 Get rid of unnecessary include.
svn path=/trunk/; revision=43733
2012-07-15 21:53:50 +00:00
Guy Harris 205165dfb8 Squelch some more warnings with explicit casts.
svn path=/trunk/; revision=43732
2012-07-15 21:22:09 +00:00
Guy Harris 6bf7a66b29 Try gdouble here, to see if it removes "gdouble to gfloat" warnings with
MSVC.

svn path=/trunk/; revision=43731
2012-07-15 21:19:42 +00:00
Jakub Zawadzki b69c48df5a Fix bug #6690: Wireshark quite slow displaying frames with many detail pane nodes and large byteviews
Add custom widget to render hexdump or bitsdump.

svn path=/trunk/; revision=43728
2012-07-15 20:24:48 +00:00