[gnome-clocks/wip/mallard-help: 14/39] Wire up the Help menu item



commit 5ca05263c95ab6995ad898ab0bf50709b51f0a2b
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Sep 8 16:07:38 2013 +0200

    Wire up the Help menu item

 src/window.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/window.vala b/src/window.vala
index 829dc4b..9df49c8 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -23,6 +23,7 @@ public class Window : Gtk.ApplicationWindow {
     private const GLib.ActionEntry[] action_entries = {
         // app menu
         { "new", on_new_activate },
+        { "help", on_help_activate },
         { "about", on_about_activate },
 
         // selection menu
@@ -138,6 +139,14 @@ public class Window : Gtk.ApplicationWindow {
         return base.window_state_event (event);
     }
 
+    private void on_help_activate () {
+        try {
+            Gtk.show_uri (get_screen (), "help:gnome-clocks", Gtk.get_current_event_time ());
+        } catch (Error e) {
+            warning (_("Failed to show help: %s"), e.message);
+        }
+    }
+
     private void on_about_activate () {
         const string copyright = "Copyright \xc2\xa9 2011 Collabora Ltd.\n" +
                                  "Copyright \xc2\xa9 2012-2013 Collabora Ltd., Seif Lotfy, Emily Gonyer\n" +


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