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?

Jason
  • 11,709
  • 9
  • 66
  • 82
  • 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. – ptomato Oct 20 '11 at 10:15

3 Answers3

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.

Fabel
  • 1,711
  • 14
  • 36
  • This is what I ended up doing (I removed the attribute from the XML with a text editor). My application seems to run fine. – Jason Sep 20 '13 at 18:40
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.

Future
  • 388
  • 8
  • 21
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

whirlwin
  • 16,044
  • 17
  • 67
  • 98
  • I am having this problem with guake after upgrading to ubuntu 15.04. Where exactly do I make this change? – Totem May 02 '15 at 23:55
  • @Totem To find the file, follow this simple recipe: http://stackoverflow.com/a/12154601/490315 – whirlwin May 03 '15 at 10:37
  • 1
    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! – Totem May 03 '15 at 15:27
  • 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. – whirlwin May 03 '15 at 21:20