Re: Two toplevels in a glade file causes spurious warnings



Hi.

> No, I don't build the entire interface at one point.  In the first
> section, I build an interface that uses the first toplevel.  Later, I
> may (or may not) build an interface that uses the second top level.

If you use add_from_file() method, you're building entire GUI at once,
whether you like it or not. The only way of building only part of GUI
is to use add_objects_from_file() method.

> Unfortunately, I cannot use the gtk_builder_add_objects_from_file()
> method since I need to be compatible with version 2.12.  IIRC that
> method was added later on.

According to this, you'll need to split your GUI into separate files
if you don't want to recreate the whole GUI over and over again.

> Note that I am converting this work from a libglade interface to a
> gtk.builder interface.  libglade seems to handle the
> multiple-top-levels-in-one-glade-file thing a little easier, though
> that could just be my lack of understanding,

I never used libglade, since when I started using GTK+, GtkBuilder was
already preferred way of construction GUIs built with Glade, so I
cannot comment on that.

Tadej

-- 
Tadej Borovšak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com


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