[Glade-devel] please help: bug: glade2 file conversion to glade3 failed



On Tue, Nov 24, 2009 at 2:06 PM, Saku Masukita
<sakumasukita at googlemail.com> wrote:


On Mon, Nov 23, 2009 at 4:41 PM, Tristan Van Berkom
<tristan.van.berkom at gmail.com> wrote:

On Mon, Nov 23, 2009 at 2:29 PM, Saku Masukita
<sakumasukita at googlemail.com> wrote:

Well, apparently the script comes from a package
called libglade2-dev as the following output shows:

$ dpkg-query -S /usr/bin/libglade-convert
libglade2-dev: /usr/bin/libglade-convert


Thats an old conversion script to convert files from
Glade 1 format to a format readable by libglade.

By now libglade is ?deprecated and people are migrating
to GtkBuilder (which essentially does what libglade did,
except has some advantages such as doing it natively
from the GTK+ widget code).


OK so that might as well mean that I can uninstall libglade
completely from my Ubuntu 9.04 Linux system.

Not exactly, it means that eventually this can be the case
and it will be phased out, but surely there is plenty of code
still using libglade on your system.



You dont need a conversion tool to load a file created
with Glade 2, in Glade 3 - just open the file in Glade 3.

You will encounter a bug where everything seems horizontally
oriented (because the file was created with Glade 2 in an
old version, it wont output the orientation property needed
to tell VBoxes that they need to be vertical, sorry about that).

Too bad this could not have been fixed in the code.
?What are the reasons for it not working out of the box?
Are there some widget property incompatibilities?

Yes the full description is here:
   https://bugzilla.gnome.org/show_bug.cgi?id=587256



libgnomeui is an old library that does lots of gnome specific
stuff, it pulls in lots of dependencies you dont want to build
nowadays and most of the widgets if not all, have equal
coverage in GTK+ by now (i.e. its another old and deprecated
widget library).


OK so it looks like I will be uninstalling libgnomeui as well.
I never liked the idea of gnome-specific widgets which cannot
then be ported to other platforms anyway.

You can at least start by loading the file in Glade, fixing
the orientation property where you need to (search vbox
in the search entry should help), then convert it to GtkBuilder
(use the project preferences dialog) and see what deprecated
widgets dissapear in the conversion - should give you an idea
of what widget types you need to replace to move on to GtkBuilder.


Looks like I am going to have to learn how to use GtkBuilder
to port my C code which worked with glade 2 code to C code
that works with glade 3.

Yes, generally that just means replacing calls to glade_xml_new()
with gtk_builder_add_from_file(), and then glade_xml_get_widget()
with gtk_builder_get_object() (i.e. the api is very small).

The bulk of your work to use GtkBuilder would be to get rid
of the gnome widgets essentially, which is something you
would want to do anyway for new code.


Obviously something needs to be done for me to be able to open the
file with glade-3, but I am not sure exactly what. Any ideas?

The warnings are normal (as we actually need people to contribute
artwork for those missing icons), the segfault I cant tell by looking into
your file, but I was able to do something with it.

After looking at the segfault (which I didnt reproduce because I didnt
build the gnome catalog here...) I found that you do not use any gnome
widgets (good first of all for you), only gnome stock icons.

So, after removing the <requires/> line from your Glade file I loaded
up with no segfault, but horizontally.

To fix the horizontalness, I'm not sure if someone attached a script
to the bug that does that (since your file is considerably large and
a PITA to fix by hand), fixing it by hand means fixing the orientation
property of each vbox/vpaned etc in the project.

I got a bunch of errors from CList, seems support for CList somehow
got broken in Glade, however your file still seems to load and save ok,
Im not sure whats going on with your CList children (ofcourse you will
have to drop deprecated GtkCList anyway to move on to GtkBuilder).

In terms of litterature I think there is not much, its better for you to
stick with some tutorials, reference manuals, the source and irc I
would think.

Cheers,
       -Tristan




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