pidgin: fe650fc5: Italicize nicks in the conversation hist...

sadrul at pidgin.im sadrul at pidgin.im
Wed Apr 22 13:05:52 EDT 2009


-----------------------------------------------------------------
Revision: fe650fc58681996bf988489a65e10198e25c1fd3
Ancestor: 6a70c2c1325aeb644bff8476f94c5a25f83044fb
Author: sadrul at pidgin.im
Date: 2009-04-22T17:07:41
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/fe650fc58681996bf988489a65e10198e25c1fd3

Modified files:
        ChangeLog pidgin/gtkconv.c

ChangeLog: 

Italicize nicks in the conversation history for folks leaving a chat.
Does this belong in a plugin?

-------------- next part --------------
============================================================
--- ChangeLog	72856c3c446e4e4b1b1dee03d56dc91b4d536b95
+++ ChangeLog	f5e3640422f27be6178089685acbc4e2ec9c87a7
@@ -28,7 +28,6 @@ version 2.6.0 (??/??/2009):
 	  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 @@ version 2.6.0 (??/??/2009):
 	  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
============================================================
--- pidgin/gtkconv.c	3f28afec8a8b27eb5450763bfeef9f0a43f16760
+++ pidgin/gtkconv.c	d437ae3778e64095d7f9697ad248db42c57a2b47
@@ -4034,6 +4034,11 @@ add_chat_buddy_common(PurpleConversation
 				"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 @@ pidgin_conv_chat_rename_user(PurpleConve
 	PurpleConvChatBuddy *cbuddy;
 	GtkTreeIter iter;
 	GtkTreeModel *model;
+	GtkTextTag *tag;
 	int f = 1;
 
 	chat    = PURPLE_CONV_CHAT(conv);
@@ -6090,6 +6096,11 @@ pidgin_conv_chat_rename_user(PurpleConve
 		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 @@ pidgin_conv_chat_remove_users(PurpleConv
 	char tmp[BUF_LONG];
 	int num_users;
 	gboolean f;
+	GtkTextTag *tag;
 
 	chat    = PURPLE_CONV_CHAT(conv);
 	gtkconv = PIDGIN_CONVERSATION(conv);
@@ -6144,6 +6156,11 @@ pidgin_conv_chat_remove_users(PurpleConv
 
 			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),


More information about the Commits mailing list