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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/core/mainwin.cpp

    r6332 r6374  
    129129 
    130130  myCaption = "Licq"; 
    131   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     131  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    132132  if (o != NULL) 
    133133  { 
    134134    myCaption += QString(" (%1)").arg(QString::fromUtf8(o->GetAlias())); 
    135     gUserManager.DropOwner(); 
     135    gUserManager.DropOwner(o); 
    136136  } 
    137137  setWindowTitle(myCaption); 
     
    242242  { 
    243243    // Do we need to get a password 
    244     o = gUserManager.FetchOwner(LOCK_R); 
     244    o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    245245    if (o != NULL) 
    246246    { 
    247247     if (o->Password()[0] == '\0') 
    248248     { 
    249        gUserManager.DropOwner(); 
     249       gUserManager.DropOwner(o); 
    250250       new UserSelectDlg(); 
    251251     } 
    252252     else 
    253        gUserManager.DropOwner(); 
     253       gUserManager.DropOwner(o); 
    254254    } 
    255255  } 
     
    619619        { 
    620620          myCaption.replace("|", QString::fromUtf8(o->GetAlias())); 
    621           gUserManager.DropOwner(ppid); 
     621          gUserManager.DropOwner(o); 
    622622        } 
    623623        else 
     
    851851            o->IdString(), o->PPID())); 
    852852      myStatusField->update(); 
     853      gUserManager.DropOwner(o); 
    853854    } 
    854855    else 
    855856    { 
    856       gUserManager.DropOwner(nPPID); 
     857      gUserManager.DropOwner(o); 
    857858 
    858859      // Show icons for each protocol, w/o text 
     
    868869          continue; 
    869870        myStatusField->addPixmap(iconman->iconForStatus(o->StatusFull(), o->IdString(), ppid)); 
    870         gUserManager.DropOwner(ppid); 
     871        gUserManager.DropOwner(o); 
    871872      } 
    872873      FOR_EACH_PROTO_PLUGIN_END 
    873874 
    874875      myStatusField->update(); 
    875  
    876       o = gUserManager.FetchOwner(nPPID, LOCK_R); 
    877876    } 
    878  
    879     gUserManager.DropOwner(nPPID); 
    880877  } 
    881878  else 
     
    892889        continue; 
    893890      myStatusField->addPixmap(iconman->iconForStatus(o->StatusFull(), o->IdString(), ppid)); 
    894       gUserManager.DropOwner(ppid); 
     891      gUserManager.DropOwner(o); 
    895892    } 
    896893    FOR_EACH_PROTO_PLUGIN_END 
     
    911908{ 
    912909  //TODO iterate all owners that support fetching away message 
    913   ICQOwner* o = gUserManager.FetchOwner(LOCK_R); 
     910  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    914911 
    915912  if (o == NULL) 
     
    917914 
    918915  int status = o->Status(); 
    919   gUserManager.DropOwner(); 
     916  gUserManager.DropOwner(o); 
    920917 
    921918  AwayMsgDlg::showAwayMsgDlg(status);