Remove Purple.Message:author-name-color

Wed, 15 Jan 2025 19:06:50 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Wed, 15 Jan 2025 19:06:50 -0600
changeset 43142
1653cbf7e329
parent 43141
99855a04b447
child 43143
74178b555072

Remove Purple.Message:author-name-color

Testing Done:
Called in the turtles.

Reviewed at https://reviews.imfreedom.org/r/3755/

libpurple/purplemessage.c file | annotate | diff | comparison | revisions
libpurple/purplemessage.h file | annotate | diff | comparison | revisions
--- a/libpurple/purplemessage.c	Wed Jan 15 19:05:20 2025 -0600
+++ b/libpurple/purplemessage.c	Wed Jan 15 19:06:50 2025 -0600
@@ -53,7 +53,6 @@
 	PROP_0,
 	PROP_ACTION,
 	PROP_AUTHOR,
-	PROP_AUTHOR_NAME_COLOR,
 	PROP_CONTENTS,
 	PROP_DELIVERED,
 	PROP_DELIVERED_AT,
@@ -99,12 +98,6 @@
 	case PROP_AUTHOR:
 		g_value_set_object(value, purple_message_get_author(message));
 		break;
-	case PROP_AUTHOR_NAME_COLOR:
-		G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-		g_value_set_string(value,
-		                   purple_message_get_author_name_color(message));
-		G_GNUC_END_IGNORE_DEPRECATIONS
-		break;
 	case PROP_CONTENTS:
 		g_value_set_string(value, purple_message_get_contents(message));
 		break;
@@ -157,12 +150,6 @@
 	case PROP_AUTHOR:
 		purple_message_set_author(message, g_value_get_object(value));
 		break;
-	case PROP_AUTHOR_NAME_COLOR:
-		G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-		purple_message_set_author_name_color(message,
-		                                     g_value_get_string(value));
-		G_GNUC_END_IGNORE_DEPRECATIONS
-		break;
 	case PROP_CONTENTS:
 		purple_message_set_contents(message, g_value_get_string(value));
 		break;
@@ -265,20 +252,6 @@
 		G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
 
 	/**
-	 * PurpleMessage:author-name-color:
-	 *
-	 * The hex color for the author's name.
-	 *
-	 * Since: 3.0
-	 *
-	 * Deprecated: 3.0
-	 */
-	properties[PROP_AUTHOR_NAME_COLOR] = g_param_spec_string(
-		"author-name-color", NULL, NULL,
-		NULL,
-		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED);
-
-	/**
 	 * PurpleMessage:contents:
 	 *
 	 * The contents of the message.
@@ -473,28 +446,6 @@
 }
 
 void
-purple_message_set_author_name_color(PurpleMessage *message,
-                                     const char *color)
-{
-	g_return_if_fail(PURPLE_IS_MESSAGE(message));
-
-	if(PURPLE_IS_CONVERSATION_MEMBER(message->author)) {
-		purple_conversation_member_set_color(message->author, color);
-	}
-}
-
-const char *
-purple_message_get_author_name_color(PurpleMessage *message) {
-	g_return_val_if_fail(PURPLE_IS_MESSAGE(message), NULL);
-
-	if(PURPLE_IS_CONVERSATION_MEMBER(message->author)) {
-		return purple_conversation_member_get_color(message->author);
-	}
-
-	return NULL;
-}
-
-void
 purple_message_set_contents(PurpleMessage *message, const char *contents) {
 	g_return_if_fail(PURPLE_IS_MESSAGE(message));
 
--- a/libpurple/purplemessage.h	Wed Jan 15 19:05:20 2025 -0600
+++ b/libpurple/purplemessage.h	Wed Jan 15 19:06:50 2025 -0600
@@ -102,38 +102,6 @@
 PurpleConversationMember *purple_message_get_author(PurpleMessage *message);
 
 /**
- * purple_message_get_author_name_color:
- * @message: The #PurpleMessage instance.
- *
- * Gets the author's name color for @message.
- *
- * Returns: (transfer none): The hex color for the author of @message's name.
- *
- * Since: 3.0
- *
- * Deprecated: 3.0
- */
-PURPLE_DEPRECATED_FOR(purple_conversation_member_get_color)
-const char *purple_message_get_author_name_color(PurpleMessage *message);
-
-/**
- * purple_message_set_author_name_color:
- * @message: The #PurpleMessage instance.
- * @color: The hex color code for the author of @message.
- *
- * Sets the author's name color of @message to @color. This is the color that
- * will be used to display the author's name in a user interface. The user
- * interface might not use this exact color, as it might need to adapt for
- * contrast or limits on the number of colors.
- *
- * Since: 3.0
- *
- * Deprecated: 3.0
- */
-PURPLE_DEPRECATED_FOR(purple_conversation_member_set_color)
-void purple_message_set_author_name_color(PurpleMessage *message, const char *color);
-
-/**
  * purple_message_get_contents:
  * @message: The message.
  *

mercurial