From edc50c85ef3400608c12e2f40edc2b61ba6df489 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 31 Aug 2024 18:23:49 -0400 Subject: [PATCH] spinbutton: No emoji for numeric input Continuing from cfc871f031d5, when a spin button is in numeric mode, set the no-emoji input hint, since Emoji aren't useful in numeric input. --- gtk/gtkspinbutton.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 298d0fd460..7f241bb4fa 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -2296,6 +2296,9 @@ gtk_spin_button_set_numeric (GtkSpinButton *spin_button, spin_button->numeric = numeric; gtk_text_set_input_purpose (GTK_TEXT (spin_button->entry), numeric ? GTK_INPUT_PURPOSE_NUMBER: GTK_INPUT_PURPOSE_FREE_FORM); + gtk_text_set_input_hints (GTK_TEXT (spin_button->entry), + numeric ? GTK_INPUT_HINT_NO_EMOJI : GTK_INPUT_HINT_NONE); + g_object_notify_by_pspec (G_OBJECT (spin_button), spinbutton_props[PROP_NUMERIC]); } }