aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/proto_hier_stats_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/proto_hier_stats_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/proto_hier_stats_dlg.c')
-rw-r--r--gtk/proto_hier_stats_dlg.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/proto_hier_stats_dlg.c b/gtk/proto_hier_stats_dlg.c
index 0777e190e8..9e774bac5b 100644
--- a/gtk/proto_hier_stats_dlg.c
+++ b/gtk/proto_hier_stats_dlg.c
@@ -33,6 +33,7 @@
#include "ui_util.h"
#include "main.h"
#include "compat_macros.h"
+#include "help_dlg.h"
#if GTK_MAJOR_VERSION < 2
#define NUM_STAT_COLUMNS 8
@@ -312,7 +313,7 @@ void
proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
{
ph_stats_t *ps;
- GtkWidget *dlg, *ok_bt, *vbox, *bbox;
+ GtkWidget *dlg, *ok_bt, *help_bt, *vbox, *bbox;
/* Get the statistics. */
ps = ph_stats_new();
@@ -334,13 +335,22 @@ proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
ph_stats_free(ps);
/* Button row. */
- bbox = dlg_button_row_new(GTK_STOCK_OK, NULL);
+ if(topic_available(HELP_STATS_PROTO_HIERARCHY_DIALOG)) {
+ bbox = dlg_button_row_new(GTK_STOCK_OK, GTK_STOCK_HELP, NULL);
+ } else {
+ bbox = dlg_button_row_new(GTK_STOCK_OK, NULL);
+ }
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show(bbox);
ok_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_OK);
window_set_cancel_button(dlg, ok_bt, window_cancel_button_cb);
+ if(topic_available(HELP_STATS_PROTO_HIERARCHY_DIALOG)) {
+ help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP);
+ SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_STATS_PROTO_HIERARCHY_DIALOG);
+ }
+
SIGNAL_CONNECT(dlg, "delete_event", window_delete_event_cb, NULL);
gtk_widget_show_all(dlg);