diff options
Diffstat (limited to 'kopete/protocols/gadu/gaduaccount.cpp')
-rw-r--r-- | kopete/protocols/gadu/gaduaccount.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kopete/protocols/gadu/gaduaccount.cpp b/kopete/protocols/gadu/gaduaccount.cpp index 52f13e08..47a124b3 100644 --- a/kopete/protocols/gadu/gaduaccount.cpp +++ b/kopete/protocols/gadu/gaduaccount.cpp @@ -132,7 +132,7 @@ static const char* const servers_ip[] = { setMyself( new GaduContact( accountId().toInt(), accountId(), this, Kopete::ContactList::self()->myself() ) ); - p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ); + p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); p->lastDescription = TQString(); for ( unsigned int i = 0; i < NUM_SERVERS ; i++ ) { @@ -234,15 +234,15 @@ GaduAccount::initConnections() void GaduAccount::setAway( bool isAway, const TQString& awayMessage ) { - unsigned int currenttqStatus; + unsigned int currentStatus; if ( isAway ) { - currenttqStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_BUSY : GG_STATUS_BUSY_DESCR; + currentStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_BUSY : GG_STATUS_BUSY_DESCR; } else{ - currenttqStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_AVAIL : GG_STATUS_AVAIL_DESCR; + currentStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_AVAIL : GG_STATUS_AVAIL_DESCR; } - changetqStatus( GaduProtocol::protocol()->converttqStatus( currenttqStatus ), awayMessage ); + changeStatus( GaduProtocol::protocol()->convertStatus( currentStatus ), awayMessage ); } @@ -251,8 +251,8 @@ GaduAccount::actionMenu() { kdDebug(14100) << "actionMenu() " << endl; - p->actionMenu_ = new KActionMenu( accountId(), myself()->onlinetqStatus().iconFor( this ), this ); - p->actionMenu_->popupMenu()->insertTitle( myself()->onlinetqStatus().iconFor( myself() ), i18n( "%1 <%2> " ). + p->actionMenu_ = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this ); + p->actionMenu_->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%1 <%2> " ). arg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(), accountId() ) ); if ( p->session_->isConnected() ) { @@ -287,19 +287,19 @@ GaduAccount::actionMenu() p->listFromFileAction->setEnabled( TRUE ); } p->actionMenu_->insert( new KAction( i18n( "Go O&nline" ), - GaduProtocol::protocol()->converttqStatus( GG_STATUS_AVAIL ).iconFor( this ), + GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ).iconFor( this ), 0, this, TQT_SLOT( slotGoOnline() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Busy" ), - GaduProtocol::protocol()->converttqStatus( GG_STATUS_BUSY ).iconFor( this ), + GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ).iconFor( this ), 0, this, TQT_SLOT( slotGoBusy() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Invisible" ), - GaduProtocol::protocol()->converttqStatus( GG_STATUS_INVISIBLE ).iconFor( this ), + GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ).iconFor( this ), 0, this, TQT_SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Go &Offline" ), - GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ), + GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ), 0, this, TQT_SLOT( slotGoOffline() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Description..." ), "info", @@ -332,7 +332,7 @@ GaduAccount::connectWithPassword(const TQString& password) if (isConnected ()) return; // FIXME: add status description to this mechainsm, this is a hack now. libkopete design issue. - changetqStatus( initialtqStatus(), p->lastDescription ); + changeStatus( initialStatus(), p->lastDescription ); } void @@ -353,7 +353,7 @@ void GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason ) { kdDebug(14100) << k_funcinfo << "Called" << endl; - changetqStatus( status, reason); + changeStatus( status, reason); } void @@ -390,7 +390,7 @@ GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* pare } void -GaduAccount::changetqStatus( const Kopete::OnlineStatus& status, const TQString& descr ) +GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& descr ) { unsigned int ns; @@ -418,14 +418,14 @@ GaduAccount::changetqStatus( const Kopete::OnlineStatus& status, const TQString& if (!descr.isEmpty() && !GaduProtocol::protocol()->statusWithDescription( status.internalStatus() ) ) { // and rerun us again. This won't cause any recursive call, as both conversions are static ns = GaduProtocol::protocol()->statusToWithDescription( status ); - changetqStatus( GaduProtocol::protocol()->converttqStatus( ns ), descr ); + changeStatus( GaduProtocol::protocol()->convertStatus( ns ), descr ); return; } // well, if it's empty but we want to set status with desc, change it too if (descr.isEmpty() && GaduProtocol::protocol()->statusWithDescription( status.internalStatus() ) ) { ns = GaduProtocol::protocol()->statusToWithoutDescription( status ); - changetqStatus( GaduProtocol::protocol()->converttqStatus( ns ), descr ); + changeStatus( GaduProtocol::protocol()->convertStatus( ns ), descr ); return; } @@ -455,7 +455,7 @@ GaduAccount::changetqStatus( const Kopete::OnlineStatus& status, const TQString& else { p->status = status; if ( descr.isEmpty() ) { - if ( p->session_->changetqStatus( status.internalStatus(), p->forFriends ) != 0 ) + if ( p->session_->changeStatus( status.internalStatus(), p->forFriends ) != 0 ) return; } else { @@ -481,7 +481,7 @@ GaduAccount::slotLogin( int status, const TQString& dscr ) { p->lastDescription = dscr; - myself()->setOnlineStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_CONNECTING )); + myself()->setOnlineStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_CONNECTING )); myself()->setProperty( GaduProtocol::protocol()->propAwayMessage, dscr ); if ( !p->session_->isConnected() ) { @@ -507,16 +507,16 @@ GaduAccount::slotLogin( int status, const TQString& dscr ) } } else { - p->session_->changetqStatus( status ); + p->session_->changeStatus( status ); } } void GaduAccount::slotLogoff() { - if ( p->session_->isConnected() || p->status == GaduProtocol::protocol()->converttqStatus( GG_STATUS_CONNECTING )) { - p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ); - changetqStatus( p->status ); + if ( p->session_->isConnected() || p->status == GaduProtocol::protocol()->convertStatus( GG_STATUS_CONNECTING )) { + p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); + changeStatus( p->status ); p->session_->logoff(); dccOff(); } @@ -525,7 +525,7 @@ GaduAccount::slotLogoff() void GaduAccount::slotGoOnline() { - changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_AVAIL ) ); + changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ) ); } void GaduAccount::slotGoOffline() @@ -537,13 +537,13 @@ GaduAccount::slotGoOffline() void GaduAccount::slotGoInvisible() { - changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_INVISIBLE ) ); + changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ) ); } void GaduAccount::slotGoBusy() { - changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_BUSY ) ); + changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ) ); } void @@ -648,7 +648,7 @@ GaduAccount::contactStatusChanged( KGaduNotify* gaduNotify ) return; } - contact->changedtqStatus( gaduNotify ); + contact->changedStatus( gaduNotify ); } void @@ -675,7 +675,7 @@ GaduAccount::connectionFailed( gg_failure_t failure ) case GG_FAILURE_PASSWORD: password().setWrong(); // user pressed CANCEL - p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ); + p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); myself()->setOnlineStatus( p->status ); disconnected( BadPassword ); return; @@ -712,7 +712,7 @@ GaduAccount::connectionFailed( gg_failure_t failure ) else { error( i18n( "unable to connect to the Gadu-Gadu server(\"%1\")." ).tqarg( GaduSession::failureDescription( failure ) ), i18n( "Connection Error" ) ); - p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ); + p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); myself()->setOnlineStatus( p->status ); disconnected( InvalidHost ); } @@ -777,7 +777,7 @@ void GaduAccount::connectionSucceed( ) { kdDebug(14100) << "#### Gadu-Gadu connected! " << endl; - p->status = GaduProtocol::protocol()->converttqStatus( p->session_->status() ); + p->status = GaduProtocol::protocol()->convertStatus( p->session_->status() ); myself()->setOnlineStatus( p->status ); myself()->setProperty( GaduProtocol::protocol()->propAwayMessage, p->lastDescription ); startNotify(); @@ -822,11 +822,11 @@ GaduAccount::slotSessionDisconnect( Kopete::Account::DisconnectReason reason ) p->pingTimer_->stop(); } - setAllContactstqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ) ); + setAllContactsStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ) ); - status = myself()->onlinetqStatus().internalStatus(); + status = myself()->onlineStatus().internalStatus(); if ( status != GG_STATUS_NOT_AVAIL || status != GG_STATUS_NOT_AVAIL_DESCR ) { - myself()->setOnlineStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ) ); + myself()->setOnlineStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ) ); } GaduAccount::disconnect( reason ); } @@ -903,7 +903,7 @@ GaduAccount::slotFriendsMode() p->forFriends = !p->forFriends; kdDebug( 14100 ) << "for friends mode: " << p->forFriends << " desc" << p->lastDescription << endl; // now change status, it will changing it with p->forFriends flag - changetqStatus( p->status, p->lastDescription ); + changeStatus( p->status, p->lastDescription ); saveFriendsMode( p->forFriends ); @@ -1077,7 +1077,7 @@ GaduAccount::slotDescription() GaduAway* away = new GaduAway( this ); if( away->exec() == TQDialog::Accepted ) { - changetqStatus( GaduProtocol::protocol()->converttqStatus( away->status() ), + changeStatus( GaduProtocol::protocol()->convertStatus( away->status() ), away->awayText() ); } delete away; |