GtkEntry widget does not emit "editing-done" signal when Enter key is pressed
The description of GtkCellEditable::editing-done says
* Implementations of `GtkCellEditable` are responsible for * emitting this signal when they are done editing, e.g. * `GtkEntry` emits this signal when the user presses Enter.
But GtkEntry does not emit ::editing-done, when it's used without GtkCellArea and GtkCellRenderer's. See attached test cases (modifications of tests/testentryicons.c), showing that GtkEntry::activate is emitted, but GtkCellEditable::editing-done is not.
Test case for gtk3: entry_editing_done3.c
Test case for gtk4: entry_editing_done4.c
Probably this is because gtk_cell_editable_start_editing() is not called. Therefore
gtk_entry_start_editing() and gtk_cell_editable_entry_activated() in gtkentry.c
are not called. You can change
#define CALL_START_EDITING 0 to
#define CALL_START_EDITING 1
in the test cases to see what happens if gtk_cell_editable_start_editing() is called.
How is this supposed to work? In gtk3 the description of GtkEntry::activate says
* While this signal is used as a * [keybinding signal][GtkBindingSignal], * it is also commonly used by applications to intercept * activation of entries.
This text has been removed in gtk4. I thought the removal of this text meant that GtkEntry::activate is not supposed to be used by gtk4 applications. It has therefore not been implemented in C++ code in gtkmm4. I thought that GtkCellEditable::editing-done could be used instead. Am I wrong? What's the replacement for GtkEntry::activate in gtk4? Or is it okay to use GtkEntry::activate in gtk4 and gtkmm4 applications? Most keybinding signals are not wrapped in C++ code in gtkmm.