diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-01-18 00:40:39 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-01-18 00:40:39 +0000 |
commit | 59125a730477367715440270feec0cb55fd404bd (patch) | |
tree | 8068c03fd687481256d171acb82d89f663d3131d | |
parent | 993b096e21aa1d8999a5ebd7633a8738dce15a2e (diff) |
no more differences, wether display filter dialog is called from
menu "Analyze->Display Filter" or statusbar "Filter:" button.
svn path=/trunk/; revision=9698
-rw-r--r-- | gtk/filter_prefs.c | 34 | ||||
-rw-r--r-- | gtk/filter_prefs.h | 3 | ||||
-rw-r--r-- | gtk/main.c | 3 |
3 files changed, 11 insertions, 29 deletions
diff --git a/gtk/filter_prefs.c b/gtk/filter_prefs.c index b7034ac585..425fdec4e8 100644 --- a/gtk/filter_prefs.c +++ b/gtk/filter_prefs.c @@ -3,7 +3,7 @@ * (This used to be a notebook page under "Preferences", hence the * "prefs" in the file name.) * - * $Id: filter_prefs.c,v 1.47 2004/01/10 16:27:41 ulfl Exp $ + * $Id: filter_prefs.c,v 1.48 2004/01/18 00:40:39 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -42,6 +42,7 @@ #include "simple_dialog.h" #include "dfilter_expr_dlg.h" #include "compat_macros.h" +#include "gtkglobals.h" #define E_FILT_DIALOG_PTR_KEY "filter_dialog_ptr" #define E_FILT_BUTTON_PTR_KEY "filter_button_ptr" @@ -202,7 +203,7 @@ cfilter_dialog_cb(GtkWidget *w _U_) /* No Apply button, and there's no text widget to set, much less activate, on "OK". */ static construct_args_t args = { - "Ethereal: Edit Capture Filter List", + "Ethereal: Capture Filter", FALSE, FALSE }; @@ -224,8 +225,6 @@ cfilter_dialog_cb(GtkWidget *w _U_) } #endif -static GtkWidget *global_dfilter_w; - /* Create a filter dialog for editing display filters; this is to be used as a callback for menu items, toolbars, etc.. */ void @@ -234,25 +233,12 @@ dfilter_dialog_cb(GtkWidget *w _U_) /* No Apply button, and there's no text widget to set, much less activate, on "OK". */ static construct_args_t args = { - "Ethereal: Edit Display Filter List", - FALSE, - FALSE + "Ethereal: Display Filter", + TRUE, + TRUE }; - /* Has a filter dialog box already been opened for editing - display filters? */ - if (global_dfilter_w != NULL) { - /* Yes. Just reactivate it. */ - reactivate_window(global_dfilter_w); - return; - } - - /* - * No. Create one; we didn't pop this up as a result of pressing - * a button next to some text entry field, so don't associate it - * with a text entry field or button. - */ - global_dfilter_w = filter_dialog_new(NULL, NULL, DFILTER_LIST, &args); + display_filter_construct_cb(OBJECT_GET_DATA(top_level, E_FILT_BT_PTR_KEY), &args); } /* List of capture filter dialogs, so that if the list of filters changes @@ -875,12 +861,6 @@ filter_dlg_destroy(GtkWidget *win, gpointer data) global_cfilter_w = NULL; break; #endif - - case DFILTER_LIST: - g_assert(win == global_dfilter_w); - global_dfilter_w = NULL; - break; - default: g_assert_not_reached(); break; diff --git a/gtk/filter_prefs.h b/gtk/filter_prefs.h index cc85a5d8eb..94f380a5ff 100644 --- a/gtk/filter_prefs.h +++ b/gtk/filter_prefs.h @@ -3,7 +3,7 @@ * (This used to be a notebook page under "Preferences", hence the * "prefs" in the file name.) * - * $Id: filter_prefs.h,v 1.15 2003/01/15 05:58:50 guy Exp $ + * $Id: filter_prefs.h,v 1.16 2004/01/18 00:40:39 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -44,6 +44,7 @@ void filter_button_destroy_cb(GtkWidget *button, gpointer user_data); void cfilter_dialog_cb(GtkWidget *w); void dfilter_dialog_cb(GtkWidget *w); +#define E_FILT_BT_PTR_KEY "filter_bt_ptr" #define E_FILT_TE_PTR_KEY "filter_te_ptr" #endif /* filter.h */ diff --git a/gtk/main.c b/gtk/main.c index b5b820cce9..0fd4479e0f 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1,6 +1,6 @@ /* main.c * - * $Id: main.c,v 1.354 2004/01/16 20:04:21 jmayer Exp $ + * $Id: main.c,v 1.355 2004/01/18 00:40:39 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -2871,6 +2871,7 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs) SIGNAL_CONNECT(filter_bt, "clicked", display_filter_construct_cb, &args); gtk_box_pack_start(GTK_BOX(stat_hbox), filter_bt, FALSE, TRUE, 0); gtk_widget_show(filter_bt); + OBJECT_SET_DATA(top_level, E_FILT_BT_PTR_KEY, filter_bt); filter_cm = gtk_combo_new(); filter_list = g_list_append (filter_list, ""); |