diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-17 21:22:00 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-17 21:22:00 +0000 |
commit | fd9486cea603a9cd4d55e94494555f9f578c395b (patch) | |
tree | cd84c3749787a2f25f8a7fd0fb60c14c075c741a /gtk/expert_dlg.c | |
parent | 1c3c9d7828f761c50fd4e6d9ced3b0ff09cce495 (diff) |
Added help button in expert info and expert info composite dialogs.
svn path=/trunk/; revision=24374
Diffstat (limited to 'gtk/expert_dlg.c')
-rw-r--r-- | gtk/expert_dlg.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gtk/expert_dlg.c b/gtk/expert_dlg.c index 792bb8925a..5b9165b860 100644 --- a/gtk/expert_dlg.c +++ b/gtk/expert_dlg.c @@ -59,7 +59,7 @@ #include <epan/prefs.h> #include "colors.h" #include "proto_draw.h" - +#include "help_dlg.h" static const value_string expert_severity_om_vals[] = { @@ -466,12 +466,14 @@ expert_dlg_init(const char *optarg, void* userdata _U_) GtkWidget *table; GtkWidget *bbox; GtkWidget *close_bt; + GtkWidget *help_bt; GtkWidget *severity_box; GtkWidget *severity_om; GtkWidget *menu; GtkWidget *menu_item; GtkWidget *label; + GtkTooltips *tooltips = gtk_tooltips_new(); int i; if(!strncmp(optarg,"afp,srt,",8)){ @@ -546,12 +548,22 @@ expert_dlg_init(const char *optarg, void* userdata _U_) } /* Button row. */ - bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); + if(topic_available(HELP_EXPERT_INFO_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_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE); window_set_cancel_button(etd->win, close_bt, window_cancel_button_cb); + if(topic_available(HELP_EXPERT_INFO_DIALOG)) { + help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP); + SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_EXPERT_INFO_DIALOG); + gtk_tooltips_set_tip (tooltips, help_bt, "Show topic specific help", NULL); + } + SIGNAL_CONNECT(etd->win, "delete_event", window_delete_event_cb, NULL); SIGNAL_CONNECT(etd->win, "destroy", expert_dlg_destroy_cb, etd); |