On Sat, Feb 25, 2012 at 3:54 AM,  <[email protected]> wrote:
> Can i change global settings in random .leo file?

Yes, if you really want to.  In the new config world,
lm.globalSettingsDict and lm.globalShortcutsDict are all you would
need to change.  The entries of lm.globalSettingsDicts are
GeneralSetting objects.  The entries of lm.globalShortcutsDict are
lists of ShortcutInfo objects.

But why would you want to do that?

Note that c.config.getX uses local dictionaries that are created when
the outline is loaded.  Changing the global dicts would have no effect
on previously loaded settings. Changing global dicts will only affect
the local dicts of .leo files loaded later.

There is actually a c.config.set method, so you *can* change local
settings after a .leo file is loaded.  But I doubt anybody ever uses
this code.

If you want details, please see the code for c.config.get,
c.config.set and g.app.config.get: they are a *lot* simpler than they
used to be.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to