# HG changeset patch # User Daniel Atallah # Date 1232424480 0 # Node ID ff883620d9d49f562aa4a00909cf737633eaa0a3 # Parent 161d9bdcca3c4aaa43f508eb957ae45c77c8efcb Thomas Gibson-Robinson noticed that the "saveable" attribute of a status type didn't actually do anything (and consequently "non-saveable" status types were being saved). A side effect of fixing this is that we have to change the behavior of purple_status_type_new() to default "saveable" to TRUE in order to maintain the current behavior. Fixes #8162 diff -r 161d9bdcca3c -r ff883620d9d4 ChangeLog.API --- a/ChangeLog.API Tue Jan 20 03:30:36 2009 +0000 +++ b/ChangeLog.API Tue Jan 20 04:08:00 2009 +0000 @@ -1,5 +1,12 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul +version 2.5.5 (??/??/2009): + libpurple: + Changed: + * purple_status_type_new now defaults "saveable" to TRUE. + This was necessary in order to maintain the current behavior + while fixing non-saveable statuses not to be saved. + version 2.5.4 (01/12/2009): perl: Changed: diff -r 161d9bdcca3c -r ff883620d9d4 libpurple/account.c --- a/libpurple/account.c Tue Jan 20 03:30:36 2009 +0000 +++ b/libpurple/account.c Tue Jan 20 04:08:00 2009 +0000 @@ -257,15 +257,20 @@ statuses_to_xmlnode(const PurplePresence *presence) { xmlnode *node, *child; - GList *statuses, *status; + GList *statuses; + PurpleStatus *status; node = xmlnode_new("statuses"); statuses = purple_presence_get_statuses(presence); - for (status = statuses; status != NULL; status = status->next) + for (; statuses != NULL; statuses = statuses->next) { - child = status_to_xmlnode((PurpleStatus *)status->data); - xmlnode_insert_child(node, child); + status = statuses->data; + if (purple_status_type_is_saveable(purple_status_get_type(status))) + { + child = status_to_xmlnode(status); + xmlnode_insert_child(node, child); + } } return node; diff -r 161d9bdcca3c -r ff883620d9d4 libpurple/status.c --- a/libpurple/status.c Tue Jan 20 03:30:36 2009 +0000 +++ b/libpurple/status.c Tue Jan 20 04:08:00 2009 +0000 @@ -250,7 +250,7 @@ { g_return_val_if_fail(primitive != PURPLE_STATUS_UNSET, NULL); - return purple_status_type_new_full(primitive, id, name, FALSE, + return purple_status_type_new_full(primitive, id, name, TRUE, user_settable, FALSE); } diff -r 161d9bdcca3c -r ff883620d9d4 libpurple/status.h --- a/libpurple/status.h Tue Jan 20 03:30:36 2009 +0000 +++ b/libpurple/status.h Tue Jan 20 04:08:00 2009 +0000 @@ -199,8 +199,8 @@ gboolean independent); /** - * Creates a new status type with some default values (not - * savable and not independent). + * Creates a new status type with some default values ( + * saveable and not independent). * * @param primitive The primitive status type. * @param id The ID of the status type, or @c NULL to use the id of