From d346ab822b4b0206bfc22c5c294b9d609248372f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 4 Sep 2012 09:54:35 +0200 Subject: add menu item to show manual page --- vconsole.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vconsole.c b/vconsole.c index 3f01887..2e73119 100644 --- a/vconsole.c +++ b/vconsole.c @@ -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[] = " \n" " \n" " \n" +" \n" " \n" " \n" " \n" -- cgit