[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: root windows
From:       Maciej Katafiasz <ml () mathrick ! org>
Date:       2005-05-26 13:44:08
Message-ID: 1117115048.13114.24.camel () megumi
[Download RAW message or body]

Dnia 26-05-2005, czw o godzinie 14:33 +0100, y g napisał:
> > > Unless by "build of glade" you mean autogenerated C code, which is
> > > bad,
> > > bad, bad thing to use. Use libglade, really.
> > why it is bad? I use it and it works just fine and I don't have glade
> > dependiencies.
> thank you both for your replies and correcting me.... toplevel windows
> and glade autogenerated c code is what i have at the moment... about
> the argument if autogenerated code is a bad thing.... well i dont have
> much experience but i am starting to struggle a little bit now the
> application is growing... but it really depends on what you wanna do i
> guess...

I'd say refactor it to use libglade now, while it's still not too big.
It'll only get worse later.

> > > autogenerated glade code it's easy to do, check inside one of the
> > > files
> > > generated will be function glade_get_widget_by_name() or something
> > > similar, which works like glade_xml_get_widget ().
> > it's lookup_widget declared in support.h
> > 
> 
> it is indeed, however let me redescribe the scenario a bit more
> correctly this time... let's say i have two toplevel windows win1 and
> win2, one visible and hidden, each window has one button which when
> pressed hides the current window and shows the other. my problem is
> that on the callback looks like button1_onclicked (GtkWidget,
> gpointer) the button pressed is passed as a parameter and i can use
> lookup_widget to retrieve the toplevel window (or any other widget in
> the window) but i don't know how to retrieve the pointer to the other
> window...

Doesn't GtkWidget *win1 = lookup_widget("win1") work? If not, then pass
win1 as user_data param to g_signal_connect().

Cheers,
Maciej

-- 
Maciej Katafiasz <ml@mathrick.org>

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic