aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_if_dlg.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-01-20 23:17:23 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-01-20 23:17:23 +0000
commit66ce7f36231b5a15cb0b493e039c7284edf3a62f (patch)
treedc06533f5d8be6ba70be06bb5dd65f10fd1f4d7d /gtk/capture_if_dlg.c
parent13e90b72b3833198c5ebe8c1ba79ef863977fca6 (diff)
add some more online help functionality and help buttons at various dialog boxes, if a help page *is* available. However, the new help system needs a lot more work before completed.
svn path=/trunk/; revision=13152
Diffstat (limited to 'gtk/capture_if_dlg.c')
-rw-r--r--gtk/capture_if_dlg.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/capture_if_dlg.c b/gtk/capture_if_dlg.c
index d90a76150e..2ea8113cc8 100644
--- a/gtk/capture_if_dlg.c
+++ b/gtk/capture_if_dlg.c
@@ -62,6 +62,7 @@
#include "wtap.h"
#include "main.h"
+#include "help_dlg.h"
extern gboolean is_capture_in_progress(void);
@@ -298,7 +299,7 @@ capture_if_destroy_cb(GtkWidget *win _U_, gpointer user_data _U_)
void
capture_if_cb(GtkWidget *w _U_, gpointer d _U_)
{
- GtkWidget *main_vb, *bbox, *close_bt;
+ GtkWidget *main_vb, *bbox, *close_bt, *help_bt;
GtkWidget *if_tb;
GtkWidget *if_lb;
@@ -507,13 +508,22 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_)
g_string_free(if_tool_str, TRUE);
/* Button row: close button */
- bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL);
+ if(topic_available(HELP_CAPTURE_INTERFACES_DIALOG)) {
+ bbox = dlg_button_row_new(GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL);
+ } else {
+ bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL);
+ }
gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 5);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
window_set_cancel_button(cap_if_w, close_bt, window_cancel_button_cb);
gtk_tooltips_set_tip(tooltips, close_bt, "Close this window.", NULL);
+ if(topic_available(HELP_CAPTURE_INTERFACES_DIALOG)) {
+ help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP);
+ SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_CAPTURE_INTERFACES_DIALOG);
+ }
+
gtk_widget_grab_default(close_bt);
SIGNAL_CONNECT(cap_if_w, "delete_event", window_delete_event_cb, NULL);