From 148d8e75249ac1d23a4ffea356796582e785c0f4 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Wed, 28 Sep 2011 15:07:23 +0900 Subject: [PATCH] Revive eekboard -k option to specify keyboard from command line. --- src/client-main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/client-main.c b/src/client-main.c index fea1c878..094d267d 100644 --- a/src/client-main.c +++ b/src/client-main.c @@ -41,6 +41,8 @@ static gchar *opt_address = NULL; static gboolean opt_focus = FALSE; static gboolean opt_keystroke = FALSE; +static gchar *opt_keyboards = NULL; + static gboolean opt_fullscreen = FALSE; static const GOptionEntry options[] = { @@ -58,6 +60,8 @@ static const GOptionEntry options[] = { {"listen-keystroke", 's', 0, G_OPTION_ARG_NONE, &opt_keystroke, N_("Listen keystroke events with AT-SPI")}, #endif /* HAVE_ATSPI */ + {"keyboards", 'k', 0, G_OPTION_ARG_STRING, &opt_keyboards, + N_("Specify keyboards (comma separated)")}, {"fullscreen", 'F', 0, G_OPTION_ARG_NONE, &opt_fullscreen, N_("Create window in fullscreen mode")}, {NULL} @@ -313,8 +317,11 @@ main (int argc, char **argv) g_signal_connect (eekboard, "destroyed", G_CALLBACK(on_destroyed), loop); g_object_unref (eekboard); - - keyboards = g_settings_get_strv (settings, "keyboards"); + + if (opt_keyboards != NULL) + keyboards = g_strsplit (opt_keyboards, ",", -1); + else + keyboards = g_settings_get_strv (settings, "keyboards"); if (!set_keyboards (client, (const gchar * const *)keyboards)) { g_strfreev (keyboards); retval = 1;