diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-28 13:56:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-28 13:56:45 +0000 |
commit | 6d657ab72c889b134c7871ceb2d7bb513a45c2f7 (patch) | |
tree | 27b29176cc99e0fa2831effd5beb7e459a819fd8 /plugins/TabSRMM/src | |
parent | 920181e8bd7ee69f456d1e415bd7270c7b23c1f8 (diff) |
MirVer added to the tabSRMM's info panel
git-svn-id: http://svn.miranda-ng.org/main/trunk@208 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 1f6b978493..6f4f000ad0 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -496,19 +496,26 @@ void CInfoPanel::RenderIPUIN(const HDC hdc, RECT& rcItem) if (tszUin[0]) {
SIZE sUIN;
+ TCHAR temp[256];
+ DBVARIANT dbv = {0};
+ if(0 == M->GetTString(m_dat->cache->getActiveContact(), m_dat->cache->getActiveProto(), "MirVer", &dbv)) {
+ mir_sntprintf(temp, 256, _T(" Client: %s"), dbv.ptszVal);
+ ::DBFreeVariant(&dbv);
+ }
+ else mir_sntprintf(temp, 256, _T(" Client not cached yet"));
+
if (m_dat->idle) {
time_t diff = time(NULL) - m_dat->idle;
int i_hrs = diff / 3600;
int i_mins = (diff - i_hrs * 3600) / 60;
mir_sntprintf(szBuf, safe_sizeof(szBuf), CTranslator::get(CTranslator::GEN_IP_IDLENOTICE), tszUin, i_hrs, i_mins);
- ::GetTextExtentPoint32(hdc, szBuf, lstrlen(szBuf), &sUIN);
- mapRealRect(rcItem, m_rcUIN, sUIN);
- CSkin::RenderText(hdc, m_dat->hThemeIP, szBuf, &rcItem, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, clr);
- } else {
- ::GetTextExtentPoint32(hdc, tszUin, lstrlen(tszUin), &sUIN);
- mapRealRect(rcItem, m_rcUIN, sUIN);
- CSkin::RenderText(hdc, m_dat->hThemeIP, tszUin, &rcItem, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, clr);
- }
+ }
+ else _tcscpy_s (szBuf,256,tszUin);
+
+ _tcscat_s (szBuf,256,temp);
+ ::GetTextExtentPoint32(hdc, szBuf, lstrlen(szBuf), &sUIN);
+ mapRealRect(rcItem, m_rcUIN, sUIN);
+ CSkin::RenderText(hdc, m_dat->hThemeIP, szBuf, &rcItem, DT_SINGLELINE | DT_VCENTER, CSkin::m_glowSize, clr);
}
if(m_hoverFlags & HOVER_UIN)
::DeleteObject(::SelectObject(hdc, m_ipConfig.hFonts[IPFONTID_UIN]));
|