diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-14 15:51:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-14 15:51:34 +0000 |
commit | e58823d961a630eb62e60d2ccb443761ba5f1704 (patch) | |
tree | 62d071be480d57af2a53f154a1468abe0b9449ff /plugins/SmileyAdd/services.cpp | |
parent | 721aea0764451e985d575236205808bbef298244 (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/SmileyAdd/services.cpp')
-rw-r--r-- | plugins/SmileyAdd/services.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/SmileyAdd/services.cpp b/plugins/SmileyAdd/services.cpp index 71b43145dc..1993e7e733 100644 --- a/plugins/SmileyAdd/services.cpp +++ b/plugins/SmileyAdd/services.cpp @@ -27,8 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //globals, defined int main.cpp
extern HANDLE hEvent1, hContactMenuItem;
-LIST<HANDLE> menuHandleArray(5);
-
+LIST<void> menuHandleArray(5);
//implementation of service functions
@@ -444,7 +443,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) mi.pszService = MS_SMILEYADD_CUSTOMCATMENU;
bool nonecheck = true;
- HANDLE* hMenu;
+ HGENMENU hMenu;
for (i = 0; i < smc.getCount(); i++)
{
@@ -462,7 +461,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) nonecheck = false;
}
- hMenu = (HANDLE*)CallService(MS_CLIST_ADDCONTACTMENUITEM, ind, (LPARAM)&mi);
+ hMenu = Menu_AddContactMenuItem(&mi);
menuHandleArray.insert(hMenu);
mi.flags &= ~CMIF_CHECKED;
}
@@ -470,13 +469,12 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) mi.position = 1;
mi.popupPosition = 1;
mi.ptszName = _T("<None>");
- if (cat == _T("<None>"))
- {
+ if (cat == _T("<None>")) {
mi.flags |= CMIF_CHECKED;
nonecheck = false;
}
- hMenu = (HANDLE*)CallService(MS_CLIST_ADDCONTACTMENUITEM, 1, (LPARAM)&mi);
+ hMenu = Menu_AddContactMenuItem(&mi);
menuHandleArray.insert(hMenu);
mi.position = 2;
@@ -484,7 +482,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) mi.ptszName = _T("Protocol specific");
if (nonecheck) mi.flags |= CMIF_CHECKED; else mi.flags &= ~CMIF_CHECKED;
- hMenu = (HANDLE*)CallService(MS_CLIST_ADDCONTACTMENUITEM, 2, (LPARAM)&mi);
+ hMenu = Menu_AddContactMenuItem(&mi);
menuHandleArray.insert(hMenu);
}
|