[gnome-nibbles/arnaudb/modernize-code: 47/58] Clean a bit UI file.



commit 0f68a354d72c4de7ca69ed2f04783cb9d2602378
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun May 31 22:03:41 2020 +0200

    Clean a bit UI file.

 data/nibbles.ui         | 49 ++++++++-----------------------------------------
 src/nibbles-window.vala |  9 +--------
 2 files changed, 9 insertions(+), 49 deletions(-)
---
diff --git a/data/nibbles.ui b/data/nibbles.ui
index 63a798c..b7c28ee 100644
--- a/data/nibbles.ui
+++ b/data/nibbles.ui
@@ -53,7 +53,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkMenuButton" id="menu_button">
+          <object class="GtkMenuButton">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="menu-model">app-menu</property>
@@ -77,7 +77,7 @@
         <property name="visible">True</property>
         <property name="can-default">True</property>
         <child>
-          <object class="GtkBox" id="vbox">
+          <object class="GtkBox">
             <property name="visible">True</property>
             <property name="orientation">vertical</property>
             <style><class name="window-background"/></style>
@@ -90,7 +90,7 @@
                 <property name="transition-type">5</property> <!-- SLIDE_UP -->
                 <property name="transition-duration">500</property>
                 <child>
-                  <object class="GtkBox" id="first_run">
+                  <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
                     <property name="width-request">350</property>
@@ -158,13 +158,10 @@
                         <property name="pack-type">end</property>
                       </packing>
                     </child>
-                  </object> <!-- End of first_run -->
-                  <packing>
-                    <property name="name">first_run</property>
-                  </packing>
+                  </object>
                 </child>
                 <child>
-                  <object class="GtkBox" id="number_of_players">
+                  <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
                     <property name="halign">center</property>
@@ -201,7 +198,7 @@
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox" id="number_of_players_box">
+                              <object class="GtkBox">
                                 <property name="visible">True</property>
                                 <property name="orientation">horizontal</property>
                                 <property name="valign">center</property>
@@ -220,9 +217,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="players2">
@@ -236,9 +230,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="players3">
@@ -252,9 +243,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="players4">
@@ -268,9 +256,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                               </object>
                             </child>
@@ -288,7 +273,7 @@
                               </object>
                             </child>
                             <child>
-                              <object class="GtkBox" id="number_of_ai_box">
+                              <object class="GtkBox">
                                 <property name="visible">True</property>
                                 <property name="orientation">horizontal</property>
                                 <property name="valign">center</property>
@@ -306,9 +291,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="ai1">
@@ -321,9 +303,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="ai2">
@@ -336,9 +315,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="ai3">
@@ -352,9 +328,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="ai4">
@@ -368,9 +341,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                                 <child>
                                   <object class="GtkToggleButton" id="ai5">
@@ -384,9 +354,6 @@
                                       <class name="number-box"/>
                                     </style>
                                   </object>
-                                  <packing>
-                                    <property name="pack-type">start</property>
-                                  </packing>
                                 </child>
                               </object>
                             </child>
@@ -478,7 +445,7 @@
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
                     <child>
-                      <object class="GtkBox" id="statusbar">
+                      <object class="GtkBox">
                         <property name="visible">True</property>
                         <property name="halign">center</property>
                         <child>
diff --git a/src/nibbles-window.vala b/src/nibbles-window.vala
index f7c686a..1ec9c3f 100644
--- a/src/nibbles-window.vala
+++ b/src/nibbles-window.vala
@@ -178,9 +178,7 @@ private class NibblesWindow : ApplicationWindow
 
         /* Check whether to display the first run screen */
         var first_run = settings.get_boolean ("first-run");
-        if (first_run)
-            show_first_run_screen ();
-        else
+        if (!first_run)
             show_new_game_screen_cb ();
 
         /* Create scores */
@@ -443,11 +441,6 @@ private class NibblesWindow : ApplicationWindow
     * * Switching the stack
     \*/
 
-    private void show_first_run_screen ()
-    {
-        main_stack.set_visible_child_name ("first_run");
-    }
-
     private void show_new_game_screen_cb ()
     {
         if (countdown_id != 0)


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