[gnome-music] data/app-menu.ui modified for user help



commit bf5129422ace87f43b73779b00ad639eff67635e
Author: Shobha Tyagi <tyagishobha gmail com>
Date:   Fri Feb 21 17:44:37 2014 +0530

    data/app-menu.ui modified for user help
    
    application.py modified for introducing user-help
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724908

 data/app-menu.ui          |    5 +++++
 gnomemusic/application.py |    7 +++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/data/app-menu.ui b/data/app-menu.ui
index dc98b87..7df19bc 100644
--- a/data/app-menu.ui
+++ b/data/app-menu.ui
@@ -14,6 +14,11 @@
     </section>
     <section>
       <item>
+        <attribute name="label" translatable="yes">_Help</attribute>
+        <attribute name="action">app.help</attribute>
+        <attribute name="accel">F1</attribute>
+      </item>
+      <item>
         <attribute name="action">app.about</attribute>
         <attribute name="label" translatable="yes">_About</attribute>
       </item>
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index 61ab7e8..1154cbc 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -67,6 +67,10 @@ class Application(Gtk.Application):
         aboutAction.connect('activate', self.about)
         self.add_action(aboutAction)
 
+        helpAction = Gio.SimpleAction.new('help', None)
+        helpAction.connect('activate', self.help)
+        self.add_action(helpAction)
+
         newPlaylistAction = Gio.SimpleAction.new('newPlaylist', None)
         newPlaylistAction.connect('activate', self.new_playlist)
         self.add_action(newPlaylistAction)
@@ -85,6 +89,9 @@ class Application(Gtk.Application):
     def now_playing(self, action, param):
         pass
 
+    def help(self, action, param):
+        Gtk.show_uri(None, "help:gnome-music", Gdk.CURRENT_TIME)
+
     def about(self, action, param):
         builder = Gtk.Builder()
         builder.add_from_resource('/org/gnome/Music/AboutDialog.ui')


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