Commit Graph

67 Commits

Author SHA1 Message Date
Ulf Lamping 0dde603d99 alyways use SIGNAL_EMIT_BY_NAME with one user parameter,
remove SIGNAL_EMIT_BY_NAME1 completely

svn path=/trunk/; revision=11118
2004-06-05 10:27:38 +00:00
Ulf Lamping 14bf83c340 add details for doxygen, various code cleanups as a result of this
svn path=/trunk/; revision=11052
2004-06-01 17:33:37 +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 071d9bcef0 bugfix: don't try to destroy a window, when it's already being destroyed
svn path=/trunk/; revision=11018
2004-05-27 17:08: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
Guy Harris a234eb8b91 Yes, you do have to free the display filter after compiling it,
otherwise you leak memory.

svn path=/trunk/; revision=10254
2004-02-28 04:21:49 +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 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
Ulf Lamping 359fb7d5f6 added a tooltip to explain the behaviour of the syntax check in the filter string
svn path=/trunk/; revision=9862
2004-01-26 18:51:04 +00:00
Guy Harris d20e50f996 Get rid of an unused variable.
svn path=/trunk/; revision=9854
2004-01-25 22:21:01 +00:00
Ulf Lamping 34bddb3c1a adding a function to the help dialog, showing a specific topic (context help),
beautifying the placement of the help button in the button_row,
using the context help for the filter dialog

svn path=/trunk/; revision=9851
2004-01-25 21:27:16 +00:00
Ulf Lamping 24eb4363ef add syntax check and an "Add Expression" button to the filter toolbar
svn path=/trunk/; revision=9839
2004-01-25 15:10:36 +00:00
Ulf Lamping f7dbf0f940 added/changed some tooltips
svn path=/trunk/; revision=9838
2004-01-25 13:47:09 +00:00
Ulf Lamping ad7bc1e358 changed the behaviour of the edit buttons to make more sense,
removed the no longer needed "Edit and "Copy" buttons,
do a lot of code cleanup

svn path=/trunk/; revision=9837
2004-01-25 12:25:57 +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 514f438bc7 redesign of capture/display filter dialog.
didn't change the behaviour of the edit buttons,
although they should be changed

svn path=/trunk/; revision=9764
2004-01-21 05:35:42 +00:00
Ulf Lamping e3dd2f5472 use stock buttons whereever possible,
added some ethereal specific stock icons

svn path=/trunk/; revision=9763
2004-01-21 03:54:32 +00:00
Ulf Lamping 59125a7304 no more differences, wether display filter dialog is called from
menu "Analyze->Display Filter" or statusbar "Filter:" button.

svn path=/trunk/; revision=9698
2004-01-18 00:40:39 +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
Guy Harris ee1bc75c1b From Brad Hards: don't mention the "Add Expression" button in the
message box popped up if you try to add a new capture filter but haven't
specified a filter name or string, as there is no such button for
capture filters.

svn path=/trunk/; revision=7517
2003-04-21 19:43:44 +00:00
Laurent Deniel 3aa593f0d5 Add type of filter in capture/display filter windows.
svn path=/trunk/; revision=7246
2003-03-02 13:46:01 +00:00
Guy Harris f71d13b16e Move the code that associates buttons with filter dialogs, and vice
versa, into "filter_dialog_new()", rather than replicating it in a
couple of routines.

The return value of "display_filter_construct_cb()" isn't used for
anything, it's ignored by most callers and stored but subsequently
ignored by io_stat.c; get rid of the return value, and don't bother
storing it in io_stat.c.

Before destroying a filter dialog box associated with a button being
destroyed, break the association.

Get rid of an unused variable in io_stat.c.

svn path=/trunk/; revision=6931
2003-01-15 05:58:50 +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
Ronnie Sahlberg 07bcd090fc From Ronald Henderson, when closing IO-Stat window, also close any open Filter dialogs
svn path=/trunk/; revision=6916
2003-01-11 11:10:33 +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 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 25a058a7b1 From Devin Heitmueller: give the user a warning if they click "New" in
the filter list editing code without having specified a filter name and
string.

svn path=/trunk/; revision=5737
2002-06-22 20:00:26 +00:00
Guy Harris 0705d7ff0b Remove some no-longer-applicable XXX comments.
When you click "OK" on the dialog box, destroy the dialog box *before*
activating any text widget into which we've stuffed the filter
expression, so we don't get the dialog box destroyed out from under us
before we try to destroy it ourselves.

svn path=/trunk/; revision=5367
2002-05-02 23:49:21 +00:00
Guy Harris d5cd7aca15 A double-click in a filter name in the list-of-filters dialog box should
activate the text widget into which the filter text is put only if
clicking "OK" in the list-of-filters dialog box does so.  Make it so.

svn path=/trunk/; revision=4955
2002-03-16 22:02:55 +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 feb5791d6a Have a routine to create a scrolled window, set its vertical scrollbar
preference, and add it to the list of scrolled windows; call that
routine to create scrolled windows, rather than creating it and calling
other routines to do the other two operations.

As "set_scrollbar_placement_all()" and "set_ctree_styles_all()" always
set the styles to match the user's preference, don't have them take an
argument, have them just use the user's preference settings.

Get rid of unnecessary includes of "prefs_dlg.h", replacing them with
includes of "prefs.h" if necessary.  Don't have "prefs_dlg.h" include
"prefs.h" - its sole purpose is to declare routines defined in
"prefs_dlg.c" - and add any additional includes of "prefs.h" this
requires.

Get rid of unnecessary includes of "prefs.h" and "gtkglobals.h".

Fix up white space.

svn path=/trunk/; revision=4521
2002-01-11 07:40:32 +00:00
Guy Harris d453f6d992 On Windows, put Ethereal configuration files under the "Application
Data\Ethereal" directory under the user's profile, as that appears to be
the Windows 2000 standard.

svn path=/trunk/; revision=4071
2001-10-24 06:13:07 +00:00
Guy Harris cf5a1d86e7 Add a new routine to create the ".ethereal" directory for a user.
Use that routine rather than duplicating that code in the routines to
write out the preference file and filter files.

Use it in the code for the color filter dialog, so that the directory in
question is created if necessary.

As that routine returns an error indication, have the code that calls
that routine put up a message box if the attempt fails.

svn path=/trunk/; revision=4065
2001-10-23 05:01:02 +00:00
Guy Harris fafefda449 Don't offer the ability to edit capture filters if Ethereal wasn't
linked with libpcap.

svn path=/trunk/; revision=3613
2001-06-27 10:00:14 +00:00
Guy Harris 52df3c73ec The text entry box that a filter construction dialog manipulates is
always attached to the dialog as the E_FILT_FILTER_TE_KEY data, but only
sometimes attached as the E_FILT_TE_KEY data.

Get rid of E_FILT_TE_KEY completely, as it's redundant, and use only
E_FILT_FILTER_TE_KEY; this keeps us from crashing as a result of trying
to manipulate the widget referred to by E_FILT_TE_KEY if E_FILT_TE_KEY
hasn't been set to refer to any widget.

svn path=/trunk/; revision=3067
2001-02-23 05:54:27 +00:00
Guy Harris 81f6ce8b71 Make the "activate" signal on the text entry boxes in the filter editing
dialog activate the entire dialog box.

svn path=/trunk/; revision=3062
2001-02-20 20:25:08 +00:00
Guy Harris 5999b61fdd Use "Close", rather than "Cancel", in the filter dialog box; clicking
that button doesn't undo edits you've made to the list of filters it's
displaying.

Don't show an "OK" button if the dialog isn't attached to a text entry
box, as the "OK" button means "enter the current filter into the
attached text entry box, and close the dialog", and if there *is* no
attached text entry box, "OK" doesn't do what you might expect (it's
equivalent to "Close").

svn path=/trunk/; revision=2952
2001-01-28 21:30:53 +00:00
Guy Harris ceef26d2c1 Have separate capture and display filter lists; some filter dialog boxes
use the capture filter lists, and others use the display filter list, as
appropriate.

Have separate menu items for editing the capture and display filter
lists.

Have separate "~/.ethereal/cfilters" and "~/.ethereal/dfilters" files
for the two lists; if either of those files isn't found, we try
"~/.ethereal/filters", which means that you will start out with two
identical lists holding all your filters - if certain filters belong
only in one list, you'll have to delete them by hand from the other
list.

Do I/O error checking when reading and writing filter lists; when
writing a filter list, write it to a new file, and then rename the new
file on top of the old file, so that you don't lose your old filter list
if, for example, you run out of disk space or disk quota.

svn path=/trunk/; revision=2948
2001-01-28 09:13:10 +00:00
Guy Harris 3c596f5d71 Call "get_filter_list()" when Ethereal starts up.
Have it free up any list of filters we already have before reading in
new filters.

svn path=/trunk/; revision=2947
2001-01-28 04:52:29 +00:00
Guy Harris c8639c08ee Pull the stuff to read and write the list of filter expressions up into
a file in the top-level directory.

svn path=/trunk/; revision=2946
2001-01-28 04:43:26 +00:00
Guy Harris 23e7ce209a Arrange that if the filter list is edited in one dialog box, the filter
lists in all filter dialog boxes are updated to reflect reality.  (The
poor man's model-view.)

svn path=/trunk/; revision=2924
2001-01-21 03:30:24 +00:00
Guy Harris 1ddbe05e58 Give various filter constructing/editing dialog boxes titles to reflect
what they were popped up for.

svn path=/trunk/; revision=2923
2001-01-21 02:27:24 +00:00
Guy Harris d6dd1fea0d In the process of destroying a filter editing dialog box, we get a
selection change event on the list of filters.  Unfortunately, this can
happen after some other widgets in that dialog box have already been
destroyed - including some of the widgets that such a selection change
event can change.

This sometimes happened when "filter_prefs_delete()" hadn't been called,
so the mechanism we had been using, with a Boolean datum attached to the
dialog box, set in "filter_prefs_delete()" before we actually destroy
the dialog box, wasn't sufficient to keep that from happening.

Attach to the top-level window data items containing pointers to the
widgets changed when a filter is selected from the list, give each of
those widgets their own destroy callbacks, clear the pointer attached to
the top-level widget when the widget is destroyed, and don't do anything
to the widget when a filter is selected from the list if the pointer for
that widget is null, as that means the widget's been destroyed and we
*can't* do anything to it.

Not all filter editing dialogs created on behalf of a "Filter:" button
next to a text entry box should, when you click "OK", activate the text
entry box; if the text entry box is part of a dialog box with multiple
widgets, the user might not have filled in all of the items in that
dialog box, so you shouldn't activate it for them.  Add a mechanism by
which, when creating a filter editing dialog box, you can specify
whether the "OK" button should just fill in the text entry box or should
fill it in and also activate it.

svn path=/trunk/; revision=2922
2001-01-21 01:45:07 +00:00
Guy Harris 88d157ef96 Add a dialog box for constructing expressions that test a field in the
display tree, based on Jeff Foster's dialog box for selecting fields.

Make the dialog box for browsing filters into a dialog box for
constructing filters; make the "Apply" button and the "OK" button apply
the filter in the text entry box in the dialog, not the currently
selected filter (selecting a filter puts it in that text entry box, but
the user may edit it afterwards, or may use the aforementioned dialog
box to construct a filter not in the list).

Get rid of extra declarations of "m_r_font" and "m_b_font" in
"proto_draw.c"; they're declared in "gtk/gtkglobals.h", which it includes.

svn path=/trunk/; revision=2805
2001-01-02 01:32:21 +00:00
Gilbert Ramirez e4199779ca This patch adds two things:
- Pressing Esc key will cause the filter selection dialog to
          "Cancel"

        - Double-clicking on a list item in filter selection dialog is
          equivalent to single-click followed by "OK"

Santeri Paavolainen <santtu@ssh.com>

svn path=/trunk/; revision=2533
2000-10-25 16:06:50 +00:00
Gilbert Ramirez 9d9850f209 More EPAN-related code movements. Get rid of usage of #include "globals.h"
and #include "util.h" from epan code. Move get_home_dir() into epan/filesystem.c
as it's used by plugins.c.

svn path=/trunk/; revision=2461
2000-09-28 03:16:29 +00:00