GtkEntry does not emit ::insert-text during editing
While the GtkEntry
uses the GtkText
for as a delegate for GtkEditable
, the ::insert-text
signal is only emitted if you call gtk_editable_insert_text()
on the GtkEntry
.
However, during typical user input typing occurs and the GtkIMContext::commit
signal will be emitted for the GtkText
. When gtk_text_commit_cb()
calls gtk_text_enter_text()
, gtk_editable_insert_text()
is called on the GtkText
. There is nothing wrapping that call to propagate it to the GtkEntry
.
This is problematic because it means our documentation is wrong.
https://docs.gtk.org/gtk4/signal.Editable.insert-text.html says that you can connect to GtkEditable::insert-text()
to stop emission and prevent input of certain characters. For example, the "Go to Line" dialog in gedit uses this to prevent input of non-numeric characters.