xfconf data type quesions

Nick Schermer nickschermer at gmail.com
Fri Oct 12 09:47:53 CEST 2007


2007/10/12, Brian J. Tarricone <bjt23 at cornell.edu>:
> Personally, I prefer not to store numeric data as strings, but I guess
> this is OK, and it's technically less code (well, ignoring the fact that
> you have call to an expensive function in there).  And   Obviously you'd
> have to do error checking in either case (for the int array, make sure
> there are actually 3 elements; for the html string, make sure the string
> is valid).

I think it's better to use the already existing functions here for
parsing the color, since you have to look at the screen's colormap,
error check is done for you and although converting the string into a
color might be expensive, i double it's slower then reading 3 numeric
values (that have to be converting in numbers too).
And with the _regedit_ editor in mind, hexadecimal numbers are
obviously colors (although we could add a color chooser if we use a
new type for colors, meh...)

Nick



More information about the Xfce4-dev mailing list