The bug-1570 branch is ready for testing

65 views
Skip to first unread message

Edward K. Ream

unread,
Sep 9, 2020, 6:06:57 PM9/9/20
to leo-editor
This branch fixes #1570: tab pane disappears. PR #1660 describes the fix.

Please report any further problems. I plan to merge this branch into devel in a day or two.

Edward

Edward K. Ream

unread,
Sep 10, 2020, 10:10:24 AM9/10/20
to leo-editor
On Wednesday, September 9, 2020 at 5:06:57 PM UTC-5, Edward K. Ream wrote:
This branch fixes #1570: tab pane disappears. PR #1660 describes the fix.

Please report any further problems. I plan to merge this branch into devel in a day or two.

A recent rev fixes the AttributeError in the first fix. I've actually tested the new code ;-)  Please give it whirl.

Edward

Thomas Passin

unread,
Sep 10, 2020, 10:19:46 AM9/10/20
to leo-editor
I couldn't repo this bug in the current devel branch, so I didn't try with the bug-1570 branch.

Thomas Passin

unread,
Sep 10, 2020, 10:30:22 AM9/10/20
to leo-editor
Trying to repo this bug reminded my how terrible a new Leo installation (without any customization) looks, at least on Windows.  The text is blocky, too big, and rather ugly. I've attached two screenshots to illustrate.  I'm not going to say that my own customizations are the best, only that the default ones are unpleasant.  That's especially difficult for newcomers because it's so hard to know how to change it.  In fact, I couldn't really tell someone how myself because my MyLeoSettings.leo file has a mix of pre-QT and QT font settings and I don't know which ones don't do anything any more.
fresh_leo.png
my_leo.png

Brian Theado

unread,
Sep 10, 2020, 8:45:40 PM9/10/20
to leo-editor
As mentioned on github, the #1570 issue is fixed for me.

Onn the topic Thomas raised, the default pane sizing is especially bad for --use-docks. Not a huge deal because the panes can easily be dragged larger and smaller. This is what it looks like for me when I don't give a filename on the commandline (HOME=~/tmp/blank python launchLeo.py --use-docks):

image.png
Here's what it looks like if I try creating a new file:
HOME=~/tmp/blank python launchLeo.py --use-docks ~/tmp/blank/new.leo
image.png

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/788630cb-0426-43e0-9cc3-cc042bb10204o%40googlegroups.com.

Edward K. Ream

unread,
Sep 11, 2020, 7:14:14 AM9/11/20
to leo-editor
On Thu, Sep 10, 2020 at 7:45 PM Brian Theado <brian....@gmail.com> wrote:
As mentioned on github, the #1570 issue is fixed for me.

Onn the topic Thomas raised, the default pane sizing is especially bad for --use-docks.

This probably can't be fixed. However, opening a new file, setting the layout, and not saving the new file before closing Leo should set a new default for new files.

Edward

Thomas Passin

unread,
Sep 11, 2020, 2:08:28 PM9/11/20
to leo-e...@googlegroups.com

On Friday, September 11, 2020 at 7:14:14 AM UTC-4, Edward K. Ream wrote:


On Thu, Sep 10, 2020 at 7:45 PM Brian Theado <brian...@gmail.com> wrote:
As mentioned on github, the #1570 issue is fixed for me.

Onn the topic Thomas raised, the default pane sizing is especially bad for --use-docks.

This probably can't be fixed. However, opening a new file, setting the layout, and not saving the new file before closing Leo should set a new default for new files.

No, it does not do that.  It does use that new layout for the first file that it opens as a parameter on the command line.  But once open, a new outline from File/New does not use this layout but instead uses the default layout.

It seems to me that if Leo can save the layout when closing after you have adjusted a not-to-be-saved outline, then it must be possible to have a menu item "Save This Layout As the Default Layout".  We need that command.

Thomas Passin

unread,
Sep 11, 2020, 2:29:18 PM9/11/20
to leo-e...@googlegroups.com
[Added later]These remarks really ought to be on the simple-docks thread.  Sorry for bringing them in here.  Maybe we should start a new thread for startup issues including docks and appearance.

I forgot that the devel branch might have a different version of the newest docks code.  For the above remark, I was using

Leo Log Window
Leo 6.3-devel, devel branch, build 65ecc3ff0d
2020-09-09 18:48:47 -0400
Python 3.8.2, PyQt version 5.15.0
Windows 10 AMD64 (build 10.0.18362) SP0


At least with this version, the situation is even worse than I thought.  If you start Leo with --init-docks, it forgets the layouts that you have already set, even if those files had not been opened by Leo.  So actually, the only way you can get a set of outlines all open with your desired layout is to open Leo with --init-docks, adjust the layout of all of them, close Leo, then perhaps re-open it with --use-docks.

The next time you want to open another file, it will have the default layout (which is wrong), and so you will have to close and restart with --init-docks and fix the layout.  But now Leo will forget the layout for all your other Leo outlines - including the set you just fixed up earlier.

This is unworkable for practical use.

Edward K. Ream

unread,
Sep 12, 2020, 6:01:06 AM9/12/20
to leo-editor
On Fri, Sep 11, 2020 at 1:08 PM Thomas Passin <tbp1...@gmail.com> wrote:

opening a new file, setting the layout, and not saving the new file before closing Leo should set a new default for new files.

No, it does not do that.  It does use that new layout for the first file that it opens as a parameter on the command line.  But once open, a new outline from File/New does not use this outline but instead uses the default outline.

Thanks for your patience, Thomas. At last I understand your complaint. A straightforward fix should be possible.

Leo stores layouts in the cache, with path names as keys. Rather than using an empty ("") key for new files, which fails later as you explain above, new files should default, imo, to the layout of the first loaded .leo file.  By default, this will be workbook.leo when a user opens Leo without any file arguments.

I'll work on this next. With luck, the new code should be no more complex than the old. It might even be simpler.

Edward

Edward K. Ream

unread,
Sep 12, 2020, 6:03:34 AM9/12/20
to leo-editor
On Fri, Sep 11, 2020 at 1:08 PM Thomas Passin <tbp1...@gmail.com> wrote:

It seems to me that if Leo can save the layout when closing after you have adjusted a not-to-be-saved outline, then it must be possible to have a menu item "Save This Layout As the Default Layout".  We need that command.

I would like to avoid yet another command that newbies will have to know about in order to use docks. Imo, using the layout of the first loaded .leo file should "just work" in most cases.

Edward

Edward K. Ream

unread,
Sep 12, 2020, 6:06:59 AM9/12/20
to leo-editor
On Thu, Sep 10, 2020 at 9:30 AM Thomas Passin <tbp1...@gmail.com> wrote:

Trying to repo this bug reminded my how terrible a new Leo installation (without any customization) looks, at least on Windows.

I agree. I have just created #1663 for this.

Edward
Reply all
Reply to author
Forward
0 new messages