On Tue, Mar 17, 2015 at 12:47 PM, john lunzer <[email protected]> wrote:

> Here are my findings, *I did most of my testing with ONLY my plugin
> enabled*:
>
> The relevant code from leo\plugins\qt_tree.py:
>
>     def onIconBoxDoubleClick (self,event,p=None):
>         if self.busy(): return
>
>         c = self.c
>         if not p: p = c.p
>
>         if not g.doHook("icondclick1",c=c,p=p,v=p,event=event):
>             self.endEditLabel()
>             self.OnIconDoubleClick(p) # Call the method in the base class.
>
>         g.doHook("icondclick2",c=c,p=p,v=p,event=event)
>
>         c.outerUpdate()
>
> and
>
> if p:
>             # 2014/02/21: generate headddlick1/2 instead of icondclick1/2.
>             event = None
>             if g.doHook("
> ​​
> headdclick1",c=c,p=p,v=p,event=event) is None:
>                 c.frame.tree.OnIconDoubleClick(p) # Call the base class
> method.
>             g.doHook("
> ​​
> headclick2",c=c,p=p,v=p,event=event)
>
> I'm not sure why icondclick1/2 aren't working but *headdclick1 is working
> for me*. However, it doesn't seem to produce expected behavior. For
> example if I double click on any part of the Node headline the first time
> it calls the headdclick1 handler. After the first time I have to click in
> the box, I'm sure this is not the intended behavior.
>
> Additionally, if I enable my plugin as listed above ahead of todo.py I get
> this error:
>
> Traceback (most recent call last):
>   File "C:\MyPrograms\leo-editor-master\leo\plugins\qt_tree.py", line 514,
> in on ContextMenu
>     h(c,p,menu)
>   File "C:\MyPrograms\leo-editor-master\leo\plugins\todo.py", line 102, in
> popup_entry
>     c.cleo.addPopupMenu(c,p,menu)
> AttributeError: 'Commands' object has no attribute 'cleo'
>
> Which is interesting. I know todo.py can mess around with that whole icon
> area to the left of the headline so I am wondering if it has anything to do
> with that.
>
> That's all for now... sorry to be a nuisance.
>

​Don't ever be sorry for reporting problems :-) Please file a bug report.
There appears to be two problems here:

​
- 'headclick2' is matched with 'headdclick1' (missing d in headclick2)
- c.cleo doesn't exist because, iirc, cleo was a tk plugin.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to