C#/MonoDevelop: GTK MessageDialogs require a doubleclick to close - why?
- by Connel
I'm a newbie programmer writting a program in MonoDevelop in C# and have a porblem with my gtk MessageDialogs.
The close button on the window boarders of my GTK Message dialogues require a double click to actually close them. The close button on the dialogue its self works fine. Could someone please tell me how I can fix this below is the code:
if (fchDestination.CurrentFolder == fchTarget.CurrentFolder) {
MessageDialog msdSame = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Close, "Destination directory cannot be the same as the target directory");
msdSame.Title="Error";
if ((ResponseType) msdSame.Run() == ResponseType.Close) {
msdSame.Destroy();
}
return;
}
if (fchTarget.CurrentFolder.StartsWith(fchDestination.CurrentFolder)) {
MessageDialog msdContains = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Close, "error");
msdContains.Title="Error";
if ((ResponseType) msdContains.Run() == ResponseType.Close) {
msdContains.Destroy();
}
return;
}