aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-05-20 23:20:32 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-05-20 23:20:32 +0800
commita462652a29214278e1076c0aa74f6f16e3cf4ca1 (patch)
tree24aa241a93fa2b66f783c1f304aa1cecd17150fe /libempathy-gtk
parent1ba62e209502bb0cb30c80bfdebc867a39ce1651 (diff)
downloadgsoc2013-empathy-a462652a29214278e1076c0aa74f6f16e3cf4ca1.tar
gsoc2013-empathy-a462652a29214278e1076c0aa74f6f16e3cf4ca1.tar.gz
gsoc2013-empathy-a462652a29214278e1076c0aa74f6f16e3cf4ca1.tar.bz2
gsoc2013-empathy-a462652a29214278e1076c0aa74f6f16e3cf4ca1.tar.lz
gsoc2013-empathy-a462652a29214278e1076c0aa74f6f16e3cf4ca1.tar.xz
gsoc2013-empathy-a462652a29214278e1076c0aa74f6f16e3cf4ca1.tar.zst
gsoc2013-empathy-a462652a29214278e1076c0aa74f6f16e3cf4ca1.zip
2007-05-20 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/gossip-chat-view.c: Correctly remember the contact who sent last message. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@86 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/gossip-chat-view.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libempathy-gtk/gossip-chat-view.c b/libempathy-gtk/gossip-chat-view.c
index b9d2d4b51..24770f5de 100644
--- a/libempathy-gtk/gossip-chat-view.c
+++ b/libempathy-gtk/gossip-chat-view.c
@@ -1472,16 +1472,17 @@ gossip_chat_view_append_message (GossipChatView *view,
my_contact = gossip_contact_get_user (sender);
+ /* Reset the last inserted contact. */
+ if (priv->last_contact) {
+ g_object_unref (priv->last_contact);
+ }
+
if (gossip_contact_equal (my_contact, sender)) {
priv->last_block_type = BLOCK_TYPE_SELF;
+ priv->last_contact = NULL;
} else {
priv->last_block_type = BLOCK_TYPE_OTHER;
- }
-
- /* Reset the last inserted contact, since it was from self. */
- if (priv->last_contact) {
- g_object_unref (priv->last_contact);
- priv->last_contact = NULL;
+ priv->last_contact = g_object_ref (sender);
}
if (scroll_down) {