Show
Ignore:
Timestamp:
07/01/08 17:03:38 (5 months ago)
Author:
flynd
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/ownermanagerdlg.cpp

    r6187 r6381  
    8787        cmbProtocol->insertItem((*it)->Name(), n++); 
    8888      else 
    89         gUserManager.DropOwner((*it)->PPID()); 
     89        gUserManager.DropOwner(o); 
    9090    } 
    9191  } 
    92    
     92 
    9393  // Set the fields 
    9494  if (szId && nPPID) 
     
    9999    { 
    100100      edtPassword->setText(o->Password()); 
    101       gUserManager.DropOwner(nPPID); 
     101      gUserManager.DropOwner(o); 
    102102    } 
    103      
     103 
    104104    n = 0; 
    105105    for (it = pl.begin(); it != pl.end(); it++, n++) 
     
    188188      o->SetPassword(szPassword); 
    189189  } 
    190    
    191   gUserManager.DropOwner(nPPID); 
     190 
     191  gUserManager.DropOwner(o); 
    192192  server->SaveConf(); 
    193    
     193 
    194194  close(); 
    195195} 
     
    333333void OwnerManagerDlg::slot_registerClicked() 
    334334{ 
    335   if (gUserManager.OwnerUin() != 0) 
     335  if (!gUserManager.OwnerId(LICQ_PPID).empty()) 
    336336  { 
    337337    QString buf = tr("You are currently registered as\n" 
     
    340340                    "Rerun licq with the -b option to select a new\n" 
    341341                    "base directory and then register a new user.") 
    342                     .arg(gUserManager.OwnerUin()).arg(BASE_DIR); 
     342                    .arg(gUserManager.OwnerId(LICQ_PPID).c_str()).arg(BASE_DIR); 
    343343    InformUser(this, buf); 
    344344    return; 
     
    376376    updateOwners(); 
    377377 
    378     char sz[20]; 
    379378    //TODO which owner 
    380     sprintf(sz, "%lu", gUserManager.OwnerUin()); 
     379    QString id = gUserManager.OwnerId(LICQ_PPID); 
    381380    InformUser(this, tr("Successfully registered, your user identification\n" 
    382381                        "number (UIN) is %1.\n" 
    383                         "Now set your personal information.").arg(gUserManager.OwnerUin())); 
    384     mainwin->callInfoTab(mnuUserGeneral, sz, LICQ_PPID); 
     382                        "Now set your personal information.").arg(id)); 
     383    mainwin->callInfoTab(mnuUserGeneral, id, LICQ_PPID); 
    385384  } 
    386385  else