Changeset 3488 for branches/protocol_plugin_1_3_0
- Timestamp:
- 05/03/03 09:14:22 (6 years ago)
- Location:
- branches/protocol_plugin_1_3_0/qt-gui/src
- Files:
-
- 6 modified
-
filedlg.cpp (modified) (2 diffs)
-
reqauthdlg.cpp (modified) (1 diff)
-
userbox.cpp (modified) (4 diffs)
-
userbox.h (modified) (1 diff)
-
usercodec.cpp (modified) (2 diffs)
-
usercodec.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/protocol_plugin_1_3_0/qt-gui/src/filedlg.cpp
r3472 r3488 348 348 read(ftman->Pipe(), buf, 32); 349 349 350 //TODO Fix this 351 QTextCodec *codec = UserCodec::codecForUIN(strtoul(m_szId, (char **)NULL, 10)); 350 QTextCodec *codec = UserCodec::codecForProtoUser(m_szId, m_nPPID); 352 351 353 352 CFileTransferEvent *e = NULL; … … 528 527 bool bValid = false; 529 528 530 QTextCodec *codec = UserCodec::codecFor UIN(m_nUin);529 QTextCodec *codec = UserCodec::codecForProtoUser(m_szId, m_nPPID); 531 530 532 531 // Get the local filename and open it, loop until valid or cancel -
branches/protocol_plugin_1_3_0/qt-gui/src/reqauthdlg.cpp
r3472 r3488 143 143 void ReqAuthDlg::ok() 144 144 { 145 unsigned long nUin = edtUin->text().toULong();145 char *szId = (char *)edtUin->text().ascii(); 146 146 147 if ( nUin != 0)147 if (szId) 148 148 { 149 QTextCodec *codec = UserCodec::codecForUIN(nUin); 150 server->icqRequestAuth(nUin, codec->fromUnicode(mleRequest->text())); 149 //TODO add a drop down list for protocol 150 QTextCodec *codec = UserCodec::codecForProtoUser(szId, LICQ_PPID); 151 server->icqRequestAuth(strtoul(szId, (char **)NULL, 10), 152 codec->fromUnicode(mleRequest->text())); 151 153 close(true); 152 154 } -
branches/protocol_plugin_1_3_0/qt-gui/src/userbox.cpp
r3472 r3488 63 63 if(listView()->parent() == NULL) 64 64 listView()->setCaption(CUserView::tr("%1 Floaty (%2)") 65 .arg(_cUser->GetAlias()).arg(_cUser-> Uin()));65 .arg(_cUser->GetAlias()).arg(_cUser->IdString())); 66 66 67 67 m_nUin = _cUser->Uin(); … … 168 168 CUserView *v = (CUserView *)listView(); 169 169 170 if (v == NULL || m_ nUin== 0) return;170 if (v == NULL || m_szId == 0) return; 171 171 172 172 if (m_szId) … … 395 395 p->setFont(newFont); 396 396 397 bool onlBlink = (listView()->onlTimerId && listView()->onlUin && 398 listView()->onlUin == m_nUin && listView()->onlCounter & 1); 397 bool onlBlink = (listView()->onlTimerId && listView()->onlId && 398 strcmp(listView()->onlId, m_szId) == 0 && 399 listView()->onlPPID == m_nPPID && listView()->onlCounter & 1); 399 400 400 401 QColorGroup cg(cgdefault.foreground(), cgdefault.background(), … … 851 852 } 852 853 853 854 CUserView *CUserView::FindFloaty(unsigned long nUin)855 {856 unsigned int i = 0;857 for (; i<floaties->size(); i++)858 {859 if (static_cast<CUserViewItem*>(floaties->at(i)->firstChild())->ItemUin()== nUin)860 break;861 }862 if(i<floaties->size()) return floaties->at(i);863 864 return NULL;865 }866 867 854 CUserView *CUserView::FindFloaty(const char *szId, unsigned long nPPID) 868 855 { -
branches/protocol_plugin_1_3_0/qt-gui/src/userbox.h
r3472 r3488 134 134 135 135 static UserFloatyList* floaties; 136 static CUserView *FindFloaty(unsigned long);137 136 static CUserView *FindFloaty(const char *, unsigned long); 138 137 static void UpdateFloaties(); -
branches/protocol_plugin_1_3_0/qt-gui/src/usercodec.cpp
r3472 r3488 92 92 } 93 93 94 QTextCodec* UserCodec::codecForUIN(uint uin)95 {96 QTextCodec *codec = QTextCodec::codecForLocale();97 98 ICQUser *u = gUserManager.FetchUser(uin, LOCK_R);99 if (u != NULL)100 {101 codec = UserCodec::codecForICQUser(u);102 gUserManager.DropUser(u);103 }104 105 return codec;106 }107 108 94 QTextCodec *UserCodec::codecForProtoUser(const char *szId, unsigned long nPPID) 109 95 { … … 126 112 127 113 // return default encoding 128 return codecFor UIN(u->Uin());114 return codecForProtoUser(u->Id(), u->PPID()); 129 115 } 130 116 -
branches/protocol_plugin_1_3_0/qt-gui/src/usercodec.h
r3472 r3488 40 40 // Retrieves the codec for an CChatUser object 41 41 static QTextCodec * codecForCChatUser(CChatUser *u); 42 // Helper function to retrieve the codec for an UIN43 static QTextCodec * codecForUIN(uint uin);44 42 // Retrieves the codec for a proto user 45 43 static QTextCodec * codecForProtoUser(const char *, unsigned long);
