[gnome-boxes] app: Add 'Help' menu item



commit 98d3cab79990ae7bd4a9845608ff814198f73797
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Mar 5 16:23:48 2013 +0200

    app: Add 'Help' menu item
    
    This menu item takes you straight to Boxes help pages.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695212

 src/app.vala |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index a880459..2075196 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -118,6 +118,18 @@ private class Boxes.App: Boxes.UI {
         action.activate.connect (() => { view.select (SelectionCriteria.NONE); });
         application.add_action (action);
 
+        action = new GLib.SimpleAction ("help", null);
+        action.activate.connect (() => {
+            try {
+                Gtk.show_uri (window.get_screen (),
+                              "help:gnome-boxes",
+                              Gtk.get_current_event_time ());
+            } catch (GLib.Error e) {
+                warning ("Failed to display help: %s", e.message);
+            }
+        });
+        application.add_action (action);
+
         action = new GLib.SimpleAction ("about", null);
         action.activate.connect (() => {
             string[] authors = {
@@ -157,6 +169,7 @@ private class Boxes.App: Boxes.UI {
         var display_section = new GLib.Menu ();
         menu.append_section (null, display_section);
 
+        menu.append (_("Help"), "app.help");
         menu.append (_("About Boxes"), "app.about");
         menu.append (_("Quit"), "app.quit");
 


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