*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301 USA
*
* Authors: Xavier Claessens <xclaesse@gmail.com>
*/
static void
theme_irc_append_message (EmpathyChatTextView *view,
- EmpathyMessage *message)
+ EmpathyMessage *message,
+ gboolean should_highlight)
{
GtkTextBuffer *buffer;
const gchar *name;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
contact = empathy_message_get_sender (message);
- name = empathy_contact_get_name (contact);
+ name = empathy_contact_get_logged_alias (contact);
if (empathy_message_get_tptype (message) == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION) {
- tmp = g_strdup_printf (" * %s %s",
- empathy_contact_get_name (contact),
+ tmp = g_strdup_printf (" * %s %s",
+ empathy_contact_get_logged_alias (contact),
empathy_message_get_body (message));
empathy_chat_text_view_append_body (view, tmp,
EMPATHY_CHAT_TEXT_VIEW_TAG_ACTION);
if (empathy_contact_is_user (contact)) {
nick_tag = EMPATHY_THEME_IRC_TAG_NICK_SELF;
} else {
- if (empathy_message_should_highlight (message)) {
+ if (should_highlight) {
nick_tag = EMPATHY_THEME_IRC_TAG_NICK_HIGHLIGHT;
} else {
nick_tag = EMPATHY_THEME_IRC_TAG_NICK_OTHER;
}
}
-
+
gtk_text_buffer_get_end_iter (buffer, &iter);
/* The nickname. */
EMPATHY_CHAT_TEXT_VIEW_TAG_BODY);
}
-static void
-theme_irc_finalize (GObject *object)
-{
- (G_OBJECT_CLASS (empathy_theme_irc_parent_class)->finalize) (object);
-}
-
static void
empathy_theme_irc_class_init (EmpathyThemeIrcClass *class)
{
object_class = G_OBJECT_CLASS (class);
chat_text_view_class = EMPATHY_CHAT_TEXT_VIEW_CLASS (class);
- object_class->finalize = theme_irc_finalize;
chat_text_view_class->append_message = theme_irc_append_message;
g_type_class_add_private (object_class, sizeof (EmpathyThemeIrcPriv));