[lightsoff/appmenu-retirement] Moved headerbar puzzle selectors to menu (#8)



commit aa8a9ea1c85b7b57ea4c54b094e83155cc09214f
Author: Robert Roth <robert roth off gmail com>
Date:   Mon Oct 8 23:50:05 2018 +0300

    Moved headerbar puzzle selectors to menu (#8)

 data/lightsoff-menus.ui   | 10 ++++++++++
 data/lightsoff.ui         | 50 +----------------------------------------------
 src/lightsoff-window.vala |  2 +-
 3 files changed, 12 insertions(+), 50 deletions(-)
---
diff --git a/data/lightsoff-menus.ui b/data/lightsoff-menus.ui
index b28dbc6..c7868f3 100644
--- a/data/lightsoff-menus.ui
+++ b/data/lightsoff-menus.ui
@@ -8,6 +8,16 @@
         <attribute name="action">win.new-game</attribute>
         <attribute name="accel">&lt;Primary&gt;n</attribute>
       </item>
+      <item>
+        <attribute name="label" translatable="yes">_Previous puzzle</attribute>
+        <attribute name="action">win.previous-level</attribute>
+        <attribute name="accel">&lt;Primary&gt;p</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Ne_xt puzzle</attribute>
+        <attribute name="action">win.next-level</attribute>
+        <attribute name="accel">&lt;Primary&gt;x</attribute>
+      </item>
     </section>
     <section>
       <item>
diff --git a/data/lightsoff.ui b/data/lightsoff.ui
index 3a17517..9bf6944 100644
--- a/data/lightsoff.ui
+++ b/data/lightsoff.ui
@@ -8,32 +8,10 @@
       <object class="GtkHeaderBar" id="headerbar">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="title" translatable="yes">Level X</property>
+        <property name="title" translatable="yes">Puzzle X</property>
         <property name="subtitle" translatable="yes">y moves</property>
         <property name="show_close_button">True</property>
         <property name="decoration_layout">:close</property>
-        <child>
-          <object class="GtkButton">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="focus_on_click">False</property>
-            <property name="receives_default">False</property>
-            <property name="tooltip_text" translatable="yes">Return to the previous level</property>
-            <property name="valign">center</property>
-            <property name="action_name">win.previous-level</property>
-            <child>
-              <object class="GtkImage">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">go-previous-symbolic</property>
-                <property name="icon_size">1</property>
-              </object>
-            </child>
-            <style>
-              <class name="image-button"/>
-            </style>
-          </object>
-        </child>
         <child>
           <object class="GtkMenuButton" id="menu_button">
             <property name="visible">True</property>
@@ -52,32 +30,6 @@
             <property name="position">1</property>
           </packing>
         </child>
-        <child>
-          <object class="GtkButton">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="focus_on_click">False</property>
-            <property name="receives_default">False</property>
-            <property name="tooltip_text" translatable="yes">Proceed to the next level</property>
-            <property name="valign">center</property>
-            <property name="action_name">win.next-level</property>
-            <child>
-              <object class="GtkImage">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="icon_name">go-next-symbolic</property>
-                <property name="icon_size">1</property>
-              </object>
-            </child>
-            <style>
-              <class name="image-button"/>
-            </style>
-          </object>
-          <packing>
-            <property name="pack_type">end</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
       </object>
     </child>
   </template>
diff --git a/src/lightsoff-window.vala b/src/lightsoff-window.vala
index ac4aeb7..202c1a8 100644
--- a/src/lightsoff-window.vala
+++ b/src/lightsoff-window.vala
@@ -99,7 +99,7 @@ public class LightsoffWindow : ApplicationWindow
     private void update_title (int level)
     {
         /* The title of the window, %d is the level number */
-        headerbar.title = _("Level %d").printf (level);
+        headerbar.title = _("Puzzle %d").printf (level);
 
         /* Subtitle is a game hint when playing level one, the number of moves otherwise */
         if (level == 1)


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