[compiz] Include option type in gconf schema

Ben Reeves zootreeves at gmail.com
Mon Nov 13 04:41:21 PST 2006


If it can't be stored in the schema, what if it was stored in a seperate
key. e.g. each key has another key with the same name %key_name%_option_type
(or something along those lines).

e.g.
/apps/compiz/general/allscreens/options/close_window_key  should also have
another key
/apps/compiz/general/allscreens/options/close_window_key_option_type =
"CompOptionTypeAction"

/apps/compiz/plugins/cube/screen0/options/skydome_gradient_end_color
/apps/compiz/plugins/cube/screen0/options/skydome_gradient_end_color_option_type
= "CompOptionTypeColor"

I would prefer not to use dbus because if anyone turns the plugin off (or it
fails) then the user will not be able to change the configuration to change
it back. However if dbus is the only option, mike could you possibly give me
an example of how I would retrieve the key type using your code. Thanks

On 11/13/06, Mike Dransfield <mike at blueroot.co.uk> wrote:
>
> Ben Reeves wrote:
> > I am writing a configuration front end for the compiz gconf plugin at
> > the moment, but it's proving harder than it should be because gconf
> > does not record what type of compiz option the key is. For example,
> > say i want a color picker for each color option the only way I can
> > tell with gconf if it is color  is if it has a # at the beginning, but
> > there could be string option which also have a # at the beginning so
> > is not reliable.
> >
> > My proposal is that the short_description of each gconf key should
> > contain the option type
>
> I think the solution for this is to wait until the dbus bindings
> support getting information about settings.  I have been working
> on this and have a rough solution which I have attached.
>
> Putting the type into the option description, or a seperate file seems
> like it would cause a lot of problems.  The short description is
> translated
> so that would cause bugs, it is also not straight forward for developers.
>
> The dbus patches are roughly my idea for how information about
> options can be got via dbus.  I wrote them so there is one getMetadata
> function which returns all the information about the option.  Your
> application should cache this information as often as possible.
>
> I think that the method should return a dictionary rather multiple
> return values.  I couldn't find how to create a dictionary so I stopped.
> If anyone knows how to do this (or even if I can just return multiple
> return values) I would like to know.
>
> Mike
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/compiz/attachments/20061113/97e3cec8/attachment.html


More information about the compiz mailing list