Re: bonobo-conf questions



Jeroen Zwartepoorte wrote:

> On 03 Jul 2001 21:12:54 +0200, Dietmar Maurer wrote:
> > > - I've played with the example program that comes with bonobo-conf and
> > > i've changed it slightly so it uses bonobo-conf itself to generate the
> > > GUI. This GUI leaves a lot to be desired (ugly and unusable imo). I
> > > heard that's it's possible to have the BonoboControl itself return a
> > > GUI? Is this correct? If so, where do i need to look for this?
> >
> > Take a look at bonobo-conf/examples/evolution-calendar-config.c, this is
> > the proposed way to generate nice dialogs.
>
> I don't think you understand the question (or i didn't make myself
> entirely clear).

I should read my mails more carefully ;-)

> Consider this: you have an application that relies on bonobo components
> to display information (gnumeric, AbiWord, nautilus or gIDE). You don't
> know anything specific about the actual component (it might just be a
> component which supports a specific mime type).
> Example: in gIDE you can use several different controls to display/edit
> source code. You can either use the standard GTK+ text control or the
> bonobo-enabled scintilla control (or any other bonobo enabled editor
> component).
>
> You also want the user to edit the settings/properties of the component
> (show/hide line-numbers, font settings etc.). To access these properties
> you can use bonobo-conf. You also need a GUI to present these properties
> to the user. Here we have a problem: you can't create a custom gui since
> you don't know which editor components might be used. You can however
> use bonobo-conf to generate a GUI, but the default GUI is ugle &
> unusable.

The automatically generated GUI is mainly for test and prototypeing purposes.
It will never be nice an polished, that is simply impossible.

> Now for my question: i heard that bonobo-conf can query a BonoboControl
> for a GUI for the properties. Is this correct and if so, how is this
> done? Can you point me to some documentation/source code?

Ok, I think I understand the question now ;-)

What you need is a PropertyControl. The IDL is in
bonobo/idl/Bonobo_Control.idl.

A small demo is included in bonobo-conf/bonobo-conf/config-moniker-demo.c
(demo3). A BonoboConfigControl (bonobo-config-control.h) is the bonobo-conf
implementation of the PropertyControl interface. It should be possible to
aggregate such a BonoboConfigControl with your component. You can the query
the component for that interface. The dialog is build with
bonobo_preferences_new ().

Well, and there is also some documentation in bonobo-conf/doc/bonobo-conf.pdf
(the section about preferences dialogs).

- Dietmar











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