changeset 151:83b19b57cba1

Re #58: Remove LogNotifier from API * Move one of the semi-useful bits of logging to the GTK GUI
author IBBoard <dev@ibboard.co.uk>
date Sat, 17 Mar 2012 20:05:26 +0000
parents 7549ed1f4cb2
children 87fda1e6d4d3
files FrmMainWindow.cs
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/FrmMainWindow.cs	Mon Nov 28 20:05:22 2011 +0000
+++ b/FrmMainWindow.cs	Sat Mar 17 20:05:26 2012 +0000
@@ -1,7 +1,6 @@
 // This file (FrmMainWindow.cs) is a part of the IBBoard.WarFoundry.GTK project and is copyright 2008, 2009 IBBoard.
 //
 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
-
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -509,6 +508,11 @@
 			if (system != null)
 			{
 				AddCategoryButtons(system.Categories);
+				logger.DebugFormat("Game system set to {0} with ID {1}", system.Name, system.ID);
+			}
+			else
+			{
+				logger.Debug("Game system set to null");
 			}
 		}
 
@@ -572,12 +576,12 @@
 			SetStatusBarText();
 		}
 
-		private void OnArmyNameChanged (WarFoundryObject obj, string oldValue, string newValue)
+		private void OnArmyNameChanged(WarFoundryObject obj, string oldValue, string newValue)
 		{
 			SetAppTitle();
 		}
 
-		private void OnMaxPointsValueChanged (WarFoundryObject obj, int oldValue, int newValue)
+		private void OnMaxPointsValueChanged(WarFoundryObject obj, int oldValue, int newValue)
 		{
 			SetStatusBarText();
 		}
@@ -983,7 +987,7 @@
 				}
 				else
 				{
-					MessageDialog dialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok,  Translation.GetTranslation("SaveFailed", "File save failed. Please check log file"));
+					MessageDialog dialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, Translation.GetTranslation("SaveFailed", "File save failed. Please check log file"));
 					dialog.Title = Translation.GetTranslation("SaveFailedTitle", "File save failed");
 					dialog.Run();
 					dialog.Hide();