diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:47:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:47:04 +0000 |
commit | 70dcd40a48b34179ec7a6cdf5d2ade5e7f2038f5 (patch) | |
tree | 3eec7b12c2fb81157d19bb8dc4b3fe278bbb0f28 /debian/patches/keyboard-Update-filter-and-sort-when-the-display-name-cha.patch | |
parent | Adding upstream version 43.2. (diff) | |
download | gnome-initial-setup-70dcd40a48b34179ec7a6cdf5d2ade5e7f2038f5.tar.xz gnome-initial-setup-70dcd40a48b34179ec7a6cdf5d2ade5e7f2038f5.zip |
Adding debian version 43.2-6.debian/43.2-6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/keyboard-Update-filter-and-sort-when-the-display-name-cha.patch')
-rw-r--r-- | debian/patches/keyboard-Update-filter-and-sort-when-the-display-name-cha.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches/keyboard-Update-filter-and-sort-when-the-display-name-cha.patch b/debian/patches/keyboard-Update-filter-and-sort-when-the-display-name-cha.patch new file mode 100644 index 0000000..ba8d296 --- /dev/null +++ b/debian/patches/keyboard-Update-filter-and-sort-when-the-display-name-cha.patch @@ -0,0 +1,46 @@ +From: Simon McVittie <smcv@debian.org> +Date: Sun, 5 Mar 2023 16:16:12 +0000 +Subject: keyboard: Update filter and sort when the display name changes + +The display name in `InputWidget.name` can affect `sort_inputs()` +and `input_visible()`, so we should update it when we replace the +placeholder display name with the real one, and tell GTK to update its +state accordingly. + +Signed-off-by: Simon McVittie <smcv@debian.org> +Bug-Debian: https://bugs.debian.org/1032382 +Forwarded: https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/180 +--- + gnome-initial-setup/pages/keyboard/cc-input-chooser.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c +index ae8f2d7..b851ec6 100644 +--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c ++++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c +@@ -589,6 +589,7 @@ static void + update_ibus_active_sources (CcInputChooser *chooser) + { + CcInputChooserPrivate *priv; ++ gboolean invalidate = FALSE; + IBusEngineDesc *engine_desc; + const gchar *type; + const gchar *id; +@@ -615,9 +616,16 @@ update_ibus_active_sources (CcInputChooser *chooser) + if (engine_desc) { + name = engine_get_display_name (engine_desc); + gtk_label_set_text (GTK_LABEL (row->label), name); +- g_free (name); ++ g_clear_pointer (&row->name, g_free); ++ row->name = g_steal_pointer (&name); ++ invalidate = TRUE; + } + } ++ ++ if (invalidate) { ++ gtk_list_box_invalidate_sort (GTK_LIST_BOX (priv->input_list)); ++ gtk_list_box_invalidate_filter (GTK_LIST_BOX (priv->input_list)); ++ } + } + + static void |