Changeset 6381 for trunk/qt-gui/src/mainwin.cpp
- Timestamp:
- 07/01/08 17:03:38 (5 months ago)
- Files:
-
- 1 modified
-
trunk/qt-gui/src/mainwin.cpp (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt-gui/src/mainwin.cpp
r6368 r6381 620 620 m_nRealHeight = hVal; 621 621 622 ICQOwner *o = gUserManager.FetchOwner(LOCK_R);622 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 623 623 if (o != NULL) 624 624 { 625 625 m_szCaption = tr("Licq (%1)").arg(QString::fromUtf8(o->GetAlias())); 626 gUserManager.DropOwner( );626 gUserManager.DropOwner(o); 627 627 } 628 628 else … … 791 791 { 792 792 // Do we need to get a password 793 o = gUserManager.FetchOwner(L OCK_R);793 o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 794 794 if (o != NULL) 795 795 { 796 796 if(o->Password()[0] == '\0') 797 797 { 798 gUserManager.DropOwner( );798 gUserManager.DropOwner(o); 799 799 (void) new UserSelectDlg(licqDaemon); 800 800 } 801 801 else 802 gUserManager.DropOwner( );802 gUserManager.DropOwner(o); 803 803 } 804 804 } … … 808 808 { 809 809 mnuPFM->setItemChecked(o->PhoneFollowMeStatus(), true); 810 gUserManager.DropOwner( );810 gUserManager.DropOwner(o); 811 811 } 812 812 … … 1405 1405 } 1406 1406 else 1407 { 1407 { 1408 1408 s = o->Status(); 1409 gUserManager.DropOwner( nPPID);1409 gUserManager.DropOwner(o); 1410 1410 } 1411 1411 if (s == ICQ_STATUS_ONLINE || s == ICQ_STATUS_FREEFORCHAT) … … 1464 1464 { 1465 1465 m_szCaption = tr("Licq (%1)").arg(QString::fromUtf8(o->GetAlias())); 1466 gUserManager.DropOwner( nPPID);1466 gUserManager.DropOwner(o); 1467 1467 } 1468 1468 else … … 2093 2093 else 2094 2094 { 2095 gUserManager.DropOwner( nPPID);2096 2095 gUserManager.DropOwner(o); 2096 2097 2097 // Show multiple icons for each protocol 2098 2098 lblStatus->clearPrependPixmap(); 2099 2099 lblStatus->setText(""); 2100 2100 lblStatus->clearPixmaps(); 2101 2101 2102 2102 vector<unsigned long>::iterator it; 2103 2103 for (it = m_lnProtMenu.begin(); it != m_lnProtMenu.end(); it++) … … 2108 2108 lblStatus->addPixmap(CMainWindow::iconForStatus(o->StatusFull(), 2109 2109 o->IdString(), *it)); 2110 gUserManager.DropOwner( *it);2110 gUserManager.DropOwner(o); 2111 2111 } 2112 2112 } … … 2133 2133 setIcon(CMainWindow::iconForStatus(o->StatusFull())); 2134 2134 #endif // USE_KDE 2135 2136 gUserManager.DropOwner( nPPID);2135 2136 gUserManager.DropOwner(o); 2137 2137 } 2138 2138 } … … 2151 2151 lblStatus->addPixmap(CMainWindow::iconForStatus(o->StatusFull(), 2152 2152 o->IdString(), *it)); 2153 gUserManager.DropOwner( *it);2153 gUserManager.DropOwner(o); 2154 2154 } 2155 2155 } 2156 2156 2157 2157 lblStatus->update(); 2158 2158 } … … 2168 2168 { 2169 2169 //TODO iterate all owners that support fetching away message 2170 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);2170 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 2171 2171 if (o == NULL) 2172 2172 return; 2173 2173 2174 2174 unsigned short status = o->Status(); 2175 gUserManager.DropOwner( );2175 gUserManager.DropOwner(o); 2176 2176 showAwayMsgDlg(status); 2177 2177 } … … 2296 2296 ICQOwner *o = gUserManager.FetchOwner(nPPID, LOCK_R); 2297 2297 if (o == NULL) continue; 2298 2298 2299 2299 if (id == ICQ_STATUS_OFFLINE) 2300 2300 { 2301 gUserManager.DropOwner( nPPID);2301 gUserManager.DropOwner(o); 2302 2302 licqDaemon->ProtoLogoff(nPPID); 2303 2303 continue; … … 2313 2313 if (o->StatusOffline()) 2314 2314 { 2315 gUserManager.DropOwner( nPPID);2315 gUserManager.DropOwner(o); 2316 2316 continue; 2317 2317 } … … 2342 2342 // call the right function 2343 2343 bool b = o->StatusOffline(); 2344 gUserManager.DropOwner( nPPID);2344 gUserManager.DropOwner(o); 2345 2345 if (b) 2346 2346 licqDaemon->ProtoLogon(nPPID, newStatus); … … 2449 2449 szId = strdup(o->IdString()); 2450 2450 unsigned short nNumMsg = o->NewMessages(); 2451 gUserManager.DropOwner( (*_ppit)->PPID());2452 2451 gUserManager.DropOwner(o); 2452 2453 2453 if (nNumMsg > 0) 2454 2454 callFunction(index, szId, (*_ppit)->PPID()); … … 2469 2469 if (o == 0) continue; 2470 2470 szId = strdup(o->IdString()); 2471 gUserManager.DropOwner( (*_ppit)->PPID());2471 gUserManager.DropOwner(o); 2472 2472 callInfoTab(index, szId, (*_ppit)->PPID()); 2473 2473 free(szId); … … 3002 3002 if (o == 0) continue; // just in case 3003 3003 unsigned short nNumMsg = o->NewMessages(); 3004 gUserManager.DropOwner( (*_ppit)->PPID());3004 gUserManager.DropOwner(o); 3005 3005 if (nNumMsg > 0) 3006 3006 { … … 3586 3586 void CMainWindow::aboutBox() 3587 3587 { 3588 ICQOwner *o = gUserManager.FetchOwner(LOCK_R);3589 3588 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 3589 3590 3590 // We might have no owner 3591 3591 QString m_Alias = (o == 0) ? QString(tr("(Error! No owner set)")) : QString::fromUtf8(o->GetAlias()); 3592 3592 QString id = (o == 0) ? "" : o->IdString(); 3593 3593 3594 3594 QString about(tr("Licq version %1%8.\n" 3595 3595 "Qt GUI plugin version %2.\n" … … 3611 3611 #endif 3612 3612 .arg(__DATE__).arg(CICQDaemon::CryptoEnabled() ? "/SSL" : "")); 3613 gUserManager.DropOwner( );3613 gUserManager.DropOwner(o); 3614 3614 InformUser(this, about); 3615 3615 } … … 4797 4797 4798 4798 // Do system messages first 4799 ICQOwner *o = gUserManager.FetchOwner(LOCK_R);4799 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 4800 4800 unsigned short nNumMsg = 0; 4801 4801 if (o) 4802 4802 { 4803 4803 nNumMsg = o->NewMessages(); 4804 gUserManager.DropOwner( );4805 } 4806 4804 gUserManager.DropOwner(o); 4805 } 4806 4807 4807 if (nNumMsg > 0) 4808 4808 {
