diff options
author | David Adam Bordoley <bordoley@msu.edu> | 2003-05-09 00:22:12 +0800 |
---|---|---|
committer | Dave Bordoley <Bordoley@src.gnome.org> | 2003-05-09 00:22:12 +0800 |
commit | 6be59e74845e71b11e1ade1e7e8de2ad6d87f590 (patch) | |
tree | 5931e630f85581ed417fdbbf8a88f772c249ae93 /src | |
parent | 8de67d32c63ed75c7e4fa233bb4d1afd63770943 (diff) | |
download | gsoc2013-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 'src')
-rw-r--r-- | src/bookmarks/ephy-bookmark-properties.c | 11 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 5 | ||||
-rw-r--r-- | src/bookmarks/ephy-new-bookmark.c | 11 | ||||
-rw-r--r-- | src/ephy-history-window.c | 5 | ||||
-rw-r--r-- | src/prefs-dialog.c | 36 | ||||
-rw-r--r-- | src/window-commands.c | 34 |
6 files changed, 31 insertions, 71 deletions
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c index 38bcbe96f..575578aa2 100644 --- a/src/bookmarks/ephy-bookmark-properties.c +++ b/src/bookmarks/ephy-bookmark-properties.c @@ -22,6 +22,7 @@ #include "ephy-debug.h" #include "ephy-shell.h" #include "ephy-state.h" +#include "ephy-gui.h" #include <gtk/gtkcheckbutton.h> #include <gtk/gtktogglebutton.h> @@ -195,12 +196,6 @@ ephy_bookmark_properties_get_property (GObject *object, } static void -ephy_bookmark_properties_help () -{ - /* FIXME: Implement Help */ -} - -static void bookmark_properties_response_cb (GtkDialog *dialog, int response_id, gpointer data) @@ -208,7 +203,9 @@ bookmark_properties_response_cb (GtkDialog *dialog, switch (response_id) { case GTK_RESPONSE_HELP: - ephy_bookmark_properties_help (); + ephy_gui_help (GTK_WINDOW (dialog), + "epiphany", + "to-edit-bookmark-properties"); break; case GTK_RESPONSE_CLOSE: gtk_widget_destroy (GTK_WIDGET (dialog)); diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index a6d0c161c..25da06978 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -47,6 +47,7 @@ #include "ephy-state.h" #include "window-commands.h" #include "ephy-debug.h" +#include "ephy-gui.h" static GtkTargetEntry topic_drag_dest_types [] = { @@ -530,7 +531,9 @@ static void cmd_help_contents (EggAction *action, EphyBookmarksEditor *editor) { - /*FIXME: Implement help.*/ + ephy_gui_help (GTK_WINDOW (editor), + "epiphany", + "ephy-managing-bookmarks"); } GType diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c index ec913b112..3e12ec602 100644 --- a/src/bookmarks/ephy-new-bookmark.c +++ b/src/bookmarks/ephy-new-bookmark.c @@ -32,6 +32,7 @@ #include "ephy-topics-selector.h" #include "ephy-debug.h" #include "ephy-stock-icons.h" +#include "ephy-gui.h" static void ephy_new_bookmark_class_init (EphyNewBookmarkClass *klass); static void ephy_new_bookmark_init (EphyNewBookmark *editor); @@ -144,12 +145,6 @@ ephy_new_bookmark_finalize (GObject *object) } static void -ephy_new_bookmark_help () -{ - /* FIXME: Hook up Help */ -} - -static void ephy_new_bookmark_add (EphyNewBookmark *new_bookmark) { char *title; @@ -186,7 +181,9 @@ response_cb (EphyNewBookmark *new_bookmark, switch (response_id) { case GTK_RESPONSE_HELP: - ephy_new_bookmark_help (); + ephy_gui_help (GTK_WINDOW (new_bookmark), + "epiphany", + "to-create-new-bookmark"); break; case GTK_RESPONSE_CANCEL: break; diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 1e2a3e524..fac5c5243 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -43,6 +43,7 @@ #include "ephy-debug.h" #include "ephy-new-bookmark.h" #include "ephy-stock-icons.h" +#include "ephy-gui.h" #include "toolbar.h" static GtkTargetEntry page_drag_types [] = @@ -477,7 +478,9 @@ static void cmd_help_contents (EggAction *action, EphyHistoryWindow *editor) { - /*FIXME: Implement help.*/ + ephy_gui_help (GTK_WINDOW (editor), + "epiphany", + "ephy-managing-history"); } GType diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 17ca94cd8..6a58a3b7c 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -28,6 +28,7 @@ #include "ephy-embed-prefs.h" #include "ephy-shell.h" #include "ephy-state.h" +#include "ephy-gui.h" #include <bonobo/bonobo-i18n.h> #include <gtk/gtkframe.h> @@ -38,8 +39,6 @@ #include <gtk/gtkimage.h> #include <gtk/gtklabel.h> #include <gtk/gtkstock.h> -#include <gtk/gtkmessagedialog.h> -#include <libgnome/gnome-help.h> static void prefs_dialog_class_init (PrefsDialogClass *klass); @@ -243,35 +242,20 @@ prefs_dialog_show_help (PrefsDialog *pd) { GError *err = NULL; gint id; + + /* FIXME: Once we actually have documentation we + * should point these at the correct links. + */ gchar *help_preferences[] = { - "ephy-preferences-appearance", - "ephy-preferences-general", - "ephy-preferences-ui", - "ephy-preferences-advanced" + "setting-preferences", + "setting-preferences", + "setting-preferences", + "setting-preferences" }; id = gtk_notebook_get_current_page (GTK_NOTEBOOK (pd->priv->notebook)); - gnome_help_display ("epiphany", help_preferences [id], &err); - if (err != NULL) - { - GtkWidget *err_dialog; - err_dialog = gtk_message_dialog_new ( - GTK_WINDOW (pd), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("Could not display help: %s"), - err->message); - - g_signal_connect (G_OBJECT (err_dialog), "response", - G_CALLBACK (gtk_widget_destroy), - NULL); - gtk_window_set_resizable (GTK_WINDOW (err_dialog), - FALSE); - gtk_widget_show (err_dialog); - g_error_free (err); - } + ephy_gui_help (GTK_WINDOW (pd), "epiphany", help_preferences[id]); } static void diff --git a/src/window-commands.c b/src/window-commands.c index be6bbcca9..a64305efe 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -16,11 +16,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * 25 Mar 2003: Added support for help manual : Patanjali Somayaji - * (patanjali@codito.com) - */ - #include <config.h> #include "ephy-shell.h" @@ -40,6 +35,7 @@ #include "ephy-file-helpers.h" #include "toolbar.h" #include "ephy-state.h" +#include "ephy-gui.h" #include <string.h> #include <libgnomevfs/gnome-vfs-uri.h> @@ -47,9 +43,7 @@ #include <bonobo/bonobo-i18n.h> #include <libgnomeui/gnome-about.h> #include <libgnomeui/gnome-stock-icons.h> -#include <libgnome/gnome-help.h> #include <libgnome/gnome-program.h> -#include <gtk/gtkmessagedialog.h> #include <gtk/gtkeditable.h> enum @@ -730,28 +724,7 @@ void window_cmd_help_contents (EggAction *action, EphyWindow *window) { - GError *err; - - err = NULL; - gnome_help_display ("epiphany", NULL, &err); - - if (err != NULL) - { - GtkWidget *dialog; - dialog = gtk_message_dialog_new (GTK_WINDOW (window), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("Could not display help: %s"), err->message); - - g_signal_connect (G_OBJECT (dialog), "response", - G_CALLBACK (gtk_widget_destroy), - NULL); - - gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - gtk_widget_show (dialog); - g_error_free (err); - } + ephy_gui_help (GTK_WINDOW (window), "epiphany", NULL); } void @@ -765,11 +738,14 @@ window_cmd_help_about (EggAction *action, static gchar *authors[] = { "Marco Pesenti Gritti <mpeseng@tin.it>", + "Xan Lopez <xan@masilla.org>", + "David Bordoley <bordoley@msu.edu>", NULL }; gchar *documenters[] = { "Patanjali Somayaji <patanjali@codito.com>", + "David Bordoley <bordoley@msu.edu>", NULL }; |