GtkComboBox: Detect when an item was chosen from the open list of entries


I’m trying to implement a behavior, where a function is called, when an item was chosen from a GtkComboBox via the list popup.

The event should not be triggered if the user presses up/down arrow keys while the GtkComboBox is focussed ( Reason: this behavior is assumed to be “searching” an entry, rather than activating it).


How do I find out if the user chose an item from the popup list of items of a GtkComboBox?

What I’ve tried

  • I tried g_signal_connecting a changed signal after the popoup is shown and disconnecting it again when the popup is closed. However, notify::popup-shown runs before changed, so I can’t use it.

I feel like I’m overseeing something. Any pointers?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.