Mercurial > pidgin.yaz
changeset 32318:80eabeb5b794
Get rid of the wholly unused "primary attribute" thing in PurpleStatusTypes
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 21 Aug 2011 01:35:54 +0000 |
parents | bb199bc835e6 |
children | 06c38384f43d |
files | ChangeLog.API libpurple/plugins/perl/common/Status.xs libpurple/plugins/tcl/tcl_cmds.c libpurple/status.c libpurple/status.h |
diffstat | 5 files changed, 4 insertions(+), 72 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Sun Aug 21 01:16:32 2011 +0000 +++ b/ChangeLog.API Sun Aug 21 01:35:54 2011 +0000 @@ -14,6 +14,8 @@ * purple_notify_searchresults_get_columns_count * purple_notify_searchresults_get_rows_count * purple_notify_searchresults_row_get + * purple_status_type_get_primary_attr + * purple_status_type_set_primary_attr * purple_strlcat * purple_strlcpy
--- a/libpurple/plugins/perl/common/Status.xs Sun Aug 21 01:16:32 2011 +0000 +++ b/libpurple/plugins/perl/common/Status.xs Sun Aug 21 01:35:54 2011 +0000 @@ -397,10 +397,6 @@ purple_status_type_get_name(status_type) Purple::StatusType status_type -const char * -purple_status_type_get_primary_attr(status_type) - Purple::StatusType status_type - Purple::StatusPrimitive purple_status_type_get_primitive(status_type) Purple::StatusType status_type @@ -440,8 +436,3 @@ gboolean saveable gboolean user_settable gboolean independent - -void -purple_status_type_set_primary_attr(status_type, attr_id) - Purple::StatusType status_type - const char *attr_id
--- a/libpurple/plugins/tcl/tcl_cmds.c Sun Aug 21 01:16:32 2011 +0000 +++ b/libpurple/plugins/tcl/tcl_cmds.c Sun Aug 21 01:35:54 2011 +0000 @@ -1640,13 +1640,13 @@ int tcl_cmd_status_type(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { const char *cmds[] = { "attr", "attrs", "available", "exclusive", "id", - "independent", "name", "primary_attr", + "independent", "name", "primitive", "saveable", "user_settable", NULL }; enum { CMD_STATUS_TYPE_ATTR, CMD_STATUS_TYPE_ATTRS, CMD_STATUS_TYPE_AVAILABLE, CMD_STATUS_TYPE_EXCLUSIVE, CMD_STATUS_TYPE_ID, CMD_STATUS_TYPE_INDEPENDENT, - CMD_STATUS_TYPE_NAME, CMD_STATUS_TYPE_PRIMARY_ATTR, + CMD_STATUS_TYPE_NAME, CMD_STATUS_TYPE_PRIMITIVE, CMD_STATUS_TYPE_SAVEABLE, CMD_STATUS_TYPE_USER_SETTABLE } cmd; PurpleStatusType *status_type; @@ -1751,18 +1751,6 @@ Tcl_NewStringObj(purple_primitive_get_id_from_type (purple_status_type_get_primitive(status_type)), -1)); break; - case CMD_STATUS_TYPE_PRIMARY_ATTR: -#if !(defined PURPLE_DISABLE_DEPRECATED) - if (objc != 3) { - Tcl_WrongNumArgs(interp, 2, objv, "statustype"); - return TCL_ERROR; - } - if ((status_type = purple_tcl_ref_get(interp, objv[2], PurpleTclRefStatusType)) == NULL) - return TCL_ERROR; - Tcl_SetObjResult(interp, - Tcl_NewStringObj(purple_status_type_get_primary_attr(status_type), -1)); -#endif - break; case CMD_STATUS_TYPE_SAVEABLE: if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "statustype");
--- a/libpurple/status.c Sun Aug 21 01:16:32 2011 +0000 +++ b/libpurple/status.c Sun Aug 21 01:35:54 2011 +0000 @@ -44,7 +44,6 @@ char *id; char *name; - char *primary_attr_id; gboolean saveable; gboolean user_settable; @@ -294,7 +293,6 @@ g_free(status_type->id); g_free(status_type->name); - g_free(status_type->primary_attr_id); g_list_foreach(status_type->attrs, (GFunc)purple_status_attr_destroy, NULL); g_list_free(status_type->attrs); @@ -304,15 +302,6 @@ } void -purple_status_type_set_primary_attr(PurpleStatusType *status_type, const char *id) -{ - g_return_if_fail(status_type != NULL); - - g_free(status_type->primary_attr_id); - status_type->primary_attr_id = g_strdup(id); -} - -void purple_status_type_add_attr(PurpleStatusType *status_type, const char *id, const char *name, PurpleValue *value) { @@ -435,14 +424,6 @@ return (primitive == PURPLE_STATUS_AVAILABLE); } -const char * -purple_status_type_get_primary_attr(const PurpleStatusType *status_type) -{ - g_return_val_if_fail(status_type != NULL, NULL); - - return status_type->primary_attr_id; -} - PurpleStatusAttr * purple_status_type_get_attr(const PurpleStatusType *status_type, const char *id) {
--- a/libpurple/status.h Sun Aug 21 01:16:32 2011 +0000 +++ b/libpurple/status.h Sun Aug 21 01:35:54 2011 +0000 @@ -273,23 +273,6 @@ #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) /** - * Sets a status type's primary attribute. - * - * The value for the primary attribute is used as the description for - * the particular status type. An example is an away message. The message - * would be the primary attribute. - * - * @param status_type The status type. - * @param attr_id The ID of the primary attribute. - * - * @deprecated This function isn't used and should be removed in 3.0.0. - */ -void purple_status_type_set_primary_attr(PurpleStatusType *status_type, - const char *attr_id); -#endif - -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) -/** * Adds an attribute to a status type. * * @param status_type The status type to add the attribute to. @@ -419,19 +402,6 @@ */ gboolean purple_status_type_is_available(const PurpleStatusType *status_type); -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) -/** - * Returns a status type's primary attribute ID. - * - * @param type The status type. - * - * @return The primary attribute's ID. - * - * @deprecated This function isn't used and should be removed in 3.0.0. - */ -const char *purple_status_type_get_primary_attr(const PurpleStatusType *type); -#endif - /** * Returns the attribute with the specified ID. *