Re: bonobo-conf samples



Jeroen Zwartepoorte wrote:

> 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?

This is a feature not implemented in GConf, but it doesn't matter. I will
disable it so that it doesn't show that warning.

> - 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?

Bonobo_Property_getValue is the CORBA method and uses CORBA_any. The
corresponding C-wrapper is bonobo_config_get_value(). The bobono_config_*
function are only convenient wrapper function (Well, the whole thing is designed
for Gnome 2)

> - 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?

yes

> I assume these values get stored/persist once the example terminates?

Yes, take a look at ~/.gconf/test/example/%gconf.xml

- Dietmar





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