After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 358293 - GtkComboBox has no bindings
GtkComboBox has no bindings
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-09-29 12:59 UTC by Michael Natterer
Modified: 2006-10-12 13:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds bindings (7.80 KB, patch)
2006-09-29 13:03 UTC, Michael Natterer
none Details | Review
Updated patch (11.15 KB, patch)
2006-10-02 13:51 UTC, Michael Natterer
none Details | Review

Description Michael Natterer 2006-09-29 12:59:39 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().
Comment 1 Michael Natterer 2006-09-29 13:03:09 UTC
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 :)
Comment 2 Matthias Clasen 2006-09-29 13:26:07 UTC
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
Comment 3 Michael Natterer 2006-10-02 13:51:16 UTC
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()
Comment 4 Michael Natterer 2006-10-12 12:06:39 UTC
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?
Comment 5 Tim Janik 2006-10-12 12:49:10 UTC
(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.
Comment 6 Michael Natterer 2006-10-12 12:50:41 UTC
Well I used "popup" because there is a public "popup" API... I don't think
that using a different name is better.
Comment 7 Michael Natterer 2006-10-12 13:05:47 UTC
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.