summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-25 17:31:02 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-25 17:31:02 -0800
commitf6673ab359c6249c800187ea6f2d65e3c596bc82 (patch)
treecd497cff669820ff5f9950a995d3a9aaf29818d7
parent8de8d6733f0514e44641baad7f1f2a7935caa984 (diff)
downloadsubsurface-f6673ab359c6249c800187ea6f2d65e3c596bc82.tar.gz
Add link to user manual to Help menu
Yes, we could try and bundle the user manual with the executables and open a local copy of it - but this seemed much easier and safer to do. It does, of course, add another string... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--gtk-gui.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index bb30dcddb..8f912b5bc 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1083,6 +1083,11 @@ static void about_dialog(GtkWidget *w, gpointer data)
gtk_widget_destroy(dialog);
}
+static void show_user_manual(GtkWidget *w, gpointer data)
+{
+ subsurface_launch_for_uri("http://subsurface.hohndel.org/documentation/user-manual/");
+}
+
static void view_list(GtkWidget *w, gpointer data)
{
gtk_paned_set_position(GTK_PANED(vpane), 0);
@@ -1392,6 +1397,7 @@ static GtkActionEntry menu_items[] = {
{ "SelectEvents", NULL, N_("Select Events..."), NULL, NULL, G_CALLBACK(selectevents_dialog) },
{ "Quit", GTK_STOCK_QUIT, N_("Quit"), CTRLCHAR "Q", NULL, G_CALLBACK(quit) },
{ "About", GTK_STOCK_ABOUT, N_("About Subsurface"), NULL, NULL, G_CALLBACK(about_dialog) },
+ { "UserManual", GTK_STOCK_HELP, N_("User Manual"), NULL, NULL, G_CALLBACK(show_user_manual) },
{ "ViewList", NULL, N_("List"), CTRLCHAR "1", NULL, G_CALLBACK(view_list) },
{ "ViewProfile", NULL, N_("Profile"), CTRLCHAR "2", NULL, G_CALLBACK(view_profile) },
{ "ViewInfo", NULL, N_("Info"), CTRLCHAR "3", NULL, G_CALLBACK(view_info) },
@@ -1458,6 +1464,7 @@ static const gchar* ui_string = " \
</menu> \
<menu name=\"Help\" action=\"HelpMenuAction\"> \
<menuitem name=\"About\" action=\"About\" /> \
+ <menuitem name=\"UserManual\" action=\"UserManual\" /> \
</menu> \
</menubar> \
</ui> \