[aisleriot/wip/redesign: 11/17] window: Re-add toolbar



commit 9c7f88a1b2746e0a759008ce4decc92927e68398
Author: Christian Persch <chpe gnome org>
Date:   Wed Jul 3 19:35:01 2013 +0200

    window: Re-add toolbar

 src/menus.ui  |   26 ----------------
 src/window.c  |    7 +----
 src/window.ui |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+), 32 deletions(-)
---
diff --git a/src/menus.ui b/src/menus.ui
index 71dda79..7056fb2 100644
--- a/src/menus.ui
+++ b/src/menus.ui
@@ -19,32 +19,6 @@
   <menu id="appmenu">
     <section>
       <item>
-        <attribute name="label" translatable="yes">_New Game</attribute>
-        <attribute name="action">win.new-game</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Restart Game</attribute>
-        <attribute name="action">win.restart-game</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Undo</attribute>
-        <attribute name="action">win.undo</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Redo</attribute>
-        <attribute name="action">win.redo</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Hint</attribute>
-        <attribute name="action">win.hint</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">_Deal</attribute>
-        <attribute name="action">win.deal</attribute>
-      </item>
-    </section>
-    <section>
-      <item>
         <attribute name="label" translatable="yes">_Change Game</attribute>
         <attribute name="action">win.select-game</attribute>
       </item>
diff --git a/src/window.c b/src/window.c
index 147e1dc..c586fe8 100644
--- a/src/window.c
+++ b/src/window.c
@@ -102,7 +102,6 @@ struct _AisleriotWindowPrivate
   GtkWidget *clock;
 
   GtkWidget *toolbar;
-  GtkWidget *headerbar;
 
   GtkWidget *game_over_dialog;
   GtkWidget *game_choice_dialog;
@@ -1863,11 +1862,7 @@ aisleriot_window_new (GtkApplication *application)
 {
   return g_object_new (AISLERIOT_TYPE_WINDOW,
                        "application", application,
-#ifdef GNOME_ENABLE_DEBUG
-                       "show-menubar", ar_debug_on (AR_DEBUG_APPMENU),
-#else
-                       "show-menubar", FALSE,
-#endif
+                       "show-menubar", TRUE,
                        NULL);
 }
 
diff --git a/src/window.ui b/src/window.ui
index cd76b85..520b43f 100644
--- a/src/window.ui
+++ b/src/window.ui
@@ -16,6 +16,95 @@
             <style>
               <class name="primary-toolbar"/>
             </style>
+            <child>
+              <object class="GtkToolButton" id="new_game_button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">win.new-game</property>
+                <property name="label" translatable="yes">New Game</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="restart_button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">win.restart-game</property>
+                <property name="label" translatable="yes">Restart</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparatorToolItem" id="toolbar_separator">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="draw">False</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="undo_button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">win.undo</property>
+                <property name="label" translatable="yes">Undo</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="redo_button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">win.redo</property>
+                <property name="label" translatable="yes">Redo</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="deal_button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">win.deal</property>
+                <property name="label" translatable="yes">Deal</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="hint_button">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">win.hint</property>
+                <property name="label" translatable="yes">Hint</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>


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