aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/filter_prefs.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-01-25 21:27:16 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-01-25 21:27:16 +0000
commit34bddb3c1a932632fd0515f7999ed96ef9974611 (patch)
treefe72070243764590dbf41ecd763d235e53279300 /gtk/filter_prefs.c
parentd69016e5525624c1544d6359fe9a8c19b87887c5 (diff)
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
Diffstat (limited to 'gtk/filter_prefs.c')
-rw-r--r--gtk/filter_prefs.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/gtk/filter_prefs.c b/gtk/filter_prefs.c
index ff36acaf12..974081824c 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.54 2004/01/25 15:10:35 ulfl Exp $
+ * $Id: filter_prefs.c,v 1.55 2004/01/25 21:27:15 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -43,6 +43,7 @@
#include "dfilter_expr_dlg.h"
#include "compat_macros.h"
#include "gtkglobals.h"
+#include "help_dlg.h"
#define E_FILT_DIALOG_PTR_KEY "filter_dialog_ptr"
#define E_FILT_BUTTON_PTR_KEY "filter_button_ptr"
@@ -294,7 +295,8 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
*ok_bt, /* "OK" button */
*apply_bt, /* "Apply" button */
*save_bt, /* "Save" button */
- *close_bt; /* "Cancel" button */
+ *close_bt, /* "Cancel" button */
+ *help_bt; /* "Help" button */
GtkWidget *filter_vb, /* filter settings box */
*props_vb;
GtkWidget *top_hb,
@@ -562,15 +564,15 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
/* button row */
if (parent_filter_te != NULL) {
if (construct_args->wants_apply_button) {
- bbox = dlg_button_row_new(GTK_STOCK_OK, GTK_STOCK_APPLY, GTK_STOCK_SAVE, GTK_STOCK_CLOSE, NULL);
+ bbox = dlg_button_row_new(GTK_STOCK_OK, GTK_STOCK_APPLY, GTK_STOCK_SAVE, GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL);
} else {
- bbox = dlg_button_row_new(GTK_STOCK_OK, GTK_STOCK_SAVE, GTK_STOCK_CLOSE, NULL);
+ bbox = dlg_button_row_new(GTK_STOCK_OK, GTK_STOCK_SAVE, GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL);
}
} else {
if (construct_args->wants_apply_button) {
- bbox = dlg_button_row_new(GTK_STOCK_APPLY, GTK_STOCK_SAVE, GTK_STOCK_CLOSE, NULL);
+ bbox = dlg_button_row_new(GTK_STOCK_APPLY, GTK_STOCK_SAVE, GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL);
} else {
- bbox = dlg_button_row_new(GTK_STOCK_SAVE, GTK_STOCK_CLOSE, NULL);
+ bbox = dlg_button_row_new(GTK_STOCK_SAVE, GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL);
}
}
gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 5);
@@ -611,6 +613,14 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te,
if (parent_filter_te == NULL)
gtk_widget_grab_default(close_bt);
+ help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP);
+ if (list == CFILTER_LIST) {
+ SIGNAL_CONNECT(help_bt, "clicked", help_topic_cb, "Capture Filters");
+ } else {
+ SIGNAL_CONNECT(help_bt, "clicked", help_topic_cb, "Display Filters");
+ }
+ gtk_tooltips_set_tip (tooltips, help_bt, ("Show topic specific help"), NULL);
+
/*
* Catch the "key_press_event" signal in the window, so that we can
* catch the ESC key being pressed and act as if the "Close" button