From f59b2e28c7ab8707750e56a140023af08d42390e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 30 Dec 2017 15:57:14 +0100 Subject: kopete: Remove AIM protocol AIM network has been shutdown in 2017-12-15 This resolves Bug 2846 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit dc34f9c39105b0fe20ba45c064a08406084acbe2) --- kopete/protocols/oscar/aim/aimuserinfo.cpp | 224 ----------------------------- 1 file changed, 224 deletions(-) delete mode 100644 kopete/protocols/oscar/aim/aimuserinfo.cpp (limited to 'kopete/protocols/oscar/aim/aimuserinfo.cpp') diff --git a/kopete/protocols/oscar/aim/aimuserinfo.cpp b/kopete/protocols/oscar/aim/aimuserinfo.cpp deleted file mode 100644 index 0cce3a5c..00000000 --- a/kopete/protocols/oscar/aim/aimuserinfo.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - oscaruserinfo.cpp - Oscar Protocol Plugin - - Copyright (c) 2002 by Tom Linsky - - Kopete (c) 2002 by the Kopete developers - - ************************************************************************* - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ************************************************************************* - */ - -#include "aimuserinfo.h" - -#include "aimaccount.h" -#include "aimcontact.h" -#include "aimprotocol.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool modal, - TQWidget *parent, const char* name ) - : KDialogBase( parent, name, modal, i18n( "User Information on %1" ) - .arg( c->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ), - Cancel | Ok , Ok, true ) -{ - kdDebug(14200) << k_funcinfo << "for contact '" << c->contactId() << "'" << endl; - - m_contact = c; - mAccount = acc; - - mMainWidget = new AIMUserInfoWidget(this, "aimuserinfowidget"); - setMainWidget(mMainWidget); - - TQObject::connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotSaveClicked())); - TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotUpdateClicked())); - TQObject::connect(this, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCloseClicked())); - TQObject::connect(c, TQT_SIGNAL(updatedProfile()), this, TQT_SLOT(slotUpdateProfile())); - - mMainWidget->txtScreenName->setText( c->contactId() ); - - TQString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - if( nickName.isEmpty() ) - mMainWidget->txtNickName->setText( c->contactId() ); - else - mMainWidget->txtNickName->setText( nickName ); - - if(m_contact == mAccount->myself()) // edit own account profile - { - mMainWidget->lblWarnLevel->hide(); - mMainWidget->txtWarnLevel->hide(); - mMainWidget->lblIdleTime->hide(); - mMainWidget->txtIdleTime->hide(); - mMainWidget->lblOnlineSince->hide(); - mMainWidget->txtOnlineSince->hide(); - mMainWidget->txtAwayMessage->hide(); - mMainWidget->lblAwayMessage->hide(); - - userInfoView=0L; - mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); - TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); - userInfoEdit = new KTextEdit(TQString(), TQString(), - mMainWidget->userInfoFrame, "userInfoEdit"); - userInfoEdit->setTextFormat(PlainText); - - AIMMyselfContact* aimmc = dynamic_cast( c ); - if ( aimmc ) - userInfoEdit->setText( aimmc->userProfile() ); - else - userInfoEdit->setText( TQString() ); - - setButtonText(Ok, i18n("&Save Profile")); - showButton(User1, false); - l->addWidget(userInfoEdit); - } - else - { - userInfoEdit=0L; - mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); - TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); - userInfoView = new KTextBrowser(mMainWidget->userInfoFrame, "userInfoView"); - userInfoView->setTextFormat(AutoText); - userInfoView->setNotifyClick(true); - TQObject::connect( - userInfoView, TQT_SIGNAL(urlClick(const TQString&)), - this, TQT_SLOT(slotUrlClicked(const TQString&))); - TQObject::connect( - userInfoView, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), - this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); - showButton(Cancel, false); - setButtonText(Ok, i18n("&Close")); - setEscapeButton(Ok); - l->addWidget(userInfoView); - - if(m_contact->isOnline()) - { - // Update the user view to indicate that we're requesting the user's profile - userInfoView->setText(i18n("Requesting User Profile, please wait...")); - } - TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateProfile())); - } -} - -AIMUserInfoDialog::~AIMUserInfoDialog() -{ - kdDebug(14200) << k_funcinfo << "Called." << endl; -} - -void AIMUserInfoDialog::slotUpdateClicked() -{ - kdDebug(14200) << k_funcinfo << "Called." << endl; - TQString newNick = mMainWidget->txtNickName->text(); - TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - if ( !newNick.isEmpty() && ( newNick != currentNick ) ) - { - //m_contact->rename(newNick); - //emit updateNickname(newNick); - setCaption(i18n("User Information on %1").arg(newNick)); - } - -} - -void AIMUserInfoDialog::slotSaveClicked() -{ - kdDebug(14200) << k_funcinfo << "Called." << endl; - - if (userInfoEdit) - { // editable mode, set profile - TQString newNick = mMainWidget->txtNickName->text(); - TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - if(!newNick.isEmpty() && ( newNick != currentNick ) ) - { - //m_contact->rename(newNick); - //emit updateNickname(newNick); - setCaption(i18n("User Information on %1").arg(newNick)); - } - - mAccount->setUserProfile(userInfoEdit->text()); - } - - emit closing(); -} - -void AIMUserInfoDialog::slotCloseClicked() -{ - kdDebug(14200) << k_funcinfo << "Called." << endl; - emit closing(); -} - -void AIMUserInfoDialog::slotUpdateProfile() -{ - kdDebug(14152) << k_funcinfo << "Got User Profile." << endl; - AIMProtocol* p = static_cast( mAccount->protocol() ); - TQString awayMessage = m_contact->property( p->awayMessage ).value().toString(); - mMainWidget->txtAwayMessage->setText( awayMessage ); - - if ( awayMessage.isNull() ) - { - mMainWidget->txtAwayMessage->hide(); - mMainWidget->lblAwayMessage->hide(); - } - else - { - mMainWidget->txtAwayMessage->show(); - mMainWidget->lblAwayMessage->show(); - } - - TQString onlineSince = m_contact->property("onlineSince").value().toString(); - //TQString onlineSince = m_details.onlineSinceTime().toString(); - mMainWidget->txtOnlineSince->setText( onlineSince ); - - AIMContact* c = static_cast( m_contact ); - mMainWidget->txtIdleTime->setText(c->formattedIdleTime()); - mMainWidget->txtWarnLevel->setText(TQString::number(c->warningLevel())); - - TQString contactProfile = m_contact->property( p->clientProfile ).value().toString(); - if ( contactProfile.isNull() ) - { - contactProfile = - i18n("No user information provided"); - } - - if(userInfoEdit) - { - userInfoEdit->setText(contactProfile); - } - else if(userInfoView) - { - userInfoView->setText(contactProfile); - } - -} - -void AIMUserInfoDialog::slotUrlClicked(const TQString &url) -{ - new KRun(KURL(url)); -} - -void AIMUserInfoDialog::slotMailClicked(const TQString&, const TQString &address) -{ - new KRun(KURL(address)); -} - -#include "aimuserinfo.moc" - -//kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off; -- cgit v1.2.1