empathy r1015 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1015 - trunk/libempathy
- Date: Sun, 20 Apr 2008 21:12:34 +0100 (BST)
Author: xclaesse
Date: Sun Apr 20 20:12:34 2008
New Revision: 1015
URL: http://svn.gnome.org/viewvc/empathy?rev=1015&view=rev
Log:
Never set the remote_contact for named rooms, do not pretend it's a p2p chat when on a muc with only one other contact.
Modified:
trunk/libempathy/empathy-tp-chat.c
Modified: trunk/libempathy/empathy-tp-chat.c
==============================================================================
--- trunk/libempathy/empathy-tp-chat.c (original)
+++ trunk/libempathy/empathy-tp-chat.c Sun Apr 20 20:12:34 2008
@@ -123,8 +123,18 @@
EmpathyTpChat *chat)
{
EmpathyTpChatPriv *priv = GET_PRIV (chat);
+ guint handle_type = 0;
priv->members_count++;
+ g_signal_emit_by_name (chat, "members-changed",
+ contact, actor, reason, message,
+ TRUE);
+
+ g_object_get (priv->channel, "handle-type", &handle_type, NULL);
+ if (handle_type == TP_HANDLE_TYPE_ROOM) {
+ return;
+ }
+
if (priv->members_count > 2 && priv->remote_contact) {
/* We now have more than 2 members, this is not a p2p chat
* anymore. Remove the remote-contact as it makes no sense, the
@@ -142,10 +152,6 @@
priv->remote_contact = g_object_ref (contact);
g_object_notify (G_OBJECT (chat), "remote-contact");
}
-
- g_signal_emit_by_name (chat, "members-changed",
- contact, actor, reason, message,
- TRUE);
}
static void
@@ -157,8 +163,18 @@
EmpathyTpChat *chat)
{
EmpathyTpChatPriv *priv = GET_PRIV (chat);
+ guint handle_type = 0;
priv->members_count--;
+ g_signal_emit_by_name (chat, "members-changed",
+ contact, actor, reason, message,
+ FALSE);
+
+ g_object_get (priv->channel, "handle-type", &handle_type, NULL);
+ if (handle_type == TP_HANDLE_TYPE_ROOM) {
+ return;
+ }
+
if (priv->members_count <= 2 && !priv->remote_contact) {
GList *members, *l;
@@ -174,11 +190,8 @@
g_list_foreach (members, (GFunc) g_object_unref, NULL);
g_list_free (members);
}
-
- g_signal_emit_by_name (chat, "members-changed",
- contact, actor, reason, message,
- FALSE);
}
+
static void
tp_chat_local_pending_cb (EmpathyTpGroup *group,
EmpathyContact *contact,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]