summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r--plugins/SmileyAdd/main.cpp5
-rw-r--r--plugins/SmileyAdd/services.cpp14
2 files changed, 8 insertions, 11 deletions
diff --git a/plugins/SmileyAdd/main.cpp b/plugins/SmileyAdd/main.cpp
index 2515c6c076..e0965d8655 100644
--- a/plugins/SmileyAdd/main.cpp
+++ b/plugins/SmileyAdd/main.cpp
@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//globals
HINSTANCE g_hInst;
HANDLE hEvent1, hContactMenuItem;
-extern LIST<HANDLE> menuHandleArray;
+extern LIST<void> menuHandleArray;
char* metaProtoName;
@@ -105,7 +105,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
mi.icolibItem = hSkinIcon;
mi.pszPopupName = (char*)-1;
mi.pszName = "Assign Smiley Category";
- hContactMenuItem = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi);
+ hContactMenuItem = Menu_AddContactMenuItem(&mi);
DownloadInit();
@@ -124,7 +124,6 @@ static int MirandaShutdown(WPARAM, LPARAM)
return 0;
}
-
extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
{
pluginLink = link;
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);
}