From 3c50a9aa27d2138b757dd7822841c106f4c99b18 Mon Sep 17 00:00:00 2001 From: sje Date: Fri, 20 Jul 2007 17:26:51 +0000 Subject: convert to new popup api (see m_yapp.h in yapp/docs) git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@297 4f64403b-2f21-0410-a795-97e2b3489a10 --- updater/popups.cpp | 34 +++++++++++++++++----------------- updater/popups.h | 2 +- updater/version.h | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) (limited to 'updater') diff --git a/updater/popups.cpp b/updater/popups.cpp index 813d58c..4dbc7c0 100644 --- a/updater/popups.cpp +++ b/updater/popups.cpp @@ -109,14 +109,14 @@ void ShowPopupA( HANDLE hContact, const char* line1, const char* line2, int flag SetEvent(hEventPop); ResetEvent(hEventPop); - if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { - POPUPDATACLASS d = {sizeof(d), "updaterpopups"}; + if(ServiceExists(MS_YAPP_CLASSINSTANCE)) { + PopupClassInstance d = {sizeof(d), "updaterpopups"}; d.pszTitle = (char *)line1; d.pszText = (char *)line2; - d.PluginData = malloc(sizeof(PopupDataType)); - ((PopupDataType*)d.PluginData)->flags = flags; - ((PopupDataType*)d.PluginData)->hIcon = 0; - CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d); + d.opaque = malloc(sizeof(PopupDataType)); + ((PopupDataType*)d.opaque)->flags = flags; + ((PopupDataType*)d.opaque)->hIcon = 0; + CallService(MS_YAPP_CLASSINSTANCE, 0, (LPARAM)&d); } else { POPUPDATAEX* ppd = ( POPUPDATAEX* )malloc( sizeof( POPUPDATAEX )); @@ -182,14 +182,14 @@ void ShowPopupW( HANDLE hContact, const wchar_t* line1, const wchar_t* line2, in SetEvent(hEventPop); ResetEvent(hEventPop); - if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { - POPUPDATACLASS d = {sizeof(d), "updaterpopups"}; + if(ServiceExists(MS_YAPP_CLASSINSTANCE)) { + PopupClassInstance d = {sizeof(d), "updaterpopups"}; d.pwszTitle = (wchar_t *)line1; d.pwszText = (wchar_t *)line2; - d.PluginData = malloc(sizeof(PopupDataType)); - ((PopupDataType*)d.PluginData)->flags = flags; - ((PopupDataType*)d.PluginData)->hIcon = 0; - CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d); + d.opaque = malloc(sizeof(PopupDataType)); + ((PopupDataType*)d.opaque)->flags = flags; + ((PopupDataType*)d.opaque)->hIcon = 0; + CallService(MS_YAPP_CLASSINSTANCE, 0, (LPARAM)&d); } else { POPUPDATAW* ppd = ( POPUPDATAW* )malloc( sizeof( POPUPDATAW )); memset((void *)ppd, 0, sizeof(POPUPDATAW)); @@ -311,17 +311,17 @@ void InitPopups() { hEventPop = CreateEvent( NULL, TRUE, FALSE, NULL ); - if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { + if(ServiceExists(MS_YAPP_REGISTERCLASS)) { hPopupIcon = LoadIconEx(I_CHKUPD); - POPUPCLASS test = {0}; + PopupClass test = {0}; test.cbSize = sizeof(test); test.flags = PCF_TCHAR; test.hIcon = hPopupIcon; - test.iSeconds = -1; + test.timeout = -1; test.ptszDescription = TranslateT("Updater"); test.pszName = "updaterpopups"; - test.PluginWindowProc = NullWindowProc; - CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&test); + test.windowProc = NullWindowProc; + CallService(MS_YAPP_REGISTERCLASS, 0, (WPARAM)&test); } } diff --git a/updater/popups.h b/updater/popups.h index c389897..49449fe 100644 --- a/updater/popups.h +++ b/updater/popups.h @@ -1,7 +1,7 @@ #ifndef _POPUPS_INC #define _POPUPS_INC -#include +#include //#include #include "options.h" diff --git a/updater/version.h b/updater/version.h index 27630cb..2f6fd54 100644 --- a/updater/version.h +++ b/updater/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 5 #define __RELEASE_NUM 2 -#define __BUILD_NUM 1 +#define __BUILD_NUM 2 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -- cgit v1.2.3