Changeset 97

Show
Ignore:
Timestamp:
01/27/06 12:57:32 (19 years ago)
Author:
jerome
Message:

Now the confirmation dialog box can return either "OK" or "CANCEL" to the
test program.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/bin/pykoticon

    r96 r97  
    9999        # ugly, isn't it ? 
    100100        while self.frame.askConfirmationResult is None : 
    101             time.sleep(0.5) 
     101            time.sleep(0.1) 
    102102        retcode = self.frame.askConfirmationResult     
    103103        self.frame.askConfirmationResult = None # prepare for next call, just in case 
     
    236236        dialog = wx.MessageDialog(self, message, _("Confirmation"), \ 
    237237                 wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION | wx.STAY_ON_TOP) 
    238         self.askConfirmationResult = dialog.ShowModal() 
     238        self.askConfirmationResult = ((dialog.ShowModal() == wx.ID_NO) and "CANCEL") or "OK" 
    239239        dialog.Destroy() 
    240240