[gnome-klotski/arnaudb/wip/gtk4: 11/14] Update UI file.



commit eabb8777121b9c9757125d71fca62043d81534b1
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Mar 5 22:41:43 2020 +0100

    Update UI file.
    
    Has a FIXME.

 data/klotski.ui | 382 +++++++++++++++++++++++++-------------------------------
 1 file changed, 171 insertions(+), 211 deletions(-)
---
diff --git a/data/klotski.ui b/data/klotski.ui
index 4fa2550..ad66b6d 100644
--- a/data/klotski.ui
+++ b/data/klotski.ui
@@ -16,7 +16,7 @@
    with GNOME Klotski.  If not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
-  <requires lib="gtk+" version="3.12"/>
+  <requires lib="gtk+" version="3.96"/>
   <menu id="app-menu">
     <section>
       <item>
@@ -43,265 +43,250 @@
     <property name="name">puzzles-popover</property>
     <child>
       <object class="GtkBox">
-        <property name="visible">True</property>
         <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child>
           <object class="GtkBox">
-            <property name="visible">True</property>
             <property name="orientation">horizontal</property>
             <property name="halign">fill</property>
             <property name="spacing">9</property>
             <child>
               <object class="GtkButton">
-                <property name="visible">True</property>
                 <property name="action-name">win.prev-pack</property>
-                <style><class name="flat"/><class name="image-button"/></style>
-                <child>
-                  <object class="GtkImage">
-                    <property name="icon-name">go-previous-symbolic</property>
-                    <property name="visible">True</property>
-                    <property name="icon-size">1</property>
-                  </object>
-                </child>
+                <property name="icon-name">go-previous-symbolic</property>
+                <style>
+                  <class name="flat"/>
+                  <class name="image-button"/>
+                </style>
               </object>
             </child>
             <child>
               <object class="GtkStack" id="stack_packs">
                 <property name="name">stack-packs</property>
-                <property name="visible">True</property>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="name">pack-name</property>
-                    <property name="visible">True</property>
-                    <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; contains 
classical levels -->
-                    <property name="label" translatable="yes">Huarong Trail</property>
-                  </object>
-                  <packing>
+                  <object class="GtkStackPage">
                     <property name="name">huarong</property>
-                    <property name="position">0</property>
-                  </packing>
+                    <property name="child">
+                      <object class="GtkLabel">
+                        <property name="name">pack-name</property>
+                        <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; 
contains classical levels -->
+                        <property name="label" translatable="yes">Huarong Trail</property>
+                      </object>
+                    </property>
+                  </object>
                 </child>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="name">pack-name</property>
-                    <property name="visible">True</property>
-                    <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; contains 
medium-difficulty levels -->
-                    <property name="label" translatable="yes">Challenge Pack</property>
-                  </object>
-                  <packing>
+                  <object class="GtkStackPage">
                     <property name="name">challenge</property>
-                    <property name="position">1</property>
-                  </packing>
+                    <property name="child">
+                      <object class="GtkLabel">
+                        <property name="name">pack-name</property>
+                        <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; 
contains medium-difficulty levels -->
+                        <property name="label" translatable="yes">Challenge Pack</property>
+                      </object>
+                    </property>
+                  </object>
                 </child>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="name">pack-name</property>
-                    <property name="visible">True</property>
-                    <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; contains 
hardest levels -->
-                    <property name="label" translatable="yes">Skill Pack</property>
-                  </object>
-                  <packing>
+                  <object class="GtkStackPage">
                     <property name="name">skill</property>
-                    <property name="position">2</property>
-                  </packing>
+                    <property name="child">
+                      <object class="GtkLabel">
+                        <property name="name">pack-name</property>
+                        <!-- Translators: name of a levels pack, as seen in the Change Puzzle popover; 
contains hardest levels -->
+                        <property name="label" translatable="yes">Skill Pack</property>
+                      </object>
+                    </property>
+                  </object>
                 </child>
               </object>
-              <packing>
-                <property name="expand">True</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton">
-                <property name="visible">True</property>
                 <property name="action-name">win.next-pack</property>
-                <style><class name="flat"/><class name="image-button"/></style>
-                <child>
-                  <object class="GtkImage">
-                    <property name="icon-name">go-next-symbolic</property>
-                    <property name="visible">True</property>
-                    <property name="icon-size">1</property>
-                  </object>
-                </child>
+                <property name="icon-name">go-next-symbolic</property>
+                <style>
+                  <class name="flat"/>
+                  <class name="image-button"/>
+                </style>
               </object>
             </child>
           </object>
         </child>
         <child>
           <object class="GtkStack" id="stack_puzzles"> <!-- GtkScrolledWindow children are here for when big 
text -->
-            <property name="visible">True</property>
             <property name="homogeneous">True</property>
             <property name="height-request">270</property>
             <property name="width-request">190</property>
             <child>
-              <object class="GtkScrolledWindow">
-                <property name="visible">True</property>
-                <property name="hscrollbar-policy">never</property>
-                <style><class name="treeview-container"/></style>
-                <child>
-                  <object class="GtkTreeView" id="treeview_huarong">
-                    <property name="visible">True</property>
-                    <property name="headers-visible">False</property>
-                    <property name="activate-on-single-click">True</property>
-                    <property name="can-focus">False</property> <!-- for up/down keybinding -->
-                    <!-- <property name="model">*store</property> TODO -->
-                    <style><class name="toggle-like-pixbuf"/></style>
+              <object class="GtkStackPage">
+                <property name="name">huarong</property>
+                <property name="child">
+                  <object class="GtkScrolledWindow">
+                    <property name="hscrollbar-policy">never</property>
+                    <style>
+                      <class name="treeview-container"/>
+                    </style>
                     <child>
-                      <object class="GtkTreeViewColumn">
-                        <property name="title">Puzzle</property>
-                        <property name="expand">True</property>
+                      <object class="GtkTreeView" id="treeview_huarong">
+                        <property name="headers-visible">False</property>
+                        <property name="activate-on-single-click">True</property>
+                        <property name="can-focus">False</property> <!-- for up/down keybinding -->
+                        <!-- <property name="model">*store</property> TODO -->
+                        <style>
+                          <class name="toggle-like-pixbuf"/>
+                        </style>
                         <child>
-                          <object class="GtkCellRendererText"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                          <object class="GtkTreeViewColumn">
+                            <property name="title">Puzzle</property>
+                            <property name="expand">True</property>
+                            <child>
+                              <object class="GtkCellRendererText"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
                         </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkTreeViewColumn">
-                        <property name="title">Complete</property>
                         <child>
-                          <object class="GtkCellRendererToggle"/>
-                          <attributes>
-                            <attribute name="active">1</attribute>
-                            <attribute name="sensitive">3</attribute>
-                          </attributes>
+                          <object class="GtkTreeViewColumn">
+                            <property name="title">Complete</property>
+                            <child>
+                              <object class="GtkCellRendererToggle"/>
+                              <attributes>
+                                <attribute name="active">1</attribute>
+                                <attribute name="sensitive">3</attribute>
+                              </attributes>
+                            </child>
+                          </object>
                         </child>
                       </object>
                     </child>
                   </object>
-                </child>
+                </property>
               </object>
-              <packing>
-                <property name="name">huarong</property>
-                <property name="position">0</property>
-              </packing>
             </child>
             <child>
-              <object class="GtkScrolledWindow">
-                <property name="visible">True</property>
-                <property name="hscrollbar-policy">never</property>
-                <style><class name="treeview-container"/></style>
-                <child>
-                  <object class="GtkTreeView" id="treeview_challenge">
-                    <property name="visible">True</property>
-                    <property name="headers-visible">False</property>
-                    <property name="activate-on-single-click">True</property>
-                    <property name="can-focus">False</property> <!-- for up/down keybinding -->
-                    <!-- <property name="model">*store</property> TODO -->
-                    <style><class name="toggle-like-pixbuf"/></style>
+              <object class="GtkStackPage">
+                <property name="name">challenge</property>
+                <property name="child">
+                  <object class="GtkScrolledWindow">
+                    <property name="hscrollbar-policy">never</property>
+                    <style>
+                      <class name="treeview-container"/>
+                    </style>
                     <child>
-                      <object class="GtkTreeViewColumn">
-                        <property name="title">Puzzle</property>
-                        <property name="expand">True</property>
+                      <object class="GtkTreeView" id="treeview_challenge">
+                        <property name="headers-visible">False</property>
+                        <property name="activate-on-single-click">True</property>
+                        <property name="can-focus">False</property> <!-- for up/down keybinding -->
+                        <!-- <property name="model">*store</property> TODO -->
+                        <style>
+                          <class name="toggle-like-pixbuf"/>
+                        </style>
                         <child>
-                          <object class="GtkCellRendererText"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                          <object class="GtkTreeViewColumn">
+                            <property name="title">Puzzle</property>
+                            <property name="expand">True</property>
+                            <child>
+                              <object class="GtkCellRendererText"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
                         </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkTreeViewColumn">
-                        <property name="title">Complete</property>
                         <child>
-                          <object class="GtkCellRendererToggle"/>
-                          <attributes>
-                            <attribute name="active">1</attribute>
-                            <attribute name="sensitive">3</attribute>
-                          </attributes>
+                          <object class="GtkTreeViewColumn">
+                            <property name="title">Complete</property>
+                            <child>
+                              <object class="GtkCellRendererToggle"/>
+                              <attributes>
+                                <attribute name="active">1</attribute>
+                                <attribute name="sensitive">3</attribute>
+                              </attributes>
+                            </child>
+                          </object>
                         </child>
                       </object>
                     </child>
                   </object>
-                </child>
+                </property>
               </object>
-              <packing>
-                <property name="name">challenge</property>
-                <property name="position">1</property>
-              </packing>
             </child>
             <child>
-              <object class="GtkScrolledWindow">
-                <property name="visible">True</property>
-                <property name="hscrollbar-policy">never</property>
-                <style><class name="treeview-container"/></style>
-                <child>
-                  <object class="GtkTreeView" id="treeview_skill">
-                    <property name="visible">True</property>
-                    <property name="headers-visible">False</property>
-                    <property name="activate-on-single-click">True</property>
-                    <property name="can-focus">False</property> <!-- for up/down keybinding -->
-                    <!-- <property name="model">*store</property> TODO -->
-                    <style><class name="toggle-like-pixbuf"/></style>
+              <object class="GtkStackPage">
+                <property name="name">skill</property>
+                <property name="child">
+                  <object class="GtkScrolledWindow">
+                    <property name="hscrollbar-policy">never</property>
+                    <style>
+                      <class name="treeview-container"/>
+                    </style>
                     <child>
-                      <object class="GtkTreeViewColumn">
-                        <property name="title">Puzzle</property>
-                        <property name="expand">True</property>
+                      <object class="GtkTreeView" id="treeview_skill">
+                        <property name="headers-visible">False</property>
+                        <property name="activate-on-single-click">True</property>
+                        <property name="can-focus">False</property> <!-- for up/down keybinding -->
+                        <!-- <property name="model">*store</property> TODO -->
+                        <style>
+                          <class name="toggle-like-pixbuf"/>
+                        </style>
                         <child>
-                          <object class="GtkCellRendererText"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
+                          <object class="GtkTreeViewColumn">
+                            <property name="title">Puzzle</property>
+                            <property name="expand">True</property>
+                            <child>
+                              <object class="GtkCellRendererText"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
                         </child>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkTreeViewColumn">
-                        <property name="title">Complete</property>
                         <child>
-                          <object class="GtkCellRendererToggle"/>
-                          <attributes>
-                            <attribute name="active">1</attribute>
-                            <attribute name="sensitive">3</attribute>
-                          </attributes>
+                          <object class="GtkTreeViewColumn">
+                            <property name="title">Complete</property>
+                            <child>
+                              <object class="GtkCellRendererToggle"/>
+                              <attributes>
+                                <attribute name="active">1</attribute>
+                                <attribute name="sensitive">3</attribute>
+                              </attributes>
+                            </child>
+                          </object>
                         </child>
                       </object>
                     </child>
                   </object>
-                </child>
+                </property>
               </object>
-              <packing>
-                <property name="name">skill</property>
-                <property name="position">2</property>
-              </packing>
             </child>
           </object>
         </child>
         <child>
           <object class="GtkBox">
             <property name="orientation">horizontal</property>
-            <property name="visible">True</property>
             <property name="homogeneous">True</property>
             <property name="halign">fill</property>
-            <style><class name="linked"/></style>
+            <style>
+              <class name="linked"/>
+            </style>
             <child>
               <object class="GtkButton">
-                <property name="visible">True</property>
                 <!-- Translators: in the Change Puzzle popover, label of the button for playing the previous 
level -->
                 <property name="label" translatable="yes">Previous</property>
                 <!-- <property name="use-underline">True</property> TODO -->
                 <property name="action-name">win.prev-puzzle</property>
               </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-              </packing>
             </child>
             <child>
               <object class="GtkButton">
-                <property name="visible">True</property>
                 <!-- Translators: in the Change Puzzle popover, label of the button for playing the next 
level -->
                 <property name="label" translatable="yes">Next</property>
                 <!-- <property name="use-underline">True</property> TODO -->
                 <property name="action-name">win.next-puzzle</property>
               </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -313,19 +298,17 @@
     <!-- <initial-focus name=""/> -->
     <property name="width-request">600</property>
     <property name="height-request">400</property>
-    <signal name="size_allocate" handler="on_size_allocate"/>
+    <signal name="size-allocate" handler="on_size_allocate"/>
     <signal name="map" handler="init_state_watcher"/>
     <signal name="destroy" handler="on_destroy"/>
     <child type="titlebar">
       <object class="GtkHeaderBar" id="headerbar">
-        <property name="visible">True</property>
-        <property name="show-close-button">True</property>
+        <property name="show-title-buttons">True</property>
         <property name="title" translatable="yes">Klotski</property>
-        <child>
+        <child type="start">
           <object class="GtkButton">
-            <property name="visible">True</property>
-            <property name="valign">center</property>
             <property name="use-underline">True</property>
+            <property name="valign">center</property>
             <!-- Translators: in the headerbar, button that allows to directly restart the current puzzle 
(with a mnemonic that appears pressing Alt) -->
             <property name="label" translatable="yes">_Start Over</property>
             <property name="can-focus">True</property>
@@ -334,15 +317,19 @@
             <property name="tooltip-text" translatable="yes">Restart the current puzzle</property>
             <property name="action-name">win.start-game</property>
           </object>
-          <packing>
-            <property name="pack-type">start</property>
-          </packing>
         </child>
-        <child>
+        <child type="end">
+          <object class="GtkMenuButton" id="menu_button">
+            <property name="valign">center</property>
+            <property name="can-focus">True</property>
+            <property name="menu-model">app-menu</property>
+            <property name="icon-name">open-menu-symbolic</property>
+          </object>
+        </child>
+        <child type="end">
           <object class="GtkMenuButton">
-            <property name="visible">True</property>
+<!--            <property name="use-underline">True</property> FIXME 
https://gitlab.gnome.org/GNOME/gtk/issues/2489 -->
             <property name="valign">center</property>
-            <property name="use-underline">True</property>
             <!-- Translators: in the headerbar, button that allows via a popover to select a different 
puzzle (with a mnemonic that appears pressing Alt) -->
             <property name="label" translatable="yes">_Change Puzzle</property>
             <property name="can-focus">True</property>
@@ -352,39 +339,18 @@
             <property name="direction">down</property>
             <property name="popover">puzzles_popover</property>
           </object>
-          <packing>
-            <property name="pack-type">end</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkMenuButton" id="menu_button">
-            <property name="visible">True</property>
-            <property name="valign">center</property>
-            <property name="can_focus">True</property>
-            <property name="menu-model">app-menu</property>
-            <child>
-              <object class="GtkImage">
-                <property name="visible">True</property>
-                <property name="icon_name">open-menu-symbolic</property>
-                <property name="icon_size">1</property>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="pack_type">end</property>
-            <property name="position">1</property>
-          </packing>
         </child>
       </object>
     </child>
     <child>
       <object class="GtkOverlay" id="main_overlay">
-        <property name="visible">True</property>
         <child>
           <object class="GtkGrid" id="main_grid">
-            <property name="visible">True</property>
             <property name="orientation">vertical</property>
-            <property name="margin">25</property> <!-- TODO use CSS -->
+            <property name="margin-top">25</property>       <!-- TODO use CSS -->
+            <property name="margin-end">25</property>       <!-- TODO use CSS -->
+            <property name="margin-start">25</property>     <!-- TODO use CSS -->
+            <property name="margin-bottom">25</property>    <!-- TODO use CSS -->
           </object>
         </child>
         <child type="overlay">
@@ -393,18 +359,12 @@
             <property name="halign">end</property>
             <property name="valign">start</property>
             <property name="action-name">win.unfullscreen</property>
+            <property name="icon-name">view-restore-symbolic</property>
             <style>
               <class name="image-button"/>
               <class name="unfullscreen-button"/>
               <class name="flat"/>
             </style>
-            <child>
-              <object class="GtkImage">
-                <property name="icon-name">view-restore-symbolic</property>
-                <property name="visible">True</property>
-                <property name="icon-size">1</property>
-              </object>
-            </child>
           </object>
         </child>
       </object>


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