Changeset 4220

Show
Ignore:
Timestamp:
07/02/08 10:40:30 (5 months ago)
Author:
ed
Message:

Enabled skipping the dialog-ending behavior by returning False from the runOK/Cancel/Yes/No methods.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/ui/uiwx/dDialog.py

    r4186 r4220  
    346346            # New code should not have onOK 
    347347            pass 
    348         self.runOK() 
    349         self.EndModal(kons.DLG_OK) 
     348        if self.runOK() is not False: 
     349           self.EndModal(kons.DLG_OK) 
    350350    def _onCancel(self, evt): 
    351351        try: 
     
    359359            pass 
    360360        self.runCancel() 
    361         self.EndModal(kons.DLG_CANCEL) 
     361        if self.runCancel() is not False: 
     362            self.EndModal(kons.DLG_CANCEL) 
    362363    def _onYes(self, evt): 
    363364        self.Accepted = True 
    364         self.runYes() 
    365         self.EndModal(kons.DLG_YES) 
     365        if self.runYes() is not False: 
     366           self.EndModal(kons.DLG_YES) 
    366367    def _onNo(self, evt): 
    367         self.runNo() 
    368         self.EndModal(kons.DLG_NO) 
     368        if self.runNo() is not False: 
     369           self.EndModal(kons.DLG_NO) 
    369370    def _onHelp(self, evt): 
    370371        self.runHelp()