[iagno] Cleanings.



commit beaa87de5bc813870966f2bcc70808f52a7fb674
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Dec 9 00:09:40 2019 +0100

    Cleanings.

 data/ui/game-headerbar.ui | 18 ++++++++++++------
 src/game-headerbar.vala   |  6 ------
 src/game-window.vala      |  3 ---
 src/iagno.vala            |  3 +--
 4 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/data/ui/game-headerbar.ui b/data/ui/game-headerbar.ui
index 57af371..a20e844 100644
--- a/data/ui/game-headerbar.ui
+++ b/data/ui/game-headerbar.ui
@@ -22,23 +22,29 @@
 <interface>
   <requires lib="gtk+" version="3.12"/>
   <template class="GameHeaderBar" parent="BaseHeaderBar">
-    <property name="visible">True</property>
     <property name="show-close-button">True</property>
     <child>
       <object class="GtkButton" id="new_game_button">
-        <property name="visible">False</property>
-        <property name="use-underline">True</property>
-        <!-- Translators: during a game, label of the Start Over button (with a mnemonic that appears 
pressing Alt) -->
-        <property name="label" translatable="yes">_New Game</property>
         <property name="halign">center</property>
         <property name="valign">center</property>
         <property name="action-name">ui.new-game</property>
         <property name="can-default">True</property>
-        <!-- Translators: during a game, tooltip text of the Start Over button -->
+        <!-- Translators: during a game, tooltip text of the New Game button -->
         <property name="tooltip-text" translatable="yes">Start a new game</property>
         <style>
+          <class name="text-button"/>
           <class name="new-game-button"/>
         </style>
+        <child>
+          <object class="GtkLabel"> <!-- for ellipsizing, if the text shows a moves count that can grow -->
+            <property name="visible">True</property>
+            <!-- Translators: during a game, label of the New Game button (with a mnemonic that appears 
pressing Alt) -->
+            <property name="label" translatable="yes">_New Game</property>
+            <property name="ellipsize">end</property>
+            <property name="mnemonic-widget">new_game_button</property>
+            <property name="use-underline">True</property>
+          </object>
+        </child>
       </object>
     </child>
     <child>
diff --git a/src/game-headerbar.vala b/src/game-headerbar.vala
index 84b2f9a..8238b3d 100644
--- a/src/game-headerbar.vala
+++ b/src/game-headerbar.vala
@@ -30,9 +30,6 @@ private class GameHeaderBar : BaseHeaderBar, AdaptativeWidget
     [CCode (notify = false)] public string window_name   { private get; protected construct set; default = 
""; }
 
     [CCode (notify = false)] public bool has_sound { private get; protected construct; default = false; }
-    [CCode (notify = false)] public bool show_undo { private get; protected construct; default = false; }
-    [CCode (notify = false)] public bool show_redo { private get; protected construct; default = false; }
-    [CCode (notify = false)] public bool show_hint { private get; protected construct; default = false; }    
// TODO something
 
     [CCode (notify = false)] public Widget? game_widget { private get; protected construct; default = null; }
 
@@ -59,9 +56,6 @@ private class GameHeaderBar : BaseHeaderBar, AdaptativeWidget
                 has_keyboard_shortcuts: GameWindowFlags.SHORTCUTS in flags,
                 has_sound:              GameWindowFlags.HAS_SOUND in flags,
                 has_help:               GameWindowFlags.SHOW_HELP in flags, // TODO rename show_help
-                show_hint:              GameWindowFlags.SHOW_HINT in flags,
-                show_redo:              GameWindowFlags.SHOW_REDO in flags,
-                show_undo:              GameWindowFlags.SHOW_UNDO in flags,
                 appearance_menu:        _appearance_menu,
                 game_widget:            _game_widget,
                 window_name:            _window_name);
diff --git a/src/game-window.vala b/src/game-window.vala
index 06fc3a5..0cd4d55 100644
--- a/src/game-window.vala
+++ b/src/game-window.vala
@@ -25,9 +25,6 @@ private enum GameWindowFlags {
     HAS_SOUND,
     SHORTCUTS,
     SHOW_HELP,
-    SHOW_HINT,
-    SHOW_REDO,
-    SHOW_UNDO,
     SHOW_START_BUTTON;
 }
 
diff --git a/src/iagno.vala b/src/iagno.vala
index 5e11694..96649dd 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -407,8 +407,7 @@ private class Iagno : Gtk.Application, BaseApplication
                                  GameWindowFlags.SHOW_START_BUTTON
                                  | GameWindowFlags.HAS_SOUND
                                  | GameWindowFlags.SHORTCUTS
-                                 | GameWindowFlags.SHOW_HELP
-                                 | GameWindowFlags.SHOW_UNDO,
+                                 | GameWindowFlags.SHOW_HELP,
                                  (Box) new_game_screen,
                                  view,
                                  appearance_menu,


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