Re: Help! (Losing widget names)



On 20 Mar 2002 21:02:56 +0800
John Breen <locutus borg apana org au> wrote:

> On Wed, 2002-03-20 at 20:56, David Eduardo Gomez Noguera wrote:
> > On 20 Mar 2002 18:29:42 +0800
> > John Breen <locutus borg apana org au> wrote:
> > 
> > You are using glade, right?
> yes
> 
> > 
> > Glade uses gtk_object_data_set/get on the parent GtkWindow Widget with every widget that is inside it and its name. lookup_widget is just a glade function that uses gtk_object_data_get to get the widget back. So your function should update that information too.
> > 
> > 
> ok, but consider:
> 
> window1
> |
> +- frame1
>    |
>    +- clist1
> 
> window2
> 
> now, if i reparent frame1 to window2, so that i have
> 
> window1
> 
> window2
> |
> +- frame1
>    |
>    +- clist1
> 
> clist1 ALSO gets moved to window2.  I don't want to have to enumerate
> through all the children of frame1 setting all its childrens' names....
> 
> I Delphi/Kylix (Kylix uses QT), it doesn't lose object name
> properties....
> 

glade generates a file named support.c and support.h
see if there is any function that helps. (i dont know its content, but lookup_widget is defined there).
but i dont think so.
anyway, widget_lookup is something implemented by glade, not gtk. and this time you would only be updating info for two widgets.
If its a problem, it might be a good idea to ask and/or help glade developers make a wrapper (is this word used rright?) for reparenting widgets that does that too. (maybe its already there, but i dont know).
Check on glade site.

> cheers,
> 
> John Breen


-- 
ICQ: 15605359 Bicho
                                  =^..^=
First, they ignore you. Then they laugh at you. Then they fight you. Then you win. Mahatma Gandhi.
-------------------------------気検体の一致------------------------------------
暑さ寒さも彼岸まで。
恋にししょうなし。恋はしあんの他。
アン アン アン とっても大好き




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