From: dsblank <db...@cs...> - 2007-11-27 13:58:23
|
Follow-up note: if you have used GRAMPS 3.0 prior to version 9401, then you should delete your ~/.gramps/keys.ini file. If you don't, then you will be running with some bizarre defaults on some keys, and GRAMPS will likely perform some functions incorrectly. -Doug dsblank wrote: > > Benny Malengier wrote: >> Yes fix it. > > Done, in trunk version 9401. > >> Gconf support is deprecated with 3.0, so we should upgrade once >> correctly and that's it > > Ok, thanks. > > -Doug > >> Benny >> >> 2007/11/25, Douglas S. Blank < db...@cs... >> <mailto:db...@cs...>>: >> >> Ok, I tracked down the issue and it appears to be a change in the way >> that gconf client works. It used to raise an exception when a key did >> not exist, but now it gives a default value. It appears that the >> correct >> way now to check for a key is to try to get it first: if it exists, >> it >> will return an object, else None. >> >> I'm not sure who maintains src/Config/_GrampsGconfKeys.py ... shall I >> fix it? >> >> -Doug >> >> Douglas S. Blank wrote: >> > I'm trying to fix a bug in writing default ini values, and am >> trying to >> > figure out the design. >> > >> > The bug is when writing a new keys.ini file, GRAMPS doesn't get >> the >> > default value from default_value but rather asks GconfKeys. The >> relevant >> > code from src/Config/__init__.py (with some debug): >> > >> > def __upgrade_gconf(): >> > import _GrampsGconfKeys as GconfKeys >> > print "Upgrading INI file" >> > for key in default_value.keys(): >> > print key, default_value[key], >> > data = GconfKeys.get(key) >> > print data >> > set(key, data) >> > >> > gives output like: >> > >> > ('interface', 'source-height', 1) 450 0 >> > ('interface', 'person-ref-width', 1) 600 0 >> > ('interface', 'name-width', 1) 600 0 >> > ('interface', 'note-width', 1) 700 0 >> > ('behavior', 'date-after-range', 1) 9999 0 >> > >> > so the default_value[key] is being ignored and replaced by a zero >> from >> > GconfKeys.get(key), and the resulting keys.ini has a bunch of >> zeros >> > (which affects code that depends on these keys). >> > >> > The big question is: what is the relation between Gconf and Ini? >> And the >> > specific question: what should be done here (and other places) to >> > respect the defaults of default_value? Thanks for any hints. >> > >> > -Doug >> > >> > >> >> ------------------------------------------------------------------------- >> >> > This SF.net email is sponsored by: Microsoft >> > Defy all challenges. Microsoft(R) Visual Studio 2005. >> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> <http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/> >> > _______________________________________________ >> > Gramps-devel mailing list >> > Gra...@li... >> <mailto:Gra...@li...> >> > https://lists.sourceforge.net/lists/listinfo/gramps-devel >> > >> >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Gramps-devel mailing list >> Gra...@li... >> <mailto:Gra...@li...> >> https://lists.sourceforge.net/lists/listinfo/gramps-devel >> >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Gramps-devel mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/gramps-devel > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Gramps-devel mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/gramps-devel > > -- View this message in context: http://www.nabble.com/Bug-in-gconf-ini-config-tf4870717.html#a13971300 Sent from the GRAMPS - Dev mailing list archive at Nabble.com. |