Changeset a91550c for protocols/purple


Ignore:
Timestamp:
2010-07-17T12:29:51Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
6ef19f7
Parents:
a08e875
Message:

Try to pass a group when removing a contact. No idea what will happen if
a contact is in multiple groups, for now I'm not supporting it.

Also cleaning up query code to avoid calling NULL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    ra08e875 ra91550c  
    371371        if( pb != NULL )
    372372        {
    373                 purple_account_remove_buddy( (PurpleAccount*) ic->proto_data, pb, NULL );
     373                PurpleGroup *group;
     374               
     375                group = purple_buddy_get_group( pb );
     376                purple_account_remove_buddy( (PurpleAccount*) ic->proto_data, pb, group );
     377               
    374378                purple_blist_remove_buddy( pb );
    375379        }
     
    695699static void prplcb_blist_remove( PurpleBuddyList *list, PurpleBlistNode *node )
    696700{
    697         /*
     701/*
    698702        PurpleBuddy *bud = (PurpleBuddy*) node;
    699703       
     
    707711                imcb_remove_buddy( ic, bud->name, NULL );
    708712        }
    709         */
     713*/
    710714}
    711715
     
    828832        struct prplcb_request_action_data *pqad = data;
    829833       
    830         pqad->yes( pqad->user_data, pqad->yes_i );
     834        if( pqad->yes )
     835                pqad->yes( pqad->user_data, pqad->yes_i );
    831836        g_free( pqad );
    832837}
     
    836841        struct prplcb_request_action_data *pqad = data;
    837842       
    838         pqad->no( pqad->user_data, pqad->no_i );
     843        if( pqad->no )
     844                pqad->no( pqad->user_data, pqad->no_i );
    839845        g_free( pqad );
    840846}
     
    859865                fn = va_arg( actions, void* );
    860866               
    861                 if( strstr( caption, "Accept" ) )
     867                if( strstr( caption, "Accept" ) || strstr( caption, "OK" ) )
    862868                {
    863869                        pqad->yes = fn;
Note: See TracChangeset for help on using the changeset viewer.