xfconf data type quesions
Alexandre Moreira
alexandream at gmail.com
Fri Oct 12 17:52:12 CEST 2007
On 10/12/07, Nick Schermer <nickschermer at gmail.com> wrote:
> 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...)
I am really not sure if my idea is a good one, but I'll throw it: even
If you guys are planning on having a regedit-like editor, I don't
believe the types should be defined with that in mind, to allow it to
operate on a type in a different way or whatever. I think it would be
better to have a separate attribute to the config entries, like
"type-hint" or something like that, which the editor could use, but
would be useless to the applications.
That way we could have a string with a typehint="filename", and the
editor could pop a file chooser dialog for it, and so on.
One thing, though, is that I believe the editor would benefit most
from a scheme (to give users an advanced interface, with more
information and to handle things like enumeration options). But, as I
already know the consensus here is that we shouldn't have one in
xfconf, I'll just shut up :)
Best Regards,
Alexandre Moreira.
>
> Nick
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce4-dev
>
More information about the Xfce4-dev
mailing list