diff -u -r a/panel-plugin/xfce4-xkb-plugin.c b/panel-plugin/xfce4-xkb-plugin.c --- a/panel-plugin/xfce4-xkb-plugin.c 2012-02-04 15:43:16.437770560 +0400 +++ b/panel-plugin/xfce4-xkb-plugin.c 2012-02-04 15:40:43.474448759 +0400 @@ -279,6 +279,10 @@ if (xkb->settings->kbd_config->compose_key_position == NULL) xfce_rc_write_entry (rcfile, "compose_key_position", ""); else xfce_rc_write_entry (rcfile, "compose_key_position", xkb->settings->kbd_config->compose_key_position); + + if (xkb->settings->kbd_config->other_options == NULL) + xfce_rc_write_entry (rcfile, "other_options", ""); + else xfce_rc_write_entry (rcfile, "other_options", xkb->settings->kbd_config->other_options); } xfce_rc_close (rcfile); @@ -313,6 +317,7 @@ xkb->settings->kbd_config->variants = g_strdup (xfce_rc_read_entry (rcfile, "variants", NULL)); xkb->settings->kbd_config->toggle_option = g_strdup (xfce_rc_read_entry (rcfile, "toggle_option", NULL)); xkb->settings->kbd_config->compose_key_position = g_strdup (xfce_rc_read_entry (rcfile, "compose_key_position", NULL)); + xkb->settings->kbd_config->other_options = g_strdup (xfce_rc_read_entry (rcfile, "other_options", NULL)); xfce_rc_close (rcfile); diff -u -r a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c --- a/panel-plugin/xkb-config.c 2012-02-04 15:43:16.437770560 +0400 +++ b/panel-plugin/xkb-config.c 2012-02-04 15:40:43.474448759 +0400 @@ -198,6 +198,7 @@ g_free (kbd_config->variants); g_free (kbd_config->toggle_option); g_free (kbd_config->compose_key_position); + g_free (kbd_config->other_options); g_free (kbd_config); } @@ -291,6 +292,8 @@ { gboolean activate_settings = FALSE; + GString *opt_string = NULL; + gchar **opt; gchar **prefix; @@ -364,16 +367,25 @@ g_free (tmp); } + if (settings->kbd_config->other_options + && strlen (settings->kbd_config->other_options) > 0) + { + gchar *tmp = options; + options = g_strconcat (tmp, ",", settings->kbd_config->other_options, NULL); + g_free (tmp); + } + g_strfreev (config->config_rec->options); config->config_rec->options = g_strsplit_set (options, ",", 0); g_free (options); } - /* select the first "grp" option and use it (should be fixed to support more options) */ g_free (settings->kbd_config->toggle_option); settings->kbd_config->toggle_option = NULL; g_free (settings->kbd_config->compose_key_position); settings->kbd_config->compose_key_position = NULL; + g_free (settings->kbd_config->other_options); + settings->kbd_config->other_options = NULL; opt = config->config_rec->options; while (opt && *opt) { @@ -383,15 +395,29 @@ { settings->kbd_config->toggle_option = g_strdup (*opt); } - else if (prefix && *prefix && strcmp(*prefix, "compose") == 0) + else if (settings->kbd_config->compose_key_position == NULL + && prefix && *prefix && strcmp(*prefix, "compose") == 0) { settings->kbd_config->compose_key_position = g_strdup (*opt); } + else + { + if (opt_string == NULL) + opt_string = g_string_new (*opt); + else + { + g_string_append_c (opt_string, ','); + g_string_append (opt_string, *opt); + } + } g_strfreev (prefix); opt++; } + if (opt_string) + settings->kbd_config->other_options = g_string_free(opt_string, FALSE); + if (activate_settings && !settings->never_modify_config) xkl_config_rec_activate (config->config_rec, config->engine); diff -u -r a/panel-plugin/xkb-config.h b/panel-plugin/xkb-config.h --- a/panel-plugin/xkb-config.h 2012-02-04 15:43:16.437770560 +0400 +++ b/panel-plugin/xkb-config.h 2012-02-04 15:40:43.474448759 +0400 @@ -48,6 +48,7 @@ gchar* variants; gchar* toggle_option; gchar* compose_key_position; + gchar* other_options; } t_xkb_kbd_config; typedef struct