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/msgs.cpp | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'plugins/Scriver/src/msgs.cpp') diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index c557fc6776..572bcedf47 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -410,35 +410,15 @@ void ChangeStatusIcons() int StatusIconPressed(WPARAM wParam, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData *) lParam; + if (mir_strcmp(SRMMMOD, sicd->szModule)) + return 0; + HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, wParam); if (hwnd == NULL) hwnd = SM_FindWindowByContact(wParam); - if (hwnd != NULL) { - if (!mir_strcmp(SRMMMOD, sicd->szModule)) { - if (sicd->dwId == 0 && g_dat.hMenuANSIEncoding) { - if (sicd->flags & MBCF_RIGHTBUTTON) { - int codePage = (int) SendMessage(hwnd, DM_GETCODEPAGE, 0, 0); - if (codePage != 1200) { - for (int i = 0; i < GetMenuItemCount(g_dat.hMenuANSIEncoding); i++) - CheckMenuItem (g_dat.hMenuANSIEncoding, i, MF_BYPOSITION | MF_UNCHECKED); - - if (codePage == CP_ACP) - CheckMenuItem(g_dat.hMenuANSIEncoding, 0, MF_BYPOSITION | MF_CHECKED); - else - CheckMenuItem(g_dat.hMenuANSIEncoding, codePage, MF_BYCOMMAND | MF_CHECKED); - - int iSel = TrackPopupMenu(g_dat.hMenuANSIEncoding, TPM_RETURNCMD, sicd->clickLocation.x, sicd->clickLocation.y, 0, GetParent(hwnd), NULL); - if (iSel >= 500) { - if (iSel == 500) iSel = CP_ACP; - SendMessage(hwnd, DM_SETCODEPAGE, 0, iSel); - } - } - } - } - else SendMessage(hwnd, DM_SWITCHTYPING, 0, 0); - } - } + if (hwnd != NULL) + SendMessage(hwnd, DM_SWITCHTYPING, 0, 0); return 0; } -- cgit v1.2.3