summaryrefslogtreecommitdiffstats
path: root/src/remote-viewer-main.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-12-19 15:56:43 +0100
committerHans de Goede <hdegoede@redhat.com>2012-12-21 10:54:27 +0100
commit008491a2d99b626877898a6782cf4c2010bbb7db (patch)
treede9d7173650d85f8868af21bf890efb1c94bd247 /src/remote-viewer-main.c
parentaecd80ec77108beb982140a2bb4f7f8bc23090bb (diff)
downloadvirt-viewer-008491a2d99b626877898a6782cf4c2010bbb7db.tar.gz
virt-viewer-008491a2d99b626877898a6782cf4c2010bbb7db.tar.xz
virt-viewer-008491a2d99b626877898a6782cf4c2010bbb7db.zip
Make hotkey configuration functionality available from the cmdline (v2)
Changes in v2: -Add --hotkeys documentation to the man-pages Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/remote-viewer-main.c')
-rw-r--r--src/remote-viewer-main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
index 540d9de..048f6b4 100644
--- a/src/remote-viewer-main.c
+++ b/src/remote-viewer-main.c
@@ -197,6 +197,7 @@ main(int argc, char **argv)
gchar **args = NULL;
gchar *uri = NULL;
char *title = NULL;
+ char *hotkeys = NULL;
gboolean verbose = FALSE;
gboolean debug = FALSE;
gboolean direct = FALSE;
@@ -224,6 +225,8 @@ main(int argc, char **argv)
{ "spice-controller", '\0', 0, G_OPTION_ARG_NONE, &controller,
N_("Open connection using Spice controller communication"), NULL },
#endif
+ { "hotkeys", 'h', 0, G_OPTION_ARG_STRING, &hotkeys,
+ N_("Customise hotkeys"), NULL },
{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_STRING_ARRAY, &args,
NULL, "URI" },
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
@@ -302,6 +305,7 @@ main(int argc, char **argv)
NULL);
virt_viewer_window_set_zoom_level(virt_viewer_app_get_main_window(app), zoom);
virt_viewer_app_set_direct(app, direct);
+ virt_viewer_app_set_hotkeys(app, hotkeys);
if (!virt_viewer_app_start(app))
goto cleanup;