summaryrefslogtreecommitdiff
path: root/capplets/keyboard/mate-keyboard-properties-xkb.c
diff options
context:
space:
mode:
authorOleksii Prudkyi <[email protected]>2024-10-27 11:47:24 +0100
committerVictor Kareh <[email protected]>2025-04-23 12:33:19 +0000
commitf4dcf5220b070d57609c85e6e10eaa638f7ce561 (patch)
tree7554056037a81b92ced3cf84e049ce3b130a0039 /capplets/keyboard/mate-keyboard-properties-xkb.c
parent6b9a5c5348b5e3792e9ea92bfdfc71151bc1fcec (diff)
downloadmate-control-center-f4dcf5220b070d57609c85e6e10eaa638f7ce561.tar.bz2
mate-control-center-f4dcf5220b070d57609c85e6e10eaa638f7ce561.tar.xz
keyboard: option to show/select extra layouts
Diffstat (limited to 'capplets/keyboard/mate-keyboard-properties-xkb.c')
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkb.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/capplets/keyboard/mate-keyboard-properties-xkb.c b/capplets/keyboard/mate-keyboard-properties-xkb.c
index d1dd7925..831203f0 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkb.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkb.c
@@ -150,6 +150,18 @@ chk_separate_group_per_window_toggled (GSettings * settings,
}
static void
+chk_load_extra_items_toggled (GSettings * settings,
+ gchar * key,
+ GtkBuilder * dialog)
+{
+ matekbd_desktop_config_load_from_gsettings (&desktop_config);
+
+ xkl_config_registry_load (config_registry, desktop_config.load_extra_items);
+
+ xkb_layouts_fill_selected_tree (dialog);
+}
+
+static void
chk_new_windows_inherit_layout_toggled (GtkWidget *
chk_new_windows_inherit_layout,
GtkBuilder * dialog)
@@ -193,6 +205,18 @@ setup_xkb_tabs (GtkBuilder * dialog)
G_CALLBACK (chk_separate_group_per_window_toggled),
dialog);
+ g_settings_bind (xkb_general_settings,
+ "load-extra-items",
+ WID ("chk_load_extra_items"),
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_signal_connect (xkb_general_settings,
+ "changed::load-extra-items",
+ G_CALLBACK (chk_load_extra_items_toggled),
+ dialog);
+
+
#ifdef HAVE_X11_EXTENSIONS_XKB_H
if (strcmp (xkl_engine_get_backend_name (engine), "XKB"))
#endif