From 3f92d2daa436aaf90c4aabfb2cd8031ad32b4d91 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Tue, 22 Aug 2023 12:58:50 -0500 Subject: [PATCH 01/12] keyboard: stop setting 'current' input source This setting is deprecated and ignored since 3.22. We don't need to set it anymore because nothing uses it. See: https://bugzilla.gnome.org/show_bug.cgi?id=766847 --- gnome-initial-setup/pages/keyboard/gis-keyboard-page.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c index fa41230f..693bb117 100644 --- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c +++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c @@ -84,61 +84,60 @@ set_input_settings (GisKeyboardPage *self) GisKeyboardPagePrivate *priv = gis_keyboard_page_get_instance_private (self); const gchar *type; const gchar *id; GVariantBuilder builder; GSList *l; gboolean is_xkb_source = FALSE; type = cc_input_chooser_get_input_type (CC_INPUT_CHOOSER (priv->input_chooser)); id = cc_input_chooser_get_input_id (CC_INPUT_CHOOSER (priv->input_chooser)); g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ss)")); if (g_str_equal (type, "xkb")) { g_variant_builder_add (&builder, "(ss)", type, id); is_xkb_source = TRUE; } for (l = priv->system_sources; l; l = l->next) { const gchar *sid = l->data; if (g_str_equal (id, sid) && g_str_equal (type, "xkb")) continue; g_variant_builder_add (&builder, "(ss)", "xkb", sid); } if (!is_xkb_source) g_variant_builder_add (&builder, "(ss)", type, id); g_settings_set_value (priv->input_settings, KEY_INPUT_SOURCES, g_variant_builder_end (&builder)); - g_settings_set_uint (priv->input_settings, KEY_CURRENT_INPUT_SOURCE, 0); g_settings_apply (priv->input_settings); } static void set_localed_input (GisKeyboardPage *self) { GisKeyboardPagePrivate *priv = gis_keyboard_page_get_instance_private (self); const gchar *layout, *variant; GString *layouts; GString *variants; GSList *l; if (!priv->localed) return; cc_input_chooser_get_layout (CC_INPUT_CHOOSER (priv->input_chooser), &layout, &variant); if (layout == NULL) layout = ""; if (variant == NULL) variant = ""; layouts = g_string_new (layout); variants = g_string_new (variant); #define LAYOUT(a) (a[0]) #define VARIANT(a) (a[1] ? a[1] : "") for (l = priv->system_sources; l; l = l->next) { const gchar *sid = l->data; gchar **lv = g_strsplit (sid, "+", -1); -- 2.41.0