Files
gtk/gtk
António Fernandes 178ccd3b98 listbase: Select focus before moving cursor
We have built-in keybindings for cursor arrow keys. They move the focus
in the pointed direction and may also select the new focus child.

However, some views allow selection but start with no item selected;
such is the case of nautilus, and 'colors' in GTK Demo. In these views,
pressing an arrow key to initiate the cursor actually moves it to the
next position instead of the first position.

At best, this means we need to take an a extra step to move the cursor
into the first position. At worst, if there is only one child, the
cursor arrow keys don't work at all and the only way to reach the child
is with the Tab key or a pointer.

Instead, let's select the focus item if unselected but selectable. This
was the behavior of GtkTreeView in such cases, which can be tested in
GTK Demo -> Tree View -> Tree Store.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2618 and https://gitlab.gnome.org/GNOME/nautilus/-/issues/3078
2024-11-15 21:51:16 -04:00
..
2024-07-05 13:22:54 +02:00
2024-08-06 17:53:41 +02:00
2024-10-21 07:35:42 +02:00
2023-06-08 19:51:28 -04:00
2024-10-02 21:05:21 -04:00
2024-02-20 12:19:48 -05:00
2023-12-04 07:05:43 +02:00
2024-02-08 23:31:33 -05:00
2024-01-07 20:44:05 -05:00
2024-01-07 20:44:05 -05:00
2024-10-08 13:41:04 -05:00
2024-05-19 17:27:37 -04:00
2024-08-05 14:38:23 +03:00
2024-05-19 17:27:37 -04:00
2024-10-04 15:08:34 -04:00
2024-05-15 20:54:43 -04:00
2023-12-26 21:57:04 -05:00
2024-04-22 18:55:35 +04:00
2024-08-11 10:02:03 -04:00
2024-05-15 20:54:43 -04:00
2024-05-31 11:47:27 +02:00
2024-01-07 20:44:05 -05:00
2024-10-21 11:39:04 -04:00
2023-06-19 22:20:05 -04:00
2024-09-26 18:41:13 +02:00
2023-08-05 03:51:53 +02:00
2024-05-31 11:47:28 +02:00
2024-05-31 11:47:28 +02:00
2024-10-21 17:24:53 -04:00
2024-05-31 11:47:28 +02:00
2024-09-25 02:50:22 +02:00
2024-09-25 02:50:22 +02:00
2024-05-28 16:37:48 +02:00
2024-05-31 11:47:28 +02:00
2024-04-29 00:35:27 -04:00
2024-04-29 00:35:27 -04:00
2023-08-05 03:51:50 +02:00
2023-08-05 03:51:50 +02:00
2023-08-05 03:51:50 +02:00
2024-08-12 11:18:17 +03:00
2024-08-12 11:18:17 +03:00
2024-05-19 17:27:37 -04:00
2024-01-07 20:44:05 -05:00
2024-10-21 05:25:25 +02:00
2024-10-21 07:35:42 +02:00
2024-10-21 07:35:42 +02:00
2024-01-07 20:44:05 -05:00
2024-05-31 11:47:28 +02:00
2023-06-07 07:16:26 -04:00
2024-10-10 10:58:35 +02:00
2024-09-01 22:49:34 +02:00