summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/chat/window.cpp')
-rw-r--r--plugins/Scriver/src/chat/window.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index cef4c6f3dc..47080766e5 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1108,7 +1108,6 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
iee.iType = IEE_CLEAR_LOG;
iee.hwnd = si->hwndLog;
iee.hContact = si->hContact;
- iee.codepage = si->codePage;
iee.pszProto = si->pszModule;
CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&iee);
}
@@ -1225,15 +1224,6 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
}
break;
- case DM_GETCODEPAGE:
- SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, si->codePage);
- return TRUE;
-
- case DM_SETCODEPAGE:
- si->codePage = (int)lParam;
- SendMessage(hwndDlg, GC_REDRAWLOG2, 0, 0);
- break;
-
case DM_SWITCHINFOBAR:
case DM_SWITCHTOOLBAR:
SendMessage(hwndDlg, WM_SIZE, 0, 0);
@@ -1703,7 +1693,7 @@ LABEL_SHOWWINDOW:
case IDOK:
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDOK))) {
- ptrA pszRtf(GetRichTextRTF(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)));
+ char *pszRtf = GetRichTextRTF(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE));
if (pszRtf == NULL)
break;
@@ -1717,6 +1707,7 @@ LABEL_SHOWWINDOW:
cmdListNew = tcmdlist_last(si->cmdList);
}
+ // takes pszRtf to a queue, no leak here
si->cmdList = tcmdlist_append(si->cmdList, pszRtf, 20, FALSE);
CMString ptszText(ptrT(mir_utf8decodeT(pszRtf)));
@@ -1753,7 +1744,7 @@ LABEL_SHOWWINDOW:
case IDC_CHAT_MESSAGE:
if (HIWORD(wParam) == EN_CHANGE) {
si->cmdListCurrent = NULL;
- EnableWindow(GetDlgItem(hwndDlg, IDOK), GetRichTextLength(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), si->codePage, FALSE) != 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDOK), GetRichTextLength(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), 1200, FALSE) != 0);
}
break;