Changeset aef4828 for protocols/yahoo


Ignore:
Timestamp:
2007-04-06T05:20:31Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
552e641
Parents:
0da65d5
Message:

More cleanups, mainly in the callbacks. Replaced things like
do_error_dialog() and (set|hide)_login_progress(_error)?() with things
that hopefully make more sense.

Although it's still not really great...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    r0da65d5 raef4828  
    123123static void byahoo_login( account_t *acc )
    124124{
    125         struct im_connection *ic = new_gaim_conn( acc );
     125        struct im_connection *ic = imc_new( acc );
    126126        struct byahoo_data *yd = ic->proto_data = g_new0( struct byahoo_data, 1 );
    127127       
     
    129129        yd->current_status = YAHOO_STATUS_AVAILABLE;
    130130       
    131         set_login_progress( ic, 1, "Connecting" );
     131        imc_log( ic, "Connecting" );
    132132        yd->y2_id = yahoo_init( acc->user, acc->pass );
    133133        yahoo_login( yd->y2_id, yd->current_status );
     
    163163{
    164164        /* Just make an URL and let the user fetch the info */
    165         serv_got_crap(ic, "%s\n%s: %s%s", _("User Info"),
     165        imc_log(ic, "%s\n%s: %s%s", _("User Info"),
    166166                        _("For now, fetch yourself"), yahoo_get_profile_url(),
    167167                        who);
     
    511511        if( succ == YAHOO_LOGIN_OK )
    512512        {
    513                 account_online( ic );
     513                imc_connected( ic );
    514514               
    515515                yd->logged_in = TRUE;
     
    550550               
    551551                if( yd->logged_in )
    552                         hide_login_progress_error( ic, s );
     552                        imc_error( ic, s );
    553553                else
    554                         hide_login_progress( ic, s );
     554                        imc_error( ic, s );
    555555               
    556556                g_free( s );
    557557               
    558                 signoff( ic );
     558                imc_logout( ic );
    559559        }
    560560}
     
    619619        struct im_connection *ic = byahoo_get_ic_by_id( id );
    620620       
    621         serv_got_crap( ic, "Got a file transfer (file = %s) from %s. Ignoring for now due to lack of support.", fname, who );
     621        imc_log( ic, "Got a file transfer (file = %s) from %s. Ignoring for now due to lack of support.", fname, who );
    622622}
    623623
     
    639639        struct im_connection *ic = byahoo_get_ic_by_id( id );
    640640       
    641         serv_got_crap( ic, "Yahoo! system message: %s", msg );
     641        imc_log( ic, "Yahoo! system message: %s", msg );
    642642}
    643643
     
    646646        struct im_connection *ic = byahoo_get_ic_by_id( id );
    647647       
    648         serv_got_crap( ic, "Got a webcam invitation from %s. IRC+webcams is a no-no though...", from );
     648        imc_log( ic, "Got a webcam invitation from %s. IRC+webcams is a no-no though...", from );
    649649}
    650650
     
    653653        struct im_connection *ic = byahoo_get_ic_by_id( id );
    654654       
     655        imc_error( ic, "%s", err );
     656       
    655657        if( fatal )
    656         {
    657                 hide_login_progress_error( ic, err );
    658                 signoff( ic );
    659         }
    660         else
    661         {
    662                 do_error_dialog( ic, err, "Yahoo! error" );
    663         }
     658                imc_logout( ic );
    664659}
    665660
     
    829824        struct im_connection *ic = byahoo_get_ic_by_id( id );
    830825       
    831         serv_got_crap( ic, "Invite to chatroom %s rejected by %s: %s", room, who, msg );
     826        imc_log( ic, "Invite to chatroom %s rejected by %s: %s", room, who, msg );
    832827}
    833828
     
    912907       
    913908        if( from && subj )
    914                 serv_got_crap( ic, "Received e-mail message from %s with subject `%s'", from, subj );
     909                imc_log( ic, "Received e-mail message from %s with subject `%s'", from, subj );
    915910        else if( cnt > 0 )
    916                 serv_got_crap( ic, "Received %d new e-mails", cnt );
     911                imc_log( ic, "Received %d new e-mails", cnt );
    917912}
    918913
Note: See TracChangeset for help on using the changeset viewer.