Commit Graph

15 Commits

Author SHA1 Message Date
Peter Wu 966766694c ui/gtk: use GTK+ 2 name for control keys
The GDK_KEY_* names are part of GTK+ 3, GTK+ 2 does not have the _KEY_
infix. See
https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3.6

Fixes regression from "ui/gtk: fix control combos such as ctrl-a,
ctrl-c".

Change-Id: I4d470212d172f978c171e54ff7377ddc211817ac
Reviewed-on: https://code.wireshark.org/review/7325
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2015-02-23 12:32:35 +00:00
Peter Wu 1a10f5f2b4 ui/gtk: fix control combos such as ctrl-a, ctrl-c
Ignore any Ctrl combinations to allow pasting to work. Regression
introduced in "gtk: fix crash on Broadway GDK backend".

Change-Id: I3d53db2d224cb604b52081002ff923c8684a8d0a
Reviewed-on: https://code.wireshark.org/review/7276
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Balint Reczey <balint@balintreczey.hu>
2015-02-20 17:04:41 +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
Guy Harris 4a0ec75e4d Use the GTK+ 2 name for VoidSymbol.
We can use the GTK+ 2 GDK_xxx names with GTK+ 2 or 3; apparently, some
versions of GTK+ 2 don't support the GDK_KEY_xxx names.

Change-Id: I52b14a7f2273f2af2b914c3646eb33d21673057e
Reviewed-on: https://code.wireshark.org/review/6498
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-11 21:20:11 +00:00
Peter Wu 74b20dca8c gtk: fix crash on Broadway GDK backend
The Broadway GDK backend does never sets event->string. This results in
a crash when filter_string_te_key_pressed_cb tries to read its contents.

Since the documentation marks reading the string as deprecated, try to
handle the character conversion here. It is based on
_gdk_x11_event_translate_keyboard_string (from gtk+), but without trying
to interpret Escape as '\033', and without trying to convert control
characters (example: Ctrl + 1). A buffer of 6 bytes is used to hold a
UTF-8 code point (there is no zero terminator, so 7 bytes as found in
the original implementation is unnecessary).

As g_locale_from_utf8 returns dynamically allocated memory, change the
control flow to have a single exit point where pointers are freed as
needed.

Reproduce with gtk3:
$ broadwayd :5
$ GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 wireshark-gtk
(now open http://localhost:8085/ and start typing in the display filter)

Keys tested: e € (AltGr + 5) ü (AltGr + ", u)
In the X11 backend, these still get displayed correctly. In the broadway
backend however, the accents are missing due to a bug in the broadway
implementation.

Change-Id: Ic1f0ee2b87cd573023ee8e966f06489b3b744dcf
Reviewed-on: https://code.wireshark.org/review/5832
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2015-01-11 17:45:48 +00:00
Evan Huus d47ae54806 Replace linked list of proto fields with array
This is substantially more memory-efficient, shaving another ~1.5MB off our base
usage. It also lets us remove the annoying extra "last_field" pointer and
simplify proto_register_field_common(). It also accidentally fixed what may
have been a memory leak in proto_unregister_field().

It unfortunately complicates proto_get_next_protocol_field() to require
refetching the protocol each time, but that is itself just an array-lookup under
the covers (and isn't much used), so I don't expect the performance hit to be
noticable.

Change-Id: I8e1006b2326d6563fc3b710b827cc99b54440df1
Reviewed-on: https://code.wireshark.org/review/1225
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-21 15:37: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
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Jakub Zawadzki 9cfac1227d Replace hfinfo pointer to same_name_prev, with same_name_prev_id.
svn path=/trunk/; revision=51175
2013-08-06 20:53:47 +00:00
Anders Broman deefa09237 Use explicit casts.
svn path=/trunk/; revision=48217
2013-03-09 17:33:15 +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
Anders Broman 1cd8b5b0cc Get rid of some GTK_CHECK_VERSION instances by using compabillity macros.
svn path=/trunk/; revision=44186
2012-08-01 13:41:40 +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
Jakub Zawadzki 23494db817 Add missing const attribute to some char *
Fix some "assignment discards qualifiers from pointer target type", etc

svn path=/trunk/; revision=41996
2012-04-09 18:44:10 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00