Wed, 15 Jan 2025 19:05:20 -0600
Update Pidgin for the Purple.Message:author-name-color deprecation
Testing Done:
Sent some messages with echo and verified the colors were correct.
Reviewed at https://reviews.imfreedom.org/r/3754/
| pidgin/pidginmessage.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/pidginmessage.c Wed Jan 15 19:04:02 2025 -0600 +++ b/pidgin/pidginmessage.c Wed Jan 15 19:05:20 2025 -0600 @@ -100,6 +100,7 @@ PurpleMessage *message, G_GNUC_UNUSED gpointer data) { + PurpleConversationMember *author = NULL; GdkRGBA rgba; PangoAttrList *attrs = NULL; gboolean color_valid = FALSE; @@ -109,16 +110,18 @@ return NULL; } - custom_color = purple_message_get_author_name_color(message); + author = purple_message_get_author(message); + if(PURPLE_IS_CONVERSATION_MEMBER(author)) { + custom_color = purple_conversation_member_get_color(author); + } + if(!purple_strempty(custom_color)) { color_valid = gdk_rgba_parse(&rgba, custom_color); } if(!color_valid) { - PurpleConversationMember *author = NULL; const char *name_for_display = NULL; - author = purple_message_get_author(message); if(PURPLE_IS_CONVERSATION_MEMBER(author)) { name_for_display = purple_conversation_member_get_name_for_display(author); }