summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorignapk <automat.script@gmail.com>2020-09-18 05:32:27 +0200
committerignapk <automat.script@gmail.com>2020-09-21 13:48:38 +0000
commit0f1f06b9a1bb8882ade3f6e8a9f9b158dc409b67 (patch)
tree6564e2bf554f2b3429de1f17ddc9e498dbd310c4
parent8d1f0d005b2370f56680ec5e08e16d52eae49654 (diff)
downloadtotem-0f1f06b9a1bb8882ade3f6e8a9f9b158dc409b67.tar.gz
main: Make XF86Back go back up a level in library
Currently XF86Back key triggers the same action as XF86AudioPrev, which is seeking previous media in current playlist. In other GNOME apps like epiphany and nautilus XF86Back is used to navigate back in the UI, which makes totem behaviour inconsistent. On the other hand, totem doesn't have a strong spatial navigation between sections so navigating the playlist is more useful than between pages. With that in mind, make it possible to use XF86Back to go back up a level when in the library. Fixes https://gitlab.gnome.org/GNOME/totem/-/issues/367
-rw-r--r--src/totem-object.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/totem-object.c b/src/totem-object.c
index 2cc2fe018..7b945eb6a 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3591,8 +3591,13 @@ window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, TotemObject *tote
}
/* Check whether we're in the player panel */
- if (!g_str_equal (totem_object_get_main_page (totem), "player"))
+ if (!g_str_equal (totem_object_get_main_page (totem), "player")) {
+ if (event->type == GDK_KEY_PRESS &&
+ event->keyval == GDK_KEY_Back &&
+ totem_grilo_get_show_back_button (TOTEM_GRILO (totem->grilo)))
+ back_button_clicked_cb (NULL, totem);
return FALSE;
+ }
/* Special case Eject, Open, Open URI,
* seeking and zoom keyboard shortcuts */