The proposal to merge lp:~googol/openlp/central-settings-place into lp:openlp 
has been updated.

Description changed to:

Hello,

THERE is stil a problem with this branch. SEE the end of this description.

- fixed bug #1096559 (Central place for default settings)

I reworked the settings management. All core settings are now stored in the 
Settings class. The plugin settings are stored in the <my>plugin.py file. On 
start up the plugin settings are pulled in the central dict.

I also implemented a central dict to store old and replaced settings. This 
allows us to rename settings without losing the value saved. This allows even 
renaming a setting with uses ints (0/1) to e. g. a setting using bools 
(false/true).

Together with this rework I moved/splitted a few files.
Namely, I have moved the ScreenList class from openlp/core/ui to 
openlp/core/lib. When you look at trunk you'll see that in most cases the 
ScreenList was the only class imported from ui (indicating that it does not 
belong to ui). And basically the ScreenList is just like the ImageManager. It 
does not really display anything.
Furthermore, I splitted the ui.py file. Now we have a uistrings.py and ui.py 
file. While programming I noticed, that the UiStrings class does not require 
any module (other then the translate function).

In both cases (ScreenList and UiStrings) they caused import errors because 
importing them triggered other imports pointing to openlp.ui.Whatever; which 
then triggered the import of openlp.core.ui(.__init__) .

I hope that makes sense to you :)

PROBLEM:
In the SettingsManager we have "dynamic" settings. Something like this: (%s 
count).

First I decided to allow to pass the default value in the value() method. This 
wasn't nice. But then I realised that this won't work. Because this will again 
not work with the settings/importer (the importer/export then does not know the 
default values).

Then I looked at the SettingsManager class and currently I am thinking about 
removing it:
 - get_last_dir/set_last_dir will be converted to normal settings (e. g. 
songs/last_import_dir, songs/last_export_dir)
- load_list/set_list is a bit problematic. We either say a) we just remove 
these settings (users have to import their images again) or b) add some code to 
convert the old way to the new way (but this probably cannot be done with my 
new settings_migrate method, because that is just too complex).

For more details, see:
https://code.launchpad.net/~googol/openlp/central-settings-place/+merge/143418
-- 
https://code.launchpad.net/~googol/openlp/central-settings-place/+merge/143418
Your team OpenLP Core is subscribed to branch lp:openlp.

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to