diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-01-20 23:17:23 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-01-20 23:17:23 +0000 |
commit | 66ce7f36231b5a15cb0b493e039c7284edf3a62f (patch) | |
tree | dc06533f5d8be6ba70be06bb5dd65f10fd1f4d7d /gtk/summary_dlg.c | |
parent | 13e90b72b3833198c5ebe8c1ba79ef863977fca6 (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/summary_dlg.c')
-rw-r--r-- | gtk/summary_dlg.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/summary_dlg.c b/gtk/summary_dlg.c index 2909def87b..7c88be31cc 100644 --- a/gtk/summary_dlg.c +++ b/gtk/summary_dlg.c @@ -38,6 +38,7 @@ #include "dlg_utils.h" #include "ui_util.h" #include "compat_macros.h" +#include "help_dlg.h" #define SUM_STR_MAX 1024 #define FILTER_SNIP_LEN 50 @@ -86,7 +87,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) { summary_tally summary; GtkWidget *sum_open_w, - *main_vb, *bbox, *close_bt; + *main_vb, *bbox, *close_bt, *help_bt; GtkWidget *table; GtkWidget *list; char *titles[] = { "Traffic", "Captured", "Displayed" }; @@ -345,12 +346,21 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) /* Button row. */ - bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); + if(topic_available(HELP_STATS_SUMMARY_DIALOG)) { + bbox = dlg_button_row_new(GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL); + } else { + bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); + } gtk_container_add(GTK_CONTAINER(main_vb), bbox); close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE); window_set_cancel_button(sum_open_w, close_bt, window_cancel_button_cb); + if(topic_available(HELP_STATS_SUMMARY_DIALOG)) { + help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP); + SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_STATS_SUMMARY_DIALOG); + } + gtk_widget_grab_focus(close_bt); SIGNAL_CONNECT(sum_open_w, "delete_event", window_delete_event_cb, NULL); |