C#/MonoDevelop: GTK MessageDialogs require a doubleclick to close - why?

Posted by Connel on Stack Overflow See other posts from Stack Overflow or by Connel
Published on 2010-04-06T14:18:42Z Indexed on 2010/04/06 14:23 UTC
Read the original article Hit count: 371

Filed under:
|
|

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;
  }

© Stack Overflow or respective owner

Related posts about c#

Related posts about mono