From 64d66e03766ff4a529f2ebca534dbbcd756452a2 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 2 Apr 2006 20:08:14 +0000 Subject: Add ephy_guid_help_with_doc_id for use by e-e. 2006-04-02 Christian Persch * lib/ephy-gui.c: (ephy_gui_help_with_doc_id), (ephy_gui_help): * lib/ephy-gui.h: Add ephy_guid_help_with_doc_id for use by e-e. --- ChangeLog | 7 +++++++ lib/ephy-gui.c | 34 ++++++++++++++++++++++------------ lib/ephy-gui.h | 5 +++++ 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index c61cd65bd..f55555b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-04-02 Christian Persch + + * lib/ephy-gui.c: (ephy_gui_help_with_doc_id), (ephy_gui_help): + * lib/ephy-gui.h: + + Add ephy_guid_help_with_doc_id for use by e-e. + 2006-04-02 Christian Persch * embed/mozilla/mozilla-notifiers.cpp: diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c index 9729be44d..afbc8b5e7 100644 --- a/lib/ephy-gui.c +++ b/lib/ephy-gui.c @@ -391,31 +391,41 @@ ephy_gui_check_location_writable (GtkWidget *parent, } void -ephy_gui_help (GtkWindow *parent, - const char *file_name, - const char *link_id) +ephy_gui_help_with_doc_id (GtkWindow *parent, + const char *doc_id, + const char *file_name, + const char *link_id) { - GError *err = NULL; + GError *error = NULL; - gnome_help_display (file_name, link_id, &err); + gnome_help_display_with_doc_id (NULL, doc_id, file_name, link_id, &error); - if (err != NULL) + if (error != 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); + _("Could not display help: %s"), + error->message); + g_error_free (error); + + g_signal_connect (dialog, "response", + G_CALLBACK (gtk_widget_destroy), NULL); gtk_widget_show (dialog); - g_error_free (err); } } +void +ephy_gui_help (GtkWindow *parent, + const char *file_name, + const char *link_id) +{ + ephy_gui_help_with_doc_id (parent, NULL, file_name, link_id); +} + void ephy_gui_get_current_event (GdkEventType *otype, guint *ostate, diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h index 089587b49..7b76cf247 100644 --- a/lib/ephy-gui.h +++ b/lib/ephy-gui.h @@ -74,6 +74,11 @@ void ephy_gui_help (GtkWindow *parent, const char *file_name, const char *link_id); +void ephy_gui_help_with_doc_id (GtkWindow *parent, + const char *doc_id, + const char *file_name, + const char *link_id); + void ephy_gui_window_update_user_time (GtkWidget *window, guint32 user_time); -- cgit v1.2.3