Most of the GlobalConfigManager is gone!

54 views
Skip to first unread message

Edward K. Ream

unread,
Jun 24, 2022, 10:17:40 AM6/24/22
to leo-editor
PR #2692 contains a grand simplification of Leo's config code!

The GCM no longer sets ivars or specifies defaults. This eliminates a lot of code and data. More importantly, the GCM is no longer involved in policy questions. Rather than using g.app.config ivars, code throughout Leo calls c.config.get* to get settings.

More testings is needed, but I expect the ekr-config branch to be part of Leo 6.6.3.

Edward

Félix

unread,
Jun 24, 2022, 5:29:11 PM6/24/22
to leo-editor
oh, just posted under the closed pull request but since i discovered this thread exists on the forum i'll post it here instead: 

in leoGlobals, in the getBaseDirectory method, this should be a getString, not a getBool

base = c.config.getBool('relative-path-base-directory')

Félix

Félix

unread,
Jun 24, 2022, 5:49:59 PM6/24/22
to leo-editor
Continuing testing those changes, the little annoying "saving leoPyRef.leo changes the whole file by a lot" buglet came back.

Félix

tbp1...@gmail.com

unread,
Jun 24, 2022, 5:51:20 PM6/24/22
to leo-editor
This actually occurs in two places.

On Friday, June 24, 2022 at 5:29:11 PM UTC-4 Félix wrote:

Edward K. Ream

unread,
Jun 24, 2022, 10:37:21 PM6/24/22
to leo-editor
On Fri, Jun 24, 2022 at 4:50 PM Félix <felix...@gmail.com> wrote:
Continuing testing those changes, the little annoying "saving leoPyRef.leo changes the whole file by a lot" buglet came back.

I did notice the large diff, but there may have been quite a few "real" diffs recently.  I suppose I should investigate ;-)

Edward

Edward K. Ream

unread,
Jun 24, 2022, 10:39:54 PM6/24/22
to leo-editor
On Fri, Jun 24, 2022 at 4:51 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
This actually occurs in two places.

Thanks.  I missed one of the places the first time!

Edward

Félix

unread,
Jun 24, 2022, 10:45:02 PM6/24/22
to leo-editor
the context_menus that can be a property of g.app.config is not previously defined (at least as 'none') on  GlobalConfigManager, and is 'tacked on' unceremoniously in the doPopup method. (in leoConfig.js)

Félix

tbp1...@gmail.com

unread,
Jun 24, 2022, 11:48:47 PM6/24/22
to leo-editor
The Nav tab is my friend : )

Félix

unread,
Jun 25, 2022, 12:05:37 AM6/25/22
to leo-editor
found another one the getbool below should be getString in leoCommands.py 

base = c.config.getBool('relative-path-base-directory') 

Félix

Edward K. Ream

unread,
Jun 25, 2022, 9:11:45 AM6/25/22
to leo-editor
On Fri, Jun 24, 2022 at 11:05 PM Félix <felix...@gmail.com> wrote:
found another one the getbool below should be getString in leoCommands.py 

base = c.config.getBool('relative-path-base-directory') 

Fixed at faf92c1. I just now pushed it to devel.

Edward
Reply all
Reply to author
Forward
0 new messages