summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/generic_msghandlers.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-08-20 19:48:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-08-20 19:48:11 +0000
commit9cbb9794dca03fe252b0b0659ca108de63737678 (patch)
tree18ae7cc817d7902ece87a7478df6fa1aad1fe2d2 /plugins/TabSRMM/src/generic_msghandlers.cpp
parent6433efee2bc3e5642893344af0f82e5138c65cf9 (diff)
- fix for the wrong tab name for new contacts;
- code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@17195 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/generic_msghandlers.cpp')
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index ba3f54c5b9..bf08ac6917 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1704,7 +1704,7 @@ void TSAPI DM_HandleAutoSizeRequest(TWindowData *dat, REQRESIZE* rr)
void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
{
- wchar_t newtitle[128], newcontactname[128];
+ wchar_t newtitle[128];
DWORD dwOldIdle = dat->idle;
const char *szActProto = 0;
@@ -1713,7 +1713,6 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
HWND hwndContainer = dat->pContainer->hwnd;
TContainerData* m_pContainer = dat->pContainer;
- newcontactname[0] = 0;
dat->szStatus[0] = 0;
if (dat->iTabID == -1)
@@ -1735,6 +1734,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
wcsncpy_s(dat->szStatus, pcli->pfnGetStatusModeDescription(dat->szProto == NULL ? ID_STATUS_OFFLINE : dat->wStatus, 0), _TRUNCATE);
if (lParam != 0) {
+ wchar_t newcontactname[128]; newcontactname[0] = 0;
if (PluginConfig.m_bCutContactNameOnTabs)
CutContactName(szNick, newcontactname, _countof(newcontactname));
else
@@ -1742,7 +1742,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
Utils::DoubleAmpersands(newcontactname, _countof(newcontactname));
- if (mir_wstrlen(newcontactname) != 0) {
+ if (newcontactname[0] != 0) {
if (PluginConfig.m_bStatusOnTabs)
mir_snwprintf(newtitle, L"%s (%s)", newcontactname, dat->szStatus);
else