aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/print_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/print_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/print_dlg.c')
-rw-r--r--gtk/print_dlg.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/print_dlg.c b/gtk/print_dlg.c
index b7f4877f0f..eedaeaa5f3 100644
--- a/gtk/print_dlg.c
+++ b/gtk/print_dlg.c
@@ -48,6 +48,7 @@
#endif
#include "compat_macros.h"
#include "range_utils.h"
+#include "help_dlg.h"
/* dialog output action */
@@ -359,7 +360,7 @@ open_print_dialog(char *title, output_action_e action, print_args_t *args)
GtkWidget *hex_cb;
GtkWidget *sep, *formfeed_cb;
- GtkWidget *bbox, *ok_bt, *cancel_bt;
+ GtkWidget *bbox, *ok_bt, *cancel_bt, *help_bt;
GtkTooltips *tooltips;
@@ -622,7 +623,11 @@ open_print_dialog(char *title, output_action_e action, print_args_t *args)
/* Button row */
- bbox = dlg_button_row_new(action == output_action_print ? GTK_STOCK_PRINT : GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL);
+ if(topic_available(HELP_PRINT_DIALOG)) {
+ bbox = dlg_button_row_new(action == output_action_print ? GTK_STOCK_PRINT : GTK_STOCK_OK, GTK_STOCK_CANCEL, GTK_STOCK_HELP, NULL);
+ } else {
+ bbox = dlg_button_row_new(action == output_action_print ? GTK_STOCK_PRINT : GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL);
+ }
gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0);
gtk_widget_show(bbox);
@@ -654,6 +659,11 @@ open_print_dialog(char *title, output_action_e action, print_args_t *args)
window_set_cancel_button(main_win, cancel_bt, window_cancel_button_cb);
gtk_tooltips_set_tip (tooltips, cancel_bt, "Cancel and exit dialog", NULL);
+ if(topic_available(HELP_PRINT_DIALOG)) {
+ help_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_HELP);
+ SIGNAL_CONNECT(help_bt, "clicked", topic_cb, HELP_PRINT_DIALOG);
+ }
+
gtk_widget_grab_default(ok_bt);
/* Catch the "activate" signal on the "Command" and "File" text entries,