Re: bonobo-conf samples



On 02 Jul 2001 10:44:36 +0200, Dietmar Maurer wrote:
> Jeroen Zwartepoorte wrote:
> 
> > Hi all,
> >
> > I'm trying to figure out what needs to be done to configure a
> > BonoboControl using bonobo-conf. The example in bonobo-conf only deals
> > with static xml (xmldb: moniker) data. I'd like to know how to use the
> > config: moniker to access data.
> >
> > Example: take the bonobo clock control from the bonobo samples. If there
> > was an 12/24 hours system-wide property, how would i get/set this? I
> > would get it using the "config:clock/hours" moniker?
> 
> I have attached a small demo program (it is no part of the bonobo-conf
> package). I suggest to use the ConfigDatabase interface for the above case.
> The idea is that you must get a reference to the database first:
> 
>         db = bonobo_get_object ("config:", "Bonobo/ConfigDatabase", &ev);
> 
> You can then use the functions defined in bonobo-config-database.h to
> access values, for example:
> 
>         v = bonobo_config_get_long (db, "/test/example/test-long", &ev);
> 
> Does that help?

Yes, it does, thanks!

I do have some questions after reading the example:

- I'm getting the following warning: "GConfClient-WARNING **: haven't
implemented getting a specific locale in GConfClient" (i've installed
bonobo-conf-0.6 since that version doesn't yet require upgrading
libtool). I presume this has something to do with different languages?

- Why the different method name conventions? (bonobo_config_get_long and
Bonobo_Property_getValue). I read that Bonobo is for the general stuff
and bonobo for the GTK+ implementation, but the above methods are both
general type methods, right?

- The first time you run the example, there isn't any /test/example
PropertyBag or /test/example/test-long value. Are these automatically
created when you call bonobo_config_set_long in run_database_tests? I
assume these values get stored/persist once the example terminates?

Thanks,

Jeroen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]