[gnome-nibbles] Restore user help harder



commit 8324fee5428491fa09fbc1a6f6bcc3f66773b8c5
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Feb 20 22:08:54 2016 -0600

    Restore user help harder
    
    It could stand to be updated, but so could every app's user help.

 src/gnome-nibbles.vala |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-nibbles.vala b/src/gnome-nibbles.vala
index dc388f4..e8fb992 100644
--- a/src/gnome-nibbles.vala
+++ b/src/gnome-nibbles.vala
@@ -83,6 +83,7 @@ public class Nibbles : Gtk.Application
         {"pause", pause_cb},
         {"preferences", preferences_cb},
         {"scores", scores_cb},
+        {"help", help_cb},
         {"about", about_cb},
         {"quit", quit}
     };
@@ -157,6 +158,7 @@ public class Nibbles : Gtk.Application
 
         set_accels_for_action ("app.quit", {"<Primary>q"});
         set_accels_for_action ("app.back", {"Escape"});
+        set_accels_for_action ("app.help", {"F1"});
         new_game_action = (SimpleAction) lookup_action ("new-game");
         pause_action = (SimpleAction) lookup_action ("pause");
         back_action = (SimpleAction) lookup_action ("back");
@@ -998,6 +1000,18 @@ public class Nibbles : Gtk.Application
         overlay.show ();
     }
 
+    private void help_cb ()
+    {
+        try
+        {
+            Gtk.show_uri (window.get_screen (), "help:gnome-nibbles", Gtk.get_current_event_time ());
+        }
+        catch (Error e)
+        {
+            warning ("Unable to open help: %s", e.message);
+        }
+    }
+
     private void about_cb ()
     {
         const string authors[] = { "Sean MacIsaac",


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