aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-09 04:36:41 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-09 04:36:41 +0800
commita5c4e3ebc50c91ece5c524f9b381a57dfb330eea (patch)
tree345411998f9a2389b455a395ba63a2e0eac04dfe /libempathy-gtk
parent1ddf5f48b71f425d607126a040af8475d2bef7e9 (diff)
downloadgsoc2013-empathy-a5c4e3ebc50c91ece5c524f9b381a57dfb330eea.tar
gsoc2013-empathy-a5c4e3ebc50c91ece5c524f9b381a57dfb330eea.tar.gz
gsoc2013-empathy-a5c4e3ebc50c91ece5c524f9b381a57dfb330eea.tar.bz2
gsoc2013-empathy-a5c4e3ebc50c91ece5c524f9b381a57dfb330eea.tar.lz
gsoc2013-empathy-a5c4e3ebc50c91ece5c524f9b381a57dfb330eea.tar.xz
gsoc2013-empathy-a5c4e3ebc50c91ece5c524f9b381a57dfb330eea.tar.zst
gsoc2013-empathy-a5c4e3ebc50c91ece5c524f9b381a57dfb330eea.zip
Queue received messages until the sender got his alias.
svn path=/trunk/; revision=713
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c8
-rw-r--r--libempathy-gtk/empathy-status-icon.c18
2 files changed, 5 insertions, 21 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index f6e7a2c2a..8af3d573c 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1504,7 +1504,6 @@ empathy_chat_set_tp_chat (EmpathyChat *chat,
EmpathyTpChat *tp_chat)
{
EmpathyChatPriv *priv;
- GList *messages;
g_return_if_fail (EMPATHY_IS_CHAT (chat));
g_return_if_fail (EMPATHY_IS_TP_CHAT (tp_chat));
@@ -1544,6 +1543,7 @@ empathy_chat_set_tp_chat (EmpathyChat *chat,
priv->tp_chat = g_object_ref (tp_chat);
priv->id = g_strdup (empathy_tp_chat_get_id (tp_chat));
priv->account = g_object_ref (empathy_tp_chat_get_account (tp_chat));
+ empathy_tp_chat_set_acknowledge (tp_chat, TRUE);
if (priv->first_tp_chat) {
chat_add_logs (chat);
@@ -1563,12 +1563,6 @@ empathy_chat_set_tp_chat (EmpathyChat *chat,
G_CALLBACK (chat_destroy_cb),
chat);
- /* Get pending messages, wait until block_events cb before displaying
- * them to have to chance to get alias/avatar of sender. */
- empathy_tp_chat_set_acknowledge (tp_chat, TRUE);
- messages = empathy_tp_chat_get_pendings (tp_chat);
- priv->pending_messages = g_list_concat (priv->pending_messages, messages);
-
if (!priv->sensitive) {
gtk_widget_set_sensitive (chat->input_text_view, TRUE);
empathy_chat_view_append_event (chat->view, _("Connected"));
diff --git a/libempathy-gtk/empathy-status-icon.c b/libempathy-gtk/empathy-status-icon.c
index 78c8b47e0..9f10bd37e 100644
--- a/libempathy-gtk/empathy-status-icon.c
+++ b/libempathy-gtk/empathy-status-icon.c
@@ -322,7 +322,6 @@ status_icon_text_filter_new_channel (EmpathyFilter *filter,
EmpathyStatusIconPriv *priv;
McAccount *account;
EmpathyTpChat *tp_chat;
- GList *messages;
priv = GET_PRIV (icon);
@@ -335,19 +334,9 @@ status_icon_text_filter_new_channel (EmpathyFilter *filter,
g_object_set_data (G_OBJECT (tp_chat), "filter", filter);
g_object_unref (account);
- messages = empathy_tp_chat_get_pendings (tp_chat);
- if (!messages) {
- empathy_debug (DEBUG_DOMAIN, "No pending msg, waiting...");
- g_signal_connect (tp_chat, "message-received",
- G_CALLBACK (status_icon_message_received_cb),
- icon);
- return;
- }
-
- status_icon_message_received_cb (tp_chat, messages->data, icon);
-
- g_list_foreach (messages, (GFunc) g_object_unref, NULL);
- g_list_free (messages);
+ g_signal_connect (tp_chat, "message-received",
+ G_CALLBACK (status_icon_message_received_cb),
+ icon);
}
static void
@@ -783,6 +772,7 @@ status_icon_event_msg_cb (StatusIconEvent *event)
empathy_filter_process (filter,
empathy_tp_chat_get_channel (tp_chat),
TRUE);
+
g_object_unref (tp_chat);
}