Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
changeset 27:83c8945edac2
Re #143: GTK "Army has been modified" dialog has no buttons
* Button types can't be bitwise ORed so just use YesNo for now (Yes, No, Cancel dialog would be better)
Also:
* Make sure that we dispose of the dialog
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 28 Aug 2009 18:52:34 +0000 |
parents | 3a396783bfed |
children | 9440eef124b0 |
files | FrmMainWindow.cs |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmMainWindow.cs Fri Aug 28 18:47:10 2009 +0000 +++ b/FrmMainWindow.cs Fri Aug 28 18:52:34 2009 +0000 @@ -807,8 +807,10 @@ if (CommandStack.IsDirty()) { - MessageDialog dia = new MessageDialog(this, DialogFlags.DestroyWithParent, MessageType.Question, ButtonsType.YesNo | ButtonsType.Cancel, "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?"); ResponseType dr = (ResponseType)dia.Run(); + dia.Hide(); + dia.Dispose(); if (dr == ResponseType.Yes) { @@ -826,8 +828,6 @@ //Assume cancel or close with the X button canClose = false; } - - dia.Dispose(); } else {