Hi,

>> Second changes way settings.conf is loaded and saved -
>> detailed description in patch. I ended up doing this, because I wanted
>> to add other simple thing I thought might be useful (checkbox for
>> "start fullscreen") - at least for me - so I needed to add entry to
>> settings.conf with it. When I added it, I noticed, that adding new
>> entry made it fail when I used dummyobj[name], because file
>> settings.conf was present but without field with name I needed, so I
>> either had to remove settings.conf, or change dummyobj[name] into
>> dummyobj.get(name, default). Second solution sounded better - but it
>> would work in different way (default values) than 3 already present
>> options, so I though - why not use get(name, default) for all options?
>> I also moved all settings into global list - and made load/save
>> iterate over it, it makes whole thing shorter and I think cleaner -
>> that way, adding new option can be done in single place with single
>> line - and no special changes to user-side .conf file should be
>> needed.
> This area is actually very work-in-progress. I want to get rid of the
> whole "interpret the settings file as python code", and move to a
> "real" settings file format. I have patches for this in my json_prefs
> branch: http://gitorious.org/~jonnor/mypaint/jonnors-clone/commits/json_prefs
> So unless there is an issue with those, I suggest that we just do that
> instead. The major potential issue is of course that it requires json
> support. Which means either Python 2.6 or one of the libraries listed
> in the first patch. Anyone think this is too problematic?

sounds good, I will pull it in use here and use in place on my patch,
will give you some test reports later :) One thing though, in helper -
wouldn't it be better to add one more except for ImportError and
inform user he have more than one options? Because if all fails, he
will see that only simplejson wasn't found, while some distros might
provide for example cjson or json and they would be easier to get. I
know, there is docs for such things, but not all read them so simple
runtime info might be good :) So how about something like `except
ImportError: raise ImportError("No JSON support found, install Python
2.6, CJSON, JSON or SimpleJSON")`?

Cheers,
Andrzej.

_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to