summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-19 16:10:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-19 16:10:58 +0000
commit394540126b181982d8b61d07a084ceeac8559ed1 (patch)
tree3950c99abcaeb77888271dd5994d96254f0492c6 /plugins/WhenWasIt
parentfe557276119e48389b9a471d5a4ed5d232a2857d (diff)
- dynamic hotkey translation
- MS_HOTKEY_REGISTER replaced with Hotkey_Register git-svn-id: http://svn.miranda-ng.org/main/trunk@482 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r--plugins/WhenWasIt/hooked_events.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/plugins/WhenWasIt/hooked_events.cpp b/plugins/WhenWasIt/hooked_events.cpp
index bec98e9b4c..3b9d2dadef 100644
--- a/plugins/WhenWasIt/hooked_events.cpp
+++ b/plugins/WhenWasIt/hooked_events.cpp
@@ -97,7 +97,6 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
hExtraImageApply = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnExtraImageApply);
hContactSettingChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
hTopToolBarModuleLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarModuleLoaded);
- //hContactSendMessage = HookEvent(ME_WWI_SENDMESSAGE, OnContactSendMessage);
SkinAddNewSoundEx(BIRTHDAY_NEAR_SOUND, "WhenWasIt", "Birthday near");
SkinAddNewSoundEx(BIRTHDAY_TODAY_SOUND, "WhenWasIt", "Birthday today");
@@ -155,22 +154,20 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
cl.pszName = "Add/change user &birthday";
hmAddChangeBirthday = Menu_AddMainMenuItem(&cl);
- if(ServiceExists(MS_HOTKEY_REGISTER)) {
- HOTKEYDESC hotkey = {0};
- hotkey.cbSize = sizeof(hotkey);
- hotkey.dwFlags = HKD_TCHAR;
- hotkey.ptszSection = LPGENT("Birthdays");
+ // Register hotkeys
+ HOTKEYDESC hotkey = {0};
+ hotkey.cbSize = sizeof(hotkey);
+ hotkey.pszSection = LPGEN("Birthdays");
- hotkey.pszName = "wwi_birthday_list";
- hotkey.ptszDescription = LPGENT("Birthday list");
- hotkey.pszService = MS_WWI_LIST_SHOW;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&hotkey);
+ hotkey.pszName = "wwi_birthday_list";
+ hotkey.pszDescription = LPGEN("Birthday list");
+ hotkey.pszService = MS_WWI_LIST_SHOW;
+ Hotkey_Register(&hotkey);
- hotkey.pszName = "wwi_check_birthdays";
- hotkey.ptszDescription = LPGENT("Check for birthdays");
- hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&hotkey);
- }
+ hotkey.pszName = "wwi_check_birthdays";
+ hotkey.ptszDescription = LPGENT("Check for birthdays");
+ hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
+ Hotkey_Register(&hotkey);
return 0;
}