Mercurial > pidgin.yaz
changeset 26718:9e0001caa207
Italicize nicks in the conversation history for folks leaving a chat.
Does this belong in a plugin?
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 22 Apr 2009 17:07:41 +0000 |
parents | 474a0cb44f58 |
children | 9484cc400aca 33f4330401d5 |
files | ChangeLog pidgin/gtkconv.c |
diffstat | 2 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Apr 21 22:17:18 2009 +0000 +++ b/ChangeLog Wed Apr 22 17:07:41 2009 +0000 @@ -28,7 +28,6 @@ channels. * Notify the user if a /nick command fails, rather than trying fallback nicks. - Pidgin: * Added -f command line option to tell Pidgin to ignore NetworkManager @@ -44,6 +43,9 @@ new dialog box every time a pounce is triggered. (Jorge VillaseƱor) * The New Account dialog is now broken into three tabs. Proxy configuration has been moved from the Advanced tab to the new tab. + * The nicks of the persons who leave the chatroom are italicized in the + chat's conversation history. The nicks are un-italicized when they + rejoin. Finch: * The hardware cursor is updated correctly. This will be useful
--- a/pidgin/gtkconv.c Tue Apr 21 22:17:18 2009 +0000 +++ b/pidgin/gtkconv.c Wed Apr 22 17:07:41 2009 +0000 @@ -4034,6 +4034,11 @@ "send-name"); g_object_get(tag, "foreground-gdk", &color, NULL); } else { + GtkTextTag *tag; + if ((tag = get_buddy_tag(conv, name, 0, FALSE))) + g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_NORMAL, NULL); + if ((tag = get_buddy_tag(conv, name, PURPLE_MESSAGE_NICK, FALSE))) + g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_NORMAL, NULL); color = (GdkColor*)get_nick_color(gtkconv, name); } @@ -6063,6 +6068,7 @@ PurpleConvChatBuddy *cbuddy; GtkTreeIter iter; GtkTreeModel *model; + GtkTextTag *tag; int f = 1; chat = PURPLE_CONV_CHAT(conv); @@ -6090,6 +6096,11 @@ g_free(val); } + if ((tag = get_buddy_tag(conv, old_name, 0, FALSE))) + g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL); + if ((tag = get_buddy_tag(conv, old_name, PURPLE_MESSAGE_NICK, FALSE))) + g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL); + if (!purple_conv_chat_find_user(chat, old_name)) return; @@ -6112,6 +6123,7 @@ char tmp[BUF_LONG]; int num_users; gboolean f; + GtkTextTag *tag; chat = PURPLE_CONV_CHAT(conv); gtkconv = PIDGIN_CONVERSATION(conv); @@ -6144,6 +6156,11 @@ g_free(val); } while (f); + + if ((tag = get_buddy_tag(conv, l->data, 0, FALSE))) + g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL); + if ((tag = get_buddy_tag(conv, l->data, PURPLE_MESSAGE_NICK, FALSE))) + g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL); } g_snprintf(tmp, sizeof(tmp),