Mercurial > pidgin
changeset 25343:ff883620d9d4
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
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 20 Jan 2009 04:08:00 +0000 |
parents | 161d9bdcca3c |
children | 114e66c2fa7e |
files | ChangeLog.API libpurple/account.c libpurple/status.c libpurple/status.h |
diffstat | 4 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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;
--- 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); }
--- 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