On Mon, 8 Aug 2011 13:05:16 -0500
Kent Tenney <[email protected]> wrote:
> Is it possible to do this from a button or setting ...
> (more light-weight + localized than a plugin) ?
>
> I would check p.isDirty() on losing focus and
> populate a list of recent node edits.
>
> Use it to generate a @bookmark tree for the last 10
> nodes I've edited ...
A button can do the same things a plugin would do...
def make_handler(c):
"""closure to provide breadcrumb handler for c"""
def handler(tag, keywords, c=c):
if 'c' not in keywords or keywords['c'] != c:
return # wrong number
c._breadcrumbs.append(c.p.UNL())
if len(c._breadcrumbs) > 10:
c._breadcrumbs.pop(0)
return handler
if not hasattr(c._breadcrumbs):
c._breadcrumbs = []
g.registerHandler('lost-focus', make_handler(c))
# it's not lost-focus, I don't know what it is off hand
--
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.