aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-05-20 23:10:56 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-20 23:10:56 +0800
commit197e30fd6b46be7628d6458f2ee83b5c9edf6517 (patch)
treeb434da447289c23ce7dee19950119316d1e40d1c
parent2215be7730fb16efe8e4b8473ccafd45be20e490 (diff)
downloadgsoc2013-empathy-197e30fd6b46be7628d6458f2ee83b5c9edf6517.tar
gsoc2013-empathy-197e30fd6b46be7628d6458f2ee83b5c9edf6517.tar.gz
gsoc2013-empathy-197e30fd6b46be7628d6458f2ee83b5c9edf6517.tar.bz2
gsoc2013-empathy-197e30fd6b46be7628d6458f2ee83b5c9edf6517.tar.lz
gsoc2013-empathy-197e30fd6b46be7628d6458f2ee83b5c9edf6517.tar.xz
gsoc2013-empathy-197e30fd6b46be7628d6458f2ee83b5c9edf6517.tar.zst
gsoc2013-empathy-197e30fd6b46be7628d6458f2ee83b5c9edf6517.zip
Correctly remember if last message comes from the self contact or another.
2007-05-20 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/gossip-chat-view.c: Correctly remember if last message comes from the self contact or another. svn path=/trunk/; revision=85
-rw-r--r--ChangeLog5
-rw-r--r--libempathy-gtk/gossip-chat-view.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e5615193..00a97bd47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2007-05-20 Xavier Claessens <xclaesse@gmail.com>
+ * libempathy-gtk/gossip-chat-view.c: Correctly remember if last message
+ comes from the self contact or another.
+
+2007-05-20 Xavier Claessens <xclaesse@gmail.com>
+
* libempathy-gtk/gossip-contact-list-model.c:
* libempathy-gtk/gossip-contact-list-model.h: Removed.
* libempathy-gtk/gossip-contact-list-view.c:
diff --git a/libempathy-gtk/gossip-chat-view.c b/libempathy-gtk/gossip-chat-view.c
index 5f8c7d49d..b9d2d4b51 100644
--- a/libempathy-gtk/gossip-chat-view.c
+++ b/libempathy-gtk/gossip-chat-view.c
@@ -1431,6 +1431,7 @@ gossip_chat_view_append_message (GossipChatView *view,
{
GossipChatViewPriv *priv;
GossipContact *sender;
+ GossipContact *my_contact;
const gchar *body;
gboolean scroll_down;
@@ -1469,7 +1470,13 @@ gossip_chat_view_append_message (GossipChatView *view,
}
}
- priv->last_block_type = BLOCK_TYPE_SELF;
+ my_contact = gossip_contact_get_user (sender);
+
+ if (gossip_contact_equal (my_contact, sender)) {
+ priv->last_block_type = BLOCK_TYPE_SELF;
+ } else {
+ priv->last_block_type = BLOCK_TYPE_OTHER;
+ }
/* Reset the last inserted contact, since it was from self. */
if (priv->last_contact) {