Commit Graph

67 Commits

Author SHA1 Message Date
Jörg Mayer 4e1f4b18ab More char -> const char warning fixes.
Removed (very few) casts that only change the warning message
  but don't remove it (with gcc-4).

svn path=/trunk/; revision=15227
2005-08-05 20:59:08 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Guy Harris 76258fe8e3 Constify a bunch of structure members and function arguments, to squelch
compiler warnings.

Clean up indentation.

svn path=/trunk/; revision=14739
2005-06-24 01:32:42 +00:00
Guy Harris f1deabed56 Make the tone of the error messages a bit less formal, by using
contractions.  (Safari does, at least when you're trying to open a file
to which you don't have read access.)

svn path=/trunk/; revision=12852
2004-12-29 01:08:20 +00:00
Guy Harris 0cd6d2f51c From Stas Grabois: make the previous change not to show disabled
protocols in the "Add Expression" and "Decode As" dialogs work with GTK+
2.x.

svn path=/trunk/; revision=11626
2004-08-08 06:25:24 +00:00
Ulf Lamping bfd6ace52e renamed filter_prefs to filter_dlg, as the filter settings are (well, for a long time) no longer part of the preferences dialog.
svn path=/trunk/; revision=11436
2004-07-19 21:42:01 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris 77fcb848f2 Move "dfilter_expr_dlg_delete_event_cb()" after
"dfilter_expr_dlg_cancel_cb()" to avoid use-before-declaration warnings.

svn path=/trunk/; revision=11136
2004-06-10 20:16:50 +00:00
Guy Harris 045b535aed "delete_event" is an event, so its handler takes three arguments, not
two, and it returns a gboolean.

svn path=/trunk/; revision=11133
2004-06-10 10:09:58 +00:00
Guy Harris f2cf0c1e0f From Stas Grabois: don't show disabled protocols in the "Add Expression"
and "Decode As" dialogs (so that you can cut down the size of the
protocol lists in those dialogs by disabling "uninteresting" protocols).

svn path=/trunk/; revision=11132
2004-06-10 09:47:25 +00:00
Ulf Lamping 8d121bfb92 use gtk_window_set_default_size() instead of WIDGET_SET_SIZE() for the dialogs,
as WIDGET_SET_SIZE() will prevent the user from shrinking the dialog,
and gtk_window_set_default_size() will not

svn path=/trunk/; revision=11021
2004-05-27 19:59:50 +00:00
Ulf Lamping 7d37fc9d23 more code cleanup from dialog things:
changed window_xy (dialog) function calling in a lot of gtk files
cleanup of file selection code
cleanup in dlg_utils/file_dlg/ui_util
Please report any problems!!!

svn path=/trunk/; revision=11003
2004-05-26 03:49:24 +00:00
Ulf Lamping df77a41690 replaced snprintf by g_snprintf and removed #include "snprintf.h"
svn path=/trunk/; revision=10370
2004-03-13 11:47:08 +00:00
Ulf Lamping 1d2c14be66 fixed a bug GTK_WIDGET_VISIBLE -> GTK_WIDGET_SENSITIVE,
added some (not yet finished) work

svn path=/trunk/; revision=10340
2004-03-07 18:18:43 +00:00
Ulf Lamping b3dc79413e some code cleanup
svn path=/trunk/; revision=10335
2004-03-06 15:55:18 +00:00
Ulf Lamping dcadae3583 replaced show/hide by sensitive/insensitive to see all fields everytime
svn path=/trunk/; revision=10334
2004-03-06 11:16:19 +00:00
Guy Harris 90cf9a6b7b The HIG's and/or GUI toolkit documentation for:
Mac OS X

	GNOME

	Qt

	KDE

	Windows

all indicate that {message,alert} boxes are modal, at least for the
window to which they apply.  (Presumably the idea is that not forcing
the user to pay attention to the alert box, and allowing more than one
alert box to be up for a given window, causes more problems than not
letting the user do stuff to that window in order to figure out what the
underlying problem is or figure out what to do to fix it - the message
should be sufficient, in most if not all cases, to let you know what the
problem is.)

Make "simple_dialog()" unconditionally make the alert box modal, and get
rid of ESD_TYPE_MODAL.  XXX - we need to make it possible to make an
alert box modal for a given window, rather than just the top-level
window.

svn path=/trunk/; revision=10051
2004-02-12 22:24:28 +00:00
Ulf Lamping 5297f06717 replaced every appearance of gtk_scrolled_window_new() with
scrolled_window_new().
added gtk_scrolled_window_set_policy(AUTOMATIC,AUTOMATIC) to
scrolled_window_new()
added GTK2's gtk_scrolled_window_set_shadow(GTK_SHADOW_IN)
to every place needed

svn path=/trunk/; revision=9999
2004-02-06 19:19:12 +00:00
Guy Harris 1980fa5dbf Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on
some platforms, causing compiler warnings (and, on platforms where a
null pointer doesn't have all its bits 0, possibly causing misbehavior,
although I don't think there are any such platforms on which Ethereal
runs).

Don't allow 0 as button mask argument to "simple_dialog()".

Squelch a compiler warning.

Report fatal problems as errors, not warnings.

Report file I/O errors with "file_open_error_message()".

Report file write errors (including those reported by "close()", e.g.
some errors writing to an NFS server) when saving raw packet data to a
file.

svn path=/trunk/; revision=9915
2004-01-31 03:22:42 +00:00
Ulf Lamping 25edd1c53e renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR to
better reflect the real error text

svn path=/trunk/; revision=9913
2004-01-31 02:25:46 +00:00
Olivier Biot a165b0d6be Add support for the "matches" operator if HAVE_LIBPCRE is defined.
svn path=/trunk/; revision=9865
2004-01-26 21:02:36 +00:00
Ulf Lamping 8e2a930023 implemented dlg_button_row_new to get a standard function for
layouting the dialog buttons, and use it where appropriate.
This will help us with the GTK1/2 conflict on button layouts and
will also result in a more consistent look of the dialogs at all.

svn path=/trunk/; revision=9771
2004-01-21 21:19:34 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Ronnie Sahlberg 4f84e65c50 fvalue_free() is one of the most called functions.
This function is also very small, so small that teh overhead for the actual function call and return is likely to be a significant part
of its execution time.

change it into a macro and make it thus slightly faster by eliminating the function call overhead.

svn path=/trunk/; revision=9083
2003-11-25 13:20:36 +00:00
Guy Harris 7bd2e232a9 Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.

Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).

Change some direct dissector calls to go through handles.

svn path=/trunk/; revision=8979
2003-11-16 23:17:27 +00:00
Guy Harris b4bdaa5e9f Put quotes around values for FT_ABSOLUTE_TIME variables, and around
values with white space in them.

svn path=/trunk/; revision=8820
2003-10-29 23:15:35 +00:00
Olivier Abad 11c747bd5f - in show_relations() : select the first row of the relation_list when
using gtk+ v2.
- get rid of some unused variables.

svn path=/trunk/; revision=8565
2003-09-29 06:41:46 +00:00
Guy Harris 8e523e0744 The relation list is always displayed (that's been true for a while) -
we don't need to support making it visible or not depending on the
selected field.

svn path=/trunk/; revision=8517
2003-09-23 18:09:36 +00:00
Guy Harris dd2080a646 Don't try to align the field filter name and name - the font would
probably be variable-width, so that doesn't work.  Just put a dash
between them.

Boost the size of the buffer used for the field text to 256 characters.

In GTK+ 1.2[.x], put the entries for fields (rather than protocols) in
as leaf nodes.

svn path=/trunk/; revision=8388
2003-09-05 06:59:38 +00:00
Guy Harris a26f4d0682 If Belinda:
http://www.ethereal.com/lists/ethereal-dev/199910/msg00237.html

isn't there, don't try to display her.

svn path=/trunk/; revision=8385
2003-09-05 05:28:50 +00:00
Ronnie Sahlberg d633bccd2f Add some more text to the filter item description in the display filter add expression dialogue
It was very cnfusing where some protocols such as SMB had multiple items all called the same thing.   Now one can distinguish between them

svn path=/trunk/; revision=8383
2003-09-05 03:32:24 +00:00
Gilbert Ramirez 52338a3baf Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).
The search uses a naive approach; more work is required to add a
Boyer-Moore Search algorithm.

svn path=/trunk/; revision=8280
2003-08-27 15:23:11 +00:00
Guy Harris e4e0150ffa From Matthijs Melchior:
support for registering fields after all the protocol
	    registration routines are called (i.e., adding fields to the
	    named field tree as they're registered);

	fix the GTK 2.x version of the field list dialog to show the
	    correct name.

svn path=/trunk/; revision=8248
2003-08-25 00:15:02 +00:00
Gilbert Ramirez 086774b71f Add to the fundamental types passed between the scanner and the parser.
Besides "STRING", there is now "UNPARSED_STRING", where the distinction
is that "STRING" was a double-quoted string and "UNPARSED_STRING" is just
a sequence of characters that the scanner didn't know how to scan/parse,
so it's up to the Ftype to parse it.

This gives us more flexibility and prepares the dfilter parsing engine
for the upcoming addition of the "contains" operator.

In the process of doing this, I also re-did the double-quoted string
support in the scanner, so that instead of the naively-simple support we
used to have, double-quoted strings now can have embedded dobule-quotes,
embedded octal sequences, and embedded hexadecimal sequences:
    "\""    embedded double-quote
    "\110"  embedded octal
    "\x48"  embedded hex

Enhance the dfilter unit test script to be able to run a single collection
of tests instead of having to run all of them all the time.

svn path=/trunk/; revision=8083
2003-07-25 03:44:05 +00:00
Jörg Mayer 9281a04064 Pointer <--> int converions cause warnings on ia64.
Modified a patch originally contained in the SuSE distro
to do the conversions via glib macros.

svn path=/trunk/; revision=7330
2003-03-10 02:06:33 +00:00
Guy Harris ab552d3746 Get rid of BASE_BIN - it's just the same as BASE_DEC, but people seemed
to be using it for stuff that should be hex, and for stuff that should
be Boolean.  Use BASE_DEC if it should be decimal, BASE_HEX if it should
be hex, and make it Boolean if it should be Boolean.

svn path=/trunk/; revision=7053
2003-01-31 03:17:56 +00:00
Olivier Abad b48fd02f40 Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6600
2002-11-10 11:00:29 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Jörg Mayer 1b626a140a Add a missing #include <string.h>
svn path=/trunk/; revision=6390
2002-10-09 23:03:11 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 96ab70e209 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the gtk/ directory.

svn path=/trunk/; revision=5930
2002-08-02 22:34:54 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
Guy Harris e592fa4a6b Have routines to create GtkCTrees, set their line and expander style
based on the user's UI preferences, and add them to a list of GtkCTrees.
Use those routines to create all GtkCTrees.

Have a routine to update the preferences for all of those GtkCTrees.
Call that routine whenever the preferences change.

Label the line and expander style preferences as "Tree line style" and
"Tree expander style", as they no longer apply only to protocol trees.

Move the routines to maintain a list of scrolled windows, and to update
scrollbar placement for scrolled windows, to "ui_util.c".

svn path=/trunk/; revision=4520
2002-01-11 06:43:18 +00:00
Guy Harris 9d601c6799 On Windows, use the directory in which the binary resides as the
directory in which global data files are stored.  If an installed binary
is being run, that's the correct directory for them; if a build-tree
binary is being run, the "manuf" file will be there, and you can put
other data files there as well, if necessary.

Do the same with plugins, except that, if there's no
"plugins\\{version}" subdirectory of that directory, fall back on the
default installation directory, so you at least have a place where you
can put plugins for use by build-tree binaries.  (Should we, instead,
have the Windows build procedure create a subdirectory of the "plugins"
source directory, with the plugin version number as its name, and copy
the plugins there, so you'd use the build-tree plugin binaries?)

Move "test_for_directory()" out of "util.c" and into
"epan/filesystem.c", with the other file system access portability
wrappers and convenience routines.  Fix "util.h" not to declare it - or
other routines moved to "epan/filesystem.c" a while ago.

svn path=/trunk/; revision=3858
2001-08-21 06:39:18 +00:00
Guy Harris f4db05c7d1 When displaying the numeric value for the value_string string that was
selected in the filter-construction GUI, treat BASE_BIN like BASE_DEC,
as that's currently how it's treated elsewhere.

svn path=/trunk/; revision=3351
2001-04-20 21:57:55 +00:00
Guy Harris 92e96d7e9f GUI code fixes from Eduardo P�rez Ureta.
svn path=/trunk/; revision=3189
2001-03-26 10:28:34 +00:00
Guy Harris 1c71e3a0fa Do a bunch of semantic checks when "Accept" is clicked, so that we catch
at least some invalid filter expressions.

svn path=/trunk/; revision=3099
2001-03-03 00:45:14 +00:00
Guy Harris c1764ee28d Boolean fields are just like other fields - if you use the field name
without a comparison operator, it tests for the field's presence or
absence, not its value; to test whether a Boolean field is true, you
compare it with a non-zero value, and to test whether it's false, you
compare it with a zero value.

Make the filter expression construction dialog handle that correctly.

svn path=/trunk/; revision=3068
2001-02-23 07:09:39 +00:00
Guy Harris 16091b24f1 Catch the "destroy" signal on the filter-expression-construction dialog,
and, when it's being destroyed, disconnect from the "destroy" signal on
the text entry box to which it's attached, so that, when that text entry
box is destroyed, we don't try to get rid of the no-longer-extant
filter-expression-construction dialog.

svn path=/trunk/; revision=3061
2001-02-20 20:14:18 +00:00