[gbrainy/gbrainy-17x] Allow to position the toolbar vertically



commit b9f01af837ce2f28507939cde0dfabc8f2efa581
Author: Jordi Mas <jmas softcatala org>
Date:   Mon Dec 20 21:39:29 2010 +0100

    Allow to position the toolbar vertically

 src/Clients/Classical/gbrainy.cs |  104 ++++++++++-
 src/Clients/Classical/gbrainy.ui |  389 ++++++++++++++++++++++----------------
 src/Core/Main/Preferences.cs     |    6 +-
 3 files changed, 323 insertions(+), 176 deletions(-)
---
diff --git a/src/Clients/Classical/gbrainy.cs b/src/Clients/Classical/gbrainy.cs
index 1825b7f..b601c2f 100755
--- a/src/Clients/Classical/gbrainy.cs
+++ b/src/Clients/Classical/gbrainy.cs
@@ -46,8 +46,10 @@ namespace gbrainy.Clients.Classical
 #endif
 	{
 		[GtkBeans.Builder.Object("gbrainy")] Gtk.Window app_window;
-		[GtkBeans.Builder.Object] Gtk.CheckMenuItem toolbar_menuitem;
+		[GtkBeans.Builder.Object] Gtk.CheckMenuItem showtoolbar_menuitem;
 		[GtkBeans.Builder.Object] Box drawing_vbox;
+		[GtkBeans.Builder.Object] Gtk.HBox main_hbox;
+		[GtkBeans.Builder.Object] Gtk.VBox framework_vbox;
 		[GtkBeans.Builder.Object] Gtk.VBox question_vbox;
 		[GtkBeans.Builder.Object] Gtk.VBox solution_vbox;
 		[GtkBeans.Builder.Object] Gtk.Entry answer_entry;
@@ -55,7 +57,6 @@ namespace gbrainy.Clients.Classical
 		[GtkBeans.Builder.Object] Gtk.Button tip_button;
 		[GtkBeans.Builder.Object] Gtk.Button next_button;
 		[GtkBeans.Builder.Object] Gtk.Statusbar statusbar;
-		[GtkBeans.Builder.Object] Gtk.Toolbar toolbar;
 		[GtkBeans.Builder.Object] Gtk.MenuBar menubar;
 		[GtkBeans.Builder.Object] Gtk.MenuItem pause_menuitem;
 		[GtkBeans.Builder.Object] Gtk.MenuItem finish_menuitem;
@@ -66,6 +67,11 @@ namespace gbrainy.Clients.Classical
 		[GtkBeans.Builder.Object] Gtk.MenuItem memory_menuitem;
 		[GtkBeans.Builder.Object] Gtk.MenuItem verbal_menuitem;
 		[GtkBeans.Builder.Object] Gtk.MenuItem extensions_menuitem;
+		[GtkBeans.Builder.Object] Gtk.RadioMenuItem vertical_radiomenuitem;
+		[GtkBeans.Builder.Object] Gtk.RadioMenuItem horizontal_radiomenuitem;
+		[GtkBeans.Builder.Object] Gtk.MenuItem toolbar_orientation_menuitem;
+
+		Gtk.Toolbar toolbar;
 
 		DrawingArea drawing_area;
 		GameSession session;
@@ -78,6 +84,7 @@ namespace gbrainy.Clients.Classical
 		double offset_x, offset_y;
 		int drawing_square;
 		GameSession.Types initial_session;
+		bool init_completed = false;
 
 		public GtkClient ()
 #if GNOME
@@ -120,6 +127,46 @@ namespace gbrainy.Clients.Classical
 			gm.LoadPlugins ();
 		}
 
+		void AttachToolBar ()
+		{
+			Gtk.Box.BoxChild child;
+
+			if (toolbar != null)
+			{
+				switch (toolbar.Orientation) {
+				case Gtk.Orientation.Vertical:
+					main_hbox.Remove (toolbar);
+					break;
+				case Gtk.Orientation.Horizontal:
+					framework_vbox.Remove (toolbar);
+					break;
+				default:
+					throw new InvalidOperationException ();
+				}
+			}
+			toolbar.Orientation = (Gtk.Orientation) Preferences.GetIntValue (Preferences.ToolbarOrientationKey);
+
+			switch (toolbar.Orientation) {
+			case Gtk.Orientation.Vertical:
+				main_hbox.Add (toolbar);
+				main_hbox.ReorderChild (toolbar, 0);
+				child = ((Gtk.Box.BoxChild)(main_hbox[toolbar]));
+				break;
+			case Gtk.Orientation.Horizontal:
+				framework_vbox.Add (toolbar);
+				framework_vbox.ReorderChild (toolbar, 1);
+				child = ((Gtk.Box.BoxChild)(framework_vbox[toolbar]));
+				break;
+			default:
+				throw new InvalidOperationException ();
+			}
+
+			child.Expand = false;
+			child.Fill = false;
+			toolbar.ShowAll ();
+			init_completed = true;
+		}
+
 		void BuildUI ()
 		{
 			bool show_toolbar;
@@ -127,7 +174,13 @@ namespace gbrainy.Clients.Classical
 			GtkBeans.Builder builder = new GtkBeans.Builder ("gbrainy.ui");
 			builder.Autoconnect (this);
 
+			show_toolbar = Preferences.GetBoolValue (Preferences.ToolbarShowKey) == true && low_res == false;
+
+			// Toolbar creation
+			toolbar = new Gtk.Toolbar ();
+			toolbar.ToolbarStyle = ToolbarStyle.Both;
 			BuildToolBar ();
+			AttachToolBar ();
 
 			drawing_area = new DrawingArea ();
 			drawing_area.ExposeEvent += OnDrawingAreaExposeEvent;
@@ -159,7 +212,7 @@ namespace gbrainy.Clients.Classical
 			eb.MotionNotifyEvent += OnMouseMotionEvent;
 			eb.ButtonPressEvent += OnHandleButtonPress;
 
-			show_toolbar = Preferences.GetBoolValue (Preferences.ToolbarKey) == true && low_res == false;
+			show_toolbar = Preferences.GetBoolValue (Preferences.ToolbarShowKey) == true && low_res == false;
 
 			// We only disable the Arrow if we are going to show the toolbar.
 			// It has an impact on the total window width size even if you we do not show it
@@ -167,10 +220,25 @@ namespace gbrainy.Clients.Classical
 				toolbar.ShowArrow = false;
 
 			app_window.IconName = "gbrainy";
+
 			app_window.ShowAll ();
 
 			if (show_toolbar == false)
-				toolbar_menuitem.Active = false;
+				showtoolbar_menuitem.Active = false;
+
+			toolbar_orientation_menuitem.Sensitive = toolbar.Visible;
+
+			// Check default radio button
+			switch (toolbar.Orientation) {
+			case Gtk.Orientation.Vertical:
+				vertical_radiomenuitem.Active = true;
+				break;
+			case Gtk.Orientation.Horizontal:
+				horizontal_radiomenuitem.Active = true;
+				break;
+			default:
+				throw new InvalidOperationException ();
+			}
 
 		#if MONO_ADDINS
 			extensions_menuitem.Activated += delegate (object sender, EventArgs ar) { Mono.Addins.Gui.AddinManagerWindow.Run (app_window);};
@@ -657,23 +725,45 @@ namespace gbrainy.Clients.Classical
 			SetPauseResumeButton (session.Paused);
 		}
 
-		private void OnToolbarActivate (object sender, System.EventArgs args)
+		void OnActivateToolbar (object sender, System.EventArgs args)
 		{
 			int width, height;
 			Requisition requisition;
 
-			requisition =  toolbar.SizeRequest ();
+			requisition = toolbar.SizeRequest ();
 			app_window.GetSize (out width, out height);
 			toolbar.Visible = !toolbar.Visible;
 
 			if (toolbar.Visible)
 				toolbar.ShowArrow = false;
 
-			Preferences.SetBoolValue (Preferences.ToolbarKey, toolbar.Visible);
+			toolbar_orientation_menuitem.Sensitive = toolbar.Visible;
+
+			Preferences.SetBoolValue (Preferences.ToolbarShowKey, toolbar.Visible);
 			Preferences.Save ();
 			app_window.Resize (width, height - requisition.Height);
 		}
 
+		void OnVerticalToolbar (object sender, System.EventArgs args)
+		{
+			if (init_completed  == false)
+				return;
+
+			Preferences.SetIntValue (Preferences.ToolbarOrientationKey, (int) Gtk.Orientation.Vertical);
+			Preferences.Save ();
+			AttachToolBar ();
+		}
+
+		void OnHorizontalToolbar (object sender, System.EventArgs args)
+		{
+			if (init_completed  == false)
+				return;
+
+			Preferences.SetIntValue (Preferences.ToolbarOrientationKey, (int) Gtk.Orientation.Horizontal);
+			Preferences.Save ();
+			AttachToolBar ();
+		}
+
 		void OnHistory (object sender, EventArgs args)
 		{
 			PlayerHistoryDialog dialog;
diff --git a/src/Clients/Classical/gbrainy.ui b/src/Clients/Classical/gbrainy.ui
index 745fa63..cfb6fbd 100644
--- a/src/Clients/Classical/gbrainy.ui
+++ b/src/Clients/Classical/gbrainy.ui
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy toplevel-contextual -->
@@ -24,7 +24,7 @@
     <property name="title" translatable="yes">gbrainy</property>
     <signal name="delete_event" handler="OnDeleteWindow"/>
     <child>
-      <object class="GtkVBox" id="vbox1">
+      <object class="GtkVBox" id="framework_vbox">
         <property name="visible">True</property>
         <child>
           <object class="GtkMenuBar" id="menubar1">
@@ -124,7 +124,7 @@
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">Export Games to PDF for Off-line Playing...</property>
                         <property name="use_underline">True</property>
-			<signal name="activate" handler="OnPdfExport"/>
+                        <signal name="activate" handler="OnPdfExport"/>
                       </object>
                     </child>
                     <child>
@@ -154,12 +154,58 @@
                   <object class="GtkMenu" id="menu2">
                     <property name="visible">True</property>
                     <child>
-                      <object class="GtkCheckMenuItem" id="toolbar_menuitem">
+                      <object class="GtkMenuItem" id="toolbar_menuitem2">
                         <property name="visible">True</property>
                         <property name="label" translatable="yes">Toolbar</property>
                         <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <signal name="activate" handler="OnToolbarActivate"/>
+                        <child type="submenu">
+                          <object class="GtkMenu" id="menu3">
+                            <property name="visible">True</property>
+                            <property name="ubuntu_local">True</property>
+                            <child>
+                              <object class="GtkCheckMenuItem" id="showtoolbar_menuitem">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Show</property>
+                                <property name="use_underline">True</property>
+                                <property name="active">True</property>
+                                <signal name="activate" handler="OnActivateToolbar"/>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkMenuItem" id="toolbar_orientation_menuitem">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Orientation</property>
+                                <property name="use_underline">True</property>
+                                <child type="submenu">
+                                  <object class="GtkMenu" id="menu6">
+                                    <property name="visible">True</property>
+                                    <property name="ubuntu_local">True</property>
+                                    <child>
+                                      <object class="GtkRadioMenuItem" id="vertical_radiomenuitem">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Vertical</property>
+                                        <property name="use_underline">True</property>
+                                        <property name="draw_as_radio">True</property>
+                                        <property name="group">radiomenuitem1</property>
+                                        <signal name="toggled" handler="OnVerticalToolbar"/>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkRadioMenuItem" id="horizontal_radiomenuitem">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Horizontal</property>
+                                        <property name="use_underline">True</property>
+                                        <property name="draw_as_radio">True</property>
+                                        <property name="group">radiomenuitem1</property>
+                                        <signal name="toggled" handler="OnHorizontalToolbar"/>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
                       </object>
                     </child>
                     <child>
@@ -259,219 +305,224 @@
           </packing>
         </child>
         <child>
-          <object class="GtkToolbar" id="toolbar">
-            <property name="visible">True</property>
-            <property name="toolbar_style">both</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="question_vbox">
-            <property name="height_request">55</property>
-            <property name="visible">True</property>
-            <property name="spacing">1</property>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="drawing_vbox">
-            <property name="height_request">400</property>
-            <property name="visible">True</property>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="position">3</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="solution_vbox">
-            <property name="height_request">55</property>
+          <object class="GtkHBox" id="main_hbox">
             <property name="visible">True</property>
-            <property name="spacing">1</property>
             <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="vbox5">
-            <property name="width_request">500</property>
-            <property name="visible">True</property>
-            <child>
-              <object class="GtkTable" id="table4">
+              <object class="GtkVBox" id="main_vbox">
                 <property name="visible">True</property>
-                <property name="n_columns">5</property>
-                <property name="column_spacing">5</property>
                 <child>
-                  <object class="GtkLabel" id="label_answer">
+                  <object class="GtkVBox" id="question_vbox">
+                    <property name="height_request">55</property>
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="xpad">3</property>
-                    <property name="label" translatable="yes">Answer:</property>
+                    <property name="spacing">1</property>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </object>
                   <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="answer_button">
-                    <property name="label">gtk-ok</property>
+                  <object class="GtkVBox" id="drawing_vbox">
+                    <property name="height_request">400</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_stock">True</property>
-                    <signal name="clicked" handler="OnAnswerButtonClicked"/>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </object>
                   <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="position">3</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="next_button">
+                  <object class="GtkVBox" id="solution_vbox">
+                    <property name="height_request">55</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <signal name="clicked" handler="OnNextButtonClicked"/>
+                    <property name="spacing">1</property>
                     <child>
-                      <object class="GtkAlignment" id="alignment5">
-                        <property name="visible">True</property>
-                        <property name="xscale">0</property>
-                        <property name="yscale">0</property>
-                        <child>
-                          <object class="GtkHBox" id="hbox6">
-                            <property name="visible">True</property>
-                            <property name="spacing">2</property>
-                            <child>
-                              <object class="GtkImage" id="goforward_image">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-go-forward</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label23">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">_Next</property>
-                                <property name="use_underline">True</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
+                      <placeholder/>
                     </child>
                   </object>
                   <packing>
-                    <property name="left_attach">4</property>
-                    <property name="right_attach">5</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                    <property name="x_padding">3</property>
+                    <property name="expand">False</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="tip_button">
+                  <object class="GtkVBox" id="vbox5">
+                    <property name="width_request">500</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <signal name="clicked" handler="OnTip"/>
                     <child>
-                      <object class="GtkAlignment" id="alignment6">
+                      <object class="GtkTable" id="table4">
                         <property name="visible">True</property>
-                        <property name="xscale">0</property>
-                        <property name="yscale">0</property>
+                        <property name="n_columns">5</property>
+                        <property name="column_spacing">5</property>
+                        <child>
+                          <object class="GtkLabel" id="label_answer">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">3</property>
+                            <property name="label" translatable="yes">Answer:</property>
+                          </object>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
                         <child>
-                          <object class="GtkHBox" id="hbox7">
+                          <object class="GtkButton" id="answer_button">
+                            <property name="label">gtk-ok</property>
                             <property name="visible">True</property>
-                            <property name="spacing">2</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_stock">True</property>
+                            <signal name="clicked" handler="OnAnswerButtonClicked"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="right_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="next_button">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <signal name="clicked" handler="OnNextButtonClicked"/>
                             <child>
-                              <object class="GtkImage" id="dlginfo-image">
+                              <object class="GtkAlignment" id="alignment5">
                                 <property name="visible">True</property>
-                                <property name="stock">gtk-dialog-info</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <object class="GtkHBox" id="hbox6">
+                                    <property name="visible">True</property>
+                                    <property name="spacing">2</property>
+                                    <child>
+                                      <object class="GtkImage" id="goforward_image">
+                                        <property name="visible">True</property>
+                                        <property name="stock">gtk-go-forward</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label23">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">_Next</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
                               </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
                             </child>
+                          </object>
+                          <packing>
+                            <property name="left_attach">4</property>
+                            <property name="right_attach">5</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                            <property name="x_padding">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="tip_button">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <signal name="clicked" handler="OnTip"/>
                             <child>
-                              <object class="GtkLabel" id="label24">
+                              <object class="GtkAlignment" id="alignment6">
                                 <property name="visible">True</property>
-                                <property name="label" translatable="yes">_Tip</property>
-                                <property name="use_underline">True</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <object class="GtkHBox" id="hbox7">
+                                    <property name="visible">True</property>
+                                    <property name="spacing">2</property>
+                                    <child>
+                                      <object class="GtkImage" id="dlginfo-image">
+                                        <property name="visible">True</property>
+                                        <property name="stock">gtk-dialog-info</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label24">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">_Tip</property>
+                                        <property name="use_underline">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
                               </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
                             </child>
                           </object>
+                          <packing>
+                            <property name="left_attach">3</property>
+                            <property name="right_attach">4</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="answer_entry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">â??</property>
+                            <signal name="activate" handler="OnAnswerActivate"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
                         </child>
                       </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="left_attach">3</property>
-                    <property name="right_attach">4</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkEntry" id="answer_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                    <signal name="activate" handler="OnAnswerActivate"/>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="expand">False</property>
+                    <property name="position">5</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
-            <property name="position">5</property>
+            <property name="position">1</property>
           </packing>
         </child>
         <child>
@@ -495,4 +546,8 @@
     <property name="visible">True</property>
     <property name="stock">gtk-help</property>
   </object>
+  <object class="GtkRadioMenuItem" id="radiomenuitem1">
+    <property name="visible">True</property>
+    <property name="draw_as_radio">True</property>
+  </object>
 </interface>
diff --git a/src/Core/Main/Preferences.cs b/src/Core/Main/Preferences.cs
index 9073b37..c198164 100644
--- a/src/Core/Main/Preferences.cs
+++ b/src/Core/Main/Preferences.cs
@@ -36,7 +36,8 @@ namespace gbrainy.Core.Main
 		public const string DifficultyKey = "Difficulty";
 		public const string MinPlayedGamesKey = "MinPlayedGames";
 		public const string MaxStoredGamesKey = "MaxStoredGames";
-		public const string ToolbarKey = "Toolbar";
+		public const string ToolbarShowKey = "ToolbarShow";
+		public const string ToolbarOrientationKey = "ToolbarOrientation";
 		public const string ColorBlindKey = "ColorBlind";
 
 		const string element_item = "item";
@@ -163,7 +164,8 @@ namespace gbrainy.Core.Main
 			properties.Add (DifficultyKey, ((int)(GameDifficulty.Medium)).ToString ());
 			properties.Add (MinPlayedGamesKey, "5");
 			properties.Add (MaxStoredGamesKey, "20");
-			properties.Add (ToolbarKey, true.ToString ());
+			properties.Add (ToolbarShowKey, true.ToString ());
+			properties.Add (ToolbarOrientationKey, "0");
 			properties.Add (ColorBlindKey, false.ToString ());
 		}
 



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