Changeset 694be84
- Timestamp:
- 2010-11-21T19:08:43Z (14 years ago)
- Branches:
- master
- Children:
- 68adaf8
- Parents:
- 5df65bd
- Location:
- protocols/purple
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/Makefile
r5df65bd r694be84 43 43 purple_mod.o: $(objects) 44 44 @echo '*' Linking purple_mod.o 45 $(LD) $(LFLAGS) $(objects) -o purple_mod.o45 @$(LD) $(LFLAGS) $(objects) -o purple_mod.o 46 46 47 47 -include .depend/*.d -
protocols/purple/purple.c
r5df65bd r694be84 209 209 } 210 210 211 if( strcmp( prpl->info->name, "Gadu-Gadu" ) == 0 ) 212 s = set_add( &acc->set, "gg_sync_contacts", "true", set_eval_bool, acc ); 213 211 214 /* Go through all away states to figure out if away/status messages 212 215 are possible. */ … … 381 384 } 382 385 386 /* Bad bad gadu-gadu, not saving buddy list by itself */ 387 static void purple_gg_buddylist_export( PurpleConnection *gc ) 388 { 389 struct im_connection *ic = purple_ic_by_gc( gc ); 390 391 if( set_getstr( &ic->acc->set, "gg_sync_contacts" ) ) 392 { 393 GList *actions = gc->prpl->info->actions( gc->prpl, gc ); 394 GList *p; 395 for( p = g_list_first(actions); p; p = p->next ) 396 { 397 if( ((PurplePluginAction*)p->data) && 398 purple_menu_cmp( ((PurplePluginAction*)p->data)->label, "Upload buddylist to Server" ) == 0) 399 { 400 PurplePluginAction action; 401 action.plugin = gc->prpl; 402 action.context = gc; 403 action.user_data = NULL; 404 ((PurplePluginAction*)p->data)->callback(&action); 405 break; 406 } 407 } 408 g_list_free( actions ); 409 } 410 } 411 412 static void purple_gg_buddylist_import( PurpleConnection *gc ) 413 { 414 struct im_connection *ic = purple_ic_by_gc( gc ); 415 416 if( set_getstr( &ic->acc->set, "gg_sync_contacts" ) ) 417 { 418 GList *actions = gc->prpl->info->actions( gc->prpl, gc ); 419 GList *p; 420 for( p = g_list_first(actions); p; p = p->next ) 421 { 422 if( ((PurplePluginAction*)p->data) && 423 purple_menu_cmp( ((PurplePluginAction*)p->data)->label, "Download buddylist from Server" ) == 0 ) 424 { 425 PurplePluginAction action; 426 action.plugin = gc->prpl; 427 action.context = gc; 428 action.user_data = NULL; 429 ((PurplePluginAction*)p->data)->callback(&action); 430 break; 431 } 432 } 433 g_list_free( actions ); 434 } 435 } 436 383 437 static void purple_add_buddy( struct im_connection *ic, char *who, char *group ) 384 438 { … … 395 449 purple_blist_add_buddy( pb, NULL, pg, NULL ); 396 450 purple_account_add_buddy( (PurpleAccount*) ic->proto_data, pb ); 451 452 purple_gg_buddylist_export( ((PurpleAccount*)ic->proto_data)->gc ); 397 453 } 398 454 … … 411 467 purple_blist_remove_buddy( pb ); 412 468 } 469 470 purple_gg_buddylist_export( ((PurpleAccount*)ic->proto_data)->gc ); 413 471 } 414 472 … … 629 687 s->value = g_strdup( dn ); 630 688 } 689 690 // user list needs to be requested for Gadu-Gadu 691 purple_gg_buddylist_import( gc ); 631 692 632 693 if( gc->flags & PURPLE_CONNECTION_HTML )
Note: See TracChangeset
for help on using the changeset viewer.