FYI: Rev 4975 contains many disabled changes

1 view
Skip to first unread message

Edward K. Ream

unread,
Feb 11, 2012, 9:40:52 PM2/11/12
to leo-editor
This code should be safe enough, but please use caution.

The rest of the post is the checkin log:

Lots of preliminary work aiming at reading files & settings once per
file.

These changes should be safe enough, because of the switches in
leoGlobals.py.
All unit tests pass, and pylint is happy except as noted below.

LeoGlobals.py:

- Added new g.new_imports, g.new_load, and g.new_modes switches.
These switches are my way of protecting the trunk against dangerous
code:
all new code is disabled when these switches are False.

LeoApp.py:

- Added unused LogManager and LoadManager classes.
The LoadManager class will remove almost all top-level code from
runLeo.py.
The LoadManager class will be the backbone of the new configuration
and loading code.
pylint reports numerous problems with these classes. That' not
important now.

- Grouped g.app ivars by function, preparatory to migrating them to
new classes.

- Added new init method to be called by the LoadManager class.

- Replaced a section by computeWindowTitle method.

leoEditCommands.py:

Added EditCommandsManager class to leoEditCommands.py.
The new code is enabled: g.new_imports is True.
This eliminate the odious module-level classesList var.

leoConfig.py:

- Added unused readGlobalSettingsFiles method & several other methods.
These will probably migrate to the LoadManager class.

leoKeys.py:

- Added unused ModeController and ModeInfo classes,
disabled by the g.new_modes switch.
More work is needed, but these new classes promise to clarify the
code greatly.

runLeo.py:

- Added disabled code that lets g.app.loadManager do *all* the work of
initing Leo.
Eventually, the leoBridge module might use the LoadManager class as
well...

qtGui.py:

- Removed the unused g.app.pythonFrame var.

unitTest.leo:

- Changed the unit test that checks for official ivars: several were
removed.

Edward
Reply all
Reply to author
Forward
0 new messages