From 09cace2f7d8fdbfb047eba9a6396d79d59422443 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 May 2015 14:57:44 +0000 Subject: massive ansi cleaning for Scriver git-svn-id: http://svn.miranda-ng.org/main/trunk@13860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Scriver/src/chat/main.cpp | 6 ------ plugins/Scriver/src/chat/window.cpp | 15 +++------------ 2 files changed, 3 insertions(+), 18 deletions(-) (limited to 'plugins/Scriver/src/chat') diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 2d121c4806..e8fed79470 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -53,11 +53,6 @@ static void OnAddLog(SESSION_INFO *si, int isOk) SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0); } -static void OnCreateSession(SESSION_INFO *si, MODULEINFO*) -{ - si->flags = CWDF_RTF_INPUT; -} - static void OnDblClickSession(SESSION_INFO *si) { PostMessage(si->hWnd, GC_CLOSEWINDOW, 0, 0); @@ -171,7 +166,6 @@ int Chat_Load() pci->OnAddLog = OnAddLog; - pci->OnCreateSession = OnCreateSession; pci->OnRemoveSession = OnRemoveSession; pci->OnRenameSession = OnRenameSession; pci->OnReplaceSession = OnReplaceSession; 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; -- cgit v1.2.3