summaryrefslogtreecommitdiff
path: root/gtk/capture_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-01-15 05:20:19 +0000
committerGuy Harris <guy@alum.mit.edu>2003-01-15 05:20:19 +0000
commita2f01014c141592a9d0c662fea616a0fe7c981df (patch)
treeb06c7bbfd2d29e74953f94af9465aa9172a038be /gtk/capture_dlg.c
parentcdbf86b42accb6116a70818f3c6cea1ace040852 (diff)
downloadwireshark-a2f01014c141592a9d0c662fea616a0fe7c981df.tar.gz
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
Diffstat (limited to 'gtk/capture_dlg.c')
-rw-r--r--gtk/capture_dlg.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index 2b573f9f8a..893c1b3b35 100644
--- a/gtk/capture_dlg.c
+++ b/gtk/capture_dlg.c
@@ -1,7 +1,7 @@
/* capture_dlg.c
* Routines for packet capture windows
*
- * $Id: capture_dlg.c,v 1.76 2002/11/09 20:00:35 oabad Exp $
+ * $Id: capture_dlg.c,v 1.77 2003/01/15 05:20:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -284,6 +284,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
filter_bt = gtk_button_new_with_label("Filter:");
SIGNAL_CONNECT(filter_bt, "clicked", capture_filter_construct_cb, NULL);
+ SIGNAL_CONNECT(filter_bt, "destroy", filter_button_destroy_cb, NULL);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_bt, FALSE, FALSE, 3);
gtk_widget_show(filter_bt);
@@ -883,20 +884,10 @@ capture_prep_close_cb(GtkWidget *close_bt _U_, gpointer parent_w)
static void
capture_prep_destroy_cb(GtkWidget *win, gpointer user_data _U_)
{
- GtkWidget *capture_prep_filter_w;
GtkWidget *fs;
- /* Is there a filter edit/selection dialog associated with this
- Capture Options dialog? */
- capture_prep_filter_w = OBJECT_GET_DATA(win, E_FILT_DIALOG_PTR_KEY);
-
- if (capture_prep_filter_w != NULL) {
- /* Yes. Destroy it. */
- gtk_widget_destroy(capture_prep_filter_w);
- }
-
/* Is there a file selection dialog associated with this
- Print File dialog? */
+ Capture Options dialog? */
fs = OBJECT_GET_DATA(win, E_FILE_SEL_DIALOG_PTR_KEY);
if (fs != NULL) {