Commit 6b6db796 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko

savestates-list: Preview savestates immediately with keynav

Use move-cursor signal to preview savestate for selected row immediately
without requiring a press of Enter or Space keys.

This allows to load savestates with keyboard with a single key press.
parent 634d391f
Pipeline #105337 failed with stages
in 10 minutes and 3 seconds
......@@ -53,6 +53,19 @@ private class Games.SavestatesList : Gtk.Box {
scrolled_window.margin_top = margin;
private void on_move_cursor () {
var row = list_box.get_selected_row ();
if (row != null && row is SavestateListBoxRow) {
var savestate_row = row as SavestateListBoxRow;
var savestate = savestate_row.savestate;
if (savestate != state.selected_savestate)
select_savestate_row (row);
private void on_row_activated (Gtk.ListBoxRow activated_row) {
if (activated_row == new_savestate_row) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment