Changeset 7da726b
- Timestamp:
- 2009-10-06T21:49:42Z (15 years ago)
- Branches:
- master
- Children:
- d250b2a
- Parents:
- 860ba6a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r860ba6a r7da726b 47 47 } PurpleGLibIOClosure; 48 48 49 static struct im_connection *purple_ic_by_gc( PurpleConnection *gc ) 50 { 51 PurpleAccount *pa = purple_connection_get_account( gc ); 49 static struct im_connection *purple_ic_by_pa( PurpleAccount *pa ) 50 { 52 51 GSList *i; 53 52 … … 57 56 58 57 return NULL; 58 } 59 60 static struct im_connection *purple_ic_by_gc( PurpleConnection *gc ) 61 { 62 return purple_ic_by_pa( purple_connection_get_account( gc ) ); 59 63 } 60 64 … … 236 240 NULL, 237 241 prplcb_conn_report_disconnect_reason, 242 }; 243 244 static void prplcb_blist_new( PurpleBlistNode *node ) 245 { 246 PurpleBuddy *bud = (PurpleBuddy*) node; 247 struct im_connection *ic = purple_ic_by_pa( bud->account ); 248 249 if( node->type == PURPLE_BLIST_BUDDY_NODE ) 250 { 251 imcb_add_buddy( ic, bud->name, NULL ); 252 if( bud->server_alias ) 253 imcb_buddy_nick_hint( ic, bud->name, bud->server_alias ); 254 } 255 } 256 257 static void prplcb_blist_update( PurpleBuddyList *list, PurpleBlistNode *node ) 258 { 259 PurpleBuddy *bud = (PurpleBuddy*) node; 260 261 if( node->type == PURPLE_BLIST_BUDDY_NODE ) 262 { 263 imcb_buddy_status( purple_ic_by_pa( bud->account ), bud->name, 264 purple_presence_is_online( bud->presence ) ? OPT_LOGGED_IN : 0, 265 NULL, NULL ); 266 } 267 } 268 269 static void prplcb_blist_remove( PurpleBuddyList *list, PurpleBlistNode *node ) 270 { 271 PurpleBuddy *bud = (PurpleBuddy*) node; 272 273 if( node->type == PURPLE_BLIST_BUDDY_NODE ) 274 imcb_remove_buddy( purple_ic_by_pa( bud->account ), bud->name, NULL ); 275 } 276 277 static PurpleBlistUiOps bee_blist_uiops = 278 { 279 NULL, 280 prplcb_blist_new, 281 NULL, 282 prplcb_blist_update, 283 prplcb_blist_remove, 238 284 }; 239 285 … … 263 309 static void purple_ui_init() 264 310 { 311 purple_blist_set_ui_ops( &bee_blist_uiops ); 265 312 purple_connections_set_ui_ops( &bee_conn_uiops ); 266 313 purple_conversations_set_ui_ops( &bee_conv_uiops );
Note: See TracChangeset
for help on using the changeset viewer.