On Thu, May 15, 2008 at 3:49 AM, Ville M. Vainio <[EMAIL PROTECTED]> wrote:
> On Wed, May 14, 2008 at 1:34 PM, Ville M. Vainio <[EMAIL PROTECTED]> > wrote: > > > Now shoot this down if it's a nonworkable idea: > > > > What if someone (say, me ;-) decided to "port" leo to pyqt4, but not > > really port the source code - rather, implement a new GUI on top of > > leoBridge? > > I have a working (read-only) version up on launchpad. Screenshot (from > ubuntu 8.04) attached. > > Get it by: > > bzr branch > http://bazaar.launchpad.net/~villemvainio/leo-editor/qleolite<http://bazaar.launchpad.net/%7Evillemvainio/leo-editor/qleolite> > > It requires pyqt4. You need to edit the source and set sys.path > accordingly (to leoBridge), because leo-as-package hasn't happened > yet. Cool. > > > This is read-only because, interestingly, leoBridge won't allow doing > c.save(), because it tries to access the gui (this is supposedly a > bug? or should I try to save the document some other way). Traceback > below: > > Traceback (most recent call last): > File "qleolite.py", line 44, in save_file > c.save() > File "/home/ville/leo-editor/leo/src/leoCommands.py", line 804, in save > c = self ; w = g.app.gui.get_focus(c) > File "/home/ville/leo-editor/leo/src/leoGui.py", line 547, in get_focus > return self.focusWidget or frame.body.bodyCtrl > AttributeError: Commands instance has no attribute 'body' This is an initialization problem. Plugins must be careful to load first so they can set the gui. You can't be using the nullGui, because nullGui.get_focus is: def get_focus(self,frame): return self.focusWidget or (hasattr(frame,'body') and frame.body.bodyCtrl) or None HTH. 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 -~----------~----~----~----~------~----~------~--~---
