Show
Ignore:
Timestamp:
07/10/08 22:43:13 (4 months ago)
Author:
rob
Message:

Removed the CallAfter? in OnTabChanged? to prevent an extra tab change back to the original tab after a minibuffer
* changed the descruction order of minibuffer
* FIXME: somewhere there's a bad SetFocus? call in a CallAfter?:

Traceback (most recent call last):

File "/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14550, in <lambda>

lambda event: event.callable(*event.args, **event.kw) )

File "/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 9235, in SetFocus?

return _core_.Window_SetFocus(*args, **kwargs)

TypeError?: in method 'Window_SetFocus', expected argument 1 of type 'wxWindow *'

but it doesn't affect operation and it's better than leaving the code in a broken state on svn. Will fix ASAP.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/peppy/actions/minibuffer.py

    r1477 r1487  
    235235            self.finish_callback() 
    236236        else: 
     237            self.mode.removeMinibuffer(detach_only=True) 
    237238            if text is not None: 
    238239                error = self.action.processMinibuffer(self, self.mode, text) 
    239240                if error is not None: 
    240241                    self.mode.frame.SetStatusText(error) 
    241             self.removeFromParent() 
     242            self.close() 
     243            #self.removeFromParent() 
    242244 
    243245class IntMinibuffer(TextMinibuffer): 
     
    329331         
    330332    def SetFocus(self): 
     333        dprint(self) 
    331334        self.win.saveSetFocus() 
    332335        self.text.SetInsertionPointEnd() 
     
    379382 
    380383        self.text.Bind(wx.EVT_TEXT_ENTER, self.OnEnter) 
     384        self.win.Bind(wx.EVT_SET_FOCUS, self.OnFocus) 
    381385 
    382386        if self.initial is not None: 
     
    384388            self.text.SetChoices(self.complete(self.initial)) 
    385389        self.text.SetEntryCallback(self.setDynamicChoices) 
     390        #self.text.SetInsertionPointEnd() 
    386391 
    387392        self.win.saveSetFocus = self.win.SetFocus 
     
    389394         
    390395    def SetFocus(self): 
     396        dprint(self) 
    391397        self.win.saveSetFocus() 
     398        self.text.SetInsertionPointEnd() 
     399     
     400    def OnFocus(self, evt): 
     401        dprint() 
    392402        self.text.SetInsertionPointEnd() 
    393403