Re: cruft in rclick.py and base leo code?
On Mon, Jun 22, 2009 at 11:37 AM, jkn wrote: > > Thanks - that's not dissimilar to what I've been playing with - though > it's early days at the moment. I have a learning curve of Leo/Qt/ > plugins to go through, and In theory this is done in my spare time... No rush. I think you'll find that it's easier if you don't think too much about Leo, and just implement stuff in terms of Qt (I know I did) ;-). If it's easier, just add stuff to qtGui.py, the cleanup can be done afterwards. -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
Hi Ville On Jun 21, 9:00 pm, "Ville M. Vainio" wrote: > On Mon, Jun 15, 2009 at 3:21 PM, jkn wrote: > > As mentioned previously, I'm trying to get to grips with the innards > > of Leo by having a look at porting rclick.py to qt. I'm mostly reading > > Was thinking of this briefly, here's an idea how this could be > implemented the easiest (and most flexible) possible way: > > - Do not try to write any "wrappers" (they will only confine what can be done) > - Follow the pattern of "visit_tree_item", that is: > > - When you right click somewhere (or do show-popup-menu), instantiate > the popup menu (QMenu) and pass it as arg to a chain of functions. > Also pass the clicked widget (so you can right click tree item, body, > ...) > - The functions well add their own actions to the many^H^H^H^H Menu any way > they wish. Thanks - that's not dissimilar to what I've been playing with - though it's early days at the moment. I have a learning curve of Leo/Qt/ plugins to go through, and In theory this is done in my spare time... but I'm getting there... Regards Jon N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
On Sun, Jun 21, 2009 at 11:00 PM, Ville M. Vainio wrote: > - The functions well add their own actions to the many any way they wish. to the MENU... -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
On Mon, Jun 15, 2009 at 3:21 PM, jkn wrote: > As mentioned previously, I'm trying to get to grips with the innards > of Leo by having a look at porting rclick.py to qt. I'm mostly reading Was thinking of this briefly, here's an idea how this could be implemented the easiest (and most flexible) possible way: - Do not try to write any "wrappers" (they will only confine what can be done) - Follow the pattern of "visit_tree_item", that is: - When you right click somewhere (or do show-popup-menu), instantiate the popup menu (QMenu) and pass it as arg to a chain of functions. Also pass the clicked widget (so you can right click tree item, body, ...) - The functions well add their own actions to the many any way they wish. -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
never mind, I've got the plugin loading bit working at least. Not quite sure what fixed it - a combination of things I suspect. J --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
To clarify: > > Is your @enabled-plugins within a "@settings" tree? > > Yes, in both files. That is, in .../leo/config/leoSettings.leo, its in a node *one of whose clones* is within an '@settings' tree. I assume that the occurrences of the clone nodes not under such a tree do nothing... Cheers J^n --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
On Jun 16, 8:24 pm, "Ville M. Vainio" wrote: > On Tue, Jun 16, 2009 at 9:59 PM, jkn wrote: > > I thought the reading of the @enabled-plugins node in this config file > > would enable plugins at startup. What am I missing here? > > Ah, the @enabled-plugins, bane of everyone at some point... glad to hear I'm not alone... > > Have you checked if you have @enabled-plugins in myLeoSettings.leo > (help->open myleosettings)? Yes, I do - I tried it here first, IIRC (I hadn't seen the 'Help - > ...' access, thanks). This didn't seem to work so I added it to .../ leo/config/leoSettings.leo, along with all the others >From my reading of the docs these entries should be read in turn, & so presumably the noted plugins concatenated? > > Is your @enabled-plugins within a "@settings" tree? Yes, in both files. Thanks J^n --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
On Tue, Jun 16, 2009 at 9:59 PM, jkn wrote: > I thought the reading of the @enabled-plugins node in this config file > would enable plugins at startup. What am I missing here? Ah, the @enabled-plugins, bane of everyone at some point... Have you checked if you have @enabled-plugins in myLeoSettings.leo (help->open myleosettings)? Is your @enabled-plugins within a "@settings" tree? -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
I realise that this will show that i'm trying to run before I can walk, but never mind... I have, in .../trunk/leo/config/leoSettings.leo, and @enabled-plugins node: # Leo loads plugins in the order they appear here. # File names may be indented as desired. #Standard plugins enabled in official distributions. # This plugin creates the Plugins menu. plugins_menu.py # [...] rclick_qt.py # ie. the rclick file I'm experimenting with. Leo tells me in the log pane that it loads this leoSettings.leo when it start up. But, it does not display *any* plugin buttons or any pluging menu. Only when I explicitly open .../leo/config/ leoSettings.leo do these appear. I thought the reading of the @enabled-plugins node in this config file would enable plugins at startup. What am I missing here? Thanks jon N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
Hi Ville > > If I were you, I'd implement something simple from scratch - I don't > think there is much "working" in the rclick area right now. [...] Thanks, that's another form of the sort of advice I was after ;-) I will probably adopt a simultaneous 'bottom-up' and 'top-down' approach - start with something simple to get the understanding, whilst keeping an eye on the original design for compatability in the future... Cheers Jon N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: cruft in rclick.py and base leo code?
On Mon, Jun 15, 2009 at 3:21 PM, jkn wrote: > appears not to be connected to anything. The current (non)-action of > rclick.py in the Qt framework connects to this; I guess I'm learning > that there is less working in this area that I imagined. > > I'm really just looking for confirmation that I am likely to find > 'orphaned' or no-longer-relevant bits of code in both the base leo > code and in the plugin code, presumably from earlier or Tk days. I > don't want to get led down too may stray paths whilst getting to grips > with things. If I were you, I'd implement something simple from scratch - I don't think there is much "working" in the rclick area right now. Create a plugin with @g.command('show-popup-menu') def showpopup(event): c = event['c'] p = c.currentPosition() And move on from there. -- Ville M. Vainio http://tinyurl.com/vainio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
cruft in rclick.py and base leo code?
As mentioned previously, I'm trying to get to grips with the innards of Leo by having a look at porting rclick.py to qt. I'm mostly reading at the moment - both the leo code, and about pyQt in general. But I would like to check one thing. It look like there is a fair bit of cruft in the places I am looking. for instance, in qtGui.py, def OnBodyRclick(self, event = None): appears not to be connected to anything. The current (non)-action of rclick.py in the Qt framework connects to this; I guess I'm learning that there is less working in this area that I imagined. I'm really just looking for confirmation that I am likely to find 'orphaned' or no-longer-relevant bits of code in both the base leo code and in the plugin code, presumably from earlier or Tk days. I don't want to get led down too may stray paths whilst getting to grips with things. thanks jon N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---