gbrainy r317 - trunk/src



Author: jmas
Date: Wed May  7 16:50:50 2008
New Revision: 317
URL: http://svn.gnome.org/viewvc/gbrainy?rev=317&view=rev

Log:
	* GtkDialog.cs: New class that encapsulates functionality for dialogs
	* PlayerHistory.cs: Keeps player game history
	* gbrainy.cs: Keeps user history
	* PreferencesDialog.cs: Uses new GtkDialog
	* CustomGameDialog.cs: Uses new GtkDialog
	* PlayerHistoryDialog.cs: Shows player history
	* gbrainy.glade: New dialog
	* Makefile.am: New files

2008-05-06 Jordi Mas <jmas softcatala org>



Added:
   trunk/src/GtkDialog.cs
   trunk/src/PlayerHistory.cs
   trunk/src/PlayerHistoryDialog.cs
Modified:
   trunk/src/ChangeLog
   trunk/src/CustomGameDialog.cs
   trunk/src/GameDrawingArea.cs
   trunk/src/Makefile.am
   trunk/src/PreferencesDialog.cs
   trunk/src/gbrainy.cs
   trunk/src/gbrainy.glade

Modified: trunk/src/CustomGameDialog.cs
==============================================================================
--- trunk/src/CustomGameDialog.cs	(original)
+++ trunk/src/CustomGameDialog.cs	Wed May  7 16:50:50 2008
@@ -23,12 +23,9 @@
 using Mono.Unix;
 using System.Collections;
 
-public class CustomGameDialog
+public class CustomGameDialog : GtkDialog
 {
 	static ListStore games_store;
-	private Glade.XML xml;
-	private Gtk.Dialog dialog;
-	private const string dialog_name = "customgame";
 	[Glade.Widget] Gtk.TreeView treeview;
 	[Glade.Widget] Box preview_vbox;
 	[Glade.Widget] Label preview_question;
@@ -37,8 +34,7 @@
 	int ngames, npos;
 	Type [] custom_games;
 
-
-	public CustomGameDialog (GameManager manager)
+	public CustomGameDialog (GameManager manager) : base ("customgame")
 	{
 		Game game;
 		Type[] games;
@@ -50,8 +46,6 @@
 		gm.GameType = GameSession.Types.AllGames;
 		games = gm.Games;
 		dialog = null;
-		xml = new Glade.XML (null, "gbrainy.glade", dialog_name, "gbrainy");
-		xml.Autoconnect (this);
 
 		drawing_area = new CairoPreview ();
 		preview_vbox.Add (drawing_area);
@@ -107,7 +101,6 @@
 		}
 
 		treeview.Model = games_store;
-		Dialog.IconName = "gbrainy";
 		game =  (Game) Activator.CreateInstance (games [0], true);
 		game.Initialize ();
 		drawing_area.puzzle = game;
@@ -115,20 +108,6 @@
 		treeview.ColumnsAutosize ();
 	}
 
-	public int Run ()
-	{
-		return Dialog.Run ();
-	}
-
-	public Gtk.Dialog Dialog {
-		get {
-			if (dialog == null)
-				dialog = (Gtk.Dialog) xml.GetWidget (dialog_name);
-				
-			return dialog;
-		}
-	}
-
 	public int NumOfGames {
 		get { return ngames;}
 	}

Modified: trunk/src/GameDrawingArea.cs
==============================================================================
--- trunk/src/GameDrawingArea.cs	(original)
+++ trunk/src/GameDrawingArea.cs	Wed May  7 16:50:50 2008
@@ -230,7 +230,7 @@
 
 		x = x + 0.1;
 		DrawBar (gr, x, y + area_h, bar_w, bar_h, session.TotalScore);
-		gr.DrawTextCentered (x + bar_w / 2, y + area_h + 0.05, Catalog.GetString ("Score"));
+		gr.DrawTextCentered (x + bar_w / 2, y + area_h + 0.05, Catalog.GetString ("Total"));
 
 		x = x + 0.2;
 		DrawBar (gr, x, y + area_h, bar_w, bar_h, session.LogicScore);

Added: trunk/src/GtkDialog.cs
==============================================================================
--- (empty file)
+++ trunk/src/GtkDialog.cs	Wed May  7 16:50:50 2008
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 Jordi Mas i HernÃndez <jmas softcatala org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+using System;
+using Glade;
+using Gtk;
+using Mono.Unix;
+using System.Collections;
+
+public class GtkDialog
+{
+	public Glade.XML xml;
+	public Gtk.Dialog dialog;
+	public string dialog_name;
+
+	public GtkDialog (string dialog_name)
+	{
+		this.dialog_name = dialog_name;
+		xml = new Glade.XML (null, "gbrainy.glade", dialog_name, "gbrainy");
+		xml.Autoconnect (this);
+		Dialog.IconName = "gbrainy";
+		dialog = null;
+	}
+
+	public int Run ()
+	{
+		return Dialog.Run ();
+	}
+
+	public Gtk.Dialog Dialog {
+		get {
+			if (dialog == null)
+				dialog = (Gtk.Dialog) xml.GetWidget (dialog_name);
+				
+			return dialog;
+		}
+	}
+}

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Wed May  7 16:50:50 2008
@@ -61,6 +61,9 @@
 	$(srcdir)/CalculationFractions.cs	\
 	$(srcdir)/PuzzleExtraCircle.cs		\
 	$(srcdir)/PuzzleCountSeries.cs		\
+	$(srcdir)/PlayerHistory.cs		\
+	$(srcdir)/PlayerHistoryDialog.cs	\
+	$(srcdir)/GtkDialog.cs			\
 	$(srcdir)/gbrainy.cs			
 
 ASSEMBLIES = \

Added: trunk/src/PlayerHistory.cs
==============================================================================
--- (empty file)
+++ trunk/src/PlayerHistory.cs	Wed May  7 16:50:50 2008
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2008 Jordi Mas i HernÃndez <jmas softcatala org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+using System.Xml.Serialization;
+
+public class PlayerHistory
+{
+	private string file, config_path;
+	private List <GameHistory> games = new List <GameHistory> ();
+
+	[Serializable]
+	public class GameHistory
+	{
+		public int games_played;
+		public int games_won;
+		public int total_score;
+		public int math_score;
+		public int logic_score;
+		public int memory_score;
+	}
+
+	public PlayerHistory ()
+	{
+		games = new List <GameHistory> ();
+		config_path = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
+		config_path = Path.Combine (config_path, "gbrainy");
+		file = Path.Combine (config_path, "PlayerHistory.xml");
+		Load ();
+	}
+
+	public List <GameHistory> Games {
+		get { return games; }
+	}
+
+	public void SaveGameSession (GameSession session)
+	{
+		GameHistory history = new GameHistory ();
+
+		if (session.GamesPlayed == 0)
+			return;
+	
+		history.games_played = session.GamesPlayed;
+		history.games_won = session.GamesWon;
+		history.math_score = session.MathScore;
+		history.logic_score = session.LogicScore;
+		history.memory_score = session.MemoryScore;
+		history.total_score = session.TotalScore;
+
+		if (!Directory.Exists (config_path))
+			Directory.CreateDirectory (config_path);
+
+		if (games.Count >= 20) // Record the last 20 games
+			games.RemoveAt (0);
+
+		games.Add (history);
+
+		try {
+
+			using (FileStream str = File.Create (file))
+			{
+				XmlSerializer bf = new XmlSerializer (typeof (List <GameHistory>));
+				bf.Serialize (str, games);
+			}
+		}
+		
+		catch (Exception)
+		{
+		}
+	}
+
+	private void Load ()
+	{
+		try {
+			using (FileStream str = File.OpenRead (file))
+			{
+				XmlSerializer bf = new XmlSerializer (typeof (List <GameHistory>));
+			    	games = (List <GameHistory>) bf.Deserialize(str);
+			}
+		}
+		catch (Exception)
+		{
+		}
+	}
+	
+}
+
+

Added: trunk/src/PlayerHistoryDialog.cs
==============================================================================
--- (empty file)
+++ trunk/src/PlayerHistoryDialog.cs	Wed May  7 16:50:50 2008
@@ -0,0 +1,233 @@
+/*
+ * Copyright (C) 2008 Jordi Mas i HernÃndez <jmas softcatala org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+using System;
+using Glade;
+using Gtk;
+using Mono.Unix;
+using System.Collections;
+
+public class PlayerHistoryDialog : GtkDialog
+{
+	[Glade.Widget] Box history_preview;
+	[Glade.Widget] Label label_playerhistory;
+	[Glade.Widget] Gtk.CheckButton checkbutton_total;
+	[Glade.Widget] Gtk.CheckButton checkbutton_memory;
+	[Glade.Widget] Gtk.CheckButton checkbutton_logic;
+	[Glade.Widget] Gtk.CheckButton checkbutton_calculation;
+
+	CairoPreview drawing_area;
+
+	public PlayerHistoryDialog () : base ("playerhistory")
+	{
+		label_playerhistory.Text = String.Format (Catalog.GetString ("The graphic below shows the player's game score evolution. It is built using the results of {0} last recorded games."), gbrainy.history.Games.Count);
+
+		drawing_area = new CairoPreview (this);
+		history_preview.Add (drawing_area);
+		drawing_area.Visible = true;
+ 		checkbutton_total.Active = checkbutton_memory.Active = checkbutton_logic.Active = checkbutton_calculation.Active = true;
+	}
+	
+	void OnTotalToggled (object sender, EventArgs args)
+	{
+		drawing_area.QueueDraw ();
+	}
+
+	void OnLogicToggled (object sender, EventArgs args)
+	{
+		drawing_area.QueueDraw ();
+	}
+
+	void OnMemoryToggled (object sender, EventArgs args)
+	{
+		drawing_area.QueueDraw ();
+	}
+
+	void OnCalculationToggled (object sender, EventArgs args)
+	{
+		drawing_area.QueueDraw ();
+	}
+
+	public class CairoPreview : DrawingArea 
+	{
+		const double area_h = 0.8, area_w = 0.9, point_size = 0.005 * 1.25;
+		Cairo.Color math_color = new Cairo.Color (0.56, 0.71, 0.20);    // 8fb735
+		Cairo.Color logic_color = new Cairo.Color (0.81, 0.54, 0.23);   // d18c3b
+		Cairo.Color memory_color = new Cairo.Color (0.73, 0.22, 0.51);  // bb3a84
+		Cairo.Color total_color = new Cairo.Color (0, 0, 0.6);
+		Cairo.Color text_color = new Cairo.Color (0, 0, 0);
+		Cairo.Color axis_color = new Cairo.Color (0.15, 0.15, 0.15);
+		PlayerHistoryDialog dlg;
+	
+		public CairoPreview (PlayerHistoryDialog dlg)
+		{
+			this.dlg = dlg;
+		}
+
+		private void DrawLegend (CairoContextEx cr, double x, double y)
+		{
+			double line_size = 0.05, offset_x = 0.01, second_row = 0.05;
+			
+			cr.Color = total_color;
+			cr.MoveTo (x, y);
+			cr.LineTo (x + line_size, y);
+			cr.Stroke ();
+			cr.Color = text_color;
+			cr.MoveTo (x + line_size + offset_x, y + 0.01);
+			cr.ShowText (Catalog.GetString ("Total"));
+			cr.Stroke ();
+
+			cr.Color = logic_color;
+			cr.MoveTo (x, y + second_row);
+			cr.LineTo (x + line_size, y + second_row);
+			cr.Stroke ();
+			cr.Color = text_color;
+			cr.MoveTo (x + line_size + offset_x, y + 0.01 + second_row);
+			cr.ShowText (Catalog.GetString ("Logic"));
+			cr.Stroke ();
+
+			x += 0.5;
+			cr.Color = memory_color;
+			cr.MoveTo (x, y);
+			cr.LineTo (x + line_size, y);
+			cr.Stroke ();
+			cr.Color = text_color;
+			cr.MoveTo (x + line_size + offset_x, y + 0.01);
+			cr.ShowText (Catalog.GetString ("Memory"));
+			cr.Stroke ();
+
+			cr.Color = math_color;
+			cr.MoveTo (x, y + second_row);
+			cr.LineTo (x + line_size, y + second_row);
+			cr.Stroke ();
+			cr.Color = text_color;
+			cr.MoveTo (x + line_size + offset_x, y + 0.01 + second_row);
+			cr.ShowText (Catalog.GetString ("Calculation"));
+			cr.Stroke ();
+		}
+
+		private void DrawLines (CairoContextEx cr, double x, double y)
+		{
+			double px, py;
+			PlayerHistory history = gbrainy.history;
+			double ratio = (area_w / (history.Games.Count - 1)); 
+
+			if (history.Games.Count == 0)
+				return;
+			
+			if (dlg.checkbutton_logic.Active) { // Logic
+				cr.Color = logic_color;
+				cr.MoveTo (x, area_h - (area_h * history.Games[0].logic_score / 100));
+				for (int i = 1; i < history.Games.Count; i++)
+				{
+					px = x + (ratio * i);
+					py = y + area_h - (area_h * history.Games[i].logic_score / 100);
+					cr.LineTo (px, py);
+				}
+				cr.Stroke ();
+			}
+
+			if (dlg.checkbutton_calculation.Active) { // Math
+				cr.Color = math_color;
+				cr.MoveTo (x, area_h - (area_h * history.Games[0].math_score / 100));
+				for (int i = 1; i < history.Games.Count; i++)
+				{
+					px = x + (ratio * i);
+					py = y + area_h - (area_h * history.Games[i].math_score / 100);
+					cr.LineTo (px, py);
+				}
+				cr.Stroke ();
+			}
+	
+			if (dlg.checkbutton_memory.Active) { // Memory
+				cr.Color = memory_color;
+				cr.MoveTo (x, area_h - (area_h * history.Games[0].memory_score / 100));
+				for (int i = 1; i < history.Games.Count; i++)
+				{
+					px = x + (ratio * i);
+					py = y + area_h - (area_h * history.Games[i].memory_score / 100);
+					cr.LineTo (px, py);
+				}
+				cr.Stroke ();
+			}
+
+			if (dlg.checkbutton_memory.Active) { // Total			
+				cr.Color = total_color;
+				cr.MoveTo (x, area_h - (area_h * history.Games[0].total_score / 100));
+				for (int i = 1; i < history.Games.Count; i++)
+				{
+					px = x + (ratio * i);
+					py = y + area_h - (area_h * history.Games[i].total_score / 100);
+					cr.LineTo (px, py);
+				}
+				cr.Stroke ();
+			}
+		}
+		
+		protected override bool OnExposeEvent (Gdk.EventExpose args)
+		{
+			if(!IsRealized)
+				return false;
+
+			int w, h, nw, nh;
+			double x = 0, y = 0;
+
+			Cairo.Context cc = Gdk.CairoHelper.Create (args.Window);
+			CairoContextEx cr = new CairoContextEx (cc.Handle);   
+			args.Window.GetSize (out w, out h);
+
+			nh = nw = Math.Min (w, h);
+
+			if (nw < w) {
+				x = (w - nw) / 2;
+			}
+
+			if (nh < h) {
+				y = (h - nh) / 2;
+			}
+		
+			cr.Translate (x, y);
+			cr.Scale (nw, nh);
+			cr.SetNormalFont ();
+
+			// Background
+			cr.Color = new Cairo.Color (1, 1, 1);
+			cr.Paint ();
+			cr.Stroke ();
+
+			x = 0.05; 
+			y = 0.05;
+			cr.LineWidth = point_size;
+			cr.Color = axis_color;
+
+			DrawLines (cr, x, y);
+			DrawLegend (cr, x, y + area_h + 0.05);
+
+			// Draw Axis
+			cr.MoveTo (x, y);
+			cr.LineTo (x, y + area_h);
+			cr.LineTo (x + area_w, y + area_h);
+			cr.Stroke ();
+
+			((IDisposable)cc).Dispose();
+			((IDisposable)cr).Dispose();
+   			return base.OnExposeEvent(args);
+		}
+	}	
+}

Modified: trunk/src/PreferencesDialog.cs
==============================================================================
--- trunk/src/PreferencesDialog.cs	(original)
+++ trunk/src/PreferencesDialog.cs	Wed May  7 16:50:50 2008
@@ -23,23 +23,16 @@
 using Mono.Unix;
 using System.Collections;
 
-public class PreferencesDialog
+public class PreferencesDialog : GtkDialog
 {
-	private Glade.XML xml;
-	private Gtk.Dialog dialog;
-	private const string dialog_name = "preferences";
 	[Glade.Widget] Gtk.SpinButton prefspinbutton;
 	[Glade.Widget] Gtk.CheckButton prefcheckbutton;
 	[Glade.Widget] Gtk.RadioButton rb_easy;
 	[Glade.Widget] Gtk.RadioButton rb_medium;
 	[Glade.Widget] Gtk.RadioButton rb_master;
 
-	public PreferencesDialog ()
+	public PreferencesDialog () : base ("preferences")
 	{
-		dialog = null;
-		xml = new Glade.XML (null, "gbrainy.glade", dialog_name, "gbrainy");
-		xml.Autoconnect (this);
-		Dialog.IconName = "gbrainy";
 	}
 	
 	public virtual int MemQuestionTime {
@@ -76,19 +69,4 @@
 			}
 		}
 	}
-
-	public Gtk.Dialog Dialog {
-		get {
-			if (dialog == null)
-				dialog = (Gtk.Dialog) xml.GetWidget (dialog_name);
-				
-			return dialog;
-		}
-	}
-
-	public int Run ()
-	{
-		return Dialog.Run ();
-	}
-        
 }

Modified: trunk/src/gbrainy.cs
==============================================================================
--- trunk/src/gbrainy.cs	(original)
+++ trunk/src/gbrainy.cs	Wed May  7 16:50:50 2008
@@ -47,6 +47,7 @@
 	int memquestion_time = 4;
 	bool memquestion_warn = true;
 	Game.Difficulty difficulty = Game.Difficulty.Medium;
+	public static PlayerHistory history = null;
  
 	public gbrainy (string [] args, params object [] props)
 	: base ("gbrainy", Defines.VERSION, Modules.UI,  args, props)
@@ -106,7 +107,11 @@
 		button.Clicked += OnEndGame;
 		toolbar.Insert (button, -1);
 
-		session = new GameSession (this);		
+		session = new GameSession (this);	
+
+		if (history == null)
+			history = new PlayerHistory ();
+
 		drawing_area = new GameDrawingArea ();
 		drawing_vbox.Add (drawing_area);
 		//app_window.Resize (500, 700);
@@ -406,6 +411,7 @@
 		drawing_area.mode = GameDrawingArea.Modes.Scores;
 		drawing_area.GameSession = session.Copy ();
 	
+		history.SaveGameSession (session);
 		session.EndSession ();
 		drawing_area.puzzle = null;
 		question_label.Text = string.Empty;
@@ -438,6 +444,15 @@
 		app_window.Resize (width, height - requisition.Height);
 	}
 
+	void OnHistory (object sender, EventArgs args)
+	{
+		PlayerHistoryDialog dialog;
+
+		dialog = new PlayerHistoryDialog ();
+		dialog.Run ();
+		dialog.Dialog.Destroy ();	
+	}	
+
 	private void OnSizeAllocated (object obj, SizeAllocatedArgs args)
 	{
 		//Console.WriteLine ("OnSizeAllocated");

Modified: trunk/src/gbrainy.glade
==============================================================================
--- trunk/src/gbrainy.glade	(original)
+++ trunk/src/gbrainy.glade	Wed May  7 16:50:50 2008
@@ -158,6 +158,15 @@
 		      <signal name="activate" handler="OnToolbarActivate" last_modification_time="Sun, 28 Oct 2007 18:51:20 GMT"/>
 		    </widget>
 		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="players_game_history">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Player's Game History</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="OnHistory" last_modification_time="Tue, 06 May 2008 20:52:02 GMT"/>
+		    </widget>
+		  </child>
 		</widget>
 	      </child>
 	    </widget>
@@ -1120,4 +1129,233 @@
   </child>
 </widget>
 
+<widget class="GtkDialog" id="playerhistory">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Player's Game History</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">450</property>
+  <property name="default_height">450</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox3">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="players_vbox">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label_playerhistory">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">This graphic represents the player game history.
+
+</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="history_preview">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox10">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">5</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label28">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Show:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton_total">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Total</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="OnTotalToggled" last_modification_time="Wed, 07 May 2008 16:07:45 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton_logic">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Logic</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="OnLogicToggled" last_modification_time="Wed, 07 May 2008 16:09:32 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton_memory">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Memory</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="OnMemoryToggled" last_modification_time="Wed, 07 May 2008 16:10:03 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="checkbutton_calculation">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Calculation</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="OnCalculationToggled" last_modification_time="Wed, 07 May 2008 16:10:46 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>



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