-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello guys,
IMO it is annoying that you can send an authorization to a user by right-clicking on him, but you cannot _request_ authorization the same way. currently you have to call the system menu->user functions->request auth, and then drag the user into the dialog window..... *pfff* so much steps! my patch fixes this and adds a new menu item mnuUser->mnuSend->"Send Authorization Request" - it calls the same reqAuthDialog, but you do not have to drag a user down here, because the UIN is already taken from the user where you just right-clicked. for me it works, but i did not test it very much. anyhow, it's useful :) hopefully someone will test and commit this. Thomas - -- _________________________________________________ No I Don't Yahoo! And I'm getting pretty sick of being asked if I do. _________________________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9ap0B+83LmoKU5MARAvu4AKC3lVNA18vzi0fGVNkKvcePIb1rvgCfWsLi HS7wCRCN5zIAfs/Pp5tvNug= =B11j -----END PGP SIGNATURE-----
Index: gui-defines.h =================================================================== RCS file: /cvsroot/licq/qt-gui/src/gui-defines.h,v retrieving revision 1.18 diff -u -3 -p -r1.18 gui-defines.h --- gui-defines.h 17 Jul 2002 04:38:28 -0000 1.18 +++ gui-defines.h 26 Aug 2002 21:18:46 -0000 @@ -18,6 +18,7 @@ enum UserMenu { mnuUserSendSms, mnuUserSendKey, mnuUserAuthorize, + mnuUserAuthorizeRequest, mnuUserCheckResponse, mnuUserCustomAutoResponse, mnuUserGeneral, Index: mainwin.h =================================================================== RCS file: /cvsroot/licq/qt-gui/src/mainwin.h,v retrieving revision 1.89 diff -u -3 -p -r1.89 mainwin.h --- mainwin.h 15 Aug 2002 09:11:33 -0000 1.89 +++ mainwin.h 26 Aug 2002 21:18:47 -0000 @@ -269,6 +269,7 @@ protected slots: void popupOptionsDlg() { emit showOptionsDlg(0); }; void showAuthUserDlg(); void showReqAuthDlg(); + void showReqAuthDlg(unsigned long nUin); void showSearchUserDlg(); void popupSystemMenu(); void changeDebug(int); Index: reqauthdlg.h =================================================================== RCS file: /cvsroot/licq/qt-gui/src/reqauthdlg.h,v retrieving revision 1.1 diff -u -3 -p -r1.1 reqauthdlg.h --- reqauthdlg.h 26 Jul 2002 03:27:51 -0000 1.1 +++ reqauthdlg.h 26 Aug 2002 21:18:47 -0000 @@ -16,6 +16,8 @@ class ReqAuthDlg : public QDialog Q_OBJECT public: ReqAuthDlg (CICQDaemon *s, QWidget *parent = 0); + ReqAuthDlg (CICQDaemon *s, unsigned long nUin, QWidget *parent = 0); + void showReqAuthDlg (CICQDaemon *s, unsigned long nUin, QWidget *parent = 0); protected: CICQDaemon *server; QPushButton *btnOk, *btnCancel; Index: mainwin.cpp =================================================================== RCS file: /cvsroot/licq/qt-gui/src/mainwin.cpp,v retrieving revision 1.239 diff -u -3 -p -r1.239 mainwin.cpp --- mainwin.cpp 15 Aug 2002 09:09:59 -0000 1.239 +++ mainwin.cpp 26 Aug 2002 21:18:51 -0000 @@ -1752,6 +1752,11 @@ void CMainWindow::callUserFunction(int i (void) new AuthUserDlg(licqDaemon, nUin, true); break; } + case mnuUserAuthorizeRequest: + { + showReqAuthDlg(nUin); + break; + } case mnuUserCheckResponse: { (void) new ShowAwayMsgDlg(licqDaemon, licqSigMan, nUin); @@ -2951,6 +2956,7 @@ void CMainWindow::ApplyIcons(const char mnuUser->changeItem(pmFile, tr("Send &File Transfer"), mnuUserSendFile); mnuUser->changeItem(pmContact, tr("Send Contact &List"), mnuUserSendContact); mnuUser->changeItem(pmAuthorize, tr("Send &Authorization"), mnuUserAuthorize); + mnuUser->changeItem(pmAuthorize, tr("Send Authorization Re&quest"), mnuUserAuthorizeRequest); mnuUser->changeItem(pmSMS, tr("Send &SMS"), mnuUserSendSms); mnuUser->changeItem(tr("Request &Secure Channel"), mnuUserSendKey); CUserView::UpdateFloaties(); @@ -3102,6 +3108,7 @@ void CMainWindow::initMenu() mnuSend->insertItem(pmFile, tr("Send &File Transfer"), mnuUserSendFile); mnuSend->insertItem(pmContact, tr("Send Contact &List"), mnuUserSendContact); mnuSend->insertItem(pmAuthorize, tr("Send &Authorization"), mnuUserAuthorize); + mnuSend->insertItem(pmAuthorize, tr("Send Authorization Re&quest"), mnuUserAuthorizeRequest); mnuSend->insertItem(pmSMS, tr("Send &SMS"), mnuUserSendSms); mnuSend->insertSeparator(); mnuSend->insertItem(pmSecureOff, tr("Request &Secure Channel"), mnuUserSendKey); @@ -3251,6 +3258,12 @@ void CMainWindow::showAuthUserDlg() void CMainWindow::showReqAuthDlg() { ReqAuthDlg *reqAuthDlg = new ReqAuthDlg(licqDaemon); + reqAuthDlg->show(); +} + +void CMainWindow::showReqAuthDlg(unsigned long nUin) +{ + ReqAuthDlg *reqAuthDlg = new ReqAuthDlg(licqDaemon, nUin); reqAuthDlg->show(); } Index: reqauthdlg.cpp =================================================================== RCS file: /cvsroot/licq/qt-gui/src/reqauthdlg.cpp,v retrieving revision 1.1 diff -u -3 -p -r1.1 reqauthdlg.cpp --- reqauthdlg.cpp 26 Jul 2002 03:27:51 -0000 1.1 +++ reqauthdlg.cpp 26 Aug 2002 21:18:52 -0000 @@ -34,11 +34,26 @@ #include "licq_icqd.h" #include "usercodec.h" +ReqAuthDlg::ReqAuthDlg(CICQDaemon *s, unsigned long nUin, QWidget *parent) + : QDialog(parent, "RequestAuthDialog", false, WDestructiveClose) +{ + showReqAuthDlg(s, nUin, parent); +} + ReqAuthDlg::ReqAuthDlg(CICQDaemon *s, QWidget *parent) : QDialog(parent, "RequestAuthDialog", false, WDestructiveClose) { + unsigned long nUin = 0; + showReqAuthDlg(s, nUin, parent); +} + +void ReqAuthDlg::showReqAuthDlg(CICQDaemon *s, unsigned long nUin, QWidget *parent) +{ server = s; + QString UIN; + UIN.setNum(nUin); + setCaption(tr("Licq - Request Authorization")); QBoxLayout* toplay = new QVBoxLayout(this, 8, 8); @@ -48,6 +63,7 @@ ReqAuthDlg::ReqAuthDlg(CICQDaemon *s, QW lblUin->setText(tr("Request authorization from (UIN):")); edtUin = new QLineEdit(this); edtUin->setMinimumWidth(90); + edtUin->setText(UIN); edtUin->setValidator(new QIntValidator(10000, 2147483647, edtUin)); connect (edtUin, SIGNAL(returnPressed()), SLOT(ok()) ); QBoxLayout* lay = new QHBoxLayout(toplay); @@ -75,7 +91,7 @@ ReqAuthDlg::ReqAuthDlg(CICQDaemon *s, QW connect (btnOk, SIGNAL(clicked()), SLOT(ok()) ); connect (btnCancel, SIGNAL(clicked()), SLOT(close()) ); - edtUin->setFocus(); + mleRequest->setFocus(); show(); }