GNOME Bugzilla – Bug 358293
GtkComboBox has no bindings
Last modified: 2006-10-12 13:05:47 UTC
The Up/Down bindings in GtkComboBox cannot be configured, because it has no bindings. The stuff is hardcoded in gtk_combo_box_key_press().
Created attachment 73628 [details] [review] Adds bindings Attached patch adds the missing bindings. Now the only thing left in gtk_combo_box_key_press() is the handling of <alt>Down which pops up the menu. I'd like to move this to a binding as well and get rid of key_press(), but I need another signal for that. What about GtkComboBox::popup-menu ? Also, I'm not really happy with the name of the GtkComboBox::move-current I added, comments appreciated :)
Patch looks fine (without trying it...). For the popup-menu signal, I think we need a different name since there already is a GtkWidget::popup-menu signal
Created attachment 73847 [details] [review] Updated patch - adds "popup" and "popdown" signals and bindings - renames "move-current" to "move-active" - uses _gtk_binding_signal_new() so no class slots are wasted - gets rid of gtk_combo_box_key_press()
Ok, the "popdown" signal is pretty useless since the focus is on the popup and there is no way to invoke the combo's "popdown" binding. Is the patch OK to commit with the popdown signal removed? Or do we keep it for whatever symmetry reasons?
(In reply to comment #4) > Ok, the "popdown" signal is pretty useless since the focus is > on the popup and there is no way to invoke the combo's "popdown" > binding. > > Is the patch OK to commit with the popdown signal removed? > Or do we keep it for whatever symmetry reasons? regarding your own comments on the patch, i'd suggest to: - remove popdown because it's useless - rename popup to something a bit more specifc, also for picking a name that's less likely to demand the paired-ness you had a problem with. e.g. show-combo, popup-combo or show-popup. - ::move-active seems to comply with the remaining combobox API, so sounds ok.
Well I used "popup" because there is a public "popup" API... I don't think that using a different name is better.
Changes done and committed. Closing as FIXED: 2006-10-12 Michael Natterer <mitch@imendio.com> * gtk/gtkcombobox.c: added "move-active" and "popup" signals and bindings to trigger them. Removed gtk_combo_box_key_press(), it's obsolete now. Fixes bug #358293.