[iagno] Little focus fix.



commit 05445ddcaa9e7af30013a4f3ed95d729b07fbdbf
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Feb 16 16:34:21 2019 +0100

    Little focus fix.

 data/ui/iagno.ui     | 6 +++++-
 src/game-window.vala | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/data/ui/iagno.ui b/data/ui/iagno.ui
index a152a5d..464823f 100644
--- a/data/ui/iagno.ui
+++ b/data/ui/iagno.ui
@@ -48,7 +48,10 @@
             <property name="tooltip-text" translatable="yes">Go back to the current game</property>
             <property name="use-underline">True</property>
             <property name="action-name">win.back</property>
-            <style><class name="image-button"/></style>
+            <property name="focus-on-click">False</property>
+            <style>
+              <class name="image-button"/>
+            </style>
             <child>
               <object class="GtkImage">
                 <property name="icon-name">go-previous-symbolic</property>
@@ -64,6 +67,7 @@
             <property name="valign">center</property>
             <property name="can-focus">True</property>
             <property name="menu-model">primary-menu</property>
+            <property name="focus-on-click">False</property>
             <child>
               <object class="GtkImage">
                 <property name="visible">True</property>
diff --git a/src/game-window.vala b/src/game-window.vala
index e959be0..ab28dd8 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -349,7 +349,7 @@ private class GameWindow : ApplicationWindow
 
         game_finished = false;
 
-        if (new_game_button.is_focus)
+        if (!back_button.is_focus)
             view.grab_focus();
         redo_action.set_enabled (true);
         undo ();
@@ -361,7 +361,7 @@ private class GameWindow : ApplicationWindow
         if (stack_child == null || (!) stack_child != "frame")
             return;
 
-        if (new_game_button.is_focus)
+        if (!back_button.is_focus)
             view.grab_focus();
         undo_action.set_enabled (true);
         redo ();


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