On Thu, 19 Mar 2015 09:40:11 -0500
"Edward K. Ream" <[email protected]> wrote:



> - 'headclick2' is matched with 'headdclick1' (missing d in headclick2)

headclick hook names changed some time back, I think the table's
correct now though.

> - c.cleo doesn't exist because, iirc, cleo was a tk plugin.

For hysterical raisins the todo plugin still binds its reference to c
as c.cleo, so c.cleo should exist when the todo plugin is active.

I think that there's some major issues with double-click events
though.  There was disagreement about the use of QTimer with a non-zero
delay in the code base.

I suspect Tk just did what it had to to report single vs double clicks,
but Qt takes perhaps the more common approach of reporting both the
single and double click events, leaving it up to the user to suppress
the single click event with a pattern like this:

   def single_click_callback(self, event):
       self.double = False
       QTimer.singleShot(300, self.do_single_click)

   def do_single_click(self):
       if self.double:
           return
       ...

   def double_click_callback(self, event):
       self.double = True
       ...

so single clicks are delayed long enough to see a double click.

The delay isn't always needed, eg. if single click tree node selects it
and double click edits it, firing both on a double click is harmless.
The problem is use cases like single selects, double takes action
associated with node such as jumping to another node.

And even that isn't really a problem.  But there are still some
skeletons in the closet, the settings 

  @bool bookmarks-grab-dblclick = True
  @bool quickmove_timer_hack = True
  @bool single_click_auto_edits_headline = True

are relevant I think.  In order for dblclick to be able to take an
action other than editing a headline, you need some other mechanism for
editing a headline, hence single_click_auto_edits_headline:

  True: A *single* click in an already selected node begins editing of
  the headline.

quickmove_timer_hack has apparently gone away :-)

Cheers -Terry


-- 
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