diff options
Diffstat (limited to '')
-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 |