How do I fix the "unknown attribute `swapped'" warnings from libglade?
Asked Answered
R

3

6

libglade was updated and my old Glade xml file has these "swapped" attributes for signals. These attributes generate the following warnings when the file is loaded:

libglade-WARNING **: unknown attribute `swapped' for <signal>.

How do I fix these warnings? Can I just remove the swapped attribute, or will that cause a problem?

Redblooded answered 19/10, 2011 at 19:54 Comment(1)
Sounds like a bug. You should report it at bugzilla.gnome.org. Removing them will probably cause a problem. Do note also that libglade is obsolete, you should use gtk-builder-convert to convert your Glade file to a GtkBuilder file, and use GtkBuilder instead.Cancan
M
3

The "swapped" attribute has not been used by any resent version of glade (the interface builder). Newer versions of libglade assumes that the emitter of the signal and the data should be swapped if (and only if) there is an "object" attribute present. If the signal handlers assume otherwise there will be problems. Hopefully (and most likely) the "swapped" attribute is only redundant information and only occurs together with the "object" attribute (check your glade files to see if this is true). In that case you can safely remove it and never think of it again. Otherwise it would have been very bad idea to remove support for it and a quite critical bug in libglade.

Mitinger answered 9/11, 2011 at 3:30 Comment(1)
This is what I ended up doing (I removed the attribute from the XML with a text editor). My application seems to run fine.Redblooded
B
1

libglade warning is still here, when running Guake 0.5.0 from terminal in Ubuntu Gnome 15.04 Vivid Vervet

(guake:1917): libglade-WARNING **: unknown attribute `swapped' for <signal>.

As Totem said, the change is already made in /usr/bin/guake.

However, this bug is fixed in guake-0.5.1 and above versions, as stated here ( https://bugs.mageia.org/show_bug.cgi?id=15306 )

You can download the latest deb 0.7.2 from http://ppa.launchpad.net/webupd8team/unstable/ubuntu/pool/main/g/guake/


Edit:

Indeed, the warning is gone in 0.7.2, but a newer one appeared, when running guake in terminal:

INFO:guake.guake_app:Logging configuration complete /usr/lib/python2.7/dist-packages/guake/guake_app.py:1625: GtkWarning: gtk_box_pack: assertion 'child->parent == NULL' failed self.mainframe.pack_start(self.mainframe, expand=True, fill=True, padding=0)

Also when guake is invoked, the following error popsup:

/usr/lib/python2.7/dist-packages/guake/guake_app.py:722: GtkWarning: IA__gtk_window_set_type_hint: assertion '!gtk_widget_get_mapped (GTK_WIDGET (window))' failed self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) /usr/lib/python2.7/dist-packages/guake/guake_app.py:723: GtkWarning: IA__gtk_window_set_type_hint: assertion '!gtk_widget_get_mapped (GTK_WIDGET (window))' failed self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_NORMAL)

But of course, this is another discussion.

Bremerhaven answered 11/6, 2015 at 3:58 Comment(0)
A
0

I had the same problem with an outdated (I think) version of Guake, but this quickfix was fairly simple, as described here:

https://github.com/Guake/guake/commit/76679c889ac7bfe69dc7081db826f38b10ea5448

Afterlife answered 2/1, 2015 at 23:43 Comment(4)
I am having this problem with guake after upgrading to ubuntu 15.04. Where exactly do I make this change?Discontinuity
@Discontinuity To find the file, follow this simple recipe: https://mcmap.net/q/53023/-how-to-retrieve-a-module-39-s-pathAfterlife
I actually found it in the end. It was in the file /usr/bin/guake. I didn't expect to be able to read this files source, but I could. The GconfHandler class was there, and, unfortunately, the change was already made, so that wasn't my problem. Didn't know about the inspect module though, thanks!Discontinuity
Sorry to hear that it didn't work. In my case the Python executable was in some seemingly random location, so I had to locate it somehow.Afterlife

© 2022 - 2024 — McMap. All rights reserved.