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



On Tue, Nov 24, 2009 at 4:52 PM, Tristan Van Berkom
<tristan.van.berkom at gmail.com> wrote:
?- You can introduce stock icons using the GtkIconFactory object
available with GtkBuilder
?- The GnomeDateEdit missing displayable value reflects a missing
translatable string in Glade's backend
? ?(seems the GTK+ backend handles some gnome types possibly, for
some minor conversions at load time)
?- People generally use GtkTreeView for what they used to use GtkCList for

?- As far as "getting your Glade file to work", As I said, I removed
the <requires> line as I saw it was only
needed for the icon definitions and Glade
? ?did not crash - for your app to look normal; the "orientation"
property of every GtkOrientable widget
? ?must be set properly, google might find you a script for this as
its a common problem, or, you might
? ?write one and tell google about it, or somebody might just fix the
bug in GTK+.


Oops hit send prematurely but the letter was done, essentially considering
the shear size of your UI, converting it to use GtkBuilder will not be such
an easy task - you will at least have to understand GtkTreeView for instance...

Anyway good luck with your project,

  -Tristan





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

On Tue, Nov 24, 2009 at 4:39 PM, Tristan Van Berkom
<tristan.van.berkom at gmail.com> wrote:

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.

Yes, I was in fact aware of the fact that I had not used any gnome-specific
code. So I cannot really explain to myself why the glade 2 GUI builder had
placed the <requires lib="gnome"/> XML element in the XML file but I
guess glade 2 is history now so it's probably not worth fixing such bug.

Actually the reason might seem to be the fact that I have used some
gnome icons in the glade 2 XML file despite not using any actual widgets.
Here are the gnome icons from the glade 2 XML file which I seem to have
been using (seem like these icons correspond to the stock property):

stock property:
gnome-stock-text-numbered-list
gnome-stock-multiple-file
gnome-stock-mail-new
gnome-stock-about
gnome-stock-book-blue
gnome-stock-book-yellow
gnome-stock-book-red
gnome-stock-book-green

So, I'm not sure what the corresponding icons would be in
the most recent Gtk icons if any at all. But I guess this is
what I need to fix. Otherwise can I not just simply copy
these gnome icons to my source code tree and somehow
import them into glade-3 from there?

Otherwise what should I do? Should I just delete these lines
to get it to work? Because right now despite deleting the
<requires lib="gnome"/> tag I still get the segmentation
fault.

Plus I just don't understand what these complaints about
GnomeDateEdit which I don't see used within the glade 2
file are. And the names of the icons from the warnings do
not appear inside the glade 2 file either. I am confused.

I guess 4034 is just an error code (apart from the segfault).

-------------------------------------------------------------------------------------------------
GladeUI-Message: No displayable values for property GtkScaleButton::size
GladeUI-Message: No displayable values for property GtkImage::icon-size

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-sizegroup' was
found for object class 'GtkSizeGroup'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-accelgroup'
was found for object class 'GtkAccelGroup'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-adjustment'
was found for object class 'GtkAdjustment'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-uimanager' was
found for object class 'GtkUIManager'.

(glade-3:4034): GladeUI-WARNING **: No icon named
'widget-gtk-treemodelfilter' was found for object class
'GtkTreeModelFilter'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-treemodelsort'
was found for object class 'GtkTreeModelSort'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-treeselection'
was found for object class 'GtkTreeSelection'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-statusicon'
was found for object class 'GtkStatusIcon'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-textbuffer'
was found for object class 'GtkTextBuffer'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-texttag' was
found for object class 'GtkTextTag'.
GladeUI-Message: No displayable values for property GtkTextTag::direction

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-texttagtable'
was found for object class 'GtkTextTagTable'.

(glade-3:4034): GladeUI-WARNING **: No icon named 'widget-gtk-filefilter'
was found for object class 'GtkFileFilter'.
GladeUI-Message: 1 missing displayable value for
GnomeDateEdit::dateedit-flags
GladeUI-Message: No displayable values for property
GnomeIconList::selection-mode
Segmentation fault
-------------------------------------------------------------------------------------------------


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.

Yeah, maybe a script is needed, but since I don't really understand what
the replacements should be I am also not sure about how to write such
script.


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).

So what do I use in place of GtkCList or CList?


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.


Thank, I will have a look at these as well, but what other modifications
did you make to the glade file to get it to work?

Thanks,

Saku Masukita






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