[gnome-taquin] Make undo also behave as back.



commit 5b85d23a4c550627e62e903817d9932bf566e808
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Jul 30 16:54:21 2019 +0200

    Make undo also behave as back.
    
    Syncing a bit with Iagno.

 src/game-window.vala | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/game-window.vala b/src/game-window.vala
index 8b9b997..9cda7bc 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -114,15 +114,19 @@ private class GameWindow : BaseWindow, AdaptativeWidget
             return true;
         if (back_action_disabled)
             return true;
+        back_cb ();
+        return true;
+    }
+    private void back_cb ()
+    {
         if (game_view.game_content_visible_if_true ())
-            return true;
+            return;
 
         // TODO change back headerbar subtitle?
         game_view.configure_transition (StackTransitionType.SLIDE_RIGHT, 800);
         show_view ();
 
         back ();
-        return true;
     }
 
     /*\
@@ -228,7 +232,11 @@ private class GameWindow : BaseWindow, AdaptativeWidget
         if (game_view.is_in_in_window_mode ())
             return;
         if (!game_view.game_content_visible_if_true ())
+        {
+            if (!back_action_disabled)
+                back_cb ();     // FIXME not reached if undo_action is disabled, so at game start or finish
             return;
+        }
 
         game_finished = false;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]