diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-20 17:26:51 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-20 17:26:51 +0000 |
commit | 3c50a9aa27d2138b757dd7822841c106f4c99b18 (patch) | |
tree | 917724117c74653fddd7b827d58b52a8ae61fdde /message_notify | |
parent | c1f612cb53815b465cbad009c8dc45223291834d (diff) |
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
Diffstat (limited to 'message_notify')
-rw-r--r-- | message_notify/MessageNotify.mdsp | 10 | ||||
-rw-r--r-- | message_notify/messagenotify.cpp | 2 | ||||
-rw-r--r-- | message_notify/popups.cpp | 22 | ||||
-rw-r--r-- | message_notify/popups.h | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/message_notify/MessageNotify.mdsp b/message_notify/MessageNotify.mdsp index 678bb6d..fd8763c 100644 --- a/message_notify/MessageNotify.mdsp +++ b/message_notify/MessageNotify.mdsp @@ -96,9 +96,9 @@ extraResourceOptions= [Other]
1=..\..\include\m_database.h
[History]
-popups.cpp,6357
-mywindowlist.cpp,0
-options.cpp,5097
-common.h,643
..\..\include\m_database.h,16842
-messagenotify.cpp,1542
+common.h,643
+options.cpp,5097
+mywindowlist.cpp,0
+popups.cpp,6337
+messagenotify.cpp,726
diff --git a/message_notify/messagenotify.cpp b/message_notify/messagenotify.cpp index 4e1480d..f21c3f3 100644 --- a/message_notify/messagenotify.cpp +++ b/message_notify/messagenotify.cpp @@ -27,7 +27,7 @@ DWORD focusTimerId = 0; PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
"Message Notify",
- PLUGIN_MAKE_VERSION(0,3,0,1),
+ PLUGIN_MAKE_VERSION(0,3,0,2),
"Show a popup when a message is received",
"Scott Ellis",
"mail@scottellis.com.au",
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);
}
}
diff --git a/message_notify/popups.h b/message_notify/popups.h index eb71d85..b9ce8ac 100644 --- a/message_notify/popups.h +++ b/message_notify/popups.h @@ -1,7 +1,7 @@ #ifndef _POPUPS_INC
#define _POPUPS_INC
-#include "../../include/m_popup.h"
+#include <m_yapp.h>
#include "options.h"
#include "mywindowlist.h"
|