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 /protocols/Gadu-Gadu | |
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 'protocols/Gadu-Gadu')
-rw-r--r-- | protocols/Gadu-Gadu/gg.c | 8 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/groupchat.c | 4 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/image.c | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/import.c | 10 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/sessions.c | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/protocols/Gadu-Gadu/gg.c b/protocols/Gadu-Gadu/gg.c index 2cc361b57a..8e573ba6ce 100644 --- a/protocols/Gadu-Gadu/gg.c +++ b/protocols/Gadu-Gadu/gg.c @@ -317,7 +317,7 @@ static void gg_block_init(GGPROTO *gg) mi.pszName = LPGEN("&Block");
mi.pszService = service;
mi.pszContactOwner = GG_PROTO;
- gg->hBlockMenuItem = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi);
+ gg->hBlockMenuItem = Menu_AddContactMenuItem(&mi);
gg->hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, gg_prebuildcontactmenu);
}
@@ -345,7 +345,7 @@ void gg_menus_init(GGPROTO *gg) mi.hParentMenu = HGENMENU_ROOT;
mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle(IDI_GG);
- hGCRoot = hCLRoot = hRoot = gg->hMenuRoot = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ hGCRoot = hCLRoot = hRoot = gg->hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else
{
@@ -355,12 +355,12 @@ void gg_menus_init(GGPROTO *gg) mi.ptszName = LPGENT("Conference");
mi.position = 200001;
mi.icolibItem = GetIconHandle(IDI_CONFERENCE);
- hGCRoot = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ hGCRoot = Menu_AddProtoMenuItem(&mi);
mi.ptszName = LPGENT("Contact list");
mi.position = 200002;
mi.icolibItem = GetIconHandle(IDI_LIST);
- hCLRoot = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ hCLRoot = Menu_AddProtoMenuItem(&mi);
if (gg->hMenuRoot)
CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)gg->hMenuRoot, 0);
diff --git a/protocols/Gadu-Gadu/groupchat.c b/protocols/Gadu-Gadu/groupchat.c index 9ead102cf8..ddeea1a7cf 100644 --- a/protocols/Gadu-Gadu/groupchat.c +++ b/protocols/Gadu-Gadu/groupchat.c @@ -79,7 +79,7 @@ void gg_gc_menus_init(GGPROTO *gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_CONFERENCE);
mi.pszName = LPGEN("Open &conference...");
mi.pszService = service;
- gg->hMainMenu[0] = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ gg->hMainMenu[0] = Menu_AddProtoMenuItem(&mi);
// Clear ignored conferences
mir_snprintf(service, sizeof(service), GGS_CLEAR_IGNORED, GG_PROTO);
@@ -88,7 +88,7 @@ void gg_gc_menus_init(GGPROTO *gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_CLEAR_CONFERENCE);
mi.pszName = LPGEN("&Clear ignored conferences");
mi.pszService = service;
- gg->hMainMenu[1] = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ gg->hMainMenu[1] = Menu_AddProtoMenuItem(&mi);
}
}
diff --git a/protocols/Gadu-Gadu/image.c b/protocols/Gadu-Gadu/image.c index fa32fedee9..b04bb758b4 100644 --- a/protocols/Gadu-Gadu/image.c +++ b/protocols/Gadu-Gadu/image.c @@ -82,7 +82,7 @@ int gg_img_init(GGPROTO *gg) mi.pszName = LPGEN("&Image");
mi.pszService = service;
mi.pszContactOwner = GG_PROTO;
- gg->hImageMenuItem = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ gg->hImageMenuItem = Menu_AddContactMenuItem(&mi);
// Receive image
mir_snprintf(service, sizeof(service), GGS_RECVIMAGE, GG_PROTO);
diff --git a/protocols/Gadu-Gadu/import.c b/protocols/Gadu-Gadu/import.c index 43a0367402..460c417a0e 100644 --- a/protocols/Gadu-Gadu/import.c +++ b/protocols/Gadu-Gadu/import.c @@ -630,7 +630,7 @@ void gg_import_init(GGPROTO *gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_IMPORT_SERVER);
mi.pszName = LPGEN("Import List From &Server");
mi.pszService = service;
- gg->hMainMenu[2] = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ gg->hMainMenu[2] = Menu_AddProtoMenuItem(&mi);
// Import from textfile
mir_snprintf(service, sizeof(service), GGS_IMPORT_TEXT, GG_PROTO);
@@ -639,7 +639,7 @@ void gg_import_init(GGPROTO *gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_IMPORT_TEXT);
mi.pszName = LPGEN("Import List From &Text File...");
mi.pszService = service;
- gg->hMainMenu[3] = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ gg->hMainMenu[3] = Menu_AddProtoMenuItem(&mi);
// Remove from server
mir_snprintf(service, sizeof(service), GGS_REMOVE_SERVER, GG_PROTO);
@@ -648,7 +648,7 @@ void gg_import_init(GGPROTO *gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_REMOVE_SERVER);
mi.pszName = LPGEN("&Remove List From Server");
mi.pszService = service;
- gg->hMainMenu[4] = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ gg->hMainMenu[4] = Menu_AddProtoMenuItem(&mi);
// Export to server
mir_snprintf(service, sizeof(service), GGS_EXPORT_SERVER, GG_PROTO);
@@ -657,7 +657,7 @@ void gg_import_init(GGPROTO *gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_EXPORT_SERVER);
mi.pszName = LPGEN("Export List To &Server");
mi.pszService = service;
- gg->hMainMenu[5] = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ gg->hMainMenu[5] = Menu_AddProtoMenuItem(&mi);
// Export to textfile
mir_snprintf(service, sizeof(service), GGS_EXPORT_TEXT, GG_PROTO);
@@ -666,5 +666,5 @@ void gg_import_init(GGPROTO *gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_EXPORT_TEXT);
mi.pszName = LPGEN("Export List To &Text File...");
mi.pszService = service;
- gg->hMainMenu[6] = (HANDLE)CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM) &mi);
+ gg->hMainMenu[6] = Menu_AddProtoMenuItem(&mi);
}
diff --git a/protocols/Gadu-Gadu/sessions.c b/protocols/Gadu-Gadu/sessions.c index 39348fef61..d5ea8b5577 100644 --- a/protocols/Gadu-Gadu/sessions.c +++ b/protocols/Gadu-Gadu/sessions.c @@ -441,5 +441,5 @@ void gg_sessions_menus_init(GGPROTO* gg, HGENMENU hRoot) mi.icolibItem = GetIconHandle(IDI_SESSIONS);
mi.ptszName = LPGENT("Concurrent &sessions");
mi.pszService = service;
- CallService(MS_CLIST_ADDPROTOMENUITEM, 0, (LPARAM)&mi);
+ Menu_AddProtoMenuItem(&mi);
}
|