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

Jason picture Jason · Oct 19, 2011 · Viewed 8.5k times · Source

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?

Answer

Fabel picture Fabel · Nov 9, 2011

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.