summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/KeepStatus
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-07-29 21:12:13 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-07-29 21:12:13 +0000
commit102482a94b10132588fb6ae571ad369138460f55 (patch)
treec30bdd9fd204992e7b3300984c69d2080bee6f53 /plugins/StatusPlugins/KeepStatus
parentadf8fad5f0867ee4d5231d739f32633f8383d746 (diff)
x64 signature fixes
minor cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@1254 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/KeepStatus')
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.cpp57
-rw-r--r--plugins/StatusPlugins/KeepStatus/keepstatus.h2
2 files changed, 29 insertions, 30 deletions
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
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.h b/plugins/StatusPlugins/KeepStatus/keepstatus.h
index 29a92bb80a..2bb79a2f22 100644
--- a/plugins/StatusPlugins/KeepStatus/keepstatus.h
+++ b/plugins/StatusPlugins/KeepStatus/keepstatus.h
@@ -133,6 +133,6 @@ extern unsigned long mainThreadId;
// keepstatus.cpp
int LoadMainOptions();
-int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
#endif //__KEEPSTATUS_HEADER