aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-29 15:20:02 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-25 15:22:41 +0800
commit5079e73c8edf3b460ed11edc02ffb2cb6b705eac (patch)
tree57d3161a40048d6cc2eeb18dd4287100df61c2cc /libempathy
parente74a36868d7abe9c8559567cd4e6d82ce24469af (diff)
downloadgsoc2013-empathy-5079e73c8edf3b460ed11edc02ffb2cb6b705eac.tar
gsoc2013-empathy-5079e73c8edf3b460ed11edc02ffb2cb6b705eac.tar.gz
gsoc2013-empathy-5079e73c8edf3b460ed11edc02ffb2cb6b705eac.tar.bz2
gsoc2013-empathy-5079e73c8edf3b460ed11edc02ffb2cb6b705eac.tar.lz
gsoc2013-empathy-5079e73c8edf3b460ed11edc02ffb2cb6b705eac.tar.xz
gsoc2013-empathy-5079e73c8edf3b460ed11edc02ffb2cb6b705eac.tar.zst
gsoc2013-empathy-5079e73c8edf3b460ed11edc02ffb2cb6b705eac.zip
EmpathyTpChat: get rid of the destroy signal
We should just use invalidated.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-chatroom-manager.c11
-rw-r--r--libempathy/empathy-tp-chat.c39
2 files changed, 6 insertions, 44 deletions
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index 00b54200f..212c5d8ef 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -840,7 +840,10 @@ empathy_chatroom_manager_get_chatrooms (EmpathyChatroomManager *manager,
}
static void
-chatroom_manager_chat_destroyed_cb (EmpathyTpChat *chat,
+chatroom_manager_chat_invalidated_cb (EmpathyTpChat *chat,
+ guint domain,
+ gint code,
+ gchar *message,
gpointer manager)
{
EmpathyChatroomManagerPriv *priv = GET_PRIV (manager);
@@ -905,10 +908,8 @@ observe_channels_cb (TpSimpleObserver *observer,
empathy_chatroom_set_tp_chat (chatroom, tp_chat);
- /* A TpChat is always destroyed as it only gets unreffed after the channel
- * has been invalidated in the dispatcher.. */
- g_signal_connect (tp_chat, "destroy",
- G_CALLBACK (chatroom_manager_chat_destroyed_cb),
+ g_signal_connect (tp_chat, "invalidated",
+ G_CALLBACK (chatroom_manager_chat_invalidated_cb),
self);
}
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 7117058e5..f60b5ef3d 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -80,7 +80,6 @@ enum {
SEND_ERROR,
CHAT_STATE_CHANGED,
PROPERTY_CHANGED,
- DESTROY,
MESSAGE_ACKNOWLEDGED,
LAST_SIGNAL
};
@@ -130,17 +129,6 @@ static void tp_chat_prepare_ready_async (TpProxy *proxy,
gpointer user_data);
static void
-tp_chat_invalidated_cb (TpProxy *proxy,
- guint domain,
- gint code,
- gchar *message,
- EmpathyTpChat *self)
-{
- DEBUG ("Channel invalidated: %s", message);
- g_signal_emit (self, signals[DESTROY], 0);
-}
-
-static void
tp_chat_async_cb (TpChannel *proxy,
const GError *error,
gpointer user_data,
@@ -1323,21 +1311,6 @@ get_sms_channel_cb (TpProxy *channel,
check_almost_ready (EMPATHY_TP_CHAT (chat));
}
-static GObject *
-tp_chat_constructor (GType type,
- guint n_props,
- GObjectConstructParam *props)
-{
- GObject *object;
-
- object = G_OBJECT_CLASS (empathy_tp_chat_parent_class)->constructor (type, n_props, props);
-
- tp_g_signal_connect_object (object, "invalidated",
- G_CALLBACK (tp_chat_invalidated_cb), object, 0);
-
- return object;
-}
-
static void
tp_chat_get_property (GObject *object,
guint param_id,
@@ -1421,7 +1394,6 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
object_class->dispose = tp_chat_dispose;
object_class->finalize = tp_chat_finalize;
- object_class->constructor = tp_chat_constructor;
object_class->get_property = tp_chat_get_property;
object_class->set_property = tp_chat_set_property;
@@ -1510,17 +1482,6 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
G_TYPE_NONE,
2, G_TYPE_STRING, G_TYPE_VALUE);
- /* TODO: remove, should just use invalidated */
- signals[DESTROY] =
- g_signal_new ("destroy",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
-
signals[MESSAGE_ACKNOWLEDGED] =
g_signal_new ("message-acknowledged",
G_TYPE_FROM_CLASS (klass),