Changeset 6437 for trunk/qt-gui

Show
Ignore:
Timestamp:
07/09/08 08:40:24 (5 months ago)
Author:
eugene
Message:

Added the way to view user info upon receiving Auth Request, Auth Granted, and Added to List notice.

Files:
1 modified

Legend:

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

    r6431 r6437  
    10231023        else 
    10241024          gUserManager.DropUser(u); 
     1025        btnRead4->setText(tr("&View Info")); 
    10251026        break; 
    10261027      } 
     
    10331034        else 
    10341035          gUserManager.DropUser(u); 
     1036        btnRead4->setText(tr("&View Info")); 
    10351037        break; 
    10361038      } 
     
    10431045        else 
    10441046          gUserManager.DropUser(u); 
     1047        btnRead4->setText(tr("&View Info")); 
    10451048        break; 
    10461049      } 
     
    14071410      emit viewurl(this, ((CEventUrl *)m_xCurrentReadEvent)->Url()); 
    14081411      break; 
     1412 
     1413    case ICQ_CMDxSUB_AUTHxREQUEST: // Fall through 
     1414    case ICQ_CMDxSUB_AUTHxGRANTED: 
     1415    case ICQ_CMDxSUB_ADDEDxTOxLIST: 
     1416    { 
     1417      const char* id = NULL; 
     1418      unsigned long ppid = 0; 
     1419#define GETINFO(sub, type) \ 
     1420      if (m_xCurrentReadEvent->SubCommand() == sub) \ 
     1421      { \ 
     1422        type* p = dynamic_cast<type*>(m_xCurrentReadEvent); \ 
     1423        id = p->IdString(); \ 
     1424        ppid = p->PPID(); \ 
     1425      } 
     1426 
     1427      GETINFO(ICQ_CMDxSUB_AUTHxREQUEST, CEventAuthRequest); 
     1428      GETINFO(ICQ_CMDxSUB_AUTHxGRANTED, CEventAuthGranted); 
     1429      GETINFO(ICQ_CMDxSUB_ADDEDxTOxLIST, CEventAdded); 
     1430#undef GETINFO 
     1431 
     1432      if (id == NULL || ppid == 0) 
     1433        break; 
     1434 
     1435      ICQUser* u = gUserManager.FetchUser(id, ppid, LOCK_R); 
     1436      if (u == NULL) 
     1437        gLicqDaemon->AddUserToList(id, ppid, false, true); 
     1438      else 
     1439        gUserManager.DropUser(u); 
     1440 
     1441      mainwin->callInfoTab(mnuUserGeneral, id, ppid, false, true); 
     1442      break; 
     1443    } 
    14091444  } 
    14101445}