Re: What do I use instead of bonobo_arg_to_gtk?



Hi Martin,

On Sat, 2003-03-22 at 05:22, Martin Sevior wrote:
> A quick recap. We have made gtkwidget out of abiword. We have made a large 
> fraction of the commands one can give to abiword available via GtkArgs. 

	Sounds good to me - but for the fact that using GtkArgs in libbonobo
would add a Gtk+ dependency to a non-GUI library ;-) so we tend to use
GObject properties instead.

> For the Gnome 1.4 version of bonobo we made these available to the 
> remote via client by exporting them through gtk argument <=> bonobo 
> argument mapping like this on the AbiWord side.

	So - now you need to use bonobo-arg.h's mapping methods to convert
GValue's to BonoboArg's. All the mappers are still there.

	I suggest that instead you use:

void
bonobo_property_bag_map_params    (BonoboPropertyBag   *pb,
				   GObject             *on_instance,
				   const GParamSpec   **pspecs,
				   guint                n_params);

	Which will allow you to map a selected set of parameters.


> The example code distributed with libbonobo does not show how to do
> this. Feel free to include this example code (hacked as you wish) in
> the sample directory of libbonobo in the future.

	So; for reasons I don't understand, the porting guide fails to mention
libbonobo[ui]/changes.txt which details the changes from the last
versions. This contains:

bonobo-property-bag.[ch]:
	bonobo_property_bag_add_gtk_args is now called
	bonobo_property_bag_map_params and changed sig.
bonobo-arg.[ch]:
	bonobo_arg_from/to_gtk -> bonobo_arg_from/to_gvalue
	bonobo_arg_type_to/from_gtk -> bonobo_arg_type_to/from_gtype

	It's pretty stupid that these files are not mentioned; someone needs
moaning at, but I forget whom maintains the porting guides and have no
time just now.

	Your sample app looks ok; but when I ported to Gnome 2.2 I decided
(having seen much cut and paste of horribly written sample code) to have
no samples that are dubious ;-) OTOH, I'd be extremely happy to have
something based on this - turned into something that is generic, and not
Abi-word specific, in CVS.

	I was hoping glade-2 would provide a nice place to test out this sort
of thing; but for various reasons it isn't.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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