diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.h | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 4 |
3 files changed, 11 insertions, 13 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index a92b191e97..6a27e4be6e 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -35,10 +35,10 @@ static OBJLIST<CContactCache> arContacts(50, NumericKeySortT); static DBCachedContact ccInvalid; -CContactCache::CContactCache(const MCONTACT hContact) +CContactCache::CContactCache(MCONTACT hContact) { m_hContact = hContact; - m_wOldStatus = m_wStatus = ID_STATUS_OFFLINE; + m_wOldStatus = ID_STATUS_OFFLINE; if (hContact) { if ((cc = db_get_contact(hContact)) != NULL) { @@ -532,10 +532,10 @@ wchar_t* CContactCache::getNormalizedStatusMsg(const wchar_t *src, bool fStripAl /** * retrieve the tab/title icon for the corresponding session. */ -HICON CContactCache::getIcon(int& iSize) const +HICON CContactCache::getIcon(int &iSize) const { if (!m_dat || !m_hwnd) - return Skin_LoadProtoIcon(cc->szProto, m_wStatus); + return Skin_LoadProtoIcon(cc->szProto, getStatus()); if (m_dat->dwFlags & MWF_ERRORSTATE) return PluginConfig.g_iconErr; diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index 3c19516ec9..769654ac7e 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -58,14 +58,14 @@ struct TSessionStats { struct CContactCache : public MZeroedObject
{
CContactCache() {}
- CContactCache(const MCONTACT hContact);
+ CContactCache(MCONTACT hContact);
~CContactCache()
{
releaseAlloced();
}
__forceinline bool isValid() const { return m_Valid; }
- __forceinline WORD getActiveStatus() const { return m_isMeta ? m_wMetaStatus : m_wStatus; }
+ __forceinline WORD getActiveStatus() const { return m_isMeta ? m_wMetaStatus : getStatus(); }
__forceinline WORD getOldStatus() const { return m_wOldStatus; }
__forceinline LPCWSTR getNick() const { return m_szNick; }
__forceinline MCONTACT getContact() const { return m_hContact; }
@@ -128,11 +128,11 @@ private: void releaseAlloced();
MCONTACT m_hContact, m_hSub;
- WORD m_wStatus, m_wOldStatus, m_wMetaStatus;
+ WORD m_wOldStatus, m_wMetaStatus;
char *m_szMetaProto;
- wchar_t *m_szAccount;
- wchar_t m_szNick[80], m_szUIN[80];
- wchar_t *m_szStatusMsg, *m_xStatusMsg, *m_ListeningInfo;
+ wchar_t *m_szAccount;
+ wchar_t m_szNick[80], m_szUIN[80];
+ wchar_t *m_szStatusMsg, *m_xStatusMsg, *m_ListeningInfo;
BYTE m_xStatus;
DWORD m_idleTS;
bool m_isMeta;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index fc99b2d0a0..0680965059 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -539,10 +539,8 @@ int SendQueue::ackMessage(TWindowData *dat, WPARAM wParam, LPARAM lParam) if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) SkinPlaySound("SendError"); - wchar_t *szAckMsg = mir_a2u((char *)ack->lParam); - mir_snwprintf(job.szErrorMsg, TranslateT("Delivery failure: %s"), szAckMsg); + mir_snwprintf(job.szErrorMsg, TranslateT("Delivery failure: %s"), _A2T((char *)ack->lParam)); job.iStatus = SQ_ERROR; - mir_free(szAckMsg); KillTimer(dat->hwnd, TIMERID_MSGSEND + iFound); if (!(dat->dwFlags & MWF_ERRORSTATE)) handleError(dat, iFound); |