Mercurial > pidgin
comparison src/status.c @ 10151:d83e6f2125b1
[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 <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 30 Oct 2004 02:28:50 +0000 |
parents | 9fdbfe832fac |
children | 0b43f6fef9b5 |
comparison
equal
deleted
inserted
replaced
10150:31ade5ef01cc | 10151:d83e6f2125b1 |
---|---|
1442 const GList *l; | 1442 const GList *l; |
1443 | 1443 |
1444 if ((presence1 == NULL && presence2 == NULL) || (presence1 == presence2)) | 1444 if ((presence1 == NULL && presence2 == NULL) || (presence1 == presence2)) |
1445 return 0; | 1445 return 0; |
1446 else if (presence1 == NULL) | 1446 else if (presence1 == NULL) |
1447 return 1; | |
1448 else if (presence2 == NULL) | |
1447 return -1; | 1449 return -1; |
1448 else if (presence2 == NULL) | |
1449 return 1; | |
1450 | 1450 |
1451 /* Compute the score of the first set of statuses. */ | 1451 /* Compute the score of the first set of statuses. */ |
1452 for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next) | 1452 for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next) |
1453 { | 1453 { |
1454 GaimStatus *status = (GaimStatus *)l->data; | 1454 GaimStatus *status = (GaimStatus *)l->data; |
1457 if (gaim_status_is_active(status)) | 1457 if (gaim_status_is_active(status)) |
1458 score1 += primitive_scores[gaim_status_type_get_primitive(type)]; | 1458 score1 += primitive_scores[gaim_status_type_get_primitive(type)]; |
1459 } | 1459 } |
1460 | 1460 |
1461 /* Compute the score of the second set of statuses. */ | 1461 /* Compute the score of the second set of statuses. */ |
1462 for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next) | 1462 for (l = gaim_presence_get_statuses(presence2); l != NULL; l = l->next) |
1463 { | 1463 { |
1464 GaimStatus *status = (GaimStatus *)l->data; | 1464 GaimStatus *status = (GaimStatus *)l->data; |
1465 GaimStatusType *type = gaim_status_get_type(status); | 1465 GaimStatusType *type = gaim_status_get_type(status); |
1466 | 1466 |
1467 if (gaim_status_is_active(status)) | 1467 if (gaim_status_is_active(status)) |