Mercurial > pidgin.yaz
comparison libpurple/protocols/toc/toc.c @ 15463:0b6f337a46d5
Emblems in the blist
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 30 Jan 2007 06:53:23 +0000 |
parents | 21bc8d84974f |
children | 32c366eeeb99 |
comparison
equal
deleted
inserted
replaced
15462:e9c12873fae0 | 15463:0b6f337a46d5 |
---|---|
1513 if (b && b->name && isdigit(b->name[0])) | 1513 if (b && b->name && isdigit(b->name[0])) |
1514 return "icq"; | 1514 return "icq"; |
1515 return "aim"; | 1515 return "aim"; |
1516 } | 1516 } |
1517 | 1517 |
1518 static void toc_list_emblems(GaimBuddy *b, const char **se, const char **sw, const char **nw, const char **ne) | 1518 static const char* toc_list_emblem(GaimBuddy *b) |
1519 { | 1519 { |
1520 char *emblems[4] = {NULL,NULL,NULL,NULL}; | 1520 if (b->uc & UC_AOL) |
1521 int i = 0; | 1521 return "aol"; |
1522 | 1522 if (b->uc & UC_ADMIN) |
1523 if (!GAIM_BUDDY_IS_ONLINE(b)) { | 1523 return "admin"; |
1524 *se = "offline"; | 1524 if (b->uc & UC_WIRELESS) |
1525 return; | 1525 return "mobile"; |
1526 } else { | 1526 return NULL |
1527 if (b->uc & UC_UNAVAILABLE) | |
1528 emblems[i++] = "away"; | |
1529 if (b->uc & UC_AOL) | |
1530 emblems[i++] = "aol"; | |
1531 if (b->uc & UC_ADMIN) | |
1532 emblems[i++] = "admin"; | |
1533 if (b->uc & UC_WIRELESS) | |
1534 emblems[i++] = "wireless"; | |
1535 } | |
1536 *se = emblems[0]; | |
1537 *sw = emblems[1]; | |
1538 *nw = emblems[2]; | |
1539 *ne = emblems[3]; | |
1540 } | 1527 } |
1541 | 1528 |
1542 static GList *toc_blist_node_menu(GaimBlistNode *node) | 1529 static GList *toc_blist_node_menu(GaimBlistNode *node) |
1543 { | 1530 { |
1544 GList *m = NULL; | 1531 GList *m = NULL; |
2241 0, | 2228 0, |
2242 NULL, /* user_splits */ | 2229 NULL, /* user_splits */ |
2243 NULL, /* protocol_options */ | 2230 NULL, /* protocol_options */ |
2244 NO_BUDDY_ICONS, /* icon_spec */ | 2231 NO_BUDDY_ICONS, /* icon_spec */ |
2245 toc_list_icon, /* list_icon */ | 2232 toc_list_icon, /* list_icon */ |
2246 toc_list_emblems, /* list_emblems */ | 2233 toc_list_emblem, /* list_emblems */ |
2247 NULL, /* status_text */ | 2234 NULL, /* status_text */ |
2248 NULL, /* tooltip_text */ | 2235 NULL, /* tooltip_text */ |
2249 toc_away_states, /* away_states */ | 2236 toc_away_states, /* away_states */ |
2250 toc_blist_node_menu, /* blist_node_menu */ | 2237 toc_blist_node_menu, /* blist_node_menu */ |
2251 toc_chat_info, /* chat_info */ | 2238 toc_chat_info, /* chat_info */ |