# HG changeset patch # User IBBoard # Date 1281553860 0 # Node ID 35ad26ac59c0f4f44e3d97a562ed6f95a4fe262c # Parent a32b6bb7f1eb26c7022f2ea5fb12a7b09832487e Fixes #143: GTK "Army has been modified" dialog has no buttons * Use "AddButton" method to add a button that returns "Cancel" response diff -r a32b6bb7f1eb -r 35ad26ac59c0 FrmMainWindow.cs --- 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();