diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-12 15:32:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-12 15:32:48 +0000 |
commit | 4ae9916b55bd3dc17479563f1b3bb5ac3755315d (patch) | |
tree | 79dfef94e077e7bf8eab42ff3478b8f463cc84ce /plugins/TabSRMM/src/chat/window.cpp | |
parent | 1abc0fb06f39f97db893e33cd7fcffb92536b1db (diff) |
click on nicklist in tabsrmm's chats should substitute a nick, not a user id
git-svn-id: http://svn.miranda-ng.org/main/trunk@7615 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/chat/window.cpp')
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 69a21e790f..35d66b459c 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -2942,13 +2942,13 @@ LABEL_SHOWWINDOW: if (g_Settings.bDoubleClick4Privat ? GetKeyState(VK_SHIFT) & 0x8000 : !(GetKeyState(VK_SHIFT) & 0x8000)) {
LRESULT lResult = (LRESULT)SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_GETSEL, 0, 0);
int start = LOWORD(lResult);
- TCHAR* pszName = (TCHAR*)_alloca(sizeof(TCHAR) * (lstrlen(ui->pszUID) + 3));
+ CMString tszName;
if (start == 0)
- mir_sntprintf(pszName, lstrlen(ui->pszUID) + 3, _T("%s: "), ui->pszUID);
+ tszName.Format(_T("%s: "), ui->pszNick);
else
- mir_sntprintf(pszName, lstrlen(ui->pszUID) + 2, _T("%s "), ui->pszUID);
+ tszName.Format(_T("%s "), ui->pszNick);
- SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_REPLACESEL, FALSE, (LPARAM)pszName);
+ SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_REPLACESEL, FALSE, (LPARAM)tszName.GetString());
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
SetFocus(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE));
}
|