Commit Graph

70 Commits

Author SHA1 Message Date
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 1909b97d4d Remove all warnings under Unix for the gtk/ directory.
svn path=/trunk/; revision=21160
2007-03-24 00:45:11 +00:00
Ronnie Sahlberg 53dc5d4196 add check that string is non-null before we dereference and gfree it
svn path=/trunk/; revision=18544
2006-06-22 11:43:18 +00:00
Anders Broman 05448fcc3d Ethereal->Wireshark
svn path=/trunk/; revision=18232
2006-05-28 17:19:08 +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
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Gerald Combs 65d37c099e Fix Coverity CID 129: initialize a couple of variables.
svn path=/trunk/; revision=17560
2006-03-09 23:13:49 +00:00
Ulf Lamping b4471e0195 fix #152
set the read filter dialog modal and transient to the parent window if requested. This way, it will receive input signals (solving problems with GTK2's gtk_file_chooser).

To do this, add another construct_args flag, so it will be modal only if really needed ...

svn path=/trunk/; revision=16926
2005-12-31 17:09:27 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
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
Ulf Lamping 22fff1e1f3 fix #271: don't do:
g_free(bytes); 

twice, probably a copy/paste error

svn path=/trunk/; revision=14829
2005-07-01 20:47:22 +00:00
Ulf Lamping 0861927ce3 huge cleanup of capture file API (functions in file.c/file.h).
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions.

Hopefully, I didn't introduced any new bugs, as I had to change a lot of files...

svn path=/trunk/; revision=13289
2005-02-04 18:44:44 +00:00
Ulf Lamping 66ce7f3623 add some more online help functionality and help buttons at various dialog boxes, if a help page *is* available. However, the new help system needs a lot more work before completed.
svn path=/trunk/; revision=13152
2005-01-20 23:17:23 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Gerald Combs 2875ddd269 Move convert_string_to_hex() and convert_string_case() from gtk/find_dlg.c
to epan/strutil.c

svn path=/trunk/; revision=11733
2004-08-13 02:39:49 +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
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
Guy Harris 3aaf65db46 Don't capitalize "Filter" in "Display Filter" in the "Find" dialog box,
just as we don't capitalize "value" in "Hex value" in the same set of
radio buttons.

svn path=/trunk/; revision=11002
2004-05-26 02:33:37 +00:00
Guy Harris e5f2451735 Rename a bunch of variables and routines that pertain to string search
with "string" rather than "ascii", to make it clearer what they're
involved with.

Use "gtk_toggle_button_set_active()", not
"gtk_toggle_button_set_state()" (the latter is a deprecated alias for
the former, probably dating back to GTK+ 1.0[.x] - 1.2[.x] and later
have "gtk_toggle_button_set_active()").

Do *NOT* change the radio buttons for the type of string search to do
based on whether we're doing a string search or not - doing so means we
don't correctly remember the type of string search.

Get rid of code to fetch some values that we don't subsequently use.

svn path=/trunk/; revision=10609
2004-04-15 23:28:11 +00:00
Ulf Lamping 38f076a301 improved resizability
svn path=/trunk/; revision=10267
2004-02-29 10:41:03 +00:00
Ulf Lamping 99c72920c1 redesign of the whole dialog
svn path=/trunk/; revision=10261
2004-02-28 22:07:33 +00:00
Guy Harris 4215bfee6b The string in the Find Frame dialog box isn't necessarily a display
filter string; check its syntax appropriately for the type of search
we're doing when colorizing it.

Searching for an empty text string is a pointless exercise; report that
as an error.

svn path=/trunk/; revision=10253
2004-02-28 04:18:47 +00:00
Ulf Lamping c9ea03f55a added dfilter string syntax check to various places
svn path=/trunk/; revision=10252
2004-02-27 19:07:20 +00:00
Guy Harris c7fd1b2b13 Add a routine to be used to put up alert boxes for invalid display
filter expressions; use that in a number of places, so we use the same
alert box.  (More work is needed to figure out the right way to handle
some other "dfilter_compile()" failures.)

Use the error message from the display filter as the primary error, as
that's the message that tells you what the underlying problem is.  (The
GNOME HIG says "In most situations the user should only need the primary
text to make a quick decision", so the primary text should tell you
what's wrong with the filter, not just that it's invalid.  If there are
messages from the display filter code that don't give enough
information, or are a bit cryptic, such as "Unexpected end of filter
string," those should be fixed in the display filter code.)

Improve the error used if an empty filter is used for "find frame".

svn path=/trunk/; revision=10025
2004-02-11 00:55:28 +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
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 ef9d4ada2d code cleanup and added some more
application specific stock items in toolbar.c,
use them where appropriate

svn path=/trunk/; revision=9747
2004-01-20 02:21:17 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Guy Harris 64bc566ea8 In GTK+ 2.x, "gtk_entry_get_text()" returns a "const gchar *"; assign
its value to pointer-to-const variables.

svn path=/trunk/; revision=9161
2003-12-04 00:45:39 +00:00
Ulf Lamping e4037df998 renamed frame to packet in all GUI elements
svn path=/trunk/; revision=9113
2003-11-28 19:02:41 +00:00
Ronnie Sahlberg d6a720dd17 Add Find Next/Find Previous submenu to conversation lists.
By using Find Next/Previous you will jump to the next/previous matching packet in the ethereal main window.

I could not get CTRL-N / CTRL-B to work and was too lazy to research.
It would be nice if CTRL-N / CTRL-P would invoke the same thing as selecting
/Find Frame/Find Next/EP1 <-> EP2
or
/Find Frame/Find Previous/EP1 <-> EP2
from the menu.
I could not figure out how to get gtk to do this.
The person that adds CTRL-N/CTRL-B here will be a hero.

svn path=/trunk/; revision=8635
2003-10-07 09:30:34 +00:00
Gerald Combs 4c19deb206 In the Find dialog add periods or dashes to the list of allowed hex
separator characters.  Update the Ethereal man page accordingly.

svn path=/trunk/; revision=8420
2003-09-09 02:41:00 +00:00
Ronnie Sahlberg 764972414c Add a Find Frame item to the popup menu for the conversation list
that will open the find frame dialogue and preload the filter string
with the conversation and the direction the user selected from the menu.

svn path=/trunk/; revision=8386
2003-09-05 06:16:10 +00:00
Ronnie Sahlberg 19a99f8a34 Make the hex to string conversion code in find_dlg.c handle ':' characters
such as you might find when doing "prepare" on a FT_BYTES field.

So one need not delete the ':' characters manually

svn path=/trunk/; revision=8309
2003-08-29 09:32:16 +00:00
Guy Harris 56664b9b77 Make the CList of character sets non-editable, so you only get to choose
from what we offer.  (XXX - should it be an option menu, instead?)

svn path=/trunk/; revision=8308
2003-08-29 04:56:46 +00:00
Guy Harris 1cf6565adc Get rid of the EBCDIC stuff in the find dialog - it's not supported yet,
so we shouldn't torment the users by offering it.

Check the string type and convert it to an internal representation in
the GUI code; have the search code deal only with the internal
representation.

Save the case-sensitivity flag, and the indication of where string
searches look, along with other search parameters.

Upper-casify the string, for case-insensitive searches, in the GUI code;
don't save the upper-casified string, so it doesn't SHOUT at you when
you next pop up a "find" dialog.

Convert the hex value string to raw binary data in the GUI code, rather
than doing so in the search code.  Check that it's a valid string.

Connect the signals to the radio buttons after the pointers have been
attached to various GUI items - the signal handlers expect some of those
pointers to be attached, and aren't happy if they're not.

Have "find_packet()" contain a framework for searching, but not contain
the matching code; instead, pass it a pointer to a matching routine and
an opaque pointer to be passed to the matching routine.  Have all the
routines that do different types of searching have their own matching
routines, and use the common "find_packet()" code, rather than
duplicating that code.

Search for the Info column by column type, not by name (the user can
change the name).

When matching on the protocol tree, don't format the entire protocol
tree into a big buffer - just have a routine that matches the text
representation of a protocol tree item against a string, and, if it
finds a match, sets a "we found a match flag" and returns; have that
routine not bother doing any more work if that flag is set.
(Unfortunately, you can't abort "g_node_children_foreach()" in the
middle of a traversal.)

Free the generated display filter code after a find-by-display-filter
finishes.

svn path=/trunk/; revision=8306
2003-08-29 04:03:46 +00:00
Guy Harris 2af6770410 From Greg Morris: put borders around the options to delimit them and
indicate where they apply, and give tooltips to some of the options.
Disable the "Filter:" button unless we're searching with a display filter.

Use "Frame data" instead of "Hex" for the option to search the raw frame
data, use "Decoded packet" instead of "Decode" for the option to search
the strings in the protocol tree display, and use "Packet summary"
instead of "Summary" for the option to search the Info column in the
packet list display, to make it a bit clearer what's being searched.

svn path=/trunk/; revision=8303
2003-08-28 23:25:55 +00:00
Richard Sharpe 2f8c75aed1 Applied the "Updated find capabilities...." from Greg Morris.
svn path=/trunk/; revision=8158
2003-08-11 22:41:10 +00:00
Guy Harris d2e2149ff9 From Greg Morris: add support for case-insensitive full-text searches.
svn path=/trunk/; revision=8132
2003-08-05 00:01:27 +00:00
Guy Harris 487d0def6b From Greg Morris: code to support searches for text or raw binary data
in a frame in Find Frame.

svn path=/trunk/; revision=8067
2003-07-22 23:08:48 +00:00
Guy Harris 8db1b28e8d Fix a comment.
svn path=/trunk/; revision=7554
2003-04-24 23:18:07 +00:00
Guy Harris a2f01014c1 Add a new routine "filter_button_destroy_cb()", and make it the
"destroy" signal handler for any button that pops up a filter; if the
button has a filter dialog box associated with it, it destroys that
dialog box.

Have the routines that create filter dialog boxes asociate the dialog
box with the button that created it, so that if the button is destroyed
the filter dialog box can be destroyed as well, and associate the button
with the dialog box.

This means that if a dialog box has a button to create a filter, we no
longer have to have the destroy handler for the dialog box destroy any
filters - that'll happen when the button in the dialog box is destroyed
as part of the process of destroying the dialog box.

Don't make the "Filter" buttons in the io_stat dialog box insensitive if
there's already a filter dialog box open - we can have more than one
open per dialog box.

svn path=/trunk/; revision=6930
2003-01-15 05:20:19 +00:00
Olivier Abad 29011060de Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6610
2002-11-11 15:39:06 +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 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
Guy Harris 71f8208bf9 From Didieer Gautheron:
Don't show progress bar for quick "Find Frame" searches
	Add "Find Next" and "Find Previous" to repeat searches

Add documentation for "Find Next" and "Find Previous".

svn path=/trunk/; revision=5378
2002-05-03 21:55:15 +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