Show
Ignore:
Timestamp:
07/01/08 06:31:24 (5 months ago)
Author:
flynd
Message:

Use the new DropOwner? function to properly specify which owner to unlock.

Location:
trunk/qt4-gui/src/dialogs
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/dialogs/awaymsgdlg.cpp

    r6352 r6374  
    166166  a->setData(999); 
    167167 
    168   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     168  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    169169  if (o == NULL) 
    170170    return; 
     
    182182          "(%m messages pending from you).") 
    183183        .arg(LicqStrings::getStatus(myStatus, false))); 
    184   gUserManager.DropOwner(); 
     184  gUserManager.DropOwner(o); 
    185185 
    186186  myAwayMsg->setFocus(); 
     
    252252  QString s = myAwayMsg->toPlainText().trimmed(); 
    253253 
    254   ICQOwner* o = gUserManager.FetchOwner(LOCK_W); 
     254  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    255255  if (o != NULL) 
    256256  { 
    257257    QTextCodec* codec = UserCodec::defaultEncoding(); 
    258258    o->SetAutoResponse(codec->fromUnicode(s)); 
    259     gUserManager.DropOwner(); 
     259    gUserManager.DropOwner(o); 
    260260  } 
    261261 
  • trunk/qt4-gui/src/dialogs/editcategorydlg.cpp

    r5837 r6374  
    125125void EditCategoryDlg::ok() 
    126126{ 
    127   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     127  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    128128  if (o != NULL) 
    129129  { 
    130130    QTextCodec* codec = UserCodec::codecForICQUser(o); 
    131     gUserManager.DropOwner(); 
     131    gUserManager.DropOwner(o); 
    132132 
    133133    ICQUserCategory* cat = new ICQUserCategory(myUserCat); 
  • trunk/qt4-gui/src/dialogs/historydlg.cpp

    r6186 r6374  
    239239  { 
    240240    myOwnerName = QString::fromUtf8(o->GetAlias()); 
    241     gUserManager.DropOwner(myPpid); 
     241    gUserManager.DropOwner(o); 
    242242  } 
    243243 
  • trunk/qt4-gui/src/dialogs/ownereditdlg.cpp

    r6352 r6374  
    9898      edtPassword->setText(o->Password()); 
    9999      chkSave->setChecked(o->SavePassword()); 
    100       gUserManager.DropOwner(ppid); 
     100      gUserManager.DropOwner(o); 
    101101    } 
    102102 
     
    139139  o->SetSavePassword(chkSave->isChecked()); 
    140140 
    141   gUserManager.DropOwner(ppid); 
     141  gUserManager.DropOwner(o); 
    142142  gLicqDaemon->SaveConf(); 
    143143 
  • trunk/qt4-gui/src/dialogs/ownermanagerdlg.cpp

    r6352 r6374  
    169169void OwnerManagerDlg::registerOwner() 
    170170{ 
    171   if (gUserManager.OwnerUin() != 0) 
     171  if (!gUserManager.OwnerId(LICQ_PPID).empty()) 
    172172  { 
    173173    QString buf = tr("You are currently registered as\n" 
     
    176176        "Rerun licq with the -b option to select a new\n" 
    177177        "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); 
    179179    InformUser(this, buf); 
    180180    return; 
  • trunk/qt4-gui/src/dialogs/phonedlg.cpp

    r5892 r6374  
    5353  setModal(true); 
    5454 
    55   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     55  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    5656  if (o == NULL) 
    5757  { 
     
    6060  } 
    6161  QTextCodec* codec = UserCodec::codecForICQUser(o); 
    62   gUserManager.DropOwner(); 
     62  gUserManager.DropOwner(o); 
    6363 
    6464  m_nEntry = nEntry; 
     
    236236  } 
    237237 
    238   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     238  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    239239  if (o == NULL) 
    240240  { 
     
    243243  } 
    244244  QTextCodec* codec = UserCodec::codecForICQUser(o); 
    245   gUserManager.DropOwner(); 
     245  gUserManager.DropOwner(o); 
    246246 
    247247  struct PhoneBookEntry pbe; 
  • trunk/qt4-gui/src/dialogs/randomchatdlg.cpp

    r6099 r6374  
    203203      myGroupsList->setCurrentRow(0); break; 
    204204  } 
    205   gUserManager.DropOwner(); 
     205  gUserManager.DropOwner(o); 
    206206 
    207207  show(); 
  • trunk/qt4-gui/src/dialogs/registeruser.cpp

    r5837 r6374  
    234234  { 
    235235    o->SetSavePassword(mySavePassword->isChecked()); 
    236     gUserManager.DropOwner(ppid); 
     236    gUserManager.DropOwner(o); 
    237237    gLicqDaemon->SaveConf(); 
    238238  } 
  • trunk/qt4-gui/src/dialogs/securitydlg.cpp

    r6352 r6374  
    8080#undef ADD_CHECK 
    8181 
    82   gUserManager.DropOwner(); 
     82  gUserManager.DropOwner(o); 
    8383 
    8484  top_lay->addWidget(boxOptions); 
     
    111111  if (o->Status() == ICQ_STATUS_OFFLINE) 
    112112  { 
    113     gUserManager.DropOwner(LICQ_PPID); 
     113    gUserManager.DropOwner(o); 
    114114    InformUser(this, tr("You need to be connected to the\n" 
    115115          "ICQ Network to change the settings.")); 
     
    125125      ip != o->HideIp()) 
    126126  { 
    127     gUserManager.DropOwner(LICQ_PPID); 
     127    gUserManager.DropOwner(o); 
    128128    btnUpdate->setEnabled(false); 
    129129 
     
    138138  } 
    139139 
    140   gUserManager.DropOwner(LICQ_PPID); 
     140  gUserManager.DropOwner(o); 
    141141 
    142142  close(); 
  • trunk/qt4-gui/src/dialogs/userinfodlg.cpp

    r6352 r6374  
    15111511  o->SetEnableSave(true); 
    15121512  o->SavePictureInfo(); 
    1513   gUserManager.DropOwner(); 
     1513  gUserManager.DropOwner(o); 
    15141514 
    15151515  gLicqDaemon->icqUpdatePictureTimestamp(); 
     
    19391939  unsigned short status = o->Status(); 
    19401940  QTextCodec* codec = UserCodec::codecForICQUser(o); 
    1941   gUserManager.DropOwner(m_nPPID); 
     1941  gUserManager.DropOwner(o); 
    19421942 
    19431943  if (m_bOwner && currentTab == PhoneInfo) 
     
    20332033    unsigned short status = o->Status(); 
    20342034    codec = UserCodec::codecForICQUser(o); 
    2035     gUserManager.DropOwner(m_nPPID); 
     2035    gUserManager.DropOwner(o); 
    20362036 
    20372037    if(status == ICQ_STATUS_OFFLINE) { 
  • trunk/qt4-gui/src/dialogs/userselectdlg.cpp

    r6352 r6374  
    8989 
    9090  // For now, just have one owner 
    91   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     91  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    9292  if (o == 0) 
    9393  { 
     
    9797  cmbUser->addItem(QString("%1 (%2)").arg(o->GetAlias()).arg(o->IdString())); 
    9898  edtPassword->setText(o->Password()); 
    99   gUserManager.DropOwner(); 
     99  gUserManager.DropOwner(o); 
    100100 
    101101  // Wait for dialog to finish before returning to caller 
     
    109109void UserSelectDlg::slot_ok() 
    110110{ 
    111   ICQOwner* o = gUserManager.FetchOwner(LOCK_W); 
     111  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    112112  if (o == 0) 
    113113  { 
     
    117117  o->SetSavePassword(chkSavePassword->isChecked()); 
    118118  o->SetPassword(edtPassword->text().toLatin1()); 
    119   gUserManager.DropOwner(); 
     119  gUserManager.DropOwner(o); 
    120120 
    121121  close();