summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-13 17:02:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-13 17:02:40 +0000
commitb21fd1d8a8e9bb3244f89c4030f0651aa82c3a81 (patch)
treee3a58d715c156be744f2083daaf125311ddd35c8 /plugins
parentbb0c52985eccfae809a08bb72938b863bc546032 (diff)
- ansi messages removed;
- strange dances with tambourines also removed git-svn-id: http://svn.miranda-ng.org/main/trunk@11369 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp2
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp2
-rw-r--r--plugins/TabSRMM/src/containeroptions.cpp4
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp6
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp43
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp9
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp6
8 files changed, 30 insertions, 44 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 341a49df90..40393980f9 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -3475,7 +3475,7 @@ LABEL_SHOWWINDOW:
case DM_ADDDIVIDER:
if (!(dat->dwFlags & MWF_DIVIDERSET) && g_Settings.bUseDividers) {
- if (GetWindowTextLengthA(GetDlgItem(hwndDlg, IDC_CHAT_LOG)) > 0) {
+ if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_LOG)) > 0) {
dat->dwFlags |= MWF_DIVIDERWANTED;
dat->dwFlags |= MWF_DIVIDERSET;
}
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 54d1a93446..1cbb8bc549 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -341,7 +341,7 @@ void CContactCache::inputHistoryEvent(WPARAM wParam)
if (m_dat->dwFlags & MWF_NEEDHISTORYSAVE) {
m_iHistoryCurrent = m_iHistoryTop;
- if (::GetWindowTextLengthA(hwndEdit) > 0)
+ if (::GetWindowTextLength(hwndEdit) > 0)
saveHistory(m_iHistorySize, 0);
else
m_history[m_iHistorySize].szText[0] = (TCHAR)'\0';
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp
index b4ee63b512..be0caeb815 100644
--- a/plugins/TabSRMM/src/containeroptions.cpp
+++ b/plugins/TabSRMM/src/containeroptions.cpp
@@ -338,8 +338,8 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
pContainer->szRelThemeFile[0] = pContainer->szAbsThemeFile[0] = 0;
- if (GetWindowTextLengthA(GetDlgItem(hwndDlg, IDC_THEME)) > 0) {
- wchar_t szFinalThemeFile[MAX_PATH], szFilename[MAX_PATH];
+ if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_THEME)) > 0) {
+ wchar_t szFinalThemeFile[MAX_PATH], szFilename[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_THEME, szFilename, SIZEOF(szFilename));
szFilename[MAX_PATH - 1] = 0;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 1fe0c33f41..ab9071715f 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -87,7 +87,7 @@ void TSAPI DM_CheckAutoHide(const TWindowData *dat, WPARAM wParam, LPARAM lParam
if (dat && lParam) {
BOOL *fResult = (BOOL *)lParam;
- if (GetWindowTextLengthA(GetDlgItem(dat->hwnd, dat->bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_CHAT_MESSAGE)) > 0) {
+ if (GetWindowTextLength(GetDlgItem(dat->hwnd, dat->bType == SESSIONTYPE_IM ? IDC_MESSAGE : IDC_CHAT_MESSAGE)) > 0) {
*fResult = FALSE;
return; // text entered in the input area -> prevent autohide/cose
}
@@ -798,7 +798,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
COLORREF colour = fIsChat ? g_Settings.crLogBackground : dat->pContainer->theme.bg;
COLORREF inputcharcolor;
- if (!fIsChat && GetWindowTextLengthA(hwndEdit) > 0)
+ if (!fIsChat && GetWindowTextLength(hwndEdit) > 0)
szStreamOut = Message_GetFromStream(hwndEdit, dat, (CP_UTF8 << 16) | (SF_RTFNOOBJS | SFF_PLAINRTF | SF_USECODEPAGE));
SendMessage(hwndLog, EM_SETBKGNDCOLOR, 0, colour);
@@ -975,7 +975,7 @@ void TSAPI DM_ScrollToBottom(TWindowData *dat, WPARAM wParam, LPARAM lParam)
if (wParam == 1 && lParam == 1) {
RECT rc;
GetClientRect(hwnd, &rc);
- int len = GetWindowTextLengthA(hwnd);
+ int len = GetWindowTextLength(hwnd);
SendMessage(hwnd, EM_SETSEL, len - 1, len - 1);
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 2dfbe714ec..1f0ab23025 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -359,16 +359,9 @@ static void MsgWindowUpdateState(TWindowData *dat, UINT msg)
dat->Panel->Invalidate();
- if (dat->dwFlags & MWF_DEFERREDSCROLL && dat->hwndIEView == 0 && dat->hwndHPP == 0) {
- HWND hwnd = GetDlgItem(hwndDlg, IDC_LOG);
-
- SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
- dat->dwFlags &= ~MWF_DEFERREDSCROLL;
- SendMessage(hwnd, WM_VSCROLL, MAKEWPARAM(SB_TOP, 0), 0);
- SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
+ if (dat->dwFlags & MWF_DEFERREDSCROLL && dat->hwndIEView == 0 && dat->hwndHPP == 0)
DM_ScrollToBottom(dat, 0, 1);
- PostMessage(hwnd, WM_VSCROLL, MAKEWPARAM(SB_PAGEDOWN, 0), 0); // XXX was post()
- }
+
DM_SetDBButtonStates(hwndDlg, dat);
if (dat->hwndIEView) {
@@ -2210,7 +2203,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_ADDDIVIDER:
if (!(dat->dwFlags & MWF_DIVIDERSET) && PluginConfig.m_UseDividers) {
- if (GetWindowTextLengthA(GetDlgItem(hwndDlg, IDC_LOG)) > 0) {
+ if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOG)) > 0) {
dat->dwFlags |= MWF_DIVIDERWANTED;
dat->dwFlags |= MWF_DIVIDERSET;
}
@@ -2381,32 +2374,22 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
return 0;
case DM_FORCESCROLL:
- {
- SCROLLINFO *psi = (SCROLLINFO *)lParam;
- POINT *ppt = (POINT *)wParam;
-
- HWND hwnd = GetDlgItem(hwndDlg, IDC_LOG);
- int len;
-
- if (wParam == 0 && lParam == 0) {
- DM_ScrollToBottom(dat, 0, 1);
- return 0;
- }
+ if (wParam == 0 && lParam == 0)
+ DM_ScrollToBottom(dat, 0, 1);
+ else {
+ SCROLLINFO *psi = (SCROLLINFO*)lParam;
+ POINT *ppt = (POINT*)wParam;
+ HWND hwndLog = GetDlgItem(hwndDlg, IDC_LOG);
if (dat->hwndIEView == 0 && dat->hwndHPP == 0) {
- len = GetWindowTextLengthA(GetDlgItem(hwndDlg, IDC_LOG));
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETSEL, len - 1, len - 1);
- }
-
- if (psi == NULL) {
- DM_ScrollToBottom(dat, 0, 0);
- return 0;
+ int len = GetWindowTextLength(hwndLog);
+ SendMessage(hwndLog, EM_SETSEL, len - 1, len - 1);
}
- if ((UINT)psi->nPos >= (UINT)psi->nMax - psi->nPage - 5 || psi->nMax - psi->nMin - psi->nPage < 50)
+ if (psi == NULL || psi->nPos >= psi->nMax - (int)psi->nPage - 5 || psi->nMax - psi->nMin - (int)psi->nPage < 50)
DM_ScrollToBottom(dat, 0, 0);
else
- SendMessage((dat->hwndIEView || dat->hwndHPP) ? (dat->hwndIEView ? dat->hwndIEView : dat->hwndHPP) : hwnd, EM_SETSCROLLPOS, 0, (LPARAM)ppt);
+ SendMessage((dat->hwndIEView || dat->hwndHPP) ? (dat->hwndIEView ? dat->hwndIEView : dat->hwndHPP) : hwndLog, EM_SETSCROLLPOS, 0, (LPARAM)ppt);
}
return 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index e35708465f..22b2c87cf5 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -1453,7 +1453,7 @@ void TSAPI HandlePasteAndSend(const TWindowData *dat)
}
SendMessage(GetDlgItem(dat->hwnd, ctrlID), EM_PASTESPECIAL, CF_UNICODETEXT, 0);
- if (GetWindowTextLengthA(GetDlgItem(dat->hwnd, ctrlID)) > 0)
+ if (GetWindowTextLength(GetDlgItem(dat->hwnd, ctrlID)) > 0)
SendMessage(dat->hwnd, WM_COMMAND, IDOK, 0);
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 1e89d91879..c1127ca645 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1317,9 +1317,6 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
// calc time limit for grouping
HWND hwndrtf = dat->hwndIEView ? dat->hwndIWebBrowserControl : GetDlgItem(hwndDlg, IDC_LOG);
- SCROLLINFO si = { 0 }, *psi = &si;
- si.cbSize = sizeof(si);
-
rtfFonts = dat->pContainer->theme.rtfFonts ? dat->pContainer->theme.rtfFonts : &(rtfFontsGlobal[0][0]);
time_t now = time(NULL);
@@ -1428,6 +1425,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
dat->isAutoRTL = 0;
}
+ // begin to draw
SendMessage(hwndrtf, WM_SETREDRAW, FALSE, 0);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM)&stream);
@@ -1465,7 +1463,10 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
ReplaceIcons(hwndDlg, dat, startAt, fAppend, isSent);
dat->clr_added = FALSE;
- SendMessage(hwndDlg, DM_FORCESCROLL, (WPARAM)&pt, (LPARAM)psi);
+ SCROLLINFO si = { 0 };
+ si.cbSize = sizeof(si);
+ SendMessage(hwndDlg, DM_FORCESCROLL, (WPARAM)&pt, (LPARAM)&si);
+
SendDlgItemMessage(hwndDlg, IDC_LOG, WM_SETREDRAW, TRUE, 0);
InvalidateRect(GetDlgItem(hwndDlg, IDC_LOG), NULL, FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_QUOTE), dat->hDbEventLast != NULL);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 95d550d64f..53165fdb39 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -541,11 +541,13 @@ void SendQueue::recallFailed(const TWindowData *dat, int iEntry) const
{
if (dat == NULL)
return;
- int iLen = GetWindowTextLengthA(GetDlgItem(dat->hwnd, IDC_MESSAGE));
+
+ int iLen = GetWindowTextLength(GetDlgItem(dat->hwnd, IDC_MESSAGE));
NotifyDeliveryFailure(dat);
if (iLen != 0)
return;
- /* message area is empty, so we can recall the failed message... */
+
+ // message area is empty, so we can recall the failed message...
SETTEXTEX stx = {ST_DEFAULT, 1200};
if (m_jobs[iEntry].dwFlags & PREF_UNICODE)
SendDlgItemMessage(dat->hwnd, IDC_MESSAGE, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)&m_jobs[iEntry].szSendBuffer[mir_strlen(m_jobs[iEntry].szSendBuffer) + 1]);