new object, with variables



heyy,

@ the moment i trying to make an object inherited from GTK_ACTION,
this all is managed.
Only now i'm trying to initialize the object with an variable,  a
struct. Ie read the manual about the wrapper that is used, only i
can't seem
to find a way in which i can add the struct to g_object_new or otherwise.

to be clear, in this function:
GtkAction*
menu_action_new (const gchar *name,
                 const gchar *label)
{
        GtkAction* action;
        _thunar_return_val_if_fail (name != NULL, NULL);
        _thunar_return_val_if_fail (label != NULL, NULL);

        action = g_object_new (MENU_TYPE_ACTION,
                                           "hide-if-empty", FALSE,
                                           "label", label,
                                           "name", name,
                                           NULL);               
        return action;
}

i want to add the struct so i don't need any get of set functions, is
this possible?

the thing i want to do is to init :
  menu_thing    *item;
in:
struct _MenuTemplatesAction
{
  GtkAction             __parent__;
  menu_thing    *item;
};

I hope this enough info to get me close to an answer


-- 
Kees



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