Changeset 6374 for trunk/qt4-gui/src
- Timestamp:
- 07/01/08 06:31:24 (5 months ago)
- Location:
- trunk/qt4-gui/src
- Files:
-
- 19 modified
-
core/licqgui.cpp (modified) (6 diffs)
-
core/mainwin.cpp (modified) (8 diffs)
-
core/systemmenu.cpp (modified) (4 diffs)
-
dialogs/awaymsgdlg.cpp (modified) (3 diffs)
-
dialogs/editcategorydlg.cpp (modified) (1 diff)
-
dialogs/historydlg.cpp (modified) (1 diff)
-
dialogs/ownereditdlg.cpp (modified) (2 diffs)
-
dialogs/ownermanagerdlg.cpp (modified) (2 diffs)
-
dialogs/phonedlg.cpp (modified) (4 diffs)
-
dialogs/randomchatdlg.cpp (modified) (1 diff)
-
dialogs/registeruser.cpp (modified) (1 diff)
-
dialogs/securitydlg.cpp (modified) (4 diffs)
-
dialogs/userinfodlg.cpp (modified) (3 diffs)
-
dialogs/userselectdlg.cpp (modified) (4 diffs)
-
dockicons/dockicon.cpp (modified) (2 diffs)
-
settings/events.cpp (modified) (4 diffs)
-
userevents/usersendcommon.cpp (modified) (1 diff)
-
widgets/historyview.cpp (modified) (1 diff)
-
widgets/protocombobox.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/core/licqgui.cpp
r6352 r6374 694 694 if (o->StatusOffline()) 695 695 { 696 gUserManager.DropOwner( ppid);696 gUserManager.DropOwner(o); 697 697 return; 698 698 } … … 712 712 713 713 bool b = o->StatusOffline(); 714 gUserManager.DropOwner( ppid);714 gUserManager.DropOwner(o); 715 715 if (b) 716 716 myLicqDaemon->ProtoLogon(ppid, status); … … 1162 1162 QString id = o->IdString(); 1163 1163 unsigned short nNumMsg = o->NewMessages(); 1164 gUserManager.DropOwner( (*_ppit)->PPID());1164 gUserManager.DropOwner(o); 1165 1165 1166 1166 if (nNumMsg > 0) … … 1187 1187 continue; 1188 1188 unsigned short nNumMsg = o->NewMessages(); 1189 gUserManager.DropOwner( (*_ppit)->PPID());1189 gUserManager.DropOwner(o); 1190 1190 if (nNumMsg > 0) 1191 1191 { … … 1265 1265 1266 1266 // Do system messages first 1267 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);1267 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 1268 1268 unsigned short numMsg = 0; 1269 1269 if (o != NULL) 1270 1270 { 1271 1271 numMsg = o->NewMessages(); 1272 gUserManager.DropOwner( );1272 gUserManager.DropOwner(o); 1273 1273 } 1274 1274 … … 1447 1447 break; 1448 1448 } 1449 gUserManager.DropOwner( ppid);1449 gUserManager.DropOwner(o); 1450 1450 } 1451 1451 -
trunk/qt4-gui/src/core/mainwin.cpp
r6332 r6374 129 129 130 130 myCaption = "Licq"; 131 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);131 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 132 132 if (o != NULL) 133 133 { 134 134 myCaption += QString(" (%1)").arg(QString::fromUtf8(o->GetAlias())); 135 gUserManager.DropOwner( );135 gUserManager.DropOwner(o); 136 136 } 137 137 setWindowTitle(myCaption); … … 242 242 { 243 243 // Do we need to get a password 244 o = gUserManager.FetchOwner(L OCK_R);244 o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 245 245 if (o != NULL) 246 246 { 247 247 if (o->Password()[0] == '\0') 248 248 { 249 gUserManager.DropOwner( );249 gUserManager.DropOwner(o); 250 250 new UserSelectDlg(); 251 251 } 252 252 else 253 gUserManager.DropOwner( );253 gUserManager.DropOwner(o); 254 254 } 255 255 } … … 619 619 { 620 620 myCaption.replace("|", QString::fromUtf8(o->GetAlias())); 621 gUserManager.DropOwner( ppid);621 gUserManager.DropOwner(o); 622 622 } 623 623 else … … 851 851 o->IdString(), o->PPID())); 852 852 myStatusField->update(); 853 gUserManager.DropOwner(o); 853 854 } 854 855 else 855 856 { 856 gUserManager.DropOwner( nPPID);857 gUserManager.DropOwner(o); 857 858 858 859 // Show icons for each protocol, w/o text … … 868 869 continue; 869 870 myStatusField->addPixmap(iconman->iconForStatus(o->StatusFull(), o->IdString(), ppid)); 870 gUserManager.DropOwner( ppid);871 gUserManager.DropOwner(o); 871 872 } 872 873 FOR_EACH_PROTO_PLUGIN_END 873 874 874 875 myStatusField->update(); 875 876 o = gUserManager.FetchOwner(nPPID, LOCK_R);877 876 } 878 879 gUserManager.DropOwner(nPPID);880 877 } 881 878 else … … 892 889 continue; 893 890 myStatusField->addPixmap(iconman->iconForStatus(o->StatusFull(), o->IdString(), ppid)); 894 gUserManager.DropOwner( ppid);891 gUserManager.DropOwner(o); 895 892 } 896 893 FOR_EACH_PROTO_PLUGIN_END … … 911 908 { 912 909 //TODO iterate all owners that support fetching away message 913 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);910 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 914 911 915 912 if (o == NULL) … … 917 914 918 915 int status = o->Status(); 919 gUserManager.DropOwner( );916 gUserManager.DropOwner(o); 920 917 921 918 AwayMsgDlg::showAwayMsgDlg(status); -
trunk/qt4-gui/src/core/systemmenu.cpp
r6352 r6374 384 384 a->setChecked(true); 385 385 386 gUserManager.DropOwner( );386 gUserManager.DropOwner(o); 387 387 } 388 388 … … 670 670 myStatusInvisibleAction->setChecked(o->StatusInvisible()); 671 671 672 gUserManager.DropOwner( myPpid);672 gUserManager.DropOwner(o); 673 673 } 674 674 … … 680 680 681 681 QString userid = o->IdString(); 682 gUserManager.DropOwner( myPpid);682 gUserManager.DropOwner(o); 683 683 LicqGui::instance()->showInfoDialog(mnuUserGeneral, userid, myPpid); 684 684 } … … 691 691 692 692 QString userid = o->IdString(); 693 gUserManager.DropOwner( myPpid);693 gUserManager.DropOwner(o); 694 694 new HistoryDlg(userid, myPpid); 695 695 } -
trunk/qt4-gui/src/dialogs/awaymsgdlg.cpp
r6352 r6374 166 166 a->setData(999); 167 167 168 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);168 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 169 169 if (o == NULL) 170 170 return; … … 182 182 "(%m messages pending from you).") 183 183 .arg(LicqStrings::getStatus(myStatus, false))); 184 gUserManager.DropOwner( );184 gUserManager.DropOwner(o); 185 185 186 186 myAwayMsg->setFocus(); … … 252 252 QString s = myAwayMsg->toPlainText().trimmed(); 253 253 254 ICQOwner* o = gUserManager.FetchOwner(L OCK_W);254 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 255 255 if (o != NULL) 256 256 { 257 257 QTextCodec* codec = UserCodec::defaultEncoding(); 258 258 o->SetAutoResponse(codec->fromUnicode(s)); 259 gUserManager.DropOwner( );259 gUserManager.DropOwner(o); 260 260 } 261 261 -
trunk/qt4-gui/src/dialogs/editcategorydlg.cpp
r5837 r6374 125 125 void EditCategoryDlg::ok() 126 126 { 127 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);127 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 128 128 if (o != NULL) 129 129 { 130 130 QTextCodec* codec = UserCodec::codecForICQUser(o); 131 gUserManager.DropOwner( );131 gUserManager.DropOwner(o); 132 132 133 133 ICQUserCategory* cat = new ICQUserCategory(myUserCat); -
trunk/qt4-gui/src/dialogs/historydlg.cpp
r6186 r6374 239 239 { 240 240 myOwnerName = QString::fromUtf8(o->GetAlias()); 241 gUserManager.DropOwner( myPpid);241 gUserManager.DropOwner(o); 242 242 } 243 243 -
trunk/qt4-gui/src/dialogs/ownereditdlg.cpp
r6352 r6374 98 98 edtPassword->setText(o->Password()); 99 99 chkSave->setChecked(o->SavePassword()); 100 gUserManager.DropOwner( ppid);100 gUserManager.DropOwner(o); 101 101 } 102 102 … … 139 139 o->SetSavePassword(chkSave->isChecked()); 140 140 141 gUserManager.DropOwner( ppid);141 gUserManager.DropOwner(o); 142 142 gLicqDaemon->SaveConf(); 143 143 -
trunk/qt4-gui/src/dialogs/ownermanagerdlg.cpp
r6352 r6374 169 169 void OwnerManagerDlg::registerOwner() 170 170 { 171 if ( gUserManager.OwnerUin() != 0)171 if (!gUserManager.OwnerId(LICQ_PPID).empty()) 172 172 { 173 173 QString buf = tr("You are currently registered as\n" … … 176 176 "Rerun licq with the -b option to select a new\n" 177 177 "base directory and then register a new user.") 178 .arg(gUserManager.OwnerUin()).arg(BASE_DIR);178 .arg(gUserManager.OwnerId(LICQ_PPID).c_str()).arg(BASE_DIR); 179 179 InformUser(this, buf); 180 180 return; -
trunk/qt4-gui/src/dialogs/phonedlg.cpp
r5892 r6374 53 53 setModal(true); 54 54 55 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);55 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 56 56 if (o == NULL) 57 57 { … … 60 60 } 61 61 QTextCodec* codec = UserCodec::codecForICQUser(o); 62 gUserManager.DropOwner( );62 gUserManager.DropOwner(o); 63 63 64 64 m_nEntry = nEntry; … … 236 236 } 237 237 238 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);238 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 239 239 if (o == NULL) 240 240 { … … 243 243 } 244 244 QTextCodec* codec = UserCodec::codecForICQUser(o); 245 gUserManager.DropOwner( );245 gUserManager.DropOwner(o); 246 246 247 247 struct PhoneBookEntry pbe; -
trunk/qt4-gui/src/dialogs/randomchatdlg.cpp
r6099 r6374 203 203 myGroupsList->setCurrentRow(0); break; 204 204 } 205 gUserManager.DropOwner( );205 gUserManager.DropOwner(o); 206 206 207 207 show(); -
trunk/qt4-gui/src/dialogs/registeruser.cpp
r5837 r6374 234 234 { 235 235 o->SetSavePassword(mySavePassword->isChecked()); 236 gUserManager.DropOwner( ppid);236 gUserManager.DropOwner(o); 237 237 gLicqDaemon->SaveConf(); 238 238 } -
trunk/qt4-gui/src/dialogs/securitydlg.cpp
r6352 r6374 80 80 #undef ADD_CHECK 81 81 82 gUserManager.DropOwner( );82 gUserManager.DropOwner(o); 83 83 84 84 top_lay->addWidget(boxOptions); … … 111 111 if (o->Status() == ICQ_STATUS_OFFLINE) 112 112 { 113 gUserManager.DropOwner( LICQ_PPID);113 gUserManager.DropOwner(o); 114 114 InformUser(this, tr("You need to be connected to the\n" 115 115 "ICQ Network to change the settings.")); … … 125 125 ip != o->HideIp()) 126 126 { 127 gUserManager.DropOwner( LICQ_PPID);127 gUserManager.DropOwner(o); 128 128 btnUpdate->setEnabled(false); 129 129 … … 138 138 } 139 139 140 gUserManager.DropOwner( LICQ_PPID);140 gUserManager.DropOwner(o); 141 141 142 142 close(); -
trunk/qt4-gui/src/dialogs/userinfodlg.cpp
r6352 r6374 1511 1511 o->SetEnableSave(true); 1512 1512 o->SavePictureInfo(); 1513 gUserManager.DropOwner( );1513 gUserManager.DropOwner(o); 1514 1514 1515 1515 gLicqDaemon->icqUpdatePictureTimestamp(); … … 1939 1939 unsigned short status = o->Status(); 1940 1940 QTextCodec* codec = UserCodec::codecForICQUser(o); 1941 gUserManager.DropOwner( m_nPPID);1941 gUserManager.DropOwner(o); 1942 1942 1943 1943 if (m_bOwner && currentTab == PhoneInfo) … … 2033 2033 unsigned short status = o->Status(); 2034 2034 codec = UserCodec::codecForICQUser(o); 2035 gUserManager.DropOwner( m_nPPID);2035 gUserManager.DropOwner(o); 2036 2036 2037 2037 if(status == ICQ_STATUS_OFFLINE) { -
trunk/qt4-gui/src/dialogs/userselectdlg.cpp
r6352 r6374 89 89 90 90 // For now, just have one owner 91 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);91 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 92 92 if (o == 0) 93 93 { … … 97 97 cmbUser->addItem(QString("%1 (%2)").arg(o->GetAlias()).arg(o->IdString())); 98 98 edtPassword->setText(o->Password()); 99 gUserManager.DropOwner( );99 gUserManager.DropOwner(o); 100 100 101 101 // Wait for dialog to finish before returning to caller … … 109 109 void UserSelectDlg::slot_ok() 110 110 { 111 ICQOwner* o = gUserManager.FetchOwner(L OCK_W);111 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 112 112 if (o == 0) 113 113 { … … 117 117 o->SetSavePassword(chkSavePassword->isChecked()); 118 118 o->SetPassword(edtPassword->text().toLatin1()); 119 gUserManager.DropOwner( );119 gUserManager.DropOwner(o); 120 120 121 121 close(); -
trunk/qt4-gui/src/dockicons/dockicon.cpp
r6058 r6374 72 72 { 73 73 // First check for ICQ/AIM owner presence 74 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);74 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 75 75 76 76 // Take any existent one otherwise … … 90 90 myStatus = o->Status(); 91 91 myInvisible = o->StatusInvisible(); 92 gUserManager.DropOwner( myPpid);92 gUserManager.DropOwner(o); 93 93 } 94 94 else -
trunk/qt4-gui/src/settings/events.cpp
r6149 r6374 327 327 oem->Unlock(); 328 328 //TODO make general for all plugins 329 ICQOwner* o = gUserManager.FetchOwner(L OCK_R);329 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 330 330 if (o != NULL) 331 331 { … … 334 334 myOnEventOccupiedCheck->setChecked(o->AcceptInOccupied()); 335 335 myOnEventDndCheck->setChecked(o->AcceptInDND()); 336 gUserManager.DropOwner( );336 gUserManager.DropOwner(o); 337 337 } 338 338 myAlwaysOnlineNotifyCheck->setChecked(gLicqDaemon->AlwaysOnlineNotify()); … … 393 393 oem->SetParameters(txtSndPlayer.toLatin1(), oemparams); 394 394 //TODO Make general for all plugins 395 ICQOwner* o = gUserManager.FetchOwner(L OCK_W);395 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 396 396 if (o) 397 397 { … … 403 403 o->SetEnableSave(true); 404 404 o->SaveLicqInfo(); 405 gUserManager.DropOwner( );405 gUserManager.DropOwner(o); 406 406 } 407 407 gLicqDaemon->SetAlwaysOnlineNotify(myAlwaysOnlineNotifyCheck->isChecked()); -
trunk/qt4-gui/src/userevents/usersendcommon.cpp
r6365 r6374 256 256 { 257 257 ownerName = QString::fromUtf8(o->GetAlias()); 258 gUserManager.DropOwner( myPpid);258 gUserManager.DropOwner(o); 259 259 } 260 260 else -
trunk/qt4-gui/src/widgets/historyview.cpp
r6185 r6374 421 421 { 422 422 contactName = QString::fromUtf8(o->GetAlias()); 423 gUserManager.DropOwner( myPpid);423 gUserManager.DropOwner(o); 424 424 } 425 425 } -
trunk/qt4-gui/src/widgets/protocombobox.cpp
r6224 r6374 56 56 if (skipExisting) 57 57 { 58 gUserManager.DropOwner( ppid);58 gUserManager.DropOwner(o); 59 59 continue; 60 60 } … … 62 62 { 63 63 id = o->IdString(); 64 gUserManager.DropOwner( ppid);64 gUserManager.DropOwner(o); 65 65 } 66 66 }
