[gnome-contacts] Added Help entry to app menu.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Added Help entry to app menu.
- Date: Tue, 18 Sep 2012 17:02:42 +0000 (UTC)
commit b450d2d1b5abba07ae1ada23dac8c6b1228b885d
Author: Erick PÃrez Castellanos <erick red gmail com>
Date: Tue Sep 18 09:51:03 2012 -0400
Added Help entry to app menu.
Added Help entry to open help:gnome-help/contacts page.
Bug 683836: Add Help entry to app menu
https://bugzilla.gnome.org/show_bug.cgi?id=683836
src/app-menu.ui | 4 ++++
src/contacts-app.vala | 10 ++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/app-menu.ui b/src/app-menu.ui
index e03440d..b51a646 100644
--- a/src/app-menu.ui
+++ b/src/app-menu.ui
@@ -12,6 +12,10 @@
<attribute name="label" translatable="yes">_About Contacts</attribute>
</item>
<item>
+ <attribute name="action">app.help</attribute>
+ <attribute name="label" translatable="yes">_Help</attribute>
+ </item>
+ <item>
<attribute name="action">app.quit</attribute>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="accel"><Primary>q</attribute>
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 3c6a362..c11c931 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -162,6 +162,12 @@ public class Contacts.App : Gtk.Application {
});
}
+ public void show_help () {
+ Gtk.show_uri (window.get_screen (),
+ "help:gnome-help/contacts",
+ Gtk.get_current_event_time ());
+ }
+
public void show_about () {
string[] authors = {
"Alexander Larsson <alexl redhat com>",
@@ -208,6 +214,10 @@ public class Contacts.App : Gtk.Application {
action.activate.connect (() => { window.destroy (); });
this.add_action (action);
+ action = new GLib.SimpleAction ("help", null);
+ action.activate.connect (() => { show_help (); });
+ this.add_action (action);
+
action = new GLib.SimpleAction ("about", null);
action.activate.connect (() => { show_about (); });
this.add_action (action);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]