Mercurial > pidgin
comparison libpurple/protocols/sametime/sametime.c @ 15462:0b6f337a46d5
Emblems in the blist
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 30 Jan 2007 06:53:23 +0000 |
parents | 5fe8042783c1 |
children | 47ca3cfedb32 |
comparison
equal
deleted
inserted
replaced
15461:e9c12873fae0 | 15462:0b6f337a46d5 |
---|---|
3169 | 3169 |
3170 return "meanwhile"; | 3170 return "meanwhile"; |
3171 } | 3171 } |
3172 | 3172 |
3173 | 3173 |
3174 static void mw_prpl_list_emblems(GaimBuddy *b, | 3174 static const char* mw_prpl_list_emblem(GaimBuddy *b) |
3175 const char **se, const char **sw, | 3175 { |
3176 const char **nw, const char **ne) { | 3176 if(buddy_is_external(b)) |
3177 | 3177 return "external"; |
3178 /* speaking of custom icons, the external icon here is an ugly | 3178 |
3179 little example of what happens when I use Gimp */ | 3179 return NULL; |
3180 | |
3181 GaimPresence *presence; | |
3182 GaimStatus *status; | |
3183 const char *status_id; | |
3184 | |
3185 presence = gaim_buddy_get_presence(b); | |
3186 status = gaim_presence_get_active_status(presence); | |
3187 status_id = gaim_status_get_id(status); | |
3188 | |
3189 if(! GAIM_BUDDY_IS_ONLINE(b)) { | |
3190 *se = "offline"; | |
3191 } else if(!strcmp(status_id, MW_STATE_AWAY)) { | |
3192 *se = "away"; | |
3193 } else if(!strcmp(status_id, MW_STATE_BUSY)) { | |
3194 *se = "dnd"; | |
3195 } | |
3196 | |
3197 if(buddy_is_external(b)) { | |
3198 /* best assignment ever */ | |
3199 *(*se?sw:se) = "external"; | |
3200 } | |
3201 } | 3180 } |
3202 | 3181 |
3203 | 3182 |
3204 static char *mw_prpl_status_text(GaimBuddy *b) { | 3183 static char *mw_prpl_status_text(GaimBuddy *b) { |
3205 GaimConnection *gc; | 3184 GaimConnection *gc; |
5096 .options = OPT_PROTO_IM_IMAGE, | 5075 .options = OPT_PROTO_IM_IMAGE, |
5097 .user_splits = NULL, /*< set in mw_plugin_init */ | 5076 .user_splits = NULL, /*< set in mw_plugin_init */ |
5098 .protocol_options = NULL, /*< set in mw_plugin_init */ | 5077 .protocol_options = NULL, /*< set in mw_plugin_init */ |
5099 .icon_spec = NO_BUDDY_ICONS, | 5078 .icon_spec = NO_BUDDY_ICONS, |
5100 .list_icon = mw_prpl_list_icon, | 5079 .list_icon = mw_prpl_list_icon, |
5101 .list_emblems = mw_prpl_list_emblems, | 5080 .list_emblem = mw_prpl_list_emblem, |
5102 .status_text = mw_prpl_status_text, | 5081 .status_text = mw_prpl_status_text, |
5103 .tooltip_text = mw_prpl_tooltip_text, | 5082 .tooltip_text = mw_prpl_tooltip_text, |
5104 .status_types = mw_prpl_status_types, | 5083 .status_types = mw_prpl_status_types, |
5105 .blist_node_menu = mw_prpl_blist_node_menu, | 5084 .blist_node_menu = mw_prpl_blist_node_menu, |
5106 .chat_info = mw_prpl_chat_info, | 5085 .chat_info = mw_prpl_chat_info, |