# HG changeset patch # User Christian Hammond # Date 1099103330 0 # Node ID d83e6f2125b1b379dd1804493c0d3f3f4ed0e03b # Parent 31ade5ef01cc5e01f933c608a98c9a28d14d7289 [gaim-migrate @ 11228] Patch by Andrew Hart to fix some bugs in the priority calculations. Marv says it still doesn't work for him, so we probably have a bug elsewhere, but this patch is correct. committer: Tailor Script diff -r 31ade5ef01cc -r d83e6f2125b1 src/status.c --- a/src/status.c Fri Oct 29 14:49:43 2004 +0000 +++ b/src/status.c Sat Oct 30 02:28:50 2004 +0000 @@ -1444,9 +1444,9 @@ if ((presence1 == NULL && presence2 == NULL) || (presence1 == presence2)) return 0; else if (presence1 == NULL) - return -1; + return 1; else if (presence2 == NULL) - return 1; + return -1; /* Compute the score of the first set of statuses. */ for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next) @@ -1459,7 +1459,7 @@ } /* Compute the score of the second set of statuses. */ - for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next) + for (l = gaim_presence_get_statuses(presence2); l != NULL; l = l->next) { GaimStatus *status = (GaimStatus *)l->data; GaimStatusType *type = gaim_status_get_type(status); diff -r 31ade5ef01cc -r d83e6f2125b1 src/status.h --- a/src/status.h Fri Oct 29 14:49:43 2004 +0000 +++ b/src/status.h Sat Oct 30 02:28:50 2004 +0000 @@ -49,8 +49,8 @@ */ typedef enum { - GAIM_STATUS_UNSET = -1, - GAIM_STATUS_OFFLINE = 0, + GAIM_STATUS_UNSET = 0, + GAIM_STATUS_OFFLINE, GAIM_STATUS_ONLINE, GAIM_STATUS_AVAILABLE, GAIM_STATUS_UNAVAILABLE,