From 102482a94b10132588fb6ae571ad369138460f55 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sun, 29 Jul 2012 21:12:13 +0000 Subject: x64 signature fixes minor cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@1254 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 57 ++++++++++++------------- 1 file changed, 28 insertions(+), 29 deletions(-) (limited to 'plugins/StatusPlugins/KeepStatus/keepstatus.cpp') diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index cc4903a511..d7d4ae0230 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -87,8 +87,8 @@ static VOID CALLBACK CheckContinueslyTimer(HWND hwnd,UINT message, UINT_PTR idEv INT_PTR IsProtocolEnabledService(WPARAM wParam, LPARAM lParam); static int ProcessPopup(int reason, LPARAM lParam); -static int ShowPopup(char* msg, HICON hIcon); -int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +static INT_PTR ShowPopup(char* msg, HICON hIcon); +LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); static int Exit(WPARAM wParam, LPARAM lParam); @@ -1043,7 +1043,7 @@ static int ProcessPopup(int reason, LPARAM lParam) return ShowPopup(text, hIcon); } -static int ShowPopup(char* msg, HICON hIcon) +static INT_PTR ShowPopup(char* msg, HICON hIcon) { POPUPDATAEX ppd = { NULL }; ppd.lchContact = NULL; @@ -1053,42 +1053,41 @@ static int ShowPopup(char* msg, HICON hIcon) strncpy(ppd.lpzContactName, Translate("KeepStatus"), sizeof(ppd.lpzContactName)-1); strncpy(ppd.lpzText, msg, sizeof(ppd.lpzText)-1); if (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0)) + { ppd.colorBack = GetSysColor(COLOR_BTNFACE); - else if (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) - ppd.colorBack = (COLORREF)NULL; - else - ppd.colorBack = DBGetContactSettingDword(NULL, MODULENAME, SETTING_POPUP_BACKCOLOR, 0xAAAAAA); - if (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0)) ppd.colorText = GetSysColor(COLOR_WINDOWTEXT); + } else if (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) - ppd.colorText = (COLORREF)NULL; + { + ppd.colorBack = NULL; + ppd.colorText = NULL; + } else + { + ppd.colorBack = DBGetContactSettingDword(NULL, MODULENAME, SETTING_POPUP_BACKCOLOR, 0xAAAAAA); ppd.colorText = DBGetContactSettingDword(NULL, MODULENAME, SETTING_POPUP_TEXTCOLOR, 0x0000CC); - ppd.PluginWindowProc = ( WNDPROC )PopupDlgProc; + } + ppd.PluginWindowProc = PopupDlgProc; ppd.PluginData = NULL; - if (!ServiceExists(MS_POPUP_ADDPOPUPEX)) - return CallService(MS_POPUP_ADDPOPUP, (WPARAM)&ppd, 0); - else { - switch (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) { - case POPUP_DELAYCUSTOM: - ppd.iSeconds = (int)DBGetContactSettingDword(NULL, MODULENAME, SETTING_POPUP_TIMEOUT, 0); - if (ppd.iSeconds == 0) { - ppd.iSeconds = currentDelay/1000-1; - } - break; - case POPUP_DELAYPERMANENT: - ppd.iSeconds = -1; - break; - case POPUP_DELAYFROMPU: - default: - ppd.iSeconds = 0; - break; + switch (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) { + case POPUP_DELAYCUSTOM: + ppd.iSeconds = (int)DBGetContactSettingDword(NULL, MODULENAME, SETTING_POPUP_TIMEOUT, 0); + if (ppd.iSeconds == 0) { + ppd.iSeconds = currentDelay/1000-1; } - return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0); + break; + case POPUP_DELAYPERMANENT: + ppd.iSeconds = -1; + break; + case POPUP_DELAYFROMPU: + default: + ppd.iSeconds = 0; + break; } + return PUAddPopUpEx(&ppd); } -int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch(message) { case WM_CONTEXTMENU: // right -- cgit v1.2.3