summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt/src/WhenWasIt.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-02-28 13:35:22 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-02-28 13:35:22 +0000
commita0c7844f40b5f5b7f7948d095218889594e2f0ca (patch)
tree1e1e47807c5acfac9774af28b9fc77d5c5cff346 /plugins/WhenWasIt/src/WhenWasIt.cpp
parentbce04f5be6d0e881b21e8fd43fb12a6045756ebd (diff)
WhenWasIt:
- minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12288 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhenWasIt/src/WhenWasIt.cpp')
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp64
1 files changed, 63 insertions, 1 deletions
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index d5d3217807..178c880b64 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -27,6 +27,14 @@ HWND hUpcomingDlg = NULL;
HANDLE hAddBirthdayWndsList = NULL;
int hLangpack;
+HANDLE hmCheckBirthdays = NULL;
+HANDLE hmBirthdayList = NULL;
+HANDLE hmRefreshDetails = NULL;
+HANDLE hmAddChangeBirthday = NULL;
+HANDLE hmImportBirthdays = NULL;
+HANDLE hmExportBirthdays = NULL;
+
+
CommonData commonData = {0};
CLIST_INTERFACE *pcli;
@@ -71,9 +79,63 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvents();
hAddBirthdayWndsList = WindowList_Create();
+
+ CLISTMENUITEM cl = { sizeof(cl) };
+ cl.position = 10000000;
+ cl.pszPopupName = LPGEN("Birthdays (When Was It)");
+
+ cl.pszService = MS_WWI_CHECK_BIRTHDAYS;
+ cl.icolibItem = hCheckMenu;
+ cl.pszName = LPGEN("Check for birthdays");
+ hmCheckBirthdays = Menu_AddMainMenuItem(&cl);
- Log("%s", "Leaving function " __FUNCTION__);
+ cl.pszService = MS_WWI_LIST_SHOW;
+ cl.pszName = LPGEN("Birthday list");
+ cl.icolibItem = hListMenu;
+ hmBirthdayList = Menu_AddMainMenuItem(&cl);
+
+ cl.pszService = MS_WWI_REFRESH_USERDETAILS;
+ cl.position = 10100000;
+ cl.pszName = LPGEN("Refresh user details");
+ cl.icolibItem = hRefreshUserDetails;
+ hmRefreshDetails = Menu_AddMainMenuItem(&cl);
+ cl.pszService = MS_WWI_IMPORT_BIRTHDAYS;
+ cl.position = 10200000;
+ cl.pszName = LPGEN("Import birthdays");
+ cl.icolibItem = hImportBirthdays;
+ hmImportBirthdays = Menu_AddMainMenuItem(&cl);
+
+ cl.pszService = MS_WWI_EXPORT_BIRTHDAYS;
+ cl.pszName = LPGEN("Export birthdays");
+ cl.icolibItem = hExportBirthdays;
+ hmExportBirthdays = Menu_AddMainMenuItem(&cl);
+
+ cl.pszService = MS_WWI_ADD_BIRTHDAY;
+ cl.position = 10000000;
+ cl.icolibItem = hAddBirthdayContact;
+ cl.pszName = LPGEN("Add/change user &birthday");
+ hmAddChangeBirthday = Menu_AddContactMenuItem(&cl);
+
+ // Register hotkeys
+ HOTKEYDESC hotkey = { sizeof(hotkey) };
+ hotkey.pszSection = LPGEN("Birthdays");
+
+ 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.pszDescription = LPGEN("Check for birthdays");
+ hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
+ Hotkey_Register(&hotkey);
+
+
+ SkinAddNewSoundExT(BIRTHDAY_NEAR_SOUND, LPGENT("WhenWasIt"), LPGENT("Birthday near"));
+ SkinAddNewSoundExT(BIRTHDAY_TODAY_SOUND, LPGENT("WhenWasIt"), LPGENT("Birthday today"));
+
+ Log("%s", "Leaving function " __FUNCTION__);
return 0;
}