telepathy-gabble: muc-channel: remove ::appeared signal, replace with is_respawning check
Jonny Lamb
jonny at kemper.freedesktop.org
Tue Aug 28 06:19:34 PDT 2012
Module: telepathy-gabble
Branch: master
Commit: 5c8c83a0637f3c44d7e608372454b6aa6410b032
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=5c8c83a0637f3c44d7e608372454b6aa6410b032
Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date: Fri Jul 20 12:44:15 2012 +0100
muc-channel: remove ::appeared signal, replace with is_respawning check
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
src/muc-channel.c | 11 -----------
src/muc-factory.c | 19 ++++++++-----------
2 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/src/muc-channel.c b/src/muc-channel.c
index 384324f..79e322f 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -125,8 +125,6 @@ enum
NEW_CALL,
#endif
- APPEARED,
-
LAST_SIGNAL
};
@@ -1244,14 +1242,6 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class)
* wants a value type, not an interface. */
G_TYPE_NONE, 1, TP_TYPE_BASE_CHANNEL);
- signals[APPEARED] = g_signal_new ("appeared",
- G_OBJECT_CLASS_TYPE (gabble_muc_channel_class),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
#ifdef ENABLE_VOIP
signals[NEW_CALL] = g_signal_new ("new-call",
G_OBJECT_CLASS_TYPE (gabble_muc_channel_class),
@@ -3060,7 +3050,6 @@ _gabble_muc_channel_receive (GabbleMucChannel *chan,
{
DEBUG ("making MUC channel reappear!");
tp_base_channel_reopened_with_requested (base, FALSE, sender);
- g_signal_emit (chan, signals[APPEARED], 0);
}
/* let's not autoclose now */
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 60f5f2e..1262d7e 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -237,6 +237,14 @@ muc_channel_closed_cb (GabbleMucChannel *chan, gpointer user_data)
TpBaseChannel *base = TP_BASE_CHANNEL (chan);
TpHandle room_handle;
+ /* channel is actually reappearing, announce it */
+ if (tp_base_channel_is_respawning (base))
+ {
+ tp_channel_manager_emit_new_channel (fac,
+ TP_EXPORTABLE_CHANNEL (chan), NULL);
+ return;
+ }
+
if (tp_base_channel_is_registered (base))
{
tp_channel_manager_emit_channel_closed_for_object (fac,
@@ -255,16 +263,6 @@ muc_channel_closed_cb (GabbleMucChannel *chan, gpointer user_data)
}
static void
-muc_channel_appeared_cb (GabbleMucChannel *chan,
- gpointer user_data)
-{
- GabbleMucFactory *fac = GABBLE_MUC_FACTORY (user_data);
-
- tp_channel_manager_emit_new_channel (fac,
- TP_EXPORTABLE_CHANNEL (chan), NULL);
-}
-
-static void
muc_ready_cb (GabbleMucChannel *text_chan,
gpointer data)
{
@@ -501,7 +499,6 @@ new_muc_channel (GabbleMucFactory *fac,
"initially-register", !needed_not_wanted,
NULL);
- g_signal_connect (chan, "appeared", (GCallback) muc_channel_appeared_cb, fac);
g_signal_connect (chan, "closed", (GCallback) muc_channel_closed_cb, fac);
g_signal_connect (chan, "new-tube", (GCallback) muc_channel_new_tube, fac);
#ifdef ENABLE_VOIP
More information about the telepathy-commits
mailing list