Since we need an argument to distinguish between document and theme
relative paths, I'm using the absence of that argument to set legacy
mode. For absolute paths it doesn't make any difference. I just need to
test for absolute or relative.
The devil is, of course, in the details. I keep overthinki
You can add a new parameter to the method call, say use_legacy = True.
Then all existing code will work as always with the default value of
use_legacy. You add a new code branch for when use_legacy is False so you
can get what you want in that case. Tests for file existence will work
with re
I can kludge it, but it introduces some subtle but potentially nasty
bugs. It really needs to be fixed properly in the next major update.
I suppose adding a 'pathType' parameter to insertIconFromFile would
work. If the parameter is missing then it uses legacy mode and issues a
deprecation warn
I'm all in favor of improving features, but please find a way to make them
continue to work with existing code. It seems to me that the easiest way
to go about this would be to make the code fall back to a document or
outline-relative path if it can't find the icon files in the other standard
g.os_path_exists works with relative paths but
c.editCommands.insertIconFromFile forces relative paths to be relative
to the Leo theme directory. Document relative paths are rejected.
Running the following command from Leo's Python Console tab fails:
c.editCommands.insertIconFromFile('./icons/
On Mon, Jul 18, 2022 at 11:09 AM tbp1...@gmail.com
wrote:
> And the default was False anyway, but having it in leoSettings.leo at
> least means that someone might notice it there.
>
Yes. All official settings should be documented in leoSettings.leo.
Edward
--
You received this message becaus
And the default was False anyway, but having it in leoSettings.leo at least
means that someone might notice it there.
On Monday, July 18, 2022 at 12:03:06 PM UTC-4 Edward K. Ream wrote:
> To use the new feature, add a new node to the @settings tree in your
>> myLeoSettings.leo outline with this
In this Developer's Notebook, I want to share how I arrived at the new code
to place the "Chapters" dropdown at the left of the Iconbar instead of the
usual right. Mainly there are a couple of tricks that I have found useful
and would like to pass on to others who haven't come across them.
As
> To use the new feature, add a new node to the @settings tree in your
> myLeoSettings.leo outline with this text:
>
> @bool chapter-dropdown-left = True
>
Rev 2e1dbd9 adds `@bool chapter-dropdown-left = False` to leoSettings.leo,
retaining legacy operation by default.
Edward
--
You received th
With the new merge of the devel branch, you can locate the "chapters"
dropdown at the left of the Iconbar. This is useful if you use chapters a
lot, since it prevents the dropdown from being truncated off the end of the
toolbar when there are many script buttons, or the Leo window is narrow.
T
Typically, either you write code and try different paths depending on
whether your file is in one place or another, or a Leo method does the same
thing for you, in which case you need to know where Leo is going to look.
For example, in the part of the Cheatsheet you mention:
fn = g.os_
11 matches
Mail list logo