summaryrefslogtreecommitdiff
path: root/src/muc-factory.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-07-20 12:44:15 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-07-20 12:44:15 +0100
commit5c8c83a0637f3c44d7e608372454b6aa6410b032 (patch)
tree43837cf64c89c702881879e822b7f2cb3e942b81 /src/muc-factory.c
parent73b0cbbf9eda1ca4922f562bc99f209e7fac326e (diff)
downloadtelepathy-gabble-5c8c83a0637f3c44d7e608372454b6aa6410b032.tar.gz
muc-channel: remove ::appeared signal, replace with is_respawning check
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/muc-factory.c')
-rw-r--r--src/muc-factory.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 60f5f2ec7..1262d7e5f 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