Commit Graph

116 Commits

Author SHA1 Message Date
Chris Maynard 5b85e16735 Move the return out of the for() loop so all values are freed. Fixes Coverity CID 1277 (loop increment j++ is unreachable).
svn path=/trunk/; revision=39053
2011-09-19 20:19:43 +00:00
Anders Broman 67210b0731 Try to improve the tooltip a bit.
svn path=/trunk/; revision=38898
2011-09-06 15:28:07 +00:00
Guy Harris bd82608737 g_slist_free_full() didn't appear until GLib 2.28.
svn path=/trunk/; revision=38885
2011-09-05 19:39:34 +00:00
Stig Bjørlykke 9fb5d05d21 From Kurnia Hendrawan via bug 2931:
Added an option to save "decode as" entries.

svn path=/trunk/; revision=38883
2011-09-05 19:05:14 +00:00
Anders Broman adbdd0d180 Put src and dst ports in the option of "Both" decorate with arrows.
svn path=/trunk/; revision=38336
2011-08-04 16:02:09 +00:00
Anders Broman 42d800366d Change the default to "Both"
svn path=/trunk/; revision=38333
2011-08-04 11:53:50 +00:00
Anders Broman 3a35b7229c Fix a couple of tooltips.
svn path=/trunk/; revision=37975
2011-07-11 19:34:57 +00:00
Jörg Mayer b8e727ac8d GTK3 fixes:
- Replace 2 cases where GtkObject was used (no longer exists in GTK3)
- Whenever gdkkeysyms.h is included also include gdkkeysyms-compat.h
  iff we are building against gtk3

svn path=/trunk/; revision=37722
2011-06-20 00:48:05 +00:00
Stephen Fisher 88ea7649d5 More -DGSEAL_ENABLE cleanup in preparation for GTK+ 3.0
svn path=/trunk/; revision=35848
2011-02-07 18:38:33 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jeff Morriss b4c2ed1b86 Remove some unnecessary includes: a lot of things don't need globals.h and register.h
svn path=/trunk/; revision=34017
2010-08-30 16:10:01 +00:00
Bill Meier e5fc612fb2 Use consistent indentation;
Fix a few @param comments.

svn path=/trunk/; revision=33901
2010-08-24 00:25:50 +00:00
Bill Meier 66d340863f (Minor) Cleanup signal callbak signatures and related:
- Don't mark callback arg as _U_ if actually used (and vice-versa);
- Use Null as user_data in g_signal_callback if unused in callback;
- Use correct signature for certain event callbacks.

svn path=/trunk/; revision=33895
2010-08-23 19:29:08 +00:00
Bill Meier 6cdec04e59 (Minor) Cleanup some "event callback" function declarations/definitions:
- Add missing 'user_data' arg as needed;
- Use gboolean rather than int as the type of the value returned.
Also: Cleanup whitespace & reformat long lines in a few cases.

svn path=/trunk/; revision=33679
2010-07-30 12:41:56 +00:00
Jaap Keuter a7c62614d7 Clean comments and indentation.
svn path=/trunk/; revision=32726
2010-05-09 05:40:29 +00:00
Sake Blok 0618e53168 Enable "Decode As..." for ethertype 0x0000 (fix for bug 4721)
svn path=/trunk/; revision=32723
2010-05-08 07:55:12 +00:00
Bill Meier 644d7d41bf GtkOptionMenu --> GtkComboBox
svn path=/trunk/; revision=31949
2010-02-22 18:47:44 +00:00
Bill Meier 7b01915b6b Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31730
2010-01-29 16:13:26 +00:00
Stig Bjørlykke 005049bebb Changed hf_ip_proto to use ipproto_val[].
Removed some unneeded includes.

svn path=/trunk/; revision=31017
2009-11-19 15:30:06 +00:00
Stig Bjørlykke 0dbfde8b6d Removed some unused variables and unused assignments.
svn path=/trunk/; revision=30918
2009-11-10 12:05:25 +00:00
Anders Broman 7e06989ac3 Fix the debug code somewhat, we do not have a clist any more.
svn path=/trunk/; revision=30085
2009-09-23 13:54:43 +00:00
Anders Broman 93a3a50a01 From Artem Tamazov:
Analyze->Decode as... menu item becomes unavailable in some situations.(Ethernet-PW)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3642

svn path=/trunk/; revision=29063
2009-07-11 09:50:09 +00:00
Stig Bjørlykke 6e0dc25aa9 From Didier Gautheron (bug 3126):
Update expert info icon on redissect.

svn path=/trunk/; revision=28269
2009-05-04 21:13:14 +00:00
Guy Harris 54c159cb41 Turn on -Wshorten-64-to-32 by default, and fix some issues that turned
up (99 44/100% of which were assignments of double-precision
floating-point constants to floats).  Hopefully this will catch at least
some P64 issues on UN*X.

svn path=/trunk/; revision=28108
2009-04-21 16:57:52 +00:00
Bill Meier 27024a1d5a As suggested by Jakub Zawadzki: actually use sizeof(...) rather than a numeric constant in various places;
svn path=/trunk/; revision=27800
2009-03-19 17:49:11 +00:00
Anders Broman 5a7b5889f6 Commited by mistake, reverting.
svn path=/trunk/; revision=27752
2009-03-17 05:56:59 +00:00
Guy Harris adfaba2cb4 Fix syntax error.
svn path=/trunk/; revision=27747
2009-03-16 21:17:53 +00:00
Michael Tüxen 8df5f2a33e Fix compilation: Mark unused arg as _U_.
svn path=/trunk/; revision=27742
2009-03-16 18:26:37 +00:00
Anders Broman 3c2eddf646 Get rid of Clists, move a comment, move display as hex to gui_utils.
svn path=/trunk/; revision=27741
2009-03-16 18:01:25 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Tomas Kukosa 99295ee0d2 put the SCTP PPI for current DATA chunk into packet_info (and ppid array renamed to ppids)
svn path=/trunk/; revision=26958
2008-12-10 11:04:36 +00:00
Stig Bjørlykke 68a6ac1954 Handle double-click and enter in "decode as" list as OK.
Reindent some blocks.

svn path=/trunk/; revision=26831
2008-11-23 19:34:28 +00:00
Jaap Keuter e86825b8f8 From Francesco Fondelli:
Attached is a patch for:
- PW Associated Channel Header dissection as per RFC 4385
- PW MPLS Control Word dissection as per RFC 4385
- mpls subdissector table indexed by label value
- enhanced "what's past last mpls label?" heuristic
- Ethernet PW (w/o CW) support as per RFC 4448

svn path=/trunk/; revision=25730
2008-07-13 17:19:33 +00:00
Bill Meier 56206e0002 Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_container_border_width()          ==> gtk_container_set_border_width()
  gtk_container_children()              ==> gtk_container_get_children()
  gtk_entry_new_with_max_length()       ==> gtk_entry_new(); gtk_entry_set_max_length()
  gtk_menu_append()                     ==> gtk_menu_shell_append()
  gtk_menu_prepend()                    ==> gtk_menu_shell_prepend()
  gtk_notebook_set_page()               ==> gtk_notebook_set_current_page()
  gtk_paned_gutter_size()               ==> gtk_paned_set_gutter_size()
  gtk_radio_button_group()              ==> gtk_radio_button_get_group()
  gtk_signal_connect()                  ==> g_signal_connect()
  gtk_signal_disconnect()               ==> g_signal_handler_disconnect()
  gtk_signal_emit_by_name()             ==> g_signal_emit_by_name()
  gtk_signal_handler_block_by_data()    ==> g_signal_handlers_block_matched()
  gtk_signal_handler_block_by_func()    ==> g_signal_handlers_block_by_func()
  gtk_signal_handler_unblock_by_data()  ==> g_signal-handlers_unblock_matched()
  gtk_signal_handler_unblock_by_func()  ==> g_signal-handlers_unblock_by_func()
  gtk_spin_button_get_value_as_float()  ==> gtk_spin_button_get_value()
  gtk_toggle_button_set_state()         ==> gtk_toggle_button_set_active()

svn path=/trunk/; revision=25634
2008-06-29 15:51:43 +00:00
Stig Bjørlykke 860028c634 Removed the usage of topic_available() as we now have all topics.
svn path=/trunk/; revision=25505
2008-06-21 13:36:31 +00:00
Ulf Lamping f3a40604dc use a GTK_STOCK_CLEAR here
svn path=/trunk/; revision=25073
2008-04-16 08:54:50 +00:00
Ulf Lamping 8e3e8b588f sort #includes by directories
svn path=/trunk/; revision=24968
2008-04-13 01:54:20 +00:00
Ulf Lamping d4ccf577a8 where it's not necessary, remove #include "compat_macros.h"
svn path=/trunk/; revision=24922
2008-04-12 01:02:59 +00:00
Ulf Lamping 9af9a0e619 first round to replace SIGNAL_CONNECT with g_signal_connect
This requires some casts to be added and I just don't want to add casts at all possible places. So I compile and only add casts where the (MSVC) compiler has a hard time. 

Unfortunately this won't find any problems in Linux/Unix only code - I'll keep an eye on the buildbot and try to fix things as I'm going on ...

svn path=/trunk/; revision=24912
2008-04-11 21:20:51 +00:00
Bill Meier 538b1be897 OBJECT_..._DATA --> g_object_..._data
svn path=/trunk/; revision=24891
2008-04-11 15:23:26 +00:00
Anders Broman c973aa3830 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24868
2008-04-09 19:39:58 +00:00
Ulf Lamping 70595a85f4 remove GTK1 code
svn path=/trunk/; revision=24815
2008-04-06 23:02:27 +00:00
Bill Meier 161eb8b6d7 Add missing g_object_unref for treeview models;
Remove not needed set_tree_model (stats_tree_stat.c)

svn path=/trunk/; revision=24230
2008-01-31 16:37:56 +00:00
Ronnie Sahlberg 2830cf2045 fix the path to include g_ascii_strcasecmp.h
svn path=/trunk/; revision=23636
2007-11-28 01:23:09 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Stephen Fisher 2ec727ba76 Fix "Gtk-CRITICAL **: gtk_tree_selection_get_selected: assertion
`selection->type != GTK_SELECTION_MULTIPLE' failed" error when
opening the User Specified Decodes with multiple decodes setup.
The problem is caused by the selection mode for the list being
set to multiple.  I changed it to none so that the user doesn't
get the false impression that you can select only certain items
and clear them (the clear button clears them all).


svn path=/trunk/; revision=21287
2007-03-30 22:14:33 +00:00
Graeme Lunt 2fd7d2c620 New "decode as ..." feature for BER-encoded files (WTAP_FILE_BER).
A BER-encoded file can be dissected as one of a number of registered syntaxes (registered using register_ber_syntax_dissector()). 
Syntaxes may also be associated with OIDs (or other strings) using register_ber_oid_syntax(). 

A default syntax with which to dissect a BER-encoded file is determined from its filename (extension). For example, ".cer" and ".crt" files will be dissected as "Certificate".


svn path=/trunk/; revision=20414
2007-01-13 12:59:27 +00:00
Ulf Lamping a1b7a22a8e from Stephen Fisher:
Here is a patch for spelling typos in comments and strings in the gtk/ 
directories.

svn path=/trunk/; revision=19568
2006-10-17 01:29:55 +00:00
Guy Harris 92552c2d76 Get rid of a bunch of "Ethereal"s and "ethereal"s in comments, GUI
strings, and function names.

svn path=/trunk/; revision=18205
2006-05-22 07:29:40 +00:00