Changeset f85e9d6 for protocols/purple


Ignore:
Timestamp:
2010-05-24T21:24:53Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d25ebea
Parents:
c3caa46
Message:

Read display names. Setting them is going to be an awesome hack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    rc3caa46 rf85e9d6  
    3737static irc_t *local_irc;
    3838
     39static char *set_eval_display_name( set_t *set, char *value );
     40
    3941struct im_connection *purple_ic_by_pa( PurpleAccount *pa )
    4042{
     
    173175        g_string_free( help, TRUE );
    174176       
     177        s = set_add( &acc->set, "display_name", NULL, set_eval_display_name, acc );
     178        s->flags |= ACC_SET_ONLINE_ONLY;
     179       
    175180        if( pi->options & OPT_PROTO_MAIL_CHECK )
    176181        {
     
    338343}
    339344
     345static char *set_eval_display_name( set_t *set, char *value )
     346{
     347        account_t *acc = set->data;
     348        struct im_connection *ic = acc->ic;
     349       
     350        return NULL;
     351}
     352
    340353static void purple_add_buddy( struct im_connection *ic, char *who, char *group )
    341354{
     
    571584{
    572585        struct im_connection *ic = purple_ic_by_gc( gc );
     586        const char *dn;
     587        set_t *s;
    573588       
    574589        imcb_connected( ic );
     590       
     591        if( ( dn = purple_connection_get_display_name( gc ) ) &&
     592            ( s = set_find( &ic->acc->set, "display_name" ) ) )
     593        {
     594                g_free( s->value );
     595                s->value = g_strdup( dn );
     596        }
    575597       
    576598        if( gc->flags & PURPLE_CONNECTION_HTML )
Note: See TracChangeset for help on using the changeset viewer.