diff options
-rw-r--r-- | lib/ephy-gui.c | 12 | ||||
-rw-r--r-- | lib/ephy-gui.h | 2 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmark-properties.c | 2 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 2 | ||||
-rw-r--r-- | src/ephy-encoding-dialog.c | 2 | ||||
-rw-r--r-- | src/ephy-history-window.c | 2 | ||||
-rw-r--r-- | src/ephy-shell.c | 13 | ||||
-rw-r--r-- | src/ephy-window.c | 3 | ||||
-rw-r--r-- | src/pdm-dialog.c | 4 | ||||
-rw-r--r-- | src/prefs-dialog.c | 26 | ||||
-rw-r--r-- | src/resources/epiphany-application-menu.ui | 4 | ||||
-rw-r--r-- | src/resources/epiphany-bookmark-editor-ui.xml | 1 | ||||
-rw-r--r-- | src/resources/epiphany-history-window-ui.xml | 1 | ||||
-rw-r--r-- | src/resources/epiphany-ui.xml | 1 | ||||
-rw-r--r-- | src/window-commands.c | 7 | ||||
-rw-r--r-- | src/window-commands.h | 2 |
16 files changed, 46 insertions, 38 deletions
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c index f3ded522c..2f5f81252 100644 --- a/lib/ephy-gui.c +++ b/lib/ephy-gui.c @@ -269,25 +269,25 @@ ephy_gui_check_location_writable (GtkWidget *parent, /** * ephy_gui_help: * @parent: the parent window where help is being called - * @section: help section to open or %NULL + * @page: help page to open or %NULL * - * Displays Epiphany's help, opening the section indicated by @section. + * Displays Epiphany's help, opening the page indicated by @page. * * Note that @parent is used to know the #GdkScreen where to open the help * window. **/ void ephy_gui_help (GtkWidget *parent, - const char *section) + const char *page) { GError *error = NULL; GdkScreen *screen; char *url; - if (section) - url = g_strdup_printf ("ghelp:epiphany?%s", section); + if (page) + url = g_strdup_printf ("help:epiphany/%s", page); else - url = g_strdup ("ghelp:epiphany"); + url = g_strdup ("help:epiphany"); if (parent) screen = gtk_widget_get_screen (parent); diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h index 505a7c591..b4a8844b1 100644 --- a/lib/ephy-gui.h +++ b/lib/ephy-gui.h @@ -59,7 +59,7 @@ gboolean ephy_gui_check_location_writable (GtkWidget *parent, const char *filename); void ephy_gui_help (GtkWidget *parent, - const char *section); + const char *page); void ephy_gui_window_update_user_time (GtkWidget *window, guint32 user_time); diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c index 294f0c085..ec26c6100 100644 --- a/src/bookmarks/ephy-bookmark-properties.c +++ b/src/bookmarks/ephy-bookmark-properties.c @@ -381,7 +381,7 @@ bookmark_properties_response_cb (GtkDialog *dialog, { case GTK_RESPONSE_HELP: ephy_gui_help (GTK_WIDGET (dialog), - "to-edit-bookmark-properties"); + "bookmark-add"); return; case GTK_RESPONSE_ACCEPT: priv->creating = FALSE; diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index e9430f2d8..6d3fdfccf 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -976,7 +976,7 @@ static void cmd_help_contents (GtkAction *action, EphyBookmarksEditor *editor) { - ephy_gui_help (GTK_WIDGET (editor), "ephy-managing-bookmarks"); + ephy_gui_help (GTK_WIDGET (editor), "bookmark"); } static void diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c index ac5d89a1c..411745ca1 100644 --- a/src/ephy-encoding-dialog.c +++ b/src/ephy-encoding-dialog.c @@ -281,7 +281,7 @@ ephy_encoding_dialog_response_cb (GtkWidget *widget, { if (response == GTK_RESPONSE_HELP) { - ephy_gui_help (widget, "text-encoding"); + ephy_gui_help (widget, NULL); return; } diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 81ba3b147..a0adb7279 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -497,7 +497,7 @@ static void cmd_help_contents (GtkAction *action, EphyHistoryWindow *editor) { - ephy_gui_help (GTK_WIDGET (editor), "ephy-managing-history"); + ephy_gui_help (GTK_WIDGET (editor), "history"); } G_DEFINE_TYPE (EphyHistoryWindow, ephy_history_window, GTK_TYPE_WINDOW) diff --git a/src/ephy-shell.c b/src/ephy-shell.c index bfb6d7a4a..d82479229 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -188,6 +188,18 @@ show_pdm (GSimpleAction *action, } static void +show_help (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + GtkWindow *window; + + window = gtk_application_get_active_window (GTK_APPLICATION (ephy_shell)); + + window_cmd_help_contents (NULL, GTK_WIDGET (window)); +} + +static void show_about (GSimpleAction *action, GVariant *parameter, gpointer user_data) @@ -214,6 +226,7 @@ static GActionEntry app_entries[] = { { "history", show_history, NULL, NULL, NULL }, { "preferences", show_preferences, NULL, NULL, NULL }, { "pdm", show_pdm, NULL, NULL, NULL }, + { "help", show_help, NULL, NULL, NULL }, { "about", show_about, NULL, NULL, NULL }, { "quit", quit_application, NULL, NULL, NULL }, }; diff --git a/src/ephy-window.c b/src/ephy-window.c index 98589d53f..643d8e4e3 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -194,6 +194,8 @@ static const GtkActionEntry ephy_menu_entries [] = { /* Help. */ + { "HelpContents", NULL, N_("_Help"), NULL, NULL, + G_CALLBACK (window_cmd_help_contents) }, { "HelpAbout", NULL, N_("_About"), NULL, NULL, G_CALLBACK (window_cmd_help_about) } }; @@ -3762,6 +3764,7 @@ static const gchar* app_actions[] = { "EditBookmarks", "EditHistory", "FileQuit", + "HelpContents", "HelpAbout" }; diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index 4a09260b8..1cff2d298 100644 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -142,8 +142,8 @@ pdm_dialog_show_help (PdmDialog *pd) int id; static char * const help_preferences[] = { - "managing-cookies", - "managing-passwords" + "data-cookies", + "data-passwords" }; ephy_dialog_get_controls (EPHY_DIALOG (pd), diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 932da6336..fd322ef33 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -113,30 +113,6 @@ prefs_dialog_class_init (PrefsDialogClass *klass) } static void -prefs_dialog_show_help (EphyDialog *dialog) -{ - GtkWidget *window, *notebook; - int id; - - static const char help_preferences[][28] = { - "general-preferences", - "fonts-and-style-preferences", - "privacy-preferences", - "language-preferences" - }; - - ephy_dialog_get_controls (dialog, - "prefs_dialog", &window, - "prefs_notebook", ¬ebook, - NULL); - - id = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); - id = CLAMP (id, 0, 3); - - ephy_gui_help (window, help_preferences[id]); -} - -static void css_edit_button_clicked_cb (GtkWidget *button, PrefsDialog *pd) { @@ -897,7 +873,7 @@ prefs_dialog_response_cb (GtkDialog *widget, { if (response == GTK_RESPONSE_HELP) { - prefs_dialog_show_help (dialog); + ephy_gui_help (GTK_WIDGET (widget), "pref"); return; } diff --git a/src/resources/epiphany-application-menu.ui b/src/resources/epiphany-application-menu.ui index d52121231..96b141930 100644 --- a/src/resources/epiphany-application-menu.ui +++ b/src/resources/epiphany-application-menu.ui @@ -44,6 +44,10 @@ </section> <section> <item> + <attribute name="label" translatable="yes">_Help</attribute> + <attribute name="action">app.help</attribute> + </item> + <item> <attribute name="label" translatable="yes">_About</attribute> <attribute name="action">app.about</attribute> </item> diff --git a/src/resources/epiphany-bookmark-editor-ui.xml b/src/resources/epiphany-bookmark-editor-ui.xml index dcad18063..2998d4792 100644 --- a/src/resources/epiphany-bookmark-editor-ui.xml +++ b/src/resources/epiphany-bookmark-editor-ui.xml @@ -32,6 +32,7 @@ </menu> <menu name="HelpMenu" action="Help"> + <menuitem action="HelpContents"/> <menuitem action="HelpAbout"/> </menu> diff --git a/src/resources/epiphany-history-window-ui.xml b/src/resources/epiphany-history-window-ui.xml index 34ed6110c..5592ec2ef 100644 --- a/src/resources/epiphany-history-window-ui.xml +++ b/src/resources/epiphany-history-window-ui.xml @@ -28,6 +28,7 @@ </menu> <menu name="HelpMenu" action="Help"> + <menuitem name="HelpContents" action="HelpContents"/> <menuitem name="HelpAbout" action="HelpAbout"/> </menu> diff --git a/src/resources/epiphany-ui.xml b/src/resources/epiphany-ui.xml index 976dddce4..ba400071a 100644 --- a/src/resources/epiphany-ui.xml +++ b/src/resources/epiphany-ui.xml @@ -101,6 +101,7 @@ </menu> <menuitem name="ViewPageSourceMenu" action="ViewPageSource"/> <separator name="FileSep7"/> + <menuitem name="HelpContentsMenu" action="HelpContents"/> <menuitem name="HelpAboutMenu" action="HelpAbout"/> <menuitem name="FileCloseWindowMenu" action="FileCloseTab"/> <menuitem name="FileQuitMenu" action="FileQuit"/> diff --git a/src/window-commands.c b/src/window-commands.c index 8e73ce74a..eb97a9d1e 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -1659,6 +1659,13 @@ window_cmd_view_page_source (GtkAction *action, } } +void +window_cmd_help_contents (GtkAction *action, + GtkWidget *window) +{ + ephy_gui_help (window, NULL); +} + #define ABOUT_GROUP "About" void diff --git a/src/window-commands.h b/src/window-commands.h index abf5865d6..ddc85ea48 100644 --- a/src/window-commands.h +++ b/src/window-commands.h @@ -84,6 +84,8 @@ void window_cmd_view_zoom_normal (GtkAction *action, EphyWindow *window); void window_cmd_view_page_source (GtkAction *action, EphyWindow *window); +void window_cmd_help_contents (GtkAction *action, + GtkWidget *window); void window_cmd_help_about (GtkAction *action, GtkWidget *window); void window_cmd_tabs_next (GtkAction *action, |