changeset 42:35ad26ac59c0

Fixes #143: GTK "Army has been modified" dialog has no buttons * Use "AddButton" method to add a button that returns "Cancel" response
author IBBoard <dev@ibboard.co.uk>
date Wed, 11 Aug 2010 19:11:00 +0000
parents a32b6bb7f1eb
children 4e127ce8682f
files FrmMainWindow.cs
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/FrmMainWindow.cs	Tue Aug 10 19:54:11 2010 +0000
+++ b/FrmMainWindow.cs	Wed Aug 11 19:11:00 2010 +0000
@@ -803,13 +803,14 @@
 
 		private bool CloseCurrentArmy()
 		{
-			if (WarFoundryCore.CurrentArmy!=null)
+			if (WarFoundryCore.CurrentArmy != null)
 			{
 				bool canClose = false;
 
 				if (CommandStack.IsDirty())
 				{
-					MessageDialog dia  = new MessageDialog(this, DialogFlags.DestroyWithParent, MessageType.Question, ButtonsType.YesNo, "The army \""+WarFoundryCore.CurrentArmy.Name+"\" has been modified.\r\nSave changes before closing army?");
+					MessageDialog dia = new MessageDialog(this, DialogFlags.DestroyWithParent, MessageType.Question, ButtonsType.YesNo, "The army \"" + WarFoundryCore.CurrentArmy.Name + "\" has been modified.\r\nSave changes before closing army?");
+					dia.AddButton("Cancel", ResponseType.Cancel);
 					ResponseType dr = (ResponseType)dia.Run();
 					dia.Hide();
 					dia.Dispose();