Re: Unexected difficulties "remembering" toggle-split-direction

2017-05-10 Thread Terry Brown
On Wed, 10 May 2017 08:47:00 -0700 (PDT)
john lunzer  wrote:

> As an extension to "arrange the panes how you want and save the
> layout", there could be multiple saved (and custom named) layouts and
> Leo could ship with "vertical" and "horizontal" default layouts and
> the binding to "toggle-split-direction" could be replaced with a
> binding to "cycle-layouts". Then the user could either
> modify/overwrite the stock layouts or scrap those and just create
> their own layouts. I think this would maintain simplicity and also
> offer a powerful system for quickly changing layouts.

This is a good idea although it does run into one wrinkle.

free_layout already supports multiple named layouts, and cycling
through them would be convenient.  However, switching layouts causes
Leo to instantiate (create) the widgets needed to fill the panes in a
particular layout.  Sometimes that might be slow / undesirable.  So
perhaps when a layout is saved, we'd need a checkbox "include in cycle
layouts".

Clarifying - switching vertical / horizontal / wide body / narrow tree
etc. is fast and no problem, but a layout might include other panes
(todo interface, graph editor, movie viewer) that are klunky to throw
up just because you're trying to cycle from horizontal to vertical.

Cheers -Terry

> Just a thought for creating a simple/unified layout interface.
> 
> On Tuesday, May 9, 2017 at 3:37:22 PM UTC-4, Edward K. Ream wrote:
> >
> > On Tue, May 9, 2017 at 2:30 PM, Terry Brown  > > wrote:
> >
> > ​...​
> >> I wonder if we should
> >> ​ ​
> >> be thinking about obsoleting these settings (and the split ratio
> >> one, ​ ​
> >> too).  As long as it works, and it already exists in free_layout,
> >> it ​ ​
> >> seems the "arrange the panes how you want and save the layout"
> >> approach ​ ​
> >> ​is simpler for all concerned.
> >
> > ​I agree.  This seems like the best idea.​
> >
> > Toggle split direction should (if it doesn't already) just call
> >> free_layouts rotate all function.
> >
> > ​That's exactly what it does:
> >
> > @cmd('toggle-split-direction')
> > def toggleSplitDirection(self, event=None):
> > '''Toggle the split direction in the present Leo window.'''
> > if hasattr(self.c, 'free_layout'):
> > self.c.free_layout.get_top_splitter().rotate()
> > ​
> >
> >> Which, appropriately, has been relabeled "toggle split direction"
> >> in the pane layout menu.
> >
> > ​So it looks like we have a plan.  When docks work we can get rid
> > of several settings.  Until then, we can do nothing.
> >
> > 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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Unexected difficulties "remembering" toggle-split-direction

2017-05-10 Thread john lunzer
As an extension to "arrange the panes how you want and save the layout", 
there could be multiple saved (and custom named) layouts and Leo could ship 
with "vertical" and "horizontal" default layouts and the binding to 
"toggle-split-direction" could be replaced with a binding to 
"cycle-layouts". Then the user could either modify/overwrite the stock 
layouts or scrap those and just create their own layouts. I think this 
would maintain simplicity and also offer a powerful system for quickly 
changing layouts.

Just a thought for creating a simple/unified layout interface.

On Tuesday, May 9, 2017 at 3:37:22 PM UTC-4, Edward K. Ream wrote:
>
> On Tue, May 9, 2017 at 2:30 PM, Terry Brown  > wrote:
>
> ​...​
>> I wonder if we should
>> ​ ​
>> be thinking about obsoleting these settings (and the split ratio one,
>> ​ ​
>> too).  As long as it works, and it already exists in free_layout, it
>> ​ ​
>> seems the "arrange the panes how you want and save the layout" approach
>> ​ ​
>> ​is simpler for all concerned.
>>
>
> ​I agree.  This seems like the best idea.​
>  
>
> Toggle split direction should (if it doesn't already) just call
>> free_layouts rotate all function.
>>
>
> ​That's exactly what it does:
>
> @cmd('toggle-split-direction')
> def toggleSplitDirection(self, event=None):
> '''Toggle the split direction in the present Leo window.'''
> if hasattr(self.c, 'free_layout'):
> self.c.free_layout.get_top_splitter().rotate()
> ​
>  
>
>> Which, appropriately, has been relabeled "toggle split direction" in
>> the pane layout menu.
>>
>
> ​So it looks like we have a plan.  When docks work we can get rid of 
> several settings.  Until then, we can do nothing.
>
> 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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Unexected difficulties "remembering" toggle-split-direction

2017-05-09 Thread Edward K. Ream
On Tue, May 9, 2017 at 2:30 PM, Terry Brown  wrote:

​...​
> I wonder if we should
> ​ ​
> be thinking about obsoleting these settings (and the split ratio one,
> ​ ​
> too).  As long as it works, and it already exists in free_layout, it
> ​ ​
> seems the "arrange the panes how you want and save the layout" approach
> ​ ​
> ​is simpler for all concerned.
>

​I agree.  This seems like the best idea.​


Toggle split direction should (if it doesn't already) just call
> free_layouts rotate all function.
>

​That's exactly what it does:

@cmd('toggle-split-direction')
def toggleSplitDirection(self, event=None):
'''Toggle the split direction in the present Leo window.'''
if hasattr(self.c, 'free_layout'):
self.c.free_layout.get_top_splitter().rotate()
​


> Which, appropriately, has been relabeled "toggle split direction" in
> the pane layout menu.
>

​So it looks like we have a plan.  When docks work we can get rid of
several settings.  Until then, we can do nothing.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Unexected difficulties "remembering" toggle-split-direction

2017-05-09 Thread Terry Brown
On Tue, 9 May 2017 12:21:30 -0700 (PDT)
"Edward K. Ream"  wrote:

> On Tuesday, May 9, 2017 at 2:09:25 PM UTC-5, Edward K. Ream wrote:
> 
> > I have just updated #483: Remember toggle-split-direction 
> . I want to
> repeat the discussion here, so as to reach the widest audience.
> ...
> > Imo, the simplest and best approach is to do nothing. If you want
> > Leo to 
> "remember" your preferred orientation, then use the @string 
> initial_split_orientation. You can put this in individual files or,
> more likely, myLeoSettings.leo.
> 
> Hmm. The first time a user chooses toggle-split-direction, Leo could
> put up a dialog tell the user about @string initial_split_orientation.
> 
> A dialog might be the only way to mitigate the unavoidable possible 
> confusion. Otoh, the dialog might quickly become intrusive...

Ignoring the indefinite :-/ timeline for QtDocks, I wonder if we should
be thinking about obsoleting these settings (and the split ratio one,
too).  As long as it works, and it already exists in free_layout, it
seems the "arrange the panes how you want and save the layout" approach
is simpler for all concerned.

Toggle split direction should (if it doesn't already) just call
free_layouts rotate all function.

Which, appropriately, has been relabeled "toggle split direction" in
the pane layout menu.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Unexected difficulties "remembering" toggle-split-direction

2017-05-09 Thread Edward K. Ream
On Tue, May 9, 2017 at 2:22 PM, Terry Brown  wrote:

​> ​
> Imo, the simplest and best approach is to do nothing.
​...​

​> ​
Implementation wise this will all need revisiting for the QtDocks
​ ​
interface
​.​

All the more reason to do nothing now.  In fact, I'll reject this proposal
unless Kent changes my mind :-)

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Unexected difficulties "remembering" toggle-split-direction

2017-05-09 Thread Edward K. Ream
On Tuesday, May 9, 2017 at 2:09:25 PM UTC-5, Edward K. Ream wrote:

> I have just updated #483: Remember toggle-split-direction 
. I want to repeat the 
discussion here, so as to reach the widest audience.
...
> Imo, the simplest and best approach is to do nothing. If you want Leo to 
"remember" your preferred orientation, then use the @string 
initial_split_orientation. You can put this in individual files or, more 
likely, myLeoSettings.leo.

Hmm. The first time a user chooses toggle-split-direction, Leo could put up 
a dialog tell the user about @string initial_split_orientation.

A dialog might be the only way to mitigate the unavoidable possible 
confusion. Otoh, the dialog might quickly become intrusive...

What say you?

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.