Layouts on the free_layout branch now reload when the outline is opened.

To set the layout for an outline you either Load or Save a layout on
the outline, using the panel splitter context menu items.  Doing either
makes that the default layout for the outline.  To clear it, use the
Forget Layout context menu item.

To do this cleanly, I had to add a new hook to Leo,
after-create-leo-frame2

The problem is that before-create-leo-frame is too early, but then
free_layout needs to have its after-create-leo-frame run before all the
other plugins, so they can call it to register the types of pane they
provide, and after all the other plugins, to load layouts using the
panes they provide.

I managed to get it working without the new hook, by having free_layout
register after-create-leo-frame again, from within
after-create-leo-frame, so it got itself at the start and end of the
list, but that only worked for outlines after the first.  Which could
be mutating a list while iterating it.  But that only worked for
outlines after the first.
I got around that by using a timer to delay loading of the first
outline's layout.  But both these things are horrible hacks and the new
hook is just one line and the best solution would be adding priorities
to hooks, but that's a major change.

So anyway, it works.

Cheers -Terry

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