aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-group-chat.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-02-16 17:22:52 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-02-16 17:22:52 +0800
commit04462d2c6fbcbde891ec2a0d10cec540110517c7 (patch)
tree495581b0245cc1b454937326f63d277db56050d1 /libempathy-gtk/empathy-group-chat.c
parent542c9b73402e30b9d07ae19055babf0eb767366b (diff)
downloadgsoc2013-empathy-04462d2c6fbcbde891ec2a0d10cec540110517c7.tar
gsoc2013-empathy-04462d2c6fbcbde891ec2a0d10cec540110517c7.tar.gz
gsoc2013-empathy-04462d2c6fbcbde891ec2a0d10cec540110517c7.tar.bz2
gsoc2013-empathy-04462d2c6fbcbde891ec2a0d10cec540110517c7.tar.lz
gsoc2013-empathy-04462d2c6fbcbde891ec2a0d10cec540110517c7.tar.xz
gsoc2013-empathy-04462d2c6fbcbde891ec2a0d10cec540110517c7.tar.zst
gsoc2013-empathy-04462d2c6fbcbde891ec2a0d10cec540110517c7.zip
Block events messages when the chat is connecting to a new Text channel. Fixes bug #507515 and #516198.
svn path=/trunk/; revision=641
Diffstat (limited to 'libempathy-gtk/empathy-group-chat.c')
-rw-r--r--libempathy-gtk/empathy-group-chat.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/libempathy-gtk/empathy-group-chat.c b/libempathy-gtk/empathy-group-chat.c
index 4f86ef2ba..a51b25228 100644
--- a/libempathy-gtk/empathy-group-chat.c
+++ b/libempathy-gtk/empathy-group-chat.c
@@ -355,20 +355,18 @@ group_chat_members_changed_cb (EmpathyTpChatroom *tp_chat,
gboolean is_member,
EmpathyGroupChat *chat)
{
- EmpathyGroupChatPriv *priv;
- gchar *str;
-
- priv = GET_PRIV (chat);
-
- if (is_member) {
- str = g_strdup_printf (_("%s has joined the room"),
- empathy_contact_get_name (contact));
- } else {
- str = g_strdup_printf (_("%s has left the room"),
- empathy_contact_get_name (contact));
+ if (!EMPATHY_CHAT (chat)->block_events) {
+ gchar *str;
+ if (is_member) {
+ str = g_strdup_printf (_("%s has joined the room"),
+ empathy_contact_get_name (contact));
+ } else {
+ str = g_strdup_printf (_("%s has left the room"),
+ empathy_contact_get_name (contact));
+ }
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
+ g_free (str);
}
- empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
- g_free (str);
}
static void
@@ -571,13 +569,15 @@ group_chat_subject_notify_cb (EmpathyTpChat *tp_chat,
priv->topic = str;
gtk_label_set_text (GTK_LABEL (priv->label_topic), priv->topic);
- if (!G_STR_EMPTY (priv->topic)) {
- str = g_strdup_printf (_("Topic set to: %s"), priv->topic);
- } else {
- str = g_strdup (_("No topic defined"));
+ if (!EMPATHY_CHAT (chat)->block_events) {
+ if (!G_STR_EMPTY (priv->topic)) {
+ str = g_strdup_printf (_("Topic set to: %s"), priv->topic);
+ } else {
+ str = g_strdup (_("No topic defined"));
+ }
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
+ g_free (str);
}
- empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
- g_free (str);
}
static void