From d8348065cbeb4c23f5594e4cabed7094a8e2e430 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Mar 2013 20:50:49 +0000 Subject: - mir_unsubclassWindow introduced for the explicit window unsubclassing; - fix for subclassing in SRMM event handlers git-svn-id: http://svn.miranda-ng.org/main/trunk@4117 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Scriver/src/chat/window.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'plugins/Scriver/src/chat/window.cpp') diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 13feea82db..3a9a9e0350 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -1801,23 +1801,18 @@ LABEL_SHOWWINDOW: break; case IDOK: - { - char* pszRtf; - TCHAR* ptszText, *p1; - if (!IsWindowEnabled(GetDlgItem(hwndDlg,IDOK))) - break; + if ( IsWindowEnabled( GetDlgItem(hwndDlg,IDOK))) { + char *pszRtf = GetRichTextRTF(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)); - pszRtf = GetRichTextRTF(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)); - { - TCmdList *cmdListNew = tcmdlist_last(si->windowData.cmdList); - while (cmdListNew != NULL && cmdListNew->temporary) { - si->windowData.cmdList = tcmdlist_remove(si->windowData.cmdList, cmdListNew); - cmdListNew = tcmdlist_last(si->windowData.cmdList); - } + TCmdList *cmdListNew = tcmdlist_last(si->windowData.cmdList); + while (cmdListNew != NULL && cmdListNew->temporary) { + si->windowData.cmdList = tcmdlist_remove(si->windowData.cmdList, cmdListNew); + cmdListNew = tcmdlist_last(si->windowData.cmdList); } + si->windowData.cmdList = tcmdlist_append(si->windowData.cmdList, pszRtf, 20, FALSE); - ptszText = DoRtfToTags(pszRtf, si); - p1 = _tcschr(ptszText, '\0'); + TCHAR *ptszText = DoRtfToTags(pszRtf, si); + TCHAR *p1 = _tcschr(ptszText, '\0'); //remove trailing linebreaks while ( p1 > ptszText && (*p1 == '\0' || *p1 == '\r' || *p1 == '\n')) { -- cgit v1.2.3