Changeset 3496 for branches/protocol_plugin_1_3_0
- Timestamp:
- 05/06/03 12:43:04 (6 years ago)
- Location:
- branches/protocol_plugin_1_3_0/qt-gui/src
- Files:
-
- 6 modified
-
mmlistview.cpp (modified) (1 diff)
-
mmsenddlg.cpp (modified) (2 diffs)
-
mmsenddlg.h (modified) (1 diff)
-
userbox.cpp (modified) (3 diffs)
-
usereventdlg.cpp (modified) (4 diffs)
-
usereventdlg.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/protocol_plugin_1_3_0/qt-gui/src/mmlistview.cpp
r3472 r3496 246 246 } 247 247 248 //TODO 249 AddUser(text. latin1(), LICQ_PPID);248 //TODO get protocol id from text 249 AddUser(text.mid(4, text.length() - 4).latin1(), LICQ_PPID); 250 250 } 251 251 -
branches/protocol_plugin_1_3_0/qt-gui/src/mmsenddlg.cpp
r3472 r3496 103 103 104 104 105 int CMMSendDlg::go_contact(U inList &_uins)105 int CMMSendDlg::go_contact(UserStringList &_users) 106 106 { 107 107 m_nEventType = ICQ_CMDxSUB_CONTACTxLIST; 108 u ins = &_uins;108 users = &_users; 109 109 110 110 setCaption(tr("Multiple Recipient Contact List")); … … 258 258 gUserManager.DropUser(u); 259 259 260 //TODO in the daemon 261 icqEventTag = server->icqSendContactList(strtoul(m_szId, (char **)NULL, 0), *uins, 262 false, ICQ_TCPxMSG_NORMAL); 260 icqEventTag = server->icqSendContactList(m_szId, *users, false, 261 ICQ_TCPxMSG_NORMAL); 263 262 break; 264 263 } -
branches/protocol_plugin_1_3_0/qt-gui/src/mmsenddlg.h
r3472 r3496 32 32 int go_message(QString); 33 33 int go_url(QString, QString); 34 //TODO String List please 35 int go_contact(UinList &_uins); 34 int go_contact(UserStringList &_users); 36 35 protected: 37 36 QString s1, s2; 38 //TODO String list please 39 UinList *uins; 37 UserStringList *users; 40 38 41 39 unsigned long m_nEventType; -
branches/protocol_plugin_1_3_0/qt-gui/src/userbox.cpp
r3491 r3496 49 49 50 50 #define FLASH_TIME 500 51 52 extern char *PPIDSTRING(unsigned long); 51 53 52 54 QColor *CUserViewItem::s_cOnline = NULL, … … 1022 1024 } 1023 1025 } 1024 //TODO change this1025 1026 else if(QTextDrag::decode(e, text)) { 1026 unsigned long Uin = text.toULong(); 1027 1028 if(Uin >= 10000) { 1029 if(Uin == it->ItemUin()) return; 1027 const char *p = (text.left(4).latin1()); 1028 char *szId = strdup((text.mid(4, text.length() - 4).latin1())); 1029 unsigned long nPPID = LICQ_PPID; //TODO fix this 1030 1031 if(szId) { 1032 if(strcmp(szId, it->ItemId()) == 0 && nPPID == it->ItemPPID()) return; 1030 1033 UserSendContactEvent* e = static_cast<UserSendContactEvent*> 1031 (gMainWindow->callFunction(mnuUserSendContact, it->Item Uin()));1032 ICQUser* u = gUserManager.FetchUser( Uin, LOCK_R);1034 (gMainWindow->callFunction(mnuUserSendContact, it->ItemId(), it->ItemPPID())); 1035 ICQUser* u = gUserManager.FetchUser(szId, nPPID, LOCK_R); 1033 1036 QString alias = u ? u->GetAlias() : ""; 1034 1037 gUserManager.DropUser(u); 1035 1038 1036 e->setContact( Uin, alias);1039 e->setContact(szId, nPPID, alias); 1037 1040 e->show(); 1038 1041 } 1039 1042 else { 1040 1043 UserSendMsgEvent* e = static_cast<UserSendMsgEvent*> 1041 (gMainWindow->callFunction(mnuUserSendMsg, it->Item Uin()));1044 (gMainWindow->callFunction(mnuUserSendMsg, it->ItemId(), it->ItemPPID())); 1042 1045 e->setText(text); 1043 1046 e->show(); 1044 1047 } 1045 } 1046 } 1047 //TODO Change this 1048 1049 free (szId); 1050 } 1051 } 1048 1052 else if(it->isGroupItem()) 1049 1053 { 1050 1054 QString text; 1051 1055 if(QTextDrag::decode(e, text)) { 1052 unsigned long Uin = text.toULong(); 1053 if(Uin >= 10000) { 1054 gUserManager.AddUserToGroup(Uin, it->GroupId()); 1056 const char *p = (text.left(4).latin1()); 1057 char *szId = strdup(text.mid(4, text.length() - 4).latin1()); 1058 unsigned long nPPID = LICQ_PPID; //TODO Fix this 1059 1060 if(szId) { 1061 gUserManager.AddUserToGroup(szId, nPPID, it->GroupId()); 1055 1062 gMainWindow->updateUserWin(); 1056 1063 } 1064 1065 free(szId); 1057 1066 } 1058 1067 } … … 1303 1312 1304 1313 if (parent() && (me->state() & LeftButton) && (i = (CUserViewItem *)currentItem()) 1305 && !mousePressPos.isNull() && i->Item Uin() &&1314 && !mousePressPos.isNull() && i->ItemId() && 1306 1315 (QPoint(me->pos() - mousePressPos).manhattanLength() > 8)) 1307 1316 { 1308 QTextDrag *d = new QTextDrag(QString::number(i->ItemUin()), this); 1317 char *p = PPIDSTRING(i->ItemPPID()); 1318 QString data(p); 1319 data += i->ItemId(); 1320 delete [] p; 1321 QTextDrag *d = new QTextDrag(data, this); 1309 1322 d->dragCopy(); 1310 1323 } -
branches/protocol_plugin_1_3_0/qt-gui/src/usereventdlg.cpp
r3490 r3496 2951 2951 { 2952 2952 CMMUserViewItem *i = static_cast<CMMUserViewItem*>(lstContacts->firstChild()); 2953 U inList uins;2953 UserStringList users; 2954 2954 2955 2955 while (i) 2956 2956 { 2957 u ins.push_back(i->Uin());2957 users.push_back(i->Id()); 2958 2958 i = static_cast<CMMUserViewItem *>(i->nextSibling()); 2959 2959 } 2960 2960 2961 if (u ins.size() == 0)2961 if (users.size() == 0) 2962 2962 return; 2963 2963 … … 2967 2967 { 2968 2968 CMMSendDlg *m = new CMMSendDlg(server, sigman, lstMultipleRecipients, this); 2969 int r = m->go_contact(u ins);2969 int r = m->go_contact(users); 2970 2970 delete m; 2971 2971 if (r != QDialog::Accepted) return; … … 2973 2973 2974 2974 unsigned long icqEventTag; 2975 icqEventTag = server->icqSendContactList(m_ nUin, uins,2975 icqEventTag = server->icqSendContactList(m_szId, users, 2976 2976 chkSendServer->isChecked() ? false : true, 2977 2977 chkUrgent->isChecked() ? ICQ_TCPxMSG_URGENT : ICQ_TCPxMSG_NORMAL, … … 3007 3007 3008 3008 //-----UserSendContactEvent::setContact-------------------------------------- 3009 //TODO for new protocol plugin 3010 void UserSendContactEvent::setContact(unsigned long Uin,const QString&)3011 { 3012 ICQUser* u = gUserManager.FetchUser( Uin, LOCK_R);3009 void UserSendContactEvent::setContact(const char *szId, unsigned long nPPID, 3010 const QString&) 3011 { 3012 ICQUser* u = gUserManager.FetchUser(szId, nPPID, LOCK_R); 3013 3013 3014 3014 if(u != NULL) -
branches/protocol_plugin_1_3_0/qt-gui/src/usereventdlg.h
r3472 r3496 380 380 virtual ~UserSendContactEvent(); 381 381 382 //TODO 383 void setContact(unsigned long uin, const QString& alias); 382 void setContact(const char *, unsigned long, const QString& alias); 384 383 385 384 protected:
