Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

glade

gtk2

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?

like image 442
Jason Avatar asked Oct 19 '11 19:10

Jason


2 Answers

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.

like image 144
Fabel Avatar answered Nov 17 '22 16:11

Fabel


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.

like image 1
Future Avatar answered Nov 17 '22 16:11

Future