[solang] Added Help -> Contents



commit 54eb5b40644c9728ab12f84aa252356a2f7495a4
Author: Florent Thévenet <feuloren free fr>
Date:   Sat Mar 27 04:34:31 2010 +0200

    Added Help -> Contents

 data/solang.ui                  |    1 +
 src/application/main-window.cpp |   14 ++++++++++++++
 src/application/main-window.h   |    3 +++
 3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/data/solang.ui b/data/solang.ui
index 6d72fb7..285c559 100644
--- a/data/solang.ui
+++ b/data/solang.ui
@@ -36,6 +36,7 @@
 		<placeholder name="PlaceholderToolMenus"/>
 		<placeholder name="PlaceholderGoMenus"/>
 		<menu action="ActionHelpMenu">
+			<menuitem action="ActionHelpContents"/>
 			<menuitem action="ActionHelpAbout"/>
 		</menu>
 	</menubar>
diff --git a/src/application/main-window.cpp b/src/application/main-window.cpp
index 251dd8c..d2bbe6a 100644
--- a/src/application/main-window.cpp
+++ b/src/application/main-window.cpp
@@ -286,6 +286,12 @@ MainWindow::MainWindow() throw() :
         Gtk::Action::create(
             "ActionHelpMenu", _("_Help")));
 
+    actionGroup_->add(
+        Gtk::Action::create(
+            "ActionHelpContents", Gtk::Stock::HELP,
+            _("_Contents")),
+        Gtk::AccelKey("F1"),
+        sigc::mem_fun(*this, &MainWindow::on_action_help_contents));
 
     actionGroup_->add(
         Gtk::Action::create(
@@ -635,6 +641,14 @@ MainWindow::on_action_help_about() throw()
 }
 
 void
+MainWindow::on_action_help_contents() throw()
+{
+    const ScreenPtr screen = get_screen();
+    gtk_show_uri(screen->gobj(), "ghelp:" PACKAGE_TARNAME,
+                 GDK_CURRENT_TIME, 0);
+}
+
+void
 MainWindow::on_action_photo_quit() throw()
 {
     hide();
diff --git a/src/application/main-window.h b/src/application/main-window.h
index 5574010..4bd8fef 100644
--- a/src/application/main-window.h
+++ b/src/application/main-window.h
@@ -100,6 +100,9 @@ class MainWindow :
         on_action_help_about() throw();
 
         void
+        on_action_help_contents() throw();
+
+        void
         on_action_photo_quit() throw();
 
         void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]