Changeset 3472 for branches/protocol_plugin_1_3_0
- Timestamp:
- 05/01/03 10:55:35 (6 years ago)
- Location:
- branches/protocol_plugin_1_3_0/qt-gui/src
- Files:
-
- 39 modified
-
adduserdlg.cpp (modified) (3 diffs)
-
authuserdlg.cpp (modified) (4 diffs)
-
authuserdlg.h (modified) (2 diffs)
-
awaymsgdlg.cpp (modified) (4 diffs)
-
awaymsgdlg.h (modified) (1 diff)
-
chatdlg.cpp (modified) (2 diffs)
-
chatdlg.h (modified) (3 diffs)
-
ewidgets.cpp (modified) (6 diffs)
-
ewidgets.h (modified) (1 diff)
-
filedlg.cpp (modified) (4 diffs)
-
filedlg.h (modified) (3 diffs)
-
forwarddlg.cpp (modified) (6 diffs)
-
forwarddlg.h (modified) (1 diff)
-
keyrequestdlg.cpp (modified) (3 diffs)
-
keyrequestdlg.h (modified) (1 diff)
-
mainwin.cpp (modified) (63 diffs)
-
mainwin.h (modified) (11 diffs)
-
mmlistview.cpp (modified) (8 diffs)
-
mmlistview.h (modified) (3 diffs)
-
mmsenddlg.cpp (modified) (9 diffs)
-
mmsenddlg.h (modified) (1 diff)
-
refusedlg.cpp (modified) (2 diffs)
-
refusedlg.h (modified) (1 diff)
-
reqauthdlg.cpp (modified) (4 diffs)
-
reqauthdlg.h (modified) (1 diff)
-
showawaymsgdlg.cpp (modified) (5 diffs)
-
showawaymsgdlg.h (modified) (1 diff)
-
sigman.cpp (modified) (2 diffs)
-
sigman.h (modified) (1 diff)
-
userbox.cpp (modified) (37 diffs)
-
userbox.h (modified) (4 diffs)
-
usercodec.cpp (modified) (2 diffs)
-
usercodec.h (modified) (1 diff)
-
usereventdlg.cpp (modified) (81 diffs)
-
usereventdlg.h (modified) (11 diffs)
-
userinfodlg.cpp (modified) (20 diffs)
-
userinfodlg.h (modified) (3 diffs)
-
utilitydlg.cpp (modified) (4 diffs)
-
utilitydlg.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/protocol_plugin_1_3_0/qt-gui/src/adduserdlg.cpp
r3467 r3472 50 50 51 51 QBoxLayout *layUin = new QBoxLayout(frmUin, QBoxLayout::LeftToRight); 52 #ifdef QT_PROTOCOL_PLUGIN 53 lblUin = new QLabel(tr("New User Id:"), frmUin); 52 lblUin = new QLabel(tr("New User ID:"), frmUin); 54 53 edtUin = new QLineEdit(frmUin); 55 #else56 lblUin = new QLabel(tr("New User UIN:"), frmUin);57 edtUin = new QLineEdit(frmUin);58 edtUin->setValidator(new QIntValidator(10000, 2147483647, edtUin));59 #endif60 54 layUin->addWidget(lblUin); 61 55 layUin->addWidget(edtUin); … … 91 85 void AddUserDlg::ok() 92 86 { 93 #ifdef QT_PROTOCOL_PLUGIN94 87 QString strUser = edtUin->text().latin1(); 95 88 if (!strUser.isEmpty()) … … 97 90 //TODO Get protocol 98 91 server->AddUserToList(strUser, LICQ_PPID); 92 //if (chkAlert->isChecked()) 93 // server->icqAlertUser(strUser); 99 94 } 100 #else 101 unsigned long nUin = edtUin->text().toULong(); 102 if (nUin != 0) 103 { 104 server->AddUserToList(nUin); 105 if (chkAlert->isChecked()) // alert the user they were added 106 server->icqAlertUser(nUin); 107 } 108 #endif 109 close(true); 95 96 close(true); 110 97 } 111 98 -
branches/protocol_plugin_1_3_0/qt-gui/src/authuserdlg.cpp
r3467 r3472 36 36 #include "usercodec.h" 37 37 38 #ifdef QT_PROTOCOL_PLUGIN39 38 //TODO Add drop down list of avaiable protocols 40 39 AuthUserDlg::AuthUserDlg(CICQDaemon *s, const char *szId, unsigned long nPPID, … … 113 112 show(); 114 113 } 115 #endif116 114 117 115 AuthUserDlg::AuthUserDlg(CICQDaemon *s, unsigned long nUin, bool bGrant, … … 197 195 if (edtUin->text().isEmpty()) return; 198 196 m_nUin = edtUin->text().toULong(); 199 } 200 201 #ifdef QT_PROTOCOL_PLUGIN 197 } 198 202 199 if (m_szId == 0) m_szId = strdup(edtUin->text().latin1()); 203 200 … … 212 209 close(true); 213 210 } 214 #else215 if (m_nUin)216 {217 QTextCodec *codec = UserCodec::codecForUIN(m_nUin);218 if (m_bGrant)219 server->icqAuthorizeGrant(m_nUin, codec->fromUnicode(mleResponse->text()));220 else221 server->icqAuthorizeRefuse(m_nUin, codec->fromUnicode(mleResponse->text()));222 close(true);223 }224 #endif225 211 } 226 212 -
branches/protocol_plugin_1_3_0/qt-gui/src/authuserdlg.h
r3467 r3472 18 18 AuthUserDlg (CICQDaemon *s, unsigned long nUin, bool bGrant, 19 19 QWidget *parent = 0); 20 #ifdef QT_PROTOCOL_PLUGIN21 20 AuthUserDlg (CICQDaemon *s, const char *szId, unsigned long nPPID, 22 21 bool bGrant, QWidget *parent = 0); 23 #endif24 22 25 23 protected: … … 32 30 33 31 unsigned long m_nUin; 34 #ifdef QT_PROTOCOL_PLUGIN35 32 char *m_szId; 36 33 unsigned long m_nPPID; 37 #endif38 34 39 35 bool m_bGrant; -
branches/protocol_plugin_1_3_0/qt-gui/src/awaymsgdlg.cpp
r3467 r3472 220 220 // ----------------------------------------------------------------------------- 221 221 222 #ifdef QT_PROTOCOL_PLUGIN223 222 CustomAwayMsgDlg::CustomAwayMsgDlg(const char *szId, 224 223 unsigned long nPPID, QWidget *parent) … … 279 278 show(); 280 279 } 281 #endif282 280 283 281 CustomAwayMsgDlg::CustomAwayMsgDlg(unsigned long nUin, QWidget *parent) … … 353 351 s.truncate(s.length()-1); 354 352 355 #ifdef QT_PROTOCOL_PLUGIN356 353 ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_W); 357 #else358 ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_W);359 #endif360 354 if (u != NULL) 361 355 { 362 356 u->SetCustomAutoResponse(s.local8Bit()); 363 357 gUserManager.DropUser(u); 364 #ifdef QT_PROTOCOL_PLUGIN365 358 CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_szId, m_nPPID); 366 #else367 CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin);368 #endif369 359 gMainWindow->slot_updatedUser(&sig); 370 360 } … … 375 365 void CustomAwayMsgDlg::slot_clear() 376 366 { 377 #ifdef QT_PROTOCOL_PLUGIN378 367 ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_W); 379 #else380 ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_W);381 #endif382 368 if (u != NULL) 383 369 { 384 370 u->ClearCustomAutoResponse(); 385 371 gUserManager.DropUser(u); 386 #ifdef QT_PROTOCOL_PLUGIN387 372 CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_szId, m_nPPID); 388 #else389 CICQSignal sig(SIGNAL_UPDATExUSER, USER_BASIC, m_nUin);390 #endif391 373 gMainWindow->slot_updatedUser(&sig); 392 374 } -
branches/protocol_plugin_1_3_0/qt-gui/src/awaymsgdlg.h
r3467 r3472 43 43 public: 44 44 CustomAwayMsgDlg(unsigned long, QWidget *parent = 0); 45 #ifdef QT_PROTOCOL_PLUGIN46 45 CustomAwayMsgDlg(const char *, unsigned long, QWidget *parent = 0); 47 #endif48 46 49 47 protected: 50 48 MLEditWrap *mleAwayMsg; 51 49 unsigned long m_nUin; 52 #ifdef QT_PROTOCOL_PLUGIN53 50 char *m_szId; 54 51 unsigned long m_nPPID; 55 #endif56 52 57 53 protected slots: -
branches/protocol_plugin_1_3_0/qt-gui/src/chatdlg.cpp
r3467 r3472 110 110 // --------------------------------------------------------------------------- 111 111 112 #ifdef QT_PROTOCOL_PLUGIN113 112 ChatDlg::ChatDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 114 113 CMainWindow *m, QWidget *parent) … … 393 392 show(); 394 393 } 395 #endif396 394 397 395 ChatDlg::ChatDlg(unsigned long _nUin, CICQDaemon *daemon, -
branches/protocol_plugin_1_3_0/qt-gui/src/chatdlg.h
r3467 r3472 85 85 ChatDlg(unsigned long _nUin, CICQDaemon *daemon, CMainWindow *m, 86 86 QWidget *parent = 0); 87 #ifdef QT_PROTOCOL_PLUGIN88 87 ChatDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 89 88 CMainWindow *m, QWidget *parent = 0); 90 #endif91 89 virtual ~ChatDlg(); 92 90 … … 95 93 96 94 unsigned short LocalPort(); 97 #ifdef QT_PROTOCOL_PLUGIN98 95 char *Id() { return m_szId; } 99 96 unsigned long PPID() { return m_nPPID; } 100 #endif101 97 unsigned long Uin() { return m_nUin; }; 102 98 … … 133 129 134 130 unsigned long m_nUin; 135 #ifdef QT_PROTOCOL_PLUGIN136 131 char *m_szId; 137 132 unsigned long m_nPPID; 138 #endif139 133 QSocketNotifier *sn; 140 134 bool m_bAudio; -
branches/protocol_plugin_1_3_0/qt-gui/src/ewidgets.cpp
r3467 r3472 518 518 //- Message View Widget --------------------------------------------------------- 519 519 520 #ifdef QT_PROTOCOL_PLUGIN521 520 CMessageViewWidget::CMessageViewWidget(const char *szId, unsigned long nPPID, 522 521 CMainWindow *m, QWidget* parent, const char * name) … … 543 542 addMsg(newEventList[i]); 544 543 } 545 #endif546 544 547 545 CMessageViewWidget::CMessageViewWidget(unsigned long _nUin, CMainWindow *m, QWidget* parent, const char * name) … … 570 568 CMessageViewWidget::~CMessageViewWidget() 571 569 { 572 #ifdef QT_PROTOCOL_PLUGIN573 570 if (m_szId) 574 571 free(m_szId); 575 #endif576 572 } 577 573 578 574 void CMessageViewWidget::addMsg(ICQEvent * _e) 579 575 { 580 #ifdef QT_PROTOCOL_PLUGIN 581 if (strcmp(_e->Id(), m_szId) == 0 && _e->PPID() == m_nPPID) 582 #else 583 if ( _e->Uin() == m_nUin && _e->UserEvent() ) 584 #endif 576 if (strcmp(_e->Id(), m_szId) == 0 && _e->PPID() == m_nPPID && 577 _e->UserEvent()) 585 578 addMsg( _e->UserEvent() ); 586 579 } … … 596 589 597 590 { 598 #ifdef QT_PROTOCOL_PLUGIN599 591 ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R); 600 #else601 ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R);602 #endif603 592 if (u != NULL) 604 593 { … … 612 601 if (e->Direction() != D_RECEIVER) 613 602 { 614 #ifdef QT_PROTOCOL_PLUING615 603 ICQOwner *o = gUserManager.FetchOwner(m_nPPID, LOCK_R); 616 #else617 ICQOwner *o = gUserManager.FetchOwner(LOCK_R);618 #endif619 604 if (o != NULL) 620 605 { … … 689 674 #endif 690 675 e->Direction() == D_RECEIVER && e->SubCommand() == ICQ_CMDxSUB_MSG) { 691 #ifdef QT_PROTOCOL_PLUGIN692 676 ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R); 693 #else694 ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R );695 #endif696 677 if (u != NULL) { 697 678 u->EventClearId(e->Id()); -
branches/protocol_plugin_1_3_0/qt-gui/src/ewidgets.h
r3467 r3472 129 129 Q_OBJECT 130 130 private: 131 #ifdef QT_PROTOCOL_PLUGIN132 131 char *m_szId; 133 132 unsigned long m_nPPID; 134 #endif135 133 unsigned long m_nUin; 136 134 CMainWindow *mainwin; 137 135 public: 138 #ifdef QT_PROTOCOL_PLUGIN139 136 CMessageViewWidget(const char *szId, unsigned long nPPID, 140 137 CMainWindow *m, QWidget *parent = 0, const char *name = 0); 141 #endif142 138 CMessageViewWidget(unsigned long _nUin, CMainWindow *m, 143 139 QWidget* parent=0, const char * name =0); -
branches/protocol_plugin_1_3_0/qt-gui/src/filedlg.cpp
r3467 r3472 48 48 49 49 //-----Constructor------------------------------------------------------------ 50 #ifdef QT_PROTOCOL_PLUGIN51 50 CFileDlg::CFileDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 52 51 QWidget* parent) … … 119 118 hbox->setSpacing(8); 120 119 lay->addMultiCellWidget(hbox, CR, CR, 0, 2); 121 120 122 121 btnCancel = new QPushButton(tr("&Cancel Transfer"), hbox); 123 122 btnCancel->setMinimumWidth(75); … … 140 139 } 141 140 142 #endif143 141 CFileDlg::CFileDlg(unsigned long _nUin, CICQDaemon *daemon, QWidget* parent) 144 142 : QWidget(parent, "FileDialog", WDestructiveClose) … … 351 349 352 350 //TODO Fix this 353 #ifdef QT_PROTOCOL_PLUGIN354 351 QTextCodec *codec = UserCodec::codecForUIN(strtoul(m_szId, (char **)NULL, 10)); 355 #else356 QTextCodec *codec = UserCodec::codecForUIN(m_nUin);357 #endif358 352 359 353 CFileTransferEvent *e = NULL; -
branches/protocol_plugin_1_3_0/qt-gui/src/filedlg.h
r3467 r3472 21 21 public: 22 22 CFileDlg(unsigned long _nUin, CICQDaemon *daemon, QWidget* parent = 0); 23 #ifdef QT_PROTOCOL_PLUGIN24 23 CFileDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 25 24 QWidget *parent = 0); 26 #endif27 25 virtual ~CFileDlg(); 28 26 … … 31 29 32 30 unsigned short LocalPort(); 33 #ifdef QT_PROTOCOL_PLUGIN34 31 char *Id() { return m_szId; } 35 32 unsigned long PPID() { return m_nPPID; } 36 #endif37 33 unsigned long Uin() { return m_nUin; }; 38 34 … … 55 51 56 52 unsigned long m_nUin; 57 #ifdef QT_PROTOCOL_PLUGIN58 53 char *m_szId; 59 54 unsigned long m_nPPID; 60 #endif61 55 CICQDaemon *licqDaemon; 62 56 QSocketNotifier *sn; -
branches/protocol_plugin_1_3_0/qt-gui/src/forwarddlg.cpp
r3467 r3472 45 45 m_nEventType = e->SubCommand(); 46 46 m_nUin = 0; 47 #ifdef QT_PROTOCOL_PLUGIN48 47 m_szId = 0; 49 48 m_nPPID = 0; 50 #endif51 49 52 50 QString t; … … 99 97 CForwardDlg::~CForwardDlg() 100 98 { 101 #ifdef QT_PROTOCOL_PLUGIN102 99 if (m_szId) free(m_szId); 103 #endif104 100 } 105 101 … … 107 103 void CForwardDlg::slot_ok() 108 104 { 109 #ifdef QT_PROTOCOL_PLUGIN110 105 if (m_szId == 0) return; 111 #endif112 113 if (m_nUin == 0) return;114 106 115 107 switch(m_nEventType) … … 118 110 { 119 111 s1.prepend(tr("Forwarded message:\n")); 120 #ifdef QT_PROTOCOL_PLUGIN121 112 UserSendMsgEvent *e = new UserSendMsgEvent(gLicqDaemon, sigman, gMainWindow, m_szId, 122 113 m_nPPID); 123 #else124 UserSendMsgEvent* e = new UserSendMsgEvent(gLicqDaemon, sigman, gMainWindow, m_nUin);125 #endif126 114 e->setText(s1); 127 115 e->show(); … … 131 119 { 132 120 s1.prepend(tr("Forwarded URL:\n")); 133 #ifdef QT_PROTOCOL_PLUGIN134 121 UserSendUrlEvent *e = new UserSendUrlEvent(gLicqDaemon, sigman, gMainWindow, m_szId, 135 122 m_nPPID); 136 #else137 UserSendUrlEvent* e = new UserSendUrlEvent(gLicqDaemon, sigman, gMainWindow, m_nUin);138 #endif139 123 e->setUrl(s2, s1); 140 124 e->show(); … … 162 146 return; 163 147 164 #ifdef QT_PROTOCOL_PLUGIN165 148 if (text.length() == 0) return; 166 149 m_szId = strdup(text.latin1()); 167 150 m_nPPID = LICQ_PPID; //TODO dropevent needs the ppid 168 #endif169 m_nUin = text.toULong();170 if (m_nUin == 0) return;171 151 172 #ifdef QT_PROTOCOL_PLUGIN173 152 ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R); 174 #else175 ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R);176 #endif177 153 edtUser->setText(QString::fromLocal8Bit(u->GetAlias()) + " (" + text + ")"); 178 154 gUserManager.DropUser(u); -
branches/protocol_plugin_1_3_0/qt-gui/src/forwarddlg.h
r3467 r3472 25 25 CInfoField *edtUser; 26 26 QPushButton *btnOk, *btnCancel; 27 #ifdef QT_PROTOCOL_PLUGIN28 27 char *m_szId; 29 28 unsigned long m_nPPID; 30 #endif31 29 unsigned long m_nUin; 32 30 protected slots: -
branches/protocol_plugin_1_3_0/qt-gui/src/keyrequestdlg.cpp
r3467 r3472 34 34 35 35 // ----------------------------------------------------------------------------- 36 #ifdef QT_PROTOCOL_PLUGIN37 36 KeyRequestDlg::KeyRequestDlg(CSignalManager* _sigman, const char *szId, 38 37 unsigned long nPPID, QWidget *parent) … … 117 116 show(); 118 117 } 119 #endif120 118 121 119 KeyRequestDlg::KeyRequestDlg(CSignalManager* _sigman, unsigned long nUin, QWidget *parent) … … 210 208 icqEventTag = 0; 211 209 } 212 #ifdef QT_PROTOCOL_PLUGIN213 210 if (m_szId) free(m_szId); 214 #endif215 211 } 216 212 -
branches/protocol_plugin_1_3_0/qt-gui/src/keyrequestdlg.h
r3467 r3472 32 32 public: 33 33 KeyRequestDlg(CSignalManager *_sigman, unsigned long nUin, QWidget *parent = 0); 34 #ifdef QT_PROTOCOL_PLUGIN35 34 KeyRequestDlg(CSignalManager *_sigman, const char *szId, 36 35 unsigned long nPPID, QWidget *parent = 0); 37 #endif38 36 virtual ~KeyRequestDlg(); 39 37 40 38 protected: 41 39 unsigned long m_nUin; 42 #ifdef QT_PROTOCOL_PLUGIN43 40 char *m_szId; 44 41 unsigned long m_nPPID; 45 #endif46 42 QPushButton *btnSend, *btnCancel; 47 43 QLabel *lblStatus; -
branches/protocol_plugin_1_3_0/qt-gui/src/mainwin.cpp
r3467 r3472 264 264 licqLogWindow = theLogWindow; 265 265 positionChanges = 0; 266 #ifdef QT_PROTOCOL_PLUGIN267 266 m_szUserMenuId = 0; 268 #endif269 267 270 268 // Overwrite Qt's event handler … … 602 600 connect (licqSigMan, SIGNAL(signal_ui_message(unsigned long)), 603 601 this, SLOT(slot_ui_message(unsigned long))); 604 #ifdef QT_PROTOCOL_PLUGIN605 602 connect (licqSigMan, SIGNAL(signal_ui_viewevent(const char *)), 606 603 this, SLOT(slot_ui_viewevent(const char *))); 607 604 connect (licqSigMan, SIGNAL(signal_protocolPlugin(unsigned long)), 608 605 this, SLOT(slot_protocolPlugin(unsigned long))); 609 #endif610 606 611 607 m_bInMiniMode = false; … … 654 650 } 655 651 656 #ifdef QT_PROTOCOL_PLUGIN657 652 m_nProtoNum = 0; 658 #endif659 653 660 654 #if QT_VERSION > 3 … … 848 842 849 843 //-----CMainWindow::CreateUserFloaty--------------------------------------------- 850 #ifdef QT_PROTOCOL_PLUGIN851 844 void CMainWindow::CreateUserFloaty(const char *szId, unsigned long nPPID, 852 845 unsigned short x, unsigned short y, unsigned short w) … … 876 869
