shortcut controller: Fix mnemonic cycling

Iterate the shortcuts we found in order, not in
reverse. Otherwise, we always end up activating
the last_selected one, since it is last in the
list.

This broke in fb9b54d4b2 when a list was
turned into an array.
This commit is contained in:
Matthias Clasen
2020-05-28 08:52:55 -04:00
parent 1f4130b927
commit 2d80b105ce

View File

@@ -373,7 +373,8 @@ gtk_shortcut_controller_run_controllers (GtkEventController *controller,
if (!shortcuts)
return retval;
for (i = shortcuts->len - 1, p = shortcuts->len; i >= 0; i--)
p = shortcuts->len;
for (i = 0; i < shortcuts->len; i++)
{
const ShortcutData *data = &g_array_index (shortcuts, ShortcutData, i);