Re: GtkBuilder object dependencies

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

 



On Mon, Jan 23, 2012 at 4:37 AM, Element Green
<element@xxxxxxxxxxxxxxxxxxx> wrote:
> I'm currently porting my application Swami
> (http://www.swamiproject.org) from using libglade to GtkBuilder.  In
> this application widgets are created on demand, for which I'm using
> gtk_builder_add_objects_from_file().  One of the drawbacks of this
> function though, seems to be that it does not support loading of
> dependencies (GtkAdjustment, GtkModel, etc).  I'd like to have the
> dependencies automatically be loaded, rather than trying to keep a
> list of object dependencies in sync with the XML file.
>
> Do I need to resort to parsing the XML to determine dependencies at
> runtime?  Or does anyone know a way to handle this elegantly in GTK
> currently?  If not, perhaps it would be a good thing to add.  Could be
> handled with an additional function like
> gtk_builder_add_objects_from_file() which automatically loads
> dependencies or which calls a callback to resolve the dependency.

Easier than parsing xml, and generally better style than heaping
everything into the same xml file, would be to simply split up your
GtkBuilder xml into the fragments which you intend to load separately
and just load those files separately.

Cheers,
          -Tristan

>
> Thank you for any thoughts or information on this.
>
> Best regards,
>
> Element Green
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux