diff options
Diffstat (limited to 'kopete/protocols/gadu/gaduaccount.cpp')
-rw-r--r-- | kopete/protocols/gadu/gaduaccount.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/kopete/protocols/gadu/gaduaccount.cpp b/kopete/protocols/gadu/gaduaccount.cpp index 5ef1fe50..52f13e08 100644 --- a/kopete/protocols/gadu/gaduaccount.cpp +++ b/kopete/protocols/gadu/gaduaccount.cpp @@ -49,9 +49,9 @@ #include <tqapplication.h> #include <tqdialog.h> #include <tqtimer.h> -#include <textcodec.h> +#include <tqtextcodec.h> #include <tqptrlist.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqhostaddress.h> #include <netinet/in.h> @@ -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()->convertStatus( GG_STATUS_NOT_AVAIL ); + p->status = GaduProtocol::protocol()->converttqStatus( 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 currentStatus; + unsigned int currenttqStatus; if ( isAway ) { - currentStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_BUSY : GG_STATUS_BUSY_DESCR; + currenttqStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_BUSY : GG_STATUS_BUSY_DESCR; } else{ - currentStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_AVAIL : GG_STATUS_AVAIL_DESCR; + currenttqStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_AVAIL : GG_STATUS_AVAIL_DESCR; } - changeStatus( GaduProtocol::protocol()->convertStatus( currentStatus ), awayMessage ); + changetqStatus( GaduProtocol::protocol()->converttqStatus( currenttqStatus ), awayMessage ); } @@ -251,8 +251,8 @@ GaduAccount::actionMenu() { kdDebug(14100) << "actionMenu() " << endl; - p->actionMenu_ = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this ); - p->actionMenu_->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%1 <%2> " ). + p->actionMenu_ = new KActionMenu( accountId(), myself()->onlinetqStatus().iconFor( this ), this ); + p->actionMenu_->popupMenu()->insertTitle( myself()->onlinetqStatus().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()->convertStatus( GG_STATUS_AVAIL ).iconFor( this ), + GaduProtocol::protocol()->converttqStatus( GG_STATUS_AVAIL ).iconFor( this ), 0, this, TQT_SLOT( slotGoOnline() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Busy" ), - GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ).iconFor( this ), + GaduProtocol::protocol()->converttqStatus( GG_STATUS_BUSY ).iconFor( this ), 0, this, TQT_SLOT( slotGoBusy() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Invisible" ), - GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ).iconFor( this ), + GaduProtocol::protocol()->converttqStatus( GG_STATUS_INVISIBLE ).iconFor( this ), 0, this, TQT_SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Go &Offline" ), - GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ), + GaduProtocol::protocol()->converttqStatus( 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. - changeStatus( initialStatus(), p->lastDescription ); + changetqStatus( initialtqStatus(), p->lastDescription ); } void @@ -353,7 +353,7 @@ void GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason ) { kdDebug(14100) << k_funcinfo << "Called" << endl; - changeStatus( status, reason); + changetqStatus( status, reason); } void @@ -390,7 +390,7 @@ GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* pare } void -GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& descr ) +GaduAccount::changetqStatus( const Kopete::OnlineStatus& status, const TQString& descr ) { unsigned int ns; @@ -418,14 +418,14 @@ GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& d 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 ); - changeStatus( GaduProtocol::protocol()->convertStatus( ns ), descr ); + changetqStatus( GaduProtocol::protocol()->converttqStatus( 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 ); - changeStatus( GaduProtocol::protocol()->convertStatus( ns ), descr ); + changetqStatus( GaduProtocol::protocol()->converttqStatus( ns ), descr ); return; } @@ -455,7 +455,7 @@ GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& d else { p->status = status; if ( descr.isEmpty() ) { - if ( p->session_->changeStatus( status.internalStatus(), p->forFriends ) != 0 ) + if ( p->session_->changetqStatus( 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()->convertStatus( GG_STATUS_CONNECTING )); + myself()->setOnlineStatus( GaduProtocol::protocol()->converttqStatus( 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_->changeStatus( status ); + p->session_->changetqStatus( status ); } } void GaduAccount::slotLogoff() { - if ( p->session_->isConnected() || p->status == GaduProtocol::protocol()->convertStatus( GG_STATUS_CONNECTING )) { - p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); - changeStatus( p->status ); + if ( p->session_->isConnected() || p->status == GaduProtocol::protocol()->converttqStatus( GG_STATUS_CONNECTING )) { + p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ); + changetqStatus( p->status ); p->session_->logoff(); dccOff(); } @@ -525,7 +525,7 @@ GaduAccount::slotLogoff() void GaduAccount::slotGoOnline() { - changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ) ); + changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_AVAIL ) ); } void GaduAccount::slotGoOffline() @@ -537,13 +537,13 @@ GaduAccount::slotGoOffline() void GaduAccount::slotGoInvisible() { - changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ) ); + changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_INVISIBLE ) ); } void GaduAccount::slotGoBusy() { - changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ) ); + changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_BUSY ) ); } void @@ -648,7 +648,7 @@ GaduAccount::contactStatusChanged( KGaduNotify* gaduNotify ) return; } - contact->changedStatus( gaduNotify ); + contact->changedtqStatus( 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()->convertStatus( GG_STATUS_NOT_AVAIL ); + p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ); myself()->setOnlineStatus( p->status ); disconnected( BadPassword ); return; @@ -710,9 +710,9 @@ GaduAccount::connectionFailed( gg_failure_t failure ) slotLogin( p->status.internalStatus() , p->lastDescription ); } else { - error( i18n( "unable to connect to the Gadu-Gadu server(\"%1\")." ).arg( GaduSession::failureDescription( failure ) ), + error( i18n( "unable to connect to the Gadu-Gadu server(\"%1\")." ).tqarg( GaduSession::failureDescription( failure ) ), i18n( "Connection Error" ) ); - p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); + p->status = GaduProtocol::protocol()->converttqStatus( 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()->convertStatus( p->session_->status() ); + p->status = GaduProtocol::protocol()->converttqStatus( 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(); } - setAllContactsStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ) ); + setAllContactstqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ) ); - status = myself()->onlineStatus().internalStatus(); + status = myself()->onlinetqStatus().internalStatus(); if ( status != GG_STATUS_NOT_AVAIL || status != GG_STATUS_NOT_AVAIL_DESCR ) { - myself()->setOnlineStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ) ); + myself()->setOnlineStatus( GaduProtocol::protocol()->converttqStatus( 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 - changeStatus( p->status, p->lastDescription ); + changetqStatus( p->status, p->lastDescription ); saveFriendsMode( p->forFriends ); @@ -925,7 +925,7 @@ GaduAccount::slotExportContactsListToFile() p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString(), Kopete::UI::Global::mainWidget(), "gadu-list-save", false ); p->saveListDialog->setCaption( - i18n("Save Contacts List for Account %1 As").arg( + i18n("Save Contacts List for Account %1 As").tqarg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) ); if ( p->saveListDialog->exec() == TQDialog::Accepted ) { @@ -971,7 +971,7 @@ GaduAccount::slotImportContactsFromFile() p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString(), Kopete::UI::Global::mainWidget(), "gadu-list-load", true ); p->loadListDialog->setCaption( - i18n("Load Contacts List for Account %1 As").arg( + i18n("Load Contacts List for Account %1 As").tqarg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) ); if ( p->loadListDialog->exec() == TQDialog::Accepted ) { @@ -1077,7 +1077,7 @@ GaduAccount::slotDescription() GaduAway* away = new GaduAway( this ); if( away->exec() == TQDialog::Accepted ) { - changeStatus( GaduProtocol::protocol()->convertStatus( away->status() ), + changetqStatus( GaduProtocol::protocol()->converttqStatus( away->status() ), away->awayText() ); } delete away; |