On Thu, May 13, 2010 at 4:44 PM, Terry Brown <[email protected]> wrote:
> On Thu, 13 May 2010 23:58:39 +0300
> "Ville M. Vainio" <[email protected]> wrote:
>
>> Such a thing can be supported easily by gui-side hooks. The same
>> mechanism that's being used in colorize_headlines.py plugin could
>> probably be used for this already (change the text of
>> QListWidgetItem).
>
> colorize_headlines.py is a good example, but it's called in the wrong place 
> for changing the text.
>
> Any particular reasons for creating that hook that way (new function on g) 
> instead of the existing hook machinery?

Yes.  This is one of the places where a body is buried.  The code that
handles headlines is *fantastically* difficult.

In fact, there are a few methods in leoCommands.py that have only one
or two lines of code but that have cost me an unbelievable amount of
work.  I'll cover this in excruciating detail when I discuss
leoCommands.py, but the essence of the situation is similar to that of
the outline:  headlines can be changed either by the user or by
commands (like replace).  Making sense of the gui events generated by
these changes is really really hard.  It always has been, it always
will be.

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.

Reply via email to