aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-gui.c
diff options
context:
space:
mode:
authorDavid Adam Bordoley <bordoley@msu.edu>2003-05-09 00:22:12 +0800
committerDave Bordoley <Bordoley@src.gnome.org>2003-05-09 00:22:12 +0800
commit6be59e74845e71b11e1ade1e7e8de2ad6d87f590 (patch)
tree5931e630f85581ed417fdbbf8a88f772c249ae93 /lib/ephy-gui.c
parent8de67d32c63ed75c7e4fa233bb4d1afd63770943 (diff)
downloadgsoc2013-epiphany-6be59e74845e71b11e1ade1e7e8de2ad6d87f590.tar
gsoc2013-epiphany-6be59e74845e71b11e1ade1e7e8de2ad6d87f590.tar.gz
gsoc2013-epiphany-6be59e74845e71b11e1ade1e7e8de2ad6d87f590.tar.bz2
gsoc2013-epiphany-6be59e74845e71b11e1ade1e7e8de2ad6d87f590.tar.lz
gsoc2013-epiphany-6be59e74845e71b11e1ade1e7e8de2ad6d87f590.tar.xz
gsoc2013-epiphany-6be59e74845e71b11e1ade1e7e8de2ad6d87f590.tar.zst
gsoc2013-epiphany-6be59e74845e71b11e1ade1e7e8de2ad6d87f590.zip
Convenience function for displaying help. Remove unneeded include of
2003-05-08 David Adam Bordoley <bordoley@msu.edu> * lib/ephy-gui.c: (ephy_gui_help): * lib/ephy-gui.h: Convenience function for displaying help. Remove unneeded include of gnome-dialog.h * src/ephy-history-window.c: (cmd_help_contents): * src/prefs-dialog.c: (prefs_dialog_show_help): * src/window-commands.c: (window_cmd_help_contents), (window_cmd_help_about): * src/bookmarks/ephy-bookmark-properties.c: (ephy_bookmark_properties_help), (bookmark_properties_response_cb): * src/bookmarks/ephy-bookmarks-editor.c: (cmd_help_contents): * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_help), (response_cb): Hook up help to windows/dialogs. Add the guilty parties to about. * help/C/epiphany.xml: Fixed the "To Create a New Bookmark" id.
Diffstat (limited to 'lib/ephy-gui.c')
-rw-r--r--lib/ephy-gui.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c
index ead789762..431b1cea2 100644
--- a/lib/ephy-gui.c
+++ b/lib/ephy-gui.c
@@ -22,7 +22,9 @@
#include <ctype.h>
#include <string.h>
#include <libgnome/gnome-i18n.h>
+#include <libgnome/gnome-help.h>
#include <gtk/gtktreemodel.h>
+#include <gtk/gtkmessagedialog.h>
/* Styles for tab labels */
GtkStyle *loading_text_style = NULL;
@@ -146,3 +148,29 @@ ephy_gui_confirm_overwrite_file (GtkWidget *parent, const char *filename)
return res;
}
+
+void
+ephy_gui_help (GtkWindow *parent,
+ const char *file_name,
+ const char *link_id)
+{
+ GError *err = NULL;
+
+ gnome_help_display (file_name, link_id, &err);
+
+ if (err != NULL)
+ {
+ GtkWidget *dialog;
+ dialog = gtk_message_dialog_new (parent,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("Could not display help: %s"), err->message);
+ g_signal_connect (G_OBJECT (dialog), "response",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+ gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+ gtk_widget_show (dialog);
+ g_error_free (err);
+ }
+}