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 --- message_notify/popups.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'message_notify/popups.cpp') diff --git a/message_notify/popups.cpp b/message_notify/popups.cpp index a82cd0d..9066613 100644 --- a/message_notify/popups.cpp +++ b/message_notify/popups.cpp @@ -136,12 +136,12 @@ void ShowPopup( HANDLE hContact, const char* line1, const char* line2, int flags } if(classes_enabled) { - POPUPDATACLASS d = {sizeof(d), "messagenotify"}; + PopupClassInstance d = {sizeof(d), "messagenotify"}; d.pszTitle = line1; d.pszText = line2; d.hContact = hContact; - d.PluginData = (void *)hContact; - CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d); + d.opaque = (void *)hContact; + CallService(MS_YAPP_CLASSINSTANCE, 0, (LPARAM)&d); } else { POPUPDATAEX* ppd = ( POPUPDATAEX* )malloc( sizeof( POPUPDATAEX )); memset((void *)ppd, 0, sizeof(POPUPDATAEX)); @@ -189,12 +189,12 @@ void ShowPopupW( HANDLE hContact, const wchar_t* line1, const wchar_t* line2, in } if(classes_enabled) { - POPUPDATACLASS d = {sizeof(d), "messagenotify"}; + PopupClassInstance d = {sizeof(d), "messagenotify"}; d.pwszTitle = line1; d.pwszText = line2; d.hContact = hContact; - d.PluginData = (void *)hContact; - CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d); + d.opaque = (void *)hContact; + CallService(MS_YAPP_CLASSINSTANCE, 0, (LPARAM)&d); } else { POPUPDATAW* ppd = ( POPUPDATAW* )malloc( sizeof( POPUPDATAW )); memset((void *)ppd, 0, sizeof(POPUPDATAW)); @@ -251,17 +251,17 @@ bool IsUnicodePopupsEnabled() { void InitUtils() { hPopupIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE); unicode_enabled = ServiceExists(MS_POPUP_ADDPOPUPW) ? true : false; - classes_enabled = ServiceExists(MS_POPUP_ADDPOPUPCLASS) ? true : false; + classes_enabled = ServiceExists(MS_YAPP_REGISTERCLASS) ? true : false; if(classes_enabled) { - 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("Message Notify"); test.pszName = "messagenotify"; - test.PluginWindowProc = NullWindowProc; - CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&test); + test.windowProc = NullWindowProc; + CallService(MS_YAPP_REGISTERCLASS, 0, (WPARAM)&test); } } -- cgit v1.2.3