From: vanadiae Date: Thu, 24 Feb 2022 22:04:20 +0000 (+0100) Subject: builder: Clarify default "swapped" value when "object" is set for signals X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~344^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b4b185d53dab09ce50dab2f95fa109f385c37db2;p=gtk4.git builder: Clarify default "swapped" value when "object" is set for signals I encountered this issue where I casted user_data to my self type, but it showed me they were actually swapped when I set the "object" signal attribute. After checking the source code which confirms this, it is a good idea to properly document that convenient behaviour. --- diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 545699c45c..8b29eff605 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -153,9 +153,10 @@ * specifies the function to connect to the signal. * The remaining attributes, “after”, “swapped” and “object”, have the * same meaning as the corresponding parameters of the - * g_signal_connect_object() or g_signal_connect_data() functions. A - * “last_modification_time” attribute is also allowed, but it does not - * have a meaning to the builder. + * g_signal_connect_object() or g_signal_connect_data() functions. By + * default "swapped" will be set to "yes" if not specified otherwise, in the + * case where "object" is set, for convenience. A “last_modification_time” + * attribute is also allowed, but it does not have a meaning to the builder. * * If you rely on `GModule` support to lookup callbacks in the symbol table, * the following details should be noted: