From 4dd3ca40e89ad2ce3ad67b8732691766d862587a Mon Sep 17 00:00:00 2001 From: Piers Cornwell Date: Sun, 4 Jan 2004 22:12:11 +0000 Subject: Add help buttons to Certificate Viewer, PDM, print and print setup 2004-01-04 Piers Cornwell * data/glade/certificate-dialogs.glade: * data/glade/epiphany.glade: * data/glade/print.glade: * embed/mozilla/GtkNSSDialogs.cpp: * embed/print-dialog.c: (ephy_print_dialog_response_cb), (ephy_print_setup_dialog_help_button_cb): * src/pdm-dialog.c: (pdm_dialog_show_help): * src/prefs-dialog.c: (prefs_dialog_show_help): Add help buttons to Certificate Viewer, PDM, print and print setup dialogues. --- embed/mozilla/GtkNSSDialogs.cpp | 15 ++++++++++++++- embed/print-dialog.c | 30 ++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 7 deletions(-) (limited to 'embed') diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp index 94d8e9527..809ad9fd9 100644 --- a/embed/mozilla/GtkNSSDialogs.cpp +++ b/embed/mozilla/GtkNSSDialogs.cpp @@ -72,6 +72,7 @@ #include "GtkNSSDialogs.h" #include "ephy-glade.h" +#include "ephy-gui.h" #include @@ -1390,7 +1391,19 @@ GtkNSSDialogs::ViewCert(nsIInterfaceRequestor *ctx, g_object_unref (gxml); gtk_widget_show_all (dialog); - gtk_dialog_run (GTK_DIALOG (dialog)); + + int res; + while (1) + { + res = gtk_dialog_run (GTK_DIALOG (dialog)); + if (res == GTK_RESPONSE_HELP) + { + ephy_gui_help (GTK_WINDOW (dialog), "epiphany", "using-certificate-viewer"); + continue; + } + break; + } + gtk_widget_destroy (dialog); return NS_OK; } diff --git a/embed/print-dialog.c b/embed/print-dialog.c index 600e7a968..11c80ab1b 100755 --- a/embed/print-dialog.c +++ b/embed/print-dialog.c @@ -25,6 +25,7 @@ #include "ephy-stock-icons.h" #include "eel-gconf-extensions.h" #include "ephy-debug.h" +#include "ephy-gui.h" #include #include @@ -131,6 +132,8 @@ void ephy_print_dialog_browse_button_cb (GtkWidget *widget, EphyDialog *dialog); void ephy_print_setup_dialog_close_button_cb (GtkWidget *widget, EphyDialog *dialog); +void ephy_print_setup_dialog_help_button_cb (GtkWidget *widget, + EphyDialog *dialog); void ephy_print_info_free (EmbedPrintInfo *info) @@ -222,16 +225,24 @@ ephy_print_dialog_response_cb (GtkWidget *widget, return; } - if (response == GTK_RESPONSE_OK) + switch (response) { - info = ephy_print_get_print_info (); + case GTK_RESPONSE_OK: + info = ephy_print_get_print_info (); - embed = ephy_embed_dialog_get_embed (EPHY_EMBED_DIALOG (dialog)); - g_return_if_fail (EPHY_IS_EMBED (embed)); + embed = ephy_embed_dialog_get_embed (EPHY_EMBED_DIALOG (dialog)); + g_return_if_fail (EPHY_IS_EMBED (embed)); - ephy_embed_print (embed, info); + ephy_embed_print (embed, info); - ephy_print_info_free (info); + ephy_print_info_free (info); + + break; + case GTK_RESPONSE_HELP: + ephy_gui_help (GTK_WINDOW (dialog), "epiphany", "to-print-page"); + return; + default: + break; } g_object_unref (dialog); @@ -293,6 +304,13 @@ ephy_print_setup_dialog_close_button_cb (GtkWidget *widget, g_object_unref (dialog); } +void +ephy_print_setup_dialog_help_button_cb (GtkWidget *widget, + EphyDialog *dialog) +{ + ephy_gui_help (GTK_WINDOW (dialog), "epiphany", "using-print-setup"); +} + EphyDialog * ephy_print_dialog_new (GtkWidget *parent, EphyEmbed *embed, -- cgit v1.2.3