summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat/window.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-19 20:50:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-19 20:50:49 +0000
commitd8348065cbeb4c23f5594e4cabed7094a8e2e430 (patch)
tree55cb282c8450eb02ba918c05233d4370bae0af4b /plugins/Scriver/src/chat/window.cpp
parentb9c6f2f3a368274a21cee17d4e3ffe2f9980ec7d (diff)
- 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
Diffstat (limited to 'plugins/Scriver/src/chat/window.cpp')
-rw-r--r--plugins/Scriver/src/chat/window.cpp23
1 files changed, 9 insertions, 14 deletions
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')) {