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 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'updater/popups.cpp') 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); } } -- cgit v1.2.3