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 645240 - Select popup menu by beginning letter
Select popup menu by beginning letter
Status: RESOLVED DUPLICATE of bug 567141
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
Depends on:
Reported: 2011-03-19 17:20 UTC by David Balažic
Modified: 2017-08-25 10:47 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description David Balažic 2011-03-19 17:20:45 UTC
Currently using GNOME 2.28 with Ubuntu 10.10 (libgtk2.0-0 2.22.0-0ubuntu1)

Selecting from long but sorted list is suboptimal, especially compared to other GUIs.

Example in gnome-keyboard-properties, when adding a new layout, by country: The popup menu with the list of countries has many items.

Both in popped up and not popped up state, it is not possible to navigate by typing the beginning (and following) letter of the entry.

To select something from the last quarter, one has either to scroll down by mouse (takes seconds, as there is not scroll bar like in some other GUIs) or navigate down by several presses of PgDown key and then some more with cursor up/down.

To select "Slovenia" in other GUIs requires 3 key presses: S, L, and cursor down.
In GTK+ there are 15 key-presses needed : space to open the menu, 2 times PgDown and the 12 times cursor down.

The space would be unneeded, but if the menu is not opened, PgDown goes straight to the end of the list (same as End key). Is that a bug?
Comment 1 Daniel Boles 2017-08-25 10:47:25 UTC
Your chosen product of GtkMenu supports accelerators: specific characters in each item can be assigned as the mnemonic key, and they would then be activated if pressing that key (_without_ Alt) while the menu is popped-up.

However, you appear to be talking about GtkComboBox specifically, which just happens to have a subclass of GtkMenu - GtkTreeMenu - which does not support accelerators. Hence, this is a another dupe of Bug 567141.

(Well, ComboBox can also be in appears-as-list mode, which might require different handling for accels - but that's insanely broken, so let's ignore it.)

(In reply to David Balažic from comment #0)
> The space would be unneeded, but if the menu is not opened, PgDown goes
> straight to the end of the list (same as End key). Is that a bug?

It's intentionally programmed to go to the end, in gtk_combo_box_real_move_active():

    case GTK_SCROLL_END:
      found = tree_last (combo_box, priv->model, &new_iter);

What do you think it should do instead? Bear in mind that the ComboBox does not necessarily know how tall its menu is. Anyway, please open a new enhancement request if you have a proposed way to improve that.

*** This bug has been marked as a duplicate of bug 567141 ***