diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-04 09:54:35 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-04 09:54:35 +0200 |
commit | d346ab822b4b0206bfc22c5c294b9d609248372f (patch) | |
tree | 989d230c3cf8bd65caea2e2da1f23660c3e5d65c | |
parent | 657eaefb193b86bbf2cb5ef994e0a00e474cee41 (diff) | |
download | vconsole-d346ab822b4b0206bfc22c5c294b9d609248372f.tar.gz |
add menu item to show manual page
-rw-r--r-- | vconsole.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -290,6 +290,14 @@ static void menu_cb_about(GtkAction *action, gpointer userdata) NULL); } +static void menu_cb_manual(GtkAction *action, gpointer userdata) +{ + if (fork() <= 0) + return; + /* child */ + execlp("xdg-open", "xdg-open", "man:vconsole(1)", NULL); +} + /* ------------------------------------------------------------------ */ static void menu_cb_blink_cursor(GtkToggleAction *action, gpointer userdata) @@ -404,6 +412,10 @@ static const GtkActionEntry entries[] = { .stock_id = GTK_STOCK_ABOUT, .label = "_About ...", .callback = G_CALLBACK(menu_cb_about), + },{ + .name = "Manual", + .label = "_Manual page", + .callback = G_CALLBACK(menu_cb_manual), }, }; @@ -455,6 +467,7 @@ static char ui_xml[] = " <menuitem action='GuestKill'/>\n" " </menu>\n" " <menu action='HelpMenu'>\n" +" <menuitem action='Manual'/>\n" " <menuitem action='About'/>\n" " </menu>\n" " </menubar>\n" |