Mercurial > pidgin
diff libpurple/status.c @ 15523:84b3ab83df35
Use the status API to handle mobileness, and convert AIM to use it. This makes mobile buddies prioritze lower in Perons, and ensures the UI is notified of changes in mobileness. Other protocols to follow.
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Sun, 04 Feb 2007 02:31:04 +0000 |
| parents | 5fe8042783c1 |
| children | f485c87e6546 |
line wrap: on
line diff
--- a/libpurple/status.c Sat Feb 03 23:32:43 2007 +0000 +++ b/libpurple/status.c Sun Feb 04 02:31:04 2007 +0000 @@ -1549,18 +1549,20 @@ gaim_presence_is_status_primitive_active(const GaimPresence *presence, GaimStatusPrimitive primitive) { - GaimStatus *status; - GaimStatusType *status_type; + GList *l; g_return_val_if_fail(presence != NULL, FALSE); g_return_val_if_fail(primitive != GAIM_STATUS_UNSET, FALSE); - status = gaim_presence_get_active_status(presence); - status_type = gaim_status_get_type(status); + for (l = gaim_presence_get_statuses(presence); + l != NULL; l = l->next) { + GaimStatus *temp_status = l->data; + GaimStatusType *type = gaim_status_get_type(temp_status); - if (gaim_status_type_get_primitive(status_type) == primitive) - return TRUE; - + if (gaim_status_type_get_primitive(type) == primitive && + gaim_status_is_active(temp_status)) + return TRUE; + } return FALSE; }
