Mercurial > pidgin.yaz
diff libpurple/account.c @ 24973: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 | 98ec72f8f3cc |
children | 3687049b4faf |
line wrap: on
line diff
--- 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;