[Telepathy-commits] [telepathy-gabble/master] Add _weak suffix to gabble_signal_connect
Will Thompson
will.thompson at collabora.co.uk
Thu Feb 19 03:42:57 PST 2009
---
src/media-channel.c | 16 +++++++++-------
src/util.c | 10 +++++-----
src/util.h | 2 +-
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/media-channel.c b/src/media-channel.c
index 6323be7..c727bba 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -2358,15 +2358,17 @@ create_stream_from_content (GabbleMediaChannel *chan, GabbleJingleContent *c)
g_ptr_array_add (priv->streams, stream);
- gabble_signal_connect (stream, "close", (GCallback) stream_close_cb, chan_o);
- gabble_signal_connect (stream, "error", (GCallback) stream_error_cb, chan_o);
- gabble_signal_connect (stream, "unhold-failed", (GCallback)
- stream_unhold_failed, chan_o);
- gabble_signal_connect (stream, "notify::connection-state",
+ gabble_signal_connect_weak (stream, "close", (GCallback) stream_close_cb,
+ chan_o);
+ gabble_signal_connect_weak (stream, "error", (GCallback) stream_error_cb,
+ chan_o);
+ gabble_signal_connect_weak (stream, "unhold-failed",
+ (GCallback) stream_unhold_failed, chan_o);
+ gabble_signal_connect_weak (stream, "notify::connection-state",
(GCallback) stream_state_changed_cb, chan_o);
- gabble_signal_connect (stream, "notify::combined-direction",
+ gabble_signal_connect_weak (stream, "notify::combined-direction",
(GCallback) stream_direction_changed_cb, chan_o);
- gabble_signal_connect (stream, "notify::local-hold",
+ gabble_signal_connect_weak (stream, "notify::local-hold",
(GCallback) stream_hold_state_changed, chan_o);
/* emit StreamAdded */
diff --git a/src/util.c b/src/util.c
index 5d49df3..1ab99f4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -984,7 +984,7 @@ user_data_destroyed_cb (gpointer ctx_,
}
/**
- * gabble_signal_connect:
+ * gabble_signal_connect_weak:
* @instance: the instance to connect to.
* @detailed_signal: a string of the form "signal-name::detail".
* @c_handler: the GCallback to connect.
@@ -999,10 +999,10 @@ user_data_destroyed_cb (gpointer ctx_,
* handlers in their finalizers.
*/
void
-gabble_signal_connect (gpointer instance,
- const gchar *detailed_signal,
- GCallback c_handler,
- GObject *user_data)
+gabble_signal_connect_weak (gpointer instance,
+ const gchar *detailed_signal,
+ GCallback c_handler,
+ GObject *user_data)
{
GObject *instance_obj = G_OBJECT (instance);
WeakHandlerCtx *ctx = whc_new (instance_obj, user_data);
diff --git a/src/util.h b/src/util.h
index 2c5d993..c581e49 100644
--- a/src/util.h
+++ b/src/util.h
@@ -81,7 +81,7 @@ LmMessageNode * lm_message_node_get_child_any_ns (LmMessageNode *node,
LmMessage *
lm_iq_message_make_result (LmMessage *iq_message);
-void gabble_signal_connect (gpointer instance, const gchar *detailed_signal,
+void gabble_signal_connect_weak (gpointer instance, const gchar *detailed_signal,
GCallback c_handler, GObject *user_data);
#endif /* __GABBLE_UTIL_H__ */
--
1.5.6.5
More information about the telepathy-commits
mailing list