| 2369 int ret; |
2369 int ret; |
| 2370 |
2370 |
| 2371 if (G_OBJECT_TYPE(n1) != G_OBJECT_TYPE(n2)) |
2371 if (G_OBJECT_TYPE(n1) != G_OBJECT_TYPE(n2)) |
| 2372 return blist_node_compare_position(n1, n2); |
2372 return blist_node_compare_position(n1, n2); |
| 2373 |
2373 |
| 2374 if (PURPLE_IS_CONTACT(n1) || PURPLE_IS_BUDDY(n1)) { |
2374 if (PURPLE_IS_CONTACT(n1)) |
| 2375 n1 = PURPLE_BLIST_NODE(purple_contact_get_priority_buddy(PURPLE_CONTACT(n1))); |
2375 n1 = PURPLE_BLIST_NODE(purple_contact_get_priority_buddy(PURPLE_CONTACT(n1))); |
| |
2376 if (PURPLE_IS_CONTACT(n2)) |
| 2376 n2 = PURPLE_BLIST_NODE(purple_contact_get_priority_buddy(PURPLE_CONTACT(n2))); |
2377 n2 = PURPLE_BLIST_NODE(purple_contact_get_priority_buddy(PURPLE_CONTACT(n2))); |
| 2377 } |
2378 |
| 2378 |
2379 if (PURPLE_IS_BUDDY(n1) && PURPLE_IS_BUDDY(n2)) { |
| 2379 if (PURPLE_IS_BUDDY(n1)) { |
|
| 2380 ret = purple_buddy_presence_compare( |
2380 ret = purple_buddy_presence_compare( |
| 2381 PURPLE_BUDDY_PRESENCE(purple_buddy_get_presence(PURPLE_BUDDY(n1))), |
2381 PURPLE_BUDDY_PRESENCE(purple_buddy_get_presence(PURPLE_BUDDY(n1))), |
| 2382 PURPLE_BUDDY_PRESENCE(purple_buddy_get_presence(PURPLE_BUDDY(n2)))); |
2382 PURPLE_BUDDY_PRESENCE(purple_buddy_get_presence(PURPLE_BUDDY(n2)))); |
| 2383 if (ret != 0) |
2383 if (ret != 0) |
| 2384 return ret; |
2384 return ret; |