Summary: | [liboscar/icq] password changing support for ICQ | ||
---|---|---|---|
Product: | [Unmaintained] kopete | Reporter: | Norberto Bensa <nbensa> |
Component: | ICQ and AIM Plugins | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | kde, mail |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Norberto Bensa
2004-07-13 21:24:59 UTC
This is on the way for Gadu-Gadu and Jabber...for 0.10.x. Can't wait to see this. :) Assuming this has been done for gadu and jabber for 0.10 and reassigning to ICQ. SVN commit 604174 by rjarosz: Add feature 85117: [liboscar/icq] password changing support for ICQ. FEATURE: 85117 GUI: M +3 -1 icq/CMakeLists.txt A icq/ui/icqchangepassword.ui A icq/ui/icqchangepassworddialog.cpp [License: LGPL (v2+)] A icq/ui/icqchangepassworddialog.h [License: LGPL (v2+)] M +54 -5 icq/ui/icqeditaccountui.ui M +10 -0 icq/ui/icqeditaccountwidget.cpp M +1 -0 icq/ui/icqeditaccountwidget.h M +1 -1 liboscar/CMakeLists.txt M +23 -0 liboscar/client.cpp M +12 -0 liboscar/client.h A liboscar/icqchangepasswordtask.cpp [License: LGPL (v2+)] A liboscar/icqchangepasswordtask.h [License: LGPL (v2+)] --- trunk/KDE/kdenetwork/kopete/protocols/oscar/icq/CMakeLists.txt #604173:604174 @@ -19,6 +19,7 @@ ui/icqauthreplydialog.cpp ui/icqaddcontactpage.cpp ui/icqsearchdialog.cpp +ui/icqchangepassworddialog.cpp ) kde4_add_ui_files(kopete_icq_ui_SRCS @@ -31,7 +32,8 @@ ui/icqorgaffinfowidget.ui ui/icqauthreplyui.ui ui/icqsearchbase.ui -ui/icqeditaccountui.ui +ui/icqeditaccountui.ui +ui/icqchangepassword.ui ) set(kopete_icq_PART_SRCS --- trunk/KDE/kdenetwork/kopete/protocols/oscar/icq/ui/icqeditaccountui.ui #604173:604174 @@ -5,21 +5,21 @@ <rect> <x>0</x> <y>0</y> - <width>547</width> - <height>525</height> + <width>552</width> + <height>530</height> </rect> </property> <property name="windowTitle" > <string>Account Preferences - ICQ</string> </property> - <layout class="QGridLayout" > + <layout class="QVBoxLayout" > <property name="margin" > <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item row="0" column="0" > + <item> <widget class="QTabWidget" name="tabWidget7" > <property name="currentIndex" > <number>0</number> @@ -160,6 +160,54 @@ </widget> </item> <item> + <widget class="QGroupBox" name="groupBox_5" > + <property name="title" > + <string>Change password</string> + </property> + <layout class="QHBoxLayout" > + <property name="margin" > + <number>9</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <widget class="QLabel" name="label" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text" > + <string>If you have an existing ICQ account and would like to change its password, you can use this button to enter a new password.</string> + </property> + <property name="wordWrap" > + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="buttonChangePassword" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text" > + <string>Change Your Password</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> <spacer> <property name="orientation" > <enum>Qt::Vertical</enum> @@ -753,7 +801,7 @@ </widget> </widget> </item> - <item row="1" column="0" > + <item> <widget class="QLabel" name="labelStatusMessage" > <property name="text" > <string/> @@ -779,6 +827,7 @@ <tabstop>chkAutoLogin</tabstop> <tabstop>chkGlobalIdentity</tabstop> <tabstop>buttonRegister</tabstop> + <tabstop>buttonChangePassword</tabstop> <tabstop>optionOverrideServer</tabstop> <tabstop>edtServerAddress</tabstop> <tabstop>edtServerPort</tabstop> --- trunk/KDE/kdenetwork/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp #604173:604174 @@ -42,6 +42,7 @@ #include "icqcontact.h" #include "oscarprivacyengine.h" #include "oscarsettings.h" +#include "icqchangepassworddialog.h" ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, Kopete::Account *account, QWidget *parent) @@ -142,9 +143,11 @@ mAccountSettings->tabVisible->setEnabled( false ); mAccountSettings->tabInvisible->setEnabled( false ); mAccountSettings->tabIgnore->setEnabled( false ); + mAccountSettings->buttonChangePassword->setEnabled( false ); } QObject::connect(mAccountSettings->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); + QObject::connect(mAccountSettings->buttonChangePassword, SIGNAL(clicked()), this, SLOT(slotChangePassword())); /* Set tab order to password custom widget correctly */ QWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); @@ -283,6 +286,13 @@ KToolInvocation::invokeBrowser( QLatin1String("http://go.icq.com/register/") ); } +void ICQEditAccountWidget::slotChangePassword() +{ + ICQChangePasswordDialog *passwordDlg = new ICQChangePasswordDialog( mAccount, this ); + passwordDlg->exec(); + delete passwordDlg; +} + #include "icqeditaccountwidget.moc" // vim: set noet ts=4 sts=4 sw=4: // kate: indent-mode csands; space-indent off; replace-tabs off; --- trunk/KDE/kdenetwork/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h #604173:604174 @@ -45,6 +45,7 @@ private slots: void slotOpenRegister(); + void slotChangePassword(); protected: ICQAccount *mAccount; --- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/CMakeLists.txt #604173:604174 @@ -24,7 +24,7 @@ usersearchtask.cpp warningtask.cpp changevisibilitytask.cpp typingnotifytask.cpp buddyicontask.cpp serverredirecttask.cpp oscarsettings.cpp filetransfertask.cpp localcontactlisttask.cpp chatnavservicetask.cpp connectionhandler.cpp chatservicetask.cpp oscarguid.cpp -icquserinfoupdatetask.cpp +icquserinfoupdatetask.cpp icqchangepasswordtask.cpp ) kde4_automoc(${liboscar_SRCS} ) --- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/client.cpp #604173:604174 @@ -63,6 +63,7 @@ #include "chatservicetask.h" #include "rateclassmanager.h" #include "icquserinfoupdatetask.h" +#include "icqchangepasswordtask.h" namespace @@ -802,6 +803,28 @@ warnTask->go( true ); } +bool Client::changeICQPassword( const QString& password ) +{ + Connection* c = d->connections.connectionForFamily( 0x0015 ); + if ( !c ) + return false; + + ICQChangePasswordTask* task = new ICQChangePasswordTask( c->rootTask() ); + QObject::connect( task, SIGNAL(finished()), this, SLOT(changeICQPasswordFinished()) ); + task->setPassword( password ); + task->go( true ); + return true; +} + +void Client::changeICQPasswordFinished() +{ + ICQChangePasswordTask* task = (ICQChangePasswordTask*)sender(); + if ( task->success() ) + d->pass = task->password(); + + emit icqPasswordChanged( !task->success() ); +} + ICQGeneralUserInfo Client::getGeneralInfo( const QString& contact ) { return d->icqInfoTask->generalInfoFor( contact ); --- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/client.h #604173:604174 @@ -207,6 +207,12 @@ void sendWarning( const QString& contact, bool anonymous ); /** + * Change ICQ password + * \param password your new password + */ + bool changeICQPassword( const QString& password ); + + /** * Get the general ICQ info for a client * \param contact the contact to get info for */ @@ -418,6 +424,9 @@ /** we've received an authorization reply */ void authReplyReceived( const QString& contact, const QString& reason, bool auth ); + /** we've received a ICQ password change reply */ + void icqPasswordChanged( bool error ); + /** * we've received an error from a task and need to notify somebody */ @@ -524,6 +533,9 @@ void nextICQAwayMessageRequest(); + /** Change ICQ password finished */ + void changeICQPasswordFinished(); + private: /** Initialize some static tasks */ *** Bug 144458 has been marked as a duplicate of this bug. *** |