What do I use instead of bonobo_arg_to_gtk?



Hi Folks,
	I'm having trouble transitioning to the new bonobo property 
system.

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

/*
 * Tell abiwidget to do something.
 */
static void set_prop (BonoboPropertyBag         *bag,
          const BonoboArg       *arg,
          guint                  arg_id,
          CORBA_Environment     *ev,
          gpointer               user_data)
{
        AbiWidget       *abi;
        g_return_if_fail (IS_ABI_WIDGET(user_data));
        abi = ABI_WIDGET (user_data);
//
// Have to translate BonoboArg to GtkArg now. This is really easy.
//
        GtkArg * gtk_arg = (GtkArg *) g_new0 (GtkArg,1);
        bonobo_arg_to_gtk(gtk_arg,arg);
//
// Can only pass one argument at a time.
//
        gtk_object_setv(GTK_OBJECT(abi),1,gtk_arg);
//
// Free up allocated memory
//
        if (gtk_arg->type == GTK_TYPE_STRING && GTK_VALUE_STRING
(*gtk_arg))
        {
                g_free (GTK_VALUE_STRING (*gtk_arg));
        }
        g_free(gtk_arg);
}

But this nice mapping has disappeared from gtk2 and bonobo-2. Is there a
similar set of maps buried somewhere that I haven't discovered yet or do I
have to write my own mappings?

Thanks in advance for any help.

Martin








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