On Tue, May 20, 2008 at 12:31 PM, TL <[EMAIL PROTECTED]> wrote: > > > In k.initMode and k.reinitMode there are lines like this: > > w = g.choose(k.silentMode,k.modeWidget,k.widget) > > Just change them to: > > w = k.modeWidget > > Thanks for the help. Unfortunately, the code change didn't work for > me. Perhaps we're try to solve two different problems. I'm trying to > get Leo to exit the @modes state and return to the outline instead of > the body pane after an @mode based key has been pressed while in the > outline. > > It seems that the best solution is to issue the "--> exit-named-mode" > command at the end of the @mode node to exit the mode and make the > command smarter so that it returns the focus back to the caller's > pane. > > My investigation uncovered that the switch of the focus to the body > pane is due to the "deleteTab" call in class leoLog that is called > from the "endMode" command which is called from the exitNamedMode > command. It always issues a "self.c.bodyWantsFocus()" call regardless > of the previous focus. > > Is there a way for the deleteTab function, instead, to return focus > back to the previous focused pane or instead, check if "mode-help" was > active before issuing a call to delete the "mode" tag?
Of course there is a way. The trick is to find it :-) If deleteTab is the problem, perhaps call to bodyWantsFocus could be changed to widgetWantsFocus(k.modeWidget or c.frame.body.bodyCtrl). Just thinking out loud here. I don't have time today to do more than speculate. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
