diff options
Diffstat (limited to 'gtk/capture_if_dlg.c')
-rw-r--r-- | gtk/capture_if_dlg.c | 14 |
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); |