[gnome-tetravex/arnaudb/wip/gtk4: 17/21] Adapt UI files.



commit e28557efd089b63f6edc90b9effe7b2b7d741bc8
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Feb 21 05:06:56 2020 +0100

    Adapt UI files.

 src/app-menu.ui            |  1 +
 src/gnome-tetravex.ui      |  4 +--
 src/help-overlay.ui        | 33 +------------------------
 src/score-overlay-entry.ui | 13 +---------
 src/score-overlay.ui       | 61 +++++++++++++++++++++++-----------------------
 5 files changed, 35 insertions(+), 77 deletions(-)
---
diff --git a/src/app-menu.ui b/src/app-menu.ui
index e655f7c..d0f1df0 100644
--- a/src/app-menu.ui
+++ b/src/app-menu.ui
@@ -16,6 +16,7 @@
    with this GNOME Tetravex.  If not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
+  <requires lib="gtk+" version="3.96"/>
   <menu id="app-menu">
     <section>
       <item>
diff --git a/src/gnome-tetravex.ui b/src/gnome-tetravex.ui
index 64aa932..ffc2c74 100644
--- a/src/gnome-tetravex.ui
+++ b/src/gnome-tetravex.ui
@@ -16,15 +16,13 @@
    with this GNOME Tetravex.  If not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
-  <!-- interface-requires gtk+ 3.10 -->
+  <requires lib="gtk+" version="3.96"/>
   <object class="GtkApplicationWindow" id="gnome-tetravex-window">
-    <property name="can_focus">False</property>
     <!-- Translators: application name, as seen in GNOME Shell -->
     <property name="title" translatable="yes">Tetravex</property>
     <property name="icon-name">org.gnome.Tetravex</property>
     <child>
       <object class="GtkGrid" id="grid">
-        <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="margin-bottom">25</property>
         <property name="column-homogeneous">True</property> <!-- else the clock regularly triggers a view 
redraw... -->
diff --git a/src/help-overlay.ui b/src/help-overlay.ui
index e75299c..3b19466 100644
--- a/src/help-overlay.ui
+++ b/src/help-overlay.ui
@@ -18,21 +18,17 @@
    with this GNOME Tetravex.  If not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
-  <!-- interface-requires gtk+ 3.17 -->
+  <requires lib="gtk+" version="3.96"/>
   <object class="GtkShortcutsWindow" id="help_overlay">
-    <property name="modal">1</property>
     <child>
       <object class="GtkShortcutsSection">
-        <property name="visible">1</property>
         <property name="max-height">10</property>
         <child>
           <object class="GtkShortcutsGroup">
-            <property name="visible">1</property>
             <!-- Translators: title of a section in the Keyboard Shortcuts dialog; contains "Select where to 
play", "Play on selected tile", "Select the given row", etc. -->
             <property name="title" translatable="yes" context="shortcut window">Play with keyboard</property>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <!-- Translators: Left/Right/Up/Down arrows actions description in the Keyboard Shortcuts 
dialog, section "Play with keyboard"; moves highlight -->
                 <property name="title" translatable="yes" context="shortcut window">Move keyboard 
highlight</property>
                 <property name="accelerator">Left Right Up Down</property>
@@ -40,7 +36,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <!-- Translators: Return/space actions description in the Keyboard Shortcuts dialog, section 
"Play with keyboard"; depend on context -->
                 <property name="title" translatable="yes" context="shortcut window">Select, move or 
unselect</property>
                 <property name="accelerator">Return space</property>
@@ -48,7 +43,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <!-- Translators: numbers (1 to 6) actions description in the Keyboard Shortcuts dialog, 
section "Play with keyboard"; depending on game size, you can only use 1 to 2 or up to 1 to 6 -->
                 <property name="title" translatable="yes" context="shortcut window">Select the given 
row</property>
                 <property name="accelerator">1...6</property>
@@ -56,7 +50,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <!-- Translators: alphabetical chars (a to f) actions description in the Keyboard Shortcuts 
dialog, section "Play with keyboard"; depending on game size, you can only use a to b or up to a to f; the 
board is split in two parts, that is for the left one -->
                 <property name="title" translatable="yes" context="shortcut window">Select left half-board 
column</property>
                 <property name="accelerator">a...f</property>
@@ -64,7 +57,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <!-- Translators: capital alphabetical chars (A to F) actions description in the Keyboard 
Shortcuts dialog, section "Play with keyboard"; depending on game size, you can only use A to B or up to A to 
F; the board is split in two parts, that is for the right one -->
                 <property name="title" translatable="yes" context="shortcut window">Select right half-board 
column</property>
                 <property name="accelerator">&lt;Shift&gt;A...&lt;Shift&gt;F</property>
@@ -72,7 +64,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;Left</property>
                 <!-- Translators: Ctrl-Left shortcut (in some contexts) description in the Keyboard 
Shortcuts dialog, section "Play with keyboard"; allows user to finish puzzle on the right part of the board, 
and to then "validate", moving all tiles at the same time on the lift part of the board -->
                 <property name="title" translatable="yes" context="shortcut window">Validate right 
half-board</property>
@@ -82,12 +73,10 @@
         </child>
         <child>
           <object class="GtkShortcutsGroup">
-            <property name="visible">1</property>
             <!-- Translators: title of a section in the Keyboard Shortcuts dialog; contains "Undo" and 
"Redo" -->
             <property name="title" translatable="yes" context="shortcut window">History</property>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Primary&gt;z</property>
                 <!-- Translators: Ctrl-Z shortcut description in the Keyboard Shortcuts dialog, section 
History; verb, undoes last move -->
                 <property name="title" translatable="yes" context="shortcut window">Undo</property>
@@ -95,7 +84,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Shift&gt;&lt;Primary&gt;z</property>
                 <!-- Translators: Shift-Ctrl-Z shortcut description in the Keyboard Shortcuts dialog, 
section History; verb, redoes undone move -->
                 <property name="title" translatable="yes" context="shortcut window">Redo</property>
@@ -105,12 +93,10 @@
         </child>
         <child>
           <object class="GtkShortcutsGroup">
-            <property name="visible">1</property>
             <!-- Translators: title of a section in the Keyboard Shortcuts dialog; contains "New Game", 
"Pause", "Scores"... -->
             <property name="title" translatable="yes" context="shortcut window">Main functions</property>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;N</property>
                 <!-- Translators: Ctrl-N shortcut description in the Keyboard Shortcuts dialog, section Main 
Functions -->
                 <property name="title" translatable="yes" context="shortcut window">Start a new 
game</property>
@@ -118,7 +104,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;P Pause</property>
                 <!-- Translators: Ctrl-P shortcut description in the Keyboard Shortcuts dialog, section Main 
Functions -->
                 <property name="title" translatable="yes" context="shortcut window">Pause the game</property>
@@ -126,7 +111,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;H</property>
                 <!-- Translators: Ctrl-H shortcut description in the Keyboard Shortcuts dialog, section Main 
Functions -->
                 <property name="title" translatable="yes" context="shortcut window">Solve the game</property>
@@ -134,7 +118,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;I</property>
                 <!-- Translators: Ctrl-I shortcut description in the Keyboard Shortcuts dialog, section Main 
Functions -->
                 <property name="title" translatable="yes" context="shortcut window">Show scores</property>
@@ -144,12 +127,10 @@
         </child>
         <child>
           <object class="GtkShortcutsGroup">
-            <property name="visible">1</property>
             <!-- Translators: title of a section in the Keyboard Shortcuts dialog; contains "Show Help", 
"Show Keyboard Shortcuts", "Quit"... -->
             <property name="title" translatable="yes" context="shortcut window">Generic</property>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Primary&gt;question &lt;Primary&gt;F1</property>
                 <!-- Translators: Ctrl-F1 shortcut description in the Keyboard Shortcuts dialog, section 
Generic; displays Keyboard Shortcuts dialog -->
                 <property name="title" translatable="yes" context="shortcut window">Show Keyboard 
Shortcuts</property>
@@ -157,7 +138,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">F1</property>
                 <!-- Translators: F1 shortcut description in the Keyboard Shortcuts dialog, section Generic; 
shows application help -->
                 <property name="title" translatable="yes" context="shortcut window">Show Help</property>
@@ -165,7 +145,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Shift&gt;F1</property>
                 <!-- Translators: Shift-F1 shortcut description in the Keyboard Shortcuts dialog, section 
Generic; shows About dialog -->
                 <property name="title" translatable="yes" context="shortcut window">Show About</property>
@@ -173,7 +152,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;Q</property>
                 <!-- Translators: Ctrl-Q shortcut description in the Keyboard Shortcuts dialog, section 
Generic; quits the application -->
                 <property name="title" translatable="yes" context="shortcut window">Quit</property>
@@ -183,12 +161,10 @@
         </child>
         <child>
           <object class="GtkShortcutsGroup">
-            <property name="visible">1</property>
             <!-- Translators: title of a section in the Keyboard Shortcuts dialog; contains four keyboard 
shortcuts for functions that help playing, but are not doable by mouse, so the "advanced" note... -->
             <property name="title" translatable="yes" context="shortcut window">Advanced gameplay</property>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;Up</property>
                 <!-- Translators: Ctrl-Up shortcut description in the Keyboard Shortcuts dialog, section 
Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the left half-board up by one</property>
@@ -196,7 +172,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;Down</property>
                 <!-- Translators: Ctrl-Down shortcut description in the Keyboard Shortcuts dialog, section 
Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the left half-board down by one</property>
@@ -204,7 +179,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;Left</property>
                 <!-- Translators: Ctrl-Left shortcut description in the Keyboard Shortcuts dialog, section 
Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the left half-board left by one</property>
@@ -212,7 +186,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Ctrl&gt;Right</property>
                 <!-- Translators: Ctrl-Right shortcut description in the Keyboard Shortcuts dialog, section 
Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the left half-board right by one</property>
@@ -220,7 +193,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Shift&gt;&lt;Ctrl&gt;Up</property>
                 <!-- Translators: Shift-Ctrl-Up shortcut description in the Keyboard Shortcuts dialog, 
section Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the right half-board up by one</property>
@@ -228,7 +200,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Shift&gt;&lt;Ctrl&gt;Down</property>
                 <!-- Translators: Shift-Ctrl-Down shortcut description in the Keyboard Shortcuts dialog, 
section Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the right half-board down by one</property>
@@ -236,7 +207,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Shift&gt;&lt;Ctrl&gt;Left</property>
                 <!-- Translators: Shift-Ctrl-Left shortcut description in the Keyboard Shortcuts dialog, 
section Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the right half-board left by one</property>
@@ -244,7 +214,6 @@
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
-                <property name="visible">1</property>
                 <property name="accelerator">&lt;Shift&gt;&lt;Ctrl&gt;Right</property>
                 <!-- Translators: Shift-Ctrl-Right shortcut description in the Keyboard Shortcuts dialog, 
section Advanced gameplay -->
                 <property name="title" translatable="yes" context="shortcut window">Move all the pieces in 
the right half-board right by one</property>
diff --git a/src/score-overlay-entry.ui b/src/score-overlay-entry.ui
index 60be19d..cc97898 100644
--- a/src/score-overlay-entry.ui
+++ b/src/score-overlay-entry.ui
@@ -18,35 +18,24 @@
    with this GNOME Tetravex.  If not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
-  <requires lib="gtk+" version="3.12"/>
+  <requires lib="gtk+" version="3.96"/>
   <template class="ScoreOverlayEntry" parent="GtkGrid">
-    <property name="visible">True</property>
     <property name="width-request">160</property> <!-- two tiles of 80 max -->
     <property name="halign">center</property>
     <child>
       <object class="GtkLabel" id="place_label">
-        <property name="visible">True</property>
         <property name="hexpand">True</property>
         <property name="halign">start</property>
         <style>
           <class name="bold-label"/>
         </style>
       </object>
-      <packing>
-        <property name="top-attach">2</property>
-        <property name="left-attach">1</property>
-      </packing>
     </child>
     <child>
       <object class="GtkLabel" id="value_label">
-        <property name="visible">True</property>
         <property name="hexpand">True</property>
         <property name="halign">end</property>
       </object>
-      <packing>
-        <property name="top-attach">2</property>
-        <property name="left-attach">2</property>
-      </packing>
     </child>
   </template>
 </interface>
diff --git a/src/score-overlay.ui b/src/score-overlay.ui
index 4dd1b5d..181ade6 100644
--- a/src/score-overlay.ui
+++ b/src/score-overlay.ui
@@ -18,9 +18,8 @@
    with this GNOME Tetravex.  If not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
-  <requires lib="gtk+" version="3.12"/>
+  <requires lib="gtk+" version="3.96"/>
   <template class="ScoreOverlay" parent="GtkGrid">
-    <property name="visible">True</property>
     <property name="valign">center</property>
     <property name="orientation">vertical</property>
     <property name="row-homogeneous">True</property>
@@ -31,47 +30,49 @@
     </style>
     <child>
       <object class="GtkLabel">
-        <property name="visible">True</property>
         <property name="hexpand">True</property>
         <!-- Translators: text of the score overlay, displayed after a puzzle is complete -->
         <property name="label" translatable="yes">Congratulations!</property>
         <style>
           <class name="score-title"/>
         </style>
+        <layout>
+          <property name="top-attach">0</property>
+          <property name="left-attach">0</property>
+          <property name="row-span">2</property>
+        </layout>
       </object>
-      <packing>
-        <property name="top-attach">0</property>
-        <property name="left-attach">0</property>
-        <property name="height">2</property>
-      </packing>
     </child>
     <child>
-      <object class="ScoreOverlayEntry" id="score_0"/>
-      <packing>
-        <property name="top-attach">2</property>
-      </packing>
+      <object class="ScoreOverlayEntry" id="score_0">
+        <layout>
+          <property name="top-attach">2</property>
+        </layout>
+      </object>
     </child>
     <child>
-      <object class="ScoreOverlayEntry" id="score_1"/>
-      <packing>
-        <property name="top-attach">3</property>
-      </packing>
+      <object class="ScoreOverlayEntry" id="score_1">
+        <layout>
+          <property name="top-attach">3</property>
+        </layout>
+      </object>
     </child>
     <child>
-      <object class="ScoreOverlayEntry" id="score_2"/>
-      <packing>
-        <property name="top-attach">4</property>
-      </packing>
+      <object class="ScoreOverlayEntry" id="score_2">
+        <layout>
+          <property name="top-attach">4</property>
+        </layout>
+      </object>
     </child>
     <child>
-      <object class="ScoreOverlayEntry" id="score_3"/>
-      <packing>
-        <property name="top-attach">5</property>
-      </packing>
+      <object class="ScoreOverlayEntry" id="score_3">
+        <layout>
+          <property name="top-attach">5</property>
+        </layout>
+      </object>
     </child>
     <child>
       <object class="GtkButton">
-        <property name="visible">True</property>
         <property name="halign">center</property>
         <property name="valign">center</property>
         <!-- Translators: label of a button of the score overlay, displayed after a puzzle is complete; 
opens Scores dialog -->
@@ -81,12 +82,12 @@
         <style>
           <class name="rounded-button"/>
         </style>
+        <layout>
+          <property name="top-attach">6</property>
+          <property name="left-attach">0</property>
+          <property name="row-span">2</property>
+        </layout>
       </object>
-      <packing>
-        <property name="top-attach">6</property>
-        <property name="left-attach">0</property>
-        <property name="height">2</property>
-      </packing>
     </child>
   </template>
 </interface>


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