summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
commit30707c980d1560b358dbf2671a4d2a26a1e8173c (patch)
tree74aee5adaaac976e1398274ca64c5461a60f1feb /plugins/NotesAndReminders
parent335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff)
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NotesAndReminders')
-rw-r--r--plugins/NotesAndReminders/src/main.cpp128
1 files changed, 60 insertions, 68 deletions
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 0553a91d6d..6150abb40d 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -207,79 +207,71 @@ static void InitServices()
int OnModulesLoaded(WPARAM wparam,LPARAM lparam)
{
- CLISTMENUITEM cmi = {0};
-
// register fonts and hotkeys
-
RegisterFontServiceFonts();
RegisterKeyBindings();
// register menus
-
- cmi.cbSize = sizeof(cmi);
- cmi.pszContactOwner = NULL;
- cmi.ptszPopupName = LPGENT("Notes && Reminders");
- cmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
-
- cmi.position = 1600000000;
- cmi.icolibItem = hIconLibItem[2];
- cmi.ptszName = LPGENT("New &Note");
- cmi.pszService = MODULENAME"/MenuCommandAddNew";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
-
- cmi.position = 1600000001;
- cmi.icolibItem = hIconLibItem[0];
- cmi.ptszName = LPGENT("New &Reminder");
- cmi.pszService = MODULENAME"/MenuCommandNewReminder";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
-
- //
-
- cmi.position = 1600100000;
- cmi.icolibItem = hIconLibItem[3];
- cmi.ptszName = LPGENT("&Show / Hide Notes");
- cmi.pszService = MODULENAME"/MenuCommandShowHide";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
-
- cmi.position = 1600100001;
- cmi.icolibItem = hIconLibItem[13];
- cmi.ptszName = LPGENT("Vie&w Notes");
- cmi.pszService = MODULENAME"/MenuCommandViewNotes";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
-
- cmi.position = 1600100002;
- cmi.icolibItem = hIconLibItem[1];
- cmi.ptszName = LPGENT("&Delete All Notes");
- cmi.pszService = MODULENAME"/MenuCommandDeleteAll";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
-
- cmi.position = 1600100003;
- cmi.icolibItem = hIconLibItem[11];
- cmi.ptszName = LPGENT("&Bring All to Front");
- cmi.pszService = MODULENAME"/MenuCommandBringAllFront";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
-
- //
-
- cmi.position = 1600200000;
- cmi.icolibItem = hIconLibItem[6];
- cmi.ptszName = LPGENT("&View Reminders");
- cmi.pszService = MODULENAME"/MenuCommandViewReminders";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
-
- cmi.position = 1600200001;
- cmi.icolibItem = hIconLibItem[5];
- cmi.ptszName = LPGENT("D&elete All Reminders");
- cmi.pszService = MODULENAME"/MenuCommandDeleteReminders";
- if (g_AddContListMI) Menu_AddContactMenuItem(&cmi);
- Menu_AddMainMenuItem(&cmi);
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.pszContactOwner = NULL;
+ mi.ptszPopupName = LPGENT("Notes && Reminders");
+ mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+
+ mi.position = 1600000000;
+ mi.icolibItem = hIconLibItem[2];
+ mi.ptszName = LPGENT("New &Note");
+ mi.pszService = MODULENAME"/MenuCommandAddNew";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
+
+ mi.position = 1600000001;
+ mi.icolibItem = hIconLibItem[0];
+ mi.ptszName = LPGENT("New &Reminder");
+ mi.pszService = MODULENAME"/MenuCommandNewReminder";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
+
+ mi.position = 1600100000;
+ mi.icolibItem = hIconLibItem[3];
+ mi.ptszName = LPGENT("&Show / Hide Notes");
+ mi.pszService = MODULENAME"/MenuCommandShowHide";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
+
+ mi.position = 1600100001;
+ mi.icolibItem = hIconLibItem[13];
+ mi.ptszName = LPGENT("Vie&w Notes");
+ mi.pszService = MODULENAME"/MenuCommandViewNotes";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
+
+ mi.position = 1600100002;
+ mi.icolibItem = hIconLibItem[1];
+ mi.ptszName = LPGENT("&Delete All Notes");
+ mi.pszService = MODULENAME"/MenuCommandDeleteAll";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
+
+ mi.position = 1600100003;
+ mi.icolibItem = hIconLibItem[11];
+ mi.ptszName = LPGENT("&Bring All to Front");
+ mi.pszService = MODULENAME"/MenuCommandBringAllFront";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
+
+ mi.position = 1600200000;
+ mi.icolibItem = hIconLibItem[6];
+ mi.ptszName = LPGENT("&View Reminders");
+ mi.pszService = MODULENAME"/MenuCommandViewReminders";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
+
+ mi.position = 1600200001;
+ mi.icolibItem = hIconLibItem[5];
+ mi.ptszName = LPGENT("D&elete All Reminders");
+ mi.pszService = MODULENAME"/MenuCommandDeleteReminders";
+ if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
+ Menu_AddMainMenuItem(&mi);
// register misc