That did it! And I had to place it under @commands. Have my Leo back again, 
thanks a lot!

On Monday, December 16, 2024 at 6:20:37 AM UTC+1 [email protected] wrote:

> I did some testing, and it seems that the layout command names do have to 
> start with "layout-". The prefix doesn't have to be included in the @string 
> qt-layout-name settings node. I don't know if my memory was faulty or if 
> the code was intended to adapt to a lack of the "layout-" prefix but it 
> doesn't.  I'll take a look soon.  Anyway, just prefix your layout command 
> name with "layout-" and all should be well.
>
> The prefix is only needed by the code that applies the default layout. You 
> could add a new layout command to a custom menu and it would not have to 
> start with the prefix.
>
> On Sunday, December 15, 2024 at 4:34:59 PM UTC-5 Thomas Passin wrote:
>
> You do need to restart Leo. If you did that (I imagine you did), I'm not 
> sure.  I don't think the @string qt-layout-name node needs to be an 
> immediate child of @settings.
>
> All the built-in layouts have names that begin with "layout-", like 
> "layout-vertical-thirds".  The prefix isn't required in the setting since 
> the code supplies it if it's not present. 
>
> Your new command should be available through the minibuffer.  Try it out 
> there.  It should work regardless of the name.  When I tested the code I 
> posted, I did start its name with "layout-". So add that as a prefix to 
> your command's name try that and see if it will apply automatically after a 
> reboot.  If not, I could revisit the code to make sure that part is working 
> as intended.
>
> If your layout command is not present in the minibuffer, then make sure 
> its @command node is a child of an "@commands" node.  I don't remember if 
> that's needed for Leo to add it to the collection of commands, but that's 
> how I've been doing mine. IOW, you want a node structure like
>
> @settings
>     @commands
>         [Optional organizer nodes]
>             @command windowlayout-mine
>
> BTW, I recommend starting your layout's name with "layout-" even if it 
> isn't necessary.  It will make it easier to find via mini-buffer tab 
> completion after you have forgotten its name.
> On Sunday, December 15, 2024 at 3:01:11 PM UTC-5 [email protected] wrote:
>
> Doesn't work somehow. Here is what I did:
>
> In MyLeoSetting.leo:
>
> - Created a node @settings/Common @command nodes/@command windowlayout-mine
> - Copied your code into the node's body.
> - In @settings/Qt Gui Misc settings added the node @string qt-layout-name 
> = windowlayout-mine
>
> What have I forgotten?
>
>
> On Sunday, December 15, 2024 at 7:04:42 PM UTC+1 [email protected] wrote:
>
> We don't have a standard layout line that at present.  The new layout 
> system makes it very easy to create new layouts like yours.  Here's a 
> layout command that will create your layout.  You can put it into an 
> @command node in myLeosettings.leo. Then make it the default layout by 
> adding a settings node @string qt-layout-name = your-special-layout. Use 
> the actual name for your layout command instead of 'your-special-layout'.
>
> Maybe I should write a tutorial on creating new layouts...
>
> from leo.core.leoQt import Orientation
>
> VRX_PLACEHOLDER_NAME = 'viewrenderedx_pane'
> LAYOUT = {
>     'SPLITTERS': dict(
>             (('outlineFrame', 'main_splitter'),
>             ('bodyFrame', 'secondary_splitter'),
>             ('logFrame', 'secondary_splitter'),
>             ('secondary_splitter', 'main_splitter'),
>             (VRX_PLACEHOLDER_NAME, 'main_splitter')
>             )
>         ),
>     'ORIENTATIONS': {
>         'secondary_splitter': Orientation.Vertical,
>         'main_splitter': Orientation.Horizontal
>     }
> }
>
> dw = c.frame.top
> cache = dw.layout_cache
> cache.restoreFromLayout(LAYOUT)
>
> On Sunday, December 15, 2024 at 12:35:27 PM UTC-5 [email protected] wrote:
>
> My window layout used to be:
> Main split vertical.
> Left hand side pane: Outline pane going from top to bottom.
> Rite hand side: Body pane on top, logging etc. pane below (so a horizontal 
> split devides the rite hand side window).
>
> No, after upgrading to 6.8.3 the split is horz: 
> Bottom, reaching from left to rite: Body pane.
> Top, split by a vert split: Left hand side: Outline pane; rite hand side: 
> Log etc. pane.
>
> How can I change this back to the layout I'm used to for ages now? I 
> couldn't find any setting for this.
>
> Cheers
> Paul
>
> P.S.:
> Old and desired layout:
> outline  |  body
> outline  |  --------
> outline  |  log
>
> New and undesired layout:
> outline   |     log
> -----------------------
> outline outline
>
>

-- 
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 view this discussion visit 
https://groups.google.com/d/msgid/leo-editor/f49b638f-a2b7-4258-bab6-1ab3b8b2de05n%40googlegroups.com.

Reply via email to