GNOME Bugzilla – Bug 645240
Select popup menu by beginning letter
Last modified: 2017-08-25 10:47:25 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?
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():
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 ***