[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdelibs/kdeui
From:       Benjamin Meyer <ben () meyerhome ! net>
Date:       2003-06-30 21:38:39
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 30 June 2003 1:25 pm, Waldo Bastian wrote:
> On Monday 30 June 2003 18:34, Benjamin Meyer wrote:
> > CVS commit by bmeyer:
> >
> > Fixed existing default config bug: delete->revert
> >
> >
> >   M +12 -4     kautoconfigdialog.h   1.26
> >   M +8 -6      kcolordialog.cpp   1.101
> >   M +4 -4      kmainwindow.cpp   1.108
> >   M +7 -7      ktoolbar.cpp   1.347
>
> I don't think these changes are correct.

Well this whole past week has caused me to have to re-think what I originally 
though about KConfig and the global configs(). Which in turn brought to light 
some assumptions that I shouldn't have made.

All of the config work that I had done needs to be modified to properly work.
Once you add the hasDefault() function when it comes time to save a setting I 
will change the code to do the following

KEY:
binaryDefault - default value located in the binary
value - current value of entry;

Sudo Code snipit for one entry:

(!hasDefault() && value == binaryDefault) ? revertEntry(value) : 
writeEntry(value);

Here is my little list showing that is should work for all 8 possible options:
V=value
BD=BinaryDefault
GD=GlobalDefault

              Has
         Default Entry
V == BD | 0 | revert
V != BD | 0 | write
V == GD | 0 | write
V != GD | 0 | write
V == BD | 1 | write
V != BD | 1 | write
V == GD | 1 | write (but kconfig reverts it because it is the same as GD)
V != GD | 1 | write

Do you see any problems in this?

- -Benjamin Meyer

- -- 
Public Key: http://www.csh.rit.edu/~benjamin/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/AK3f1rZ3LTw38vIRAv3aAKCu/5uPl9cz8LcEWG9px3VO3iTp4wCdHLDd
dgzF7Aqnsu5VSZB121811Ow=
=uRAw
-----END PGP SIGNATURE-----

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic