[Glade-users] GtkBuilder and Libglade status



Ok, first of all, I wouldnt officially say there is support for saving
in builder format
from glade, 3.5.x is the development series and I think we still have
3 good months
before a stable release. Albeit, initial support is there and some
glade files may
work.

On Fri, May 16, 2008 at 2:04 PM, Micah Carrick <email at micahcarrick.com> wrote:
[...]
Ultimately, I'm looking for known issues and status with saving to
GtkBuilder from glade and gtk-builder-convert, work arounds, and the
like. I'm hoping to get up to speed enough to help the people that are
trying to get into RAD with Glade but are scared by these errors. I
thought it would be good to jump into GtkBuilderConvert to stay up to
date, but perhaps it's better to change my tutorial to use Libglade?

I am hoping that gtk-builder-convert can be made completely
obsolete by the time we release Glade 3.6, I also dont want to encourage
people to use libglade so I would say I personally would rather not see
another tutorial about libglade, but that is up to you.

In either case, I would like to provide my readers with explanations as
much as I can and point them in the right direction to following the
status (related bug reports).

I'm using Glade 3.5.2, GTK+ 2.12.19, and Libglade 2.6.2 (using Python).

First, neither LibGlade nor GtkBuilder seem to like the <requires> tag
at the top of the file. I can't seem to find information on that. Is
that something that Libglade and GtkBuilder are going to support in the
future?

Libglade invented the <requires> tag, for purposes or requiring libglade modules
such as the libgnomeui module - I was under the impression that libglade was
not going to complain if I added a version="2.4" in the requires tag -
I also used
a separate tag to depict the required version of gtk+ specifically, since I knew
libglade would choke on that.

But anyway, we will have to change the way we save this data at least for
target versions of gtk+ <= 2.14 and probably be saving this info as comments,
since gtkbuilder also doesnt like unrecognized tags.

Also, if the required version tags dont work in libglade (dont they
?), please at least _file bugs_.
(can you believe were talking about documenting bugs in a tutorial,
but the developers were
not even notified that those bugs exist ? *cough*communication breakdown*cough*)

When saving as GtkBuilder, after deleting the requires tag, GtkMenuBar
widgets always seem to crash. Even when dropping a GtkMenuBar into a
GtkWindow without any other widgets, it crashes:

I have a series of patches to gtk+ pending for GtkMenu/GtkMenuItem support
(i.e. better construct property handling etc.), but I stalled on this
- I'm not sure
how much time I will have in this release cycle, there is a chance we
wont support
native GtkMenu structuring in this round, and try to only get
GtkUIManager running
instead.


"GtkWarning: Attempting to add a widget with type GtkMenu to a container
of type GtkMenuItem, but the widget is already inside a container of
type GtkWindow, the GTK+ FAQ at http://www.gtk.org/faq/ explains how to
reparent a widget."

When taking that same file but saved as a Libglade file and running
through gtk-builder-convert you get:

"UnboundLocalError: local variable 'child' referenced before assignment"

Which you can get around by removing any "use_stock" property from
GtkImageMenuItem widget, but then you don't get the stock icons
(https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/214267/comments/3)

Sounds like an awful lot of effort spent to document an unfinished
work, I really
wish people would spend this much effort to help finish the work.

Cheers,
                       -Tristan




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