Commit Graph

95 Commits

Author SHA1 Message Date
Guy Harris 2e4e229739 Get rid of the "Question" alert box type - rename it to "Confirmation",
as that seems to be the name used in the GNOME HIG, at least.  Make it
use the Warning icon (that's what the GNOME HIG says - and it's also
what's used for the equivalent on Windows), and use it for the "Save
current capture?" alert boxes.

svn path=/trunk/; revision=10030
2004-02-11 03:55:48 +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 372e6b2da0 Add some comments about the types of alert boxes you get with the
simple_dialog routines (which are really just message box/alert box
routines).

Add some macros for combinations of buttons (corresponding to
combinations that some GUI toolkits, which only support some
combinations, allow).

svn path=/trunk/; revision=9977
2004-02-04 01:10:37 +00:00
Ulf Lamping 1d2c791ab6 enhanced some dialog messages,
close capture file when user told so

svn path=/trunk/; revision=9965
2004-02-03 17:59:01 +00:00
Ulf Lamping d11080a09f moved window geometry values from prefs to recent,
added new pref / recent setting: "maximized main window",
which will save, if the main window is maximized or not,
this will take effect on GTK version 2 only, but is saved nonetheless

svn path=/trunk/; revision=9949
2004-02-01 20:28:11 +00:00
Ulf Lamping 5b38a022e4 Implemented rudimentary Drag and Drop support.
svn path=/trunk/; revision=9926
2004-01-31 18:32:37 +00:00
Ulf Lamping 124d4e8c90 minor change in dialog text
svn path=/trunk/; revision=9924
2004-01-31 14:16:43 +00:00
Ulf Lamping d244cd82f5 cleanup of new "question dialogs",
using GTK2 primary/secondary message text from GNOME HIG for simple_dialogs,
added a "question dialog" for the coloring rules "Clear" button

svn path=/trunk/; revision=9921
2004-01-31 12:13:23 +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 3c76ec1aa2 every GUI action, which will erease a currently unsaved capture file,
will now raise a dialog "Save xy before z?" with Yes/No/Cancel buttons.

svn path=/trunk/; revision=9908
2004-01-29 23:11:38 +00:00
Guy Harris d6cd61061e Have the Wiretap open, read, and seek-and-read routines return, in
addition to an error code, an error info string, for
WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and
WTAP_ERR_BAD_RECORD errors.  Replace the error messages logged with
"g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed
strings returned as the error info string, and change the callers of
those routines to, for those errors, put the info string into the
printed message or alert box for the error.

Add messages for cases where those errors were returned without printing
an additional message.

Nobody uses the error code from "cf_read()" - "cf_read()" puts up the
alert box itself for failures; get rid of the error code, so it just
returns a success/failure indication.

Rename "file_read_error_message()" to "cf_read_error_message()", as it
handles read errors from Wiretap, and have it take an error info string
as an argument.  (That handles a lot of the work of putting the info
string into the error message.)

Make some variables in "ascend-grammar.y" static.

Check the return value of "erf_read_header()" in "erf_seek_read()".

Get rid of an unused #define in "i4btrace.c".

svn path=/trunk/; revision=9852
2004-01-25 21:55:17 +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 4676bb5bac destroy the "save as" dialog only, if it's existing
svn path=/trunk/; revision=9665
2004-01-14 14:28:25 +00:00
Ulf Lamping a6ff7799a2 close the Save (As) dialog, when the capture file is closed
svn path=/trunk/; revision=9642
2004-01-10 17:29:26 +00:00
Ulf Lamping b9cde84cac using button compatibility macros
svn path=/trunk/; revision=9633
2004-01-10 14:11:58 +00:00
Ulf Lamping ea0a32e92f use the same packet range things for "Print" dialog, as already implemented
in the "Save As" dialog and some other minor changes

svn path=/trunk/; revision=9610
2004-01-09 18:11:21 +00:00
Ulf Lamping 7e20ddc9f6 some code cleanup in range.c
svn path=/trunk/; revision=9609
2004-01-09 14:05:20 +00:00
Ulf Lamping e8232af246 Save As and range: don't use global vars in range.c,
as this will be also used for the print dialog later.
Calculate packet count for user specified ranges

svn path=/trunk/; revision=9598
2004-01-08 10:40:33 +00:00
Guy Harris 1493331f5f Get rid of "gtk_box_pack_start()" call to put the range table into the
range frame - we already have a "gtk_container_add()" call that does that.

svn path=/trunk/; revision=9596
2004-01-07 21:29:59 +00:00
Olivier Biot 219940011c Remove extraneous parameters of packet count in case the end-user manually
enters a range of packets. Comment this in the code.

svn path=/trunk/; revision=9590
2004-01-07 19:10:49 +00:00
Ulf Lamping bba39ed952 save dialog with "Captured" and "Displayed" buttons in packet range
svn path=/trunk/; revision=9580
2004-01-07 00:10:52 +00:00
Ulf Lamping 65dd8f05bc an enum represents the radio buttons much better,
than an "array" of gbooleans

svn path=/trunk/; revision=9564
2004-01-05 22:21:53 +00:00
Ulf Lamping 480cf33874 hide save dialog, while saving
svn path=/trunk/; revision=9527
2004-01-02 21:48:24 +00:00
Ulf Lamping b14477c11c comment fixed
svn path=/trunk/; revision=9507
2004-01-01 13:10:45 +00:00
Ulf Lamping c8cddf7163 minor changes and a small bugfix
svn path=/trunk/; revision=9492
2003-12-30 01:19:02 +00:00
Ulf Lamping bb2245d366 removed a GTK2 warning
svn path=/trunk/; revision=9483
2003-12-29 21:04:47 +00:00
Guy Harris 8124ea2886 Get rid of an unused variable.
svn path=/trunk/; revision=9480
2003-12-29 20:41:37 +00:00
Ulf Lamping 14e2a790f9 From Dick Gooris (and me :-)
more ways to choose which packets can be saved,
in the save(as) dialog box

svn path=/trunk/; revision=9476
2003-12-29 20:05:59 +00:00
Guy Harris bb0eb4879f "select_file_cb()" only needs a title, not a "construct_args_t" -
"construct_args_t" is for use with filter dialogs, and the members other
than the title apply only to filter dialogs.

Have "select_file_cb()" actually use the title supplied to it.

svn path=/trunk/; revision=9125
2003-12-01 02:01:56 +00:00
Richard Sharpe 114c52bf0b Move print_file_cb out of gtk/print_dlg.c and into gtk/file_dlg.c and
rename it to select_file_cb to reflect its function.

While this cleans things up a bit, I am still not happy because now
filter_prefs.h must be included before file_dlg.h just to get
construct_args_t.

svn path=/trunk/; revision=9119
2003-11-30 04:21:55 +00:00
Guy Harris 18556fed07 There doesn't seem to be any need to set "cfile.dfilter" to the contents
of the filter text entry when reloading the file, and:

	1) that doesn't work with the toolbar "reload" button (the
	   widget passed in for that button doesn't have a
	   E_DFILTER_TE_KEY data item pointing to the text entry);

	2) that causes the Tools > Summary dialog box to report what
	   you've typed in that box, not the filter that's actually in
	   effect (i.e., it causes "cfile.dfilter" to reflect what's
	   been typed, not what's been applied);

so don't bother doing so.  That also means that the "/File/Reload" menu
item doesn't need a E_DFILTER_TE_KEY data item, so don't give it one.

svn path=/trunk/; revision=8713
2003-10-16 00:45:12 +00:00
Guy Harris 8a9f45562d Clean up the stuff that fills in the starting directory.
svn path=/trunk/; revision=8700
2003-10-14 23:42:19 +00:00
Guy Harris ffa3ad8ef5 From Ian Schorr:
Add a preference to control whether the "File > Open" dialog box
	should start out in the last directory in which it looked - and
	save that in the preferences file across invocations - or should
	always start out in a user-specified directory, and add another
	preference to specify that directory.

	Write out section name comments into the preferences file.

Clean up white space a bit.

svn path=/trunk/; revision=8699
2003-10-14 23:20:17 +00:00
Guy Harris d0d3f842bb Add a "file_selection_new()" routine that does all the positioning (GTK+
2.x) and transient-for setting that's done for other dialogs, and use it
for dialogs that come from the main window or from children of the main
window.

svn path=/trunk/; revision=8531
2003-09-24 08:43:34 +00:00
Guy Harris d532ea7b17 From Giles Scott:
in GTK+ 2.x, center dialogs on the parent;

	make the file selection dialogs transient for the main window,
	just as other dialogs are.

Update Gerald's e-mail address.

svn path=/trunk/; revision=8503
2003-09-20 04:59:43 +00:00
Guy Harris 14509164fc Rename various capture file routines to have names starting with "cf_".
svn path=/trunk/; revision=8479
2003-09-15 22:48:42 +00:00
Ronnie Sahlberg 710f08b09f From Richard Urwin a great enhancement to the color filter dialogue to
make it possible to import/export color filters

svn path=/trunk/; revision=8188
2003-08-18 21:27:11 +00:00
Gerald Combs d98ee5ef39 Add two preferences to control ADNS, one to enable/disable it and one to
set its concurrency level.  Fix an ADNS queueing bug.

svn path=/trunk/; revision=8063
2003-07-22 03:14:31 +00:00
Olivier Abad 5d8e9b0d14 Various fixes related to GTK2 :
- give the focus to the packet_list when a capture file is opened, and
  each time we change the selection in the packet list (it seems that
  the tree view has the focus if we don't do this) ;

- in set_plist_sel_browse() : it seems that packet_list->selection_mode
  is always 0 in GTK2 so we can't use it to determine the current mode.
  Use a static variable instead.

This should fix the second part of debian bug #199763

svn path=/trunk/; revision=8045
2003-07-18 20:55:11 +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 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
Guy Harris 5e8ecbaf46 From Graeme Hewson:
Currently Ethereal sets and uses a default directory for reading
	and writing, but only in some places.  This set of patches extends
	the setting of the default directory to the -w option as well as
	the -r option, and causes all file dialogs to use and set the
	default consistently.  (I haven't changed the
	Preferences/Printing/File dialog, though, as that's a special
	case.)

	There's also a fix for a bug where Ethereal was issuing the
	message "Ring buffer requested, but capture isn't being saved to
	a permanent file" even though a file was specified with -w.

There also appear to be some other cleanups in his patch.

svn path=/trunk/; revision=6238
2002-09-09 20:39:01 +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 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 ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 0a03b0f73e Add a preferences page for the name resolution flags.
Separate the preferences value for those flags and the name resolution
code's value into separate variables; this means that the resolution
code no longer depends on the preferences code, and may let us
eventually have the current setting and the preference setting differ
(so that a user can temporarily override the preference setting without
causing subsequent saves of the preferences to save the temporary
value).

Add routines to create various types of widgets for preferences, and to
fetch the values for "enumerated" preferences, and use them both in the
code to handle hardwired preference pages and table-driven preference
pages.

svn path=/trunk/; revision=4536
2002-01-13 20:35:12 +00:00
Guy Harris 2026f857bc Don't update the "Save As..." dialog box if it doesn't exist.
Update some comments.

svn path=/trunk/; revision=4342
2001-12-06 03:09:28 +00:00