summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanadiae <vanadiae35@gmail.com>2022-02-24 23:04:20 +0100
committervanadiae <vanadiae35@gmail.com>2022-02-24 23:04:20 +0100
commitb4b185d53dab09ce50dab2f95fa109f385c37db2 (patch)
treee602716387d3eb5b6edef16e29e281e3dff8b74d
parent617deb8bb6cd375833517464a1ba0d2220c4266c (diff)
downloadgtk+-b4b185d53dab09ce50dab2f95fa109f385c37db2.tar.gz
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.
-rw-r--r--gtk/gtkbuilder.c7
1 files changed, 4 insertions, 3 deletions
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: