summaryrefslogtreecommitdiff
path: root/plugins/XSoundNotify/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-04-04 21:00:23 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-04-04 21:00:23 +0000
commita2a729a7e8a044b657363e4c74e0456d1b521e46 (patch)
tree04d78d7228fb0646b718544092241e2eedabbc78 /plugins/XSoundNotify/src
parent15c7496ae9887b36ad84cbc2dd48b2ca202a120a (diff)
preparing contacts menu item
git-svn-id: http://svn.miranda-ng.org/main/trunk@4308 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/XSoundNotify/src')
-rw-r--r--plugins/XSoundNotify/src/resource.hbin1642 -> 1742 bytes
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp26
2 files changed, 24 insertions, 2 deletions
diff --git a/plugins/XSoundNotify/src/resource.h b/plugins/XSoundNotify/src/resource.h
index 41704f71cc..ff362610a7 100644
--- a/plugins/XSoundNotify/src/resource.h
+++ b/plugins/XSoundNotify/src/resource.h
Binary files differ
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index 06c0c82231..a920f298ac 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -47,7 +47,7 @@ bool isReceiveMessage(LPARAM event)
return !(((info.eventType != EVENTTYPE_MESSAGE) && !(info.flags & DBEF_READ)) || (info.flags & DBEF_SENT));
}
-INT processEvent(WPARAM wParam, LPARAM lParam)
+INT ProcessEvent(WPARAM wParam, LPARAM lParam)
{
if (!isReceiveMessage(lParam))
return 0;
@@ -281,12 +281,34 @@ INT OptInit(WPARAM wParam, LPARAM lParam)
return 0;
}
+INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
+{
+ return 0;
+}
+
+int OnLoadInit(WPARAM wParam, LPARAM lParam)
+{
+ CLISTMENUITEM mi = {0};
+ mi.cbSize = sizeof(mi);
+ mi.position = -0x7FFFFFFF;
+ mi.flags = CMIF_TCHAR;
+ mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.ptszName = LPGENT("Custom contact sound");
+ mi.pszService = "XSoundNotify/ContactMenuCommand";
+ Menu_AddContactMenuItem(&mi);
+
+ return 0;
+}
+
extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
+ CreateServiceFunction("XSoundNotify/ContactMenuCommand", ShowDialog);
+
HookEvent(ME_OPT_INITIALISE, OptInit);
- HookEvent(ME_DB_EVENT_ADDED, processEvent);
+ HookEvent(ME_DB_EVENT_ADDED, ProcessEvent);
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnLoadInit);
return 0;
}