From 8f4dc7012ef832b038777e88e8e37b051f524194 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 3 Dec 2013 17:15:14 -0500 Subject: [PATCH] gsignal: Signal connection ids are always > 0 if successful Note this explicitly so that people can rely on doing: if (mystruct->sigid > 0) g_signal_disconnect (mystruct->object, mystruct->sigid); https://bugzilla.gnome.org/show_bug.cgi?id=719809 --- gobject/gsignal.c | 6 +++--- gobject/gsignal.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gobject/gsignal.c b/gobject/gsignal.c index 831ded3..8c67bdd 100644 --- a/gobject/gsignal.c +++ b/gobject/gsignal.c @@ -2256,7 +2256,7 @@ g_signal_get_invocation_hint (gpointer instance) * * Connects a closure to a signal for a particular object. * - * Returns: the handler id + * Returns: the handler id (always greater than 0 for successful connections) */ gulong g_signal_connect_closure_by_id (gpointer instance, @@ -2315,7 +2315,7 @@ g_signal_connect_closure_by_id (gpointer instance, * * Connects a closure to a signal for a particular object. * - * Returns: the handler id + * Returns: the handler id (always greater than 0 for successful connections) */ gulong g_signal_connect_closure (gpointer instance, @@ -2408,7 +2408,7 @@ node_check_deprecated (const SignalNode *node) * used. Specify @connect_flags if you need ..._after() or * ..._swapped() variants of this function. * - * Returns: the handler id + * Returns: the handler id (always greater than 0 for successful connections) */ gulong g_signal_connect_data (gpointer instance, diff --git a/gobject/gsignal.h b/gobject/gsignal.h index 46721ca..d2457df 100644 --- a/gobject/gsignal.h +++ b/gobject/gsignal.h @@ -469,7 +469,7 @@ void g_signal_chain_from_overridden_handler (gpointer instance, * * The handler will be called before the default handler of the signal. * - * Returns: the handler id + * Returns: the handler id (always greater than 0 for successful connections) */ #define g_signal_connect(instance, detailed_signal, c_handler, data) \ g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) @@ -484,7 +484,7 @@ void g_signal_chain_from_overridden_handler (gpointer instance, * * The handler will be called after the default handler of the signal. * - * Returns: the handler id + * Returns: the handler id (always greater than 0 for successful connections) */ #define g_signal_connect_after(instance, detailed_signal, c_handler, data) \ g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_AFTER) @@ -500,7 +500,7 @@ void g_signal_chain_from_overridden_handler (gpointer instance, * The instance on which the signal is emitted and @data will be swapped when * calling the handler. * - * Returns: the handler id + * Returns: the handler id (always greater than 0 for successful connections) */ #define g_signal_connect_swapped(instance, detailed_signal, c_handler, data) \ g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED) -- 2.7.4