summaryrefslogtreecommitdiff
path: root/plugins/Gender/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
commite58823d961a630eb62e60d2ccb443761ba5f1704 (patch)
tree62d071be480d57af2a53f154a1468abe0b9449ff /plugins/Gender/main.cpp
parent721aea0764451e985d575236205808bbef298244 (diff)
- all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs.
- massive cleanup of the menu-related code git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Gender/main.cpp')
-rw-r--r--plugins/Gender/main.cpp54
1 files changed, 25 insertions, 29 deletions
diff --git a/plugins/Gender/main.cpp b/plugins/Gender/main.cpp
index fb66488c48..a95d5593c9 100644
--- a/plugins/Gender/main.cpp
+++ b/plugins/Gender/main.cpp
@@ -315,7 +315,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam)
// Adding menu items, submenu even if clist supports that
if (bContactMenuItems)
{
- if(ServiceExists(MS_CLIST_ADDSUBGROUPMENUITEM))
+ if(ServiceExists(MS_CLIST_MENUBUILDSUBGROUP))
{
CLISTMENUITEM mi = {0};
mi.cbSize = sizeof(CLISTMENUITEM);
@@ -325,7 +325,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam)
mi.position = 203;
mi.ptszName = LPGENT("Set Gender");
mi.pszService = NULL;
- hContactMenu = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ hContactMenu = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
mi.position = 1001;
@@ -334,46 +334,42 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam)
mi.ptszName = LPGENT("Male");
mi.icolibItem = g_hIconMale;
mi.pszService = "Gender/MenuItemSetMale";
- hContactMenuMale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ hContactMenuMale = Menu_AddContactMenuItem(&mi);
mi.ptszName = LPGENT("Female");
mi.icolibItem = g_hIconFemale;
mi.pszService = "Gender/MenuItemSetFemale";
- hContactMenuFemale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ hContactMenuFemale = Menu_AddContactMenuItem(&mi);
mi.ptszName = LPGENT("Undefined");
mi.hIcon = NULL;
mi.pszService = "Gender/MenuItemSetUndef";
- hContactMenuNotDef = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ hContactMenuNotDef = Menu_AddContactMenuItem(&mi);
}
else
{
- CLISTMENUITEM mimale = {0};
- mimale.cbSize = sizeof(CLISTMENUITEM);
- mimale.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR;
- mimale.position = 1001;
- mimale.ptszName = LPGENT("Set Male");
- mimale.icolibItem = g_hIconMale;
- mimale.pszService = "Gender/MenuItemSetMale";
- hContactMenuMale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mimale);
+ CLISTMENUITEM mi = {0};
+ mi.cbSize = sizeof(CLISTMENUITEM);
+ mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR;
+ mi.position = 1001;
+ mi.ptszName = LPGENT("Set Male");
+ mi.icolibItem = g_hIconMale;
+ mi.pszService = "Gender/MenuItemSetMale";
+ hContactMenuMale = Menu_AddContactMenuItem(&mi);
- CLISTMENUITEM mifemale = {0};
- mifemale.cbSize = sizeof(CLISTMENUITEM);
- mifemale.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR;
- mifemale.position = 1002;
- mifemale.ptszName = LPGENT("Set Female");
- mifemale.icolibItem = g_hIconFemale;
- mifemale.pszService = "Gender/MenuItemSetFemale";
- hContactMenuFemale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mifemale);
+ mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR;
+ mi.position = 1002;
+ mi.ptszName = LPGENT("Set Female");
+ mi.icolibItem = g_hIconFemale;
+ mi.pszService = "Gender/MenuItemSetFemale";
+ hContactMenuFemale = Menu_AddContactMenuItem(&mi);
- CLISTMENUITEM miundef = {0};
- miundef.cbSize = sizeof(CLISTMENUITEM);
- miundef.flags = CMIF_TCHAR;
- miundef.position = 1003;
- miundef.ptszName = LPGENT("Set Undefined");
- miundef.pszService = "Gender/MenuItemSetUndef";
- miundef.hIcon = NULL;
- hContactMenuNotDef = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &miundef);
+ mi.flags = CMIF_TCHAR;
+ mi.position = 1003;
+ mi.ptszName = LPGENT("Set Undefined");
+ mi.pszService = "Gender/MenuItemSetUndef";
+ mi.hIcon = NULL;
+ hContactMenuNotDef = Menu_AddContactMenuItem(&mi);
}
}