Show
Ignore:
Timestamp:
11/09/06 05:22:35 (2 years ago)
Author:
erijo
Message:

Patch from Anders Olofsson to display alias instead of protocol id in join/left notices.

Files:
1 modified

Legend:

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

    r4735 r4757  
    17961796  if (mainwin->m_bMsgChatView) 
    17971797  { 
     1798    ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_R); 
     1799    QString userName; 
     1800    if (u) 
     1801      userName = QString::fromUtf8(u->GetAlias()); 
     1802    else 
     1803      userName = szId; 
     1804    gUserManager.DropUser(u); 
     1805 
    17981806    QString strMsg = QString("%1 has joined the conversation.") 
    1799       .arg(szId); 
     1807      .arg(userName); 
    18001808    mleHistory->addNotice(QDateTime::currentDateTime(), strMsg); 
    18011809  } 
     
    18231831  if (mainwin->m_bMsgChatView) 
    18241832  { 
     1833    ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_R); 
     1834    QString userName; 
     1835    if (u) 
     1836      userName = QString::fromUtf8(u->GetAlias()); 
     1837    else 
     1838      userName = szId; 
     1839 
    18251840    QString strMsg = QString("%1 has left the conversation.") 
    1826       .arg(szId); 
     1841      .arg(userName); 
    18271842    mleHistory->addNotice(QDateTime::currentDateTime(), strMsg); 
    18281843     
    18291844    // Remove the typing notification if active 
    1830     ICQUser *u = gUserManager.FetchUser(szId, m_nPPID, LOCK_W); 
    18311845    if (u && u->GetTyping() == ICQ_TYPING_ACTIVE) 
    18321846    {