summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-27 14:57:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-27 14:57:44 +0000
commit09cace2f7d8fdbfb047eba9a6396d79d59422443 (patch)
treecca8e0062d7403b9c6a7a87849a50a4ccd89ff9a /plugins/Scriver/src/msgs.cpp
parentd4feadd097aff1815404597953c3c59527b96598 (diff)
massive ansi cleaning for Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@13860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/msgs.cpp')
-rw-r--r--plugins/Scriver/src/msgs.cpp30
1 files changed, 5 insertions, 25 deletions
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;
}