After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316651 - Saves invalid glade file (even for self)
Saves invalid glade file (even for self)
Status: RESOLVED FIXED
Product: Gazpacho
Classification: Deprecated
Component: saver
0.6.2
Other Linux
: Normal major
: ---
Assigned To: Gazpacho Maintainer(s)
Gazpacho Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2005-09-18 19:18 UTC by Gustavo Noronha (kov)
Modified: 2006-05-28 14:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gustavo Noronha (kov) 2005-09-18 19:18:56 UTC
Distribution/Version: Debian unstable

Frederic-Emmanuel PICCA <picca@synchrotron-soleil.fr> has reported a bug on the
Debian BTS (http://bugs.debian.org/311283) about gazpacho not being able to open
a glade file. At the latest version gazpacho is able to load the file but if you
save it the file will contain errors.

Download the attachment he sent on his bug report, open it on gazpacho, 'save
as' it and try to load it with gazpacho or use it with libglade. Gazpacho will
display a message saying 'project could not be loaded' because of parse errors.

These messages are displayed when saving:

/usr/lib/python2.3/site-packages/gazpacho/properties.py:486: GtkWarning:
gtktreeview.c:1283: invalid property id 5 for "headers-clickable" of type
`GParamBoolean' in `GtkTreeView'
  return gobj.get_property(cls.name)
/usr/lib/python2.3/site-packages/gazpacho/properties.py:430: GtkWarning:
gtktreeview.c:1283: invalid property id 5 for "headers-clickable" of type
`GParamBoolean' in `GtkTreeView'
  self._value = self._object.get_property(self.name)
/usr/lib/python2.3/site-packages/gazpacho/properties.py:477: GtkWarning:
gtktreeview.c:1283: invalid property id 5 for "headers-clickable" of type
`GParamBoolean' in `GtkTreeView'
  return self._object.get_property(self.name)

The thing on the glade file which caught my attention quickly was this:

                            <widget class="GtkEntry" id="entry_h">
                                <property name="text" context="yes"
translatable="yes">Project-Id-Version: Gazpacho 0.5
Report-Msgid-Bugs-To:
POT-Creation-Date: 2005-02-04 15:32+0100
PO-Revision-Date: 2005-07-02 10:02+0200
Last-Translator: Henrique Romano &lt;henrique@async.com.br&gt;
Language-Team: Brazilian portuguese &lt;henrique@async.com.br&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
</property>

I believe there's something really bad here... I tried running gazpacho with
other locales like en_US.UTF-8 and C but the toolbar kept coming in pt_BR and
this problem remained.

If I can have some more info gathered for you, please let me know which =).
Comment 1 Gustavo Noronha (kov) 2005-09-18 20:03:24 UTC
After some investigation it looks like the problem is the construtor for
'menubar1' not being found; I noticed this is the message used in the exception
that is raised:

constructor menubar1 for object initial-state could not be found

I could not find a way of getting this message without manually editing the code
and doing a print e when the exception is got at application.py; any hints for
my next try?

Anyway, that string looks wrong, I suggest to apply this:

Index: loader.py
===================================================================
--- loader.py   (revisão 1791)
+++ loader.py   (cópia de trabalho)
@@ -623,7 +623,7 @@
                 gobj = self._uimanager_construct(constructor, obj.id)
             else:
                 raise ParseError("constructor %s for object %s could not "
-                                 "be found" % (obj.id, obj.constructor))
+                                 "be found" % (obj.constructor, obj.id))
             self._constructed_objects[gobj] = self._widgets[constructor]
         else:
             gobj = adapter.construct(obj.id, gtype, construct)

Looks like it should be using UI Manager, and it correctly does this when
creating a new glade file instead of reading one made by glade and resaving.
Comment 2 Kalle Vahlman 2005-11-02 13:05:10 UTC
Few notes:

1) The glade file uses "old-style" menus, which Gazpacho does not support
(there's a bug about converting them to the UIManager style, see bug #304372)

2) The original reporter is trying to load the saved file with
libglade(-python), which in turn does not support the UIManager stuff (the menu
bar located in the original will be saved as UIManager object and Actions).

3) the headers-clickable error is known, and even fixed in trunk (by disbaling
the property at least for now).

4) The patch is valid, I've noticed the reversed arguments too.

Comment 3 Johan (not receiving bugmail) Dahlin 2006-05-28 14:33:14 UTC
I committed the patch. The rest is handled in other bugs.