~ubuntu-branches/ubuntu/natty/empathy/natty-updates

« back to all changes in this revision

Viewing changes to libempathy-gtk/empathy-group-chat.c

  • Committer: Bazaar Package Importer
  • Author(s): Sjoerd Simons
  • Date: 2008-03-10 16:39:07 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080310163907-tv41g2zmf0qqgi85
Tags: 0.22.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
2
/*
3
3
 * Copyright (C) 2002-2007 Imendio AB
4
 
 * Copyright (C) 2007 Collabora Ltd.
 
4
 * Copyright (C) 2007-2008 Collabora Ltd.
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or
7
7
 * modify it under the terms of the GNU General Public License as
355
355
                               gboolean            is_member,
356
356
                               EmpathyGroupChat   *chat)
357
357
{
358
 
        EmpathyGroupChatPriv *priv;
359
 
        gchar                *str;
360
 
 
361
 
        priv = GET_PRIV (chat);
362
 
 
363
 
        if (is_member) {
364
 
                str = g_strdup_printf (_("%s has joined the room"),
365
 
                                       empathy_contact_get_name (contact));
366
 
        } else {
367
 
                str = g_strdup_printf (_("%s has left the room"),
368
 
                                       empathy_contact_get_name (contact));
 
358
        if (!EMPATHY_CHAT (chat)->block_events) {
 
359
                gchar *str;
 
360
                if (is_member) {
 
361
                        str = g_strdup_printf (_("%s has joined the room"),
 
362
                                               empathy_contact_get_name (contact));
 
363
                } else {
 
364
                        str = g_strdup_printf (_("%s has left the room"),
 
365
                                               empathy_contact_get_name (contact));
 
366
                }
 
367
                empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
 
368
                g_free (str);
369
369
        }
370
 
        empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
371
 
        g_free (str);
372
370
}
373
371
 
374
372
static void
571
569
        priv->topic = str;
572
570
        gtk_label_set_text (GTK_LABEL (priv->label_topic), priv->topic);
573
571
 
574
 
        if (!G_STR_EMPTY (priv->topic)) {
575
 
                str = g_strdup_printf (_("Topic set to: %s"), priv->topic);
576
 
        } else {
577
 
                str = g_strdup (_("No topic defined"));
 
572
        if (!EMPATHY_CHAT (chat)->block_events) {
 
573
                if (!G_STR_EMPTY (priv->topic)) {
 
574
                        str = g_strdup_printf (_("Topic set to: %s"), priv->topic);
 
575
                } else {
 
576
                        str = g_strdup (_("No topic defined"));
 
577
                }
 
578
                empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
 
579
                g_free (str);
578
580
        }
579
 
        empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
580
 
        g_free (str);
581
581
}
582
582
 
583
583
static void