[gnome-disk-utility] Add Help menu
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Add Help menu
- Date: Fri, 16 Nov 2012 19:36:08 +0000 (UTC)
commit c2ebe1176089c9abdec65d9ee38c725abb6668a8
Author: David Zeuthen <zeuthen gmail com>
Date: Fri Nov 16 14:35:31 2012 -0500
Add Help menu
This was requested in bug 687546.
https://bugzilla.gnome.org/show_bug.cgi?id=687546
Signed-off-by: David Zeuthen <zeuthen gmail com>
data/ui/app-menu.ui | 5 +++++
src/disks/gduapplication.c | 14 ++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/data/ui/app-menu.ui b/data/ui/app-menu.ui
index c14c614..5b0c06f 100644
--- a/data/ui/app-menu.ui
+++ b/data/ui/app-menu.ui
@@ -13,6 +13,11 @@
<attribute name="action">app.about</attribute>
</item>
<item>
+ <attribute name="action">app.help</attribute>
+ <attribute name="label" translatable="yes">_Help</attribute>
+ <attribute name="accel">F1</attribute>
+ </item>
+ <item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
<attribute name="accel"><Primary>q</attribute>
diff --git a/src/disks/gduapplication.c b/src/disks/gduapplication.c
index d1e907d..8bc37eb 100644
--- a/src/disks/gduapplication.c
+++ b/src/disks/gduapplication.c
@@ -258,10 +258,24 @@ quit_activated (GSimpleAction *action,
gtk_widget_destroy (GTK_WIDGET (app->window));
}
+static void
+help_activated (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ //GduApplication *app = GDU_APPLICATION (user_data);
+ //gtk_widget_destroy (GTK_WIDGET (app->window));
+ gtk_show_uri (NULL, /* GdkScreen */
+ "help:gnome-help/disk",
+ GDK_CURRENT_TIME,
+ NULL); /* GError */
+}
+
static GActionEntry app_entries[] =
{
{ "attach_disk_image", attach_disk_image_activated, NULL, NULL, NULL },
{ "about", about_activated, NULL, NULL, NULL },
+ { "help", help_activated, NULL, NULL, NULL },
{ "quit", quit_activated, NULL, NULL, NULL }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]