summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-28 17:41:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-28 17:41:48 +0000
commit59cd198e89782263777c57dcd54704ecb1e10212 (patch)
tree9515cc2c31c1254c330e79906bb669279af9b8a5 /src
parentca2afc50a432cefe892c6877710642bce6bd57c9 (diff)
finally CLISTEVENT removed completely
git-svn-id: http://svn.miranda-ng.org/main/trunk@14430 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/stdaway/src/awaymsg.cpp2
-rw-r--r--src/core/stdemail/src/email.cpp4
-rw-r--r--src/core/stdfile/src/file.cpp8
-rw-r--r--src/core/stdhelp/src/help.cpp12
-rw-r--r--src/core/stdmsg/src/msgs.cpp4
-rw-r--r--src/core/stduihist/src/history.cpp4
-rw-r--r--src/core/stdurl/url.cpp4
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp4
-rw-r--r--src/mir_app/src/chat_svc.cpp6
-rw-r--r--src/mir_app/src/clc.h2
-rw-r--r--src/mir_app/src/clistcore.cpp1
-rw-r--r--src/mir_app/src/clistmenus.cpp103
-rw-r--r--src/mir_app/src/clui.cpp8
-rw-r--r--src/mir_app/src/findadd.cpp4
-rw-r--r--src/mir_app/src/framesmenu.cpp14
-rw-r--r--src/mir_app/src/meta_menu.cpp18
-rw-r--r--src/mir_app/src/movetogroup.cpp10
-rw-r--r--src/mir_app/src/options.cpp4
-rw-r--r--src/mir_app/src/proto_opts.cpp4
19 files changed, 90 insertions, 126 deletions
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp
index b3c9f95c44..15ac55f682 100644
--- a/src/core/stdaway/src/awaymsg.cpp
+++ b/src/core/stdaway/src/awaymsg.cpp
@@ -167,7 +167,7 @@ int LoadAwayMsgModule(void)
hWindowList = WindowList_Create();
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = -2000005000;
mi.flags = CMIF_NOTOFFLINE;
mi.name.a = LPGEN("Re&ad status message");
diff --git a/src/core/stdemail/src/email.cpp b/src/core/stdemail/src/email.cpp
index 87c505b6ea..42009eb606 100644
--- a/src/core/stdemail/src/email.cpp
+++ b/src/core/stdemail/src/email.cpp
@@ -66,9 +66,9 @@ static int EMailPreBuildMenu(WPARAM hContact, LPARAM)
int LoadSendRecvEMailModule(void)
{
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = -2000010000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
mi.name.a = LPGEN("&E-mail");
mi.pszService = MS_EMAIL_SENDEMAIL;
hEMailMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index 6c0c01c207..397034f2a9 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -336,9 +336,9 @@ static int SRFileProtoAck(WPARAM, LPARAM lParam)
static int SRFileModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = -2000020000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.name.a = LPGEN("&File");
mi.pszService = MS_FILE_SENDFILE;
hSRFileMenuItem = Menu_AddContactMenuItem(&mi);
@@ -434,8 +434,8 @@ int LoadSendRecvFileModule(void)
{
CreateServiceFunction("FtMgr/Show", FtMgrShowCommand);
- CLISTMENUITEM mi = { 0 };
- mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
+ TMO_MenuItem mi = { 0 };
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.position = 1900000000;
mi.name.a = LPGEN("File &transfers...");
mi.pszService = "FtMgr/Show"; //MS_PROTO_SHOWFTMGR;
diff --git a/src/core/stdhelp/src/help.cpp b/src/core/stdhelp/src/help.cpp
index 300082ee57..d248c24d45 100644
--- a/src/core/stdhelp/src/help.cpp
+++ b/src/core/stdhelp/src/help.cpp
@@ -73,28 +73,28 @@ int LoadHelpModule(void)
CreateServiceFunction("Help/WebsiteCommand", WebsiteCommand);
CreateServiceFunction("Help/BugCommand", BugCommand);
- CLISTMENUITEM mi = { 0 };
- mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("&Help"), 2000090000);
+ TMO_MenuItem mi = { 0 };
+ mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("&Help"), 2000090000);
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.position = 2000090000;
mi.name.a = LPGEN("&About...");
mi.pszService = "Help/AboutCommand";
Menu_AddMainMenuItem(&mi);
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
mi.position = -500050000;
mi.name.a = LPGEN("&Support");
mi.pszService = "Help/IndexCommand";
Menu_AddMainMenuItem(&mi);
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDAWEB);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDAWEB);
mi.position = 2000050000;
mi.name.a = LPGEN("&Miranda NG homepage");
mi.pszService = "Help/WebsiteCommand";
Menu_AddMainMenuItem(&mi);
- mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.position = 2000040000;
mi.name.a = LPGEN("&Report bug");
mi.pszService = "Help/BugCommand";
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index ba2f82ab62..3319d29fb2 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -278,10 +278,10 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM)
RegisterSRMMFonts();
LoadMsgLogIcons();
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
mi.name.a = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
hMsgMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp
index 94de89639c..2114cd2e24 100644
--- a/src/core/stduihist/src/history.cpp
+++ b/src/core/stduihist/src/history.cpp
@@ -401,9 +401,9 @@ static int PreShutdownHistoryModule(WPARAM, LPARAM)
int LoadHistoryModule(void)
{
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 1000090000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.name.a = LPGEN("View &history");
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
hContactMenu = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp
index e6bbf11e77..ba9bd8bb14 100644
--- a/src/core/stdurl/url.cpp
+++ b/src/core/stdurl/url.cpp
@@ -119,9 +119,9 @@ static int SRUrlPreBuildMenu(WPARAM wParam, LPARAM)
static int SRUrlModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = -2000040000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.name.a = LPGEN("Web page address (&URL)");
mi.pszService = MS_URL_SENDURL;
hSRUrlMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index 93511c627f..e4019fe568 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -628,9 +628,9 @@ int LoadUserInfoModule(void)
HookEvent(ME_DB_CONTACT_DELETED, UserInfoContactDelete);
HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownUserInfo);
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 1000050000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.name.a = LPGEN("User &details");
mi.pszService = MS_USERINFO_SHOWDIALOG;
Menu_AddContactMenuItem(&mi);
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index b38bf3d194..ea88490b14 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -560,16 +560,16 @@ static int ModulesLoaded(WPARAM, LPARAM)
HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = -2000090001;
mi.flags = CMIF_DEFAULT;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
mi.name.a = LPGEN("&Join chat");
mi.pszService = "GChat/JoinChat";
hJoinMenuItem = Menu_AddContactMenuItem(&mi);
mi.position = -2000090000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE);
mi.flags = CMIF_NOTOFFLINE;
mi.name.a = LPGEN("&Leave chat");
mi.pszService = "GChat/LeaveChat";
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index 3a79db0804..bc8a921fa5 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -111,7 +111,7 @@ void GetFontSetting(int i, LOGFONTA *lf, COLORREF *colour);
/* clistmenus.c */
HGENMENU fnGetProtocolMenu(const char*);
int fnGetProtocolVisibility(const char* accName);
-int fnConvertMenu(CLISTMENUITEM*, TMO_MenuItem*);
+int fnConvertMenu(TMO_MenuItem*, TMO_MenuItem*);
int fnGetAverageMode(int *pNetProtoCount);
int fnGetAccountIndexByPos(int Pos);
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp
index b4f5442bf9..9c53d8f1ec 100644
--- a/src/mir_app/src/clistcore.cpp
+++ b/src/mir_app/src/clistcore.cpp
@@ -207,7 +207,6 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM)
cli.pfnReloadProtoMenus = fnReloadProtoMenus;
cli.pfnGetAccountIndexByPos = fnGetAccountIndexByPos;
cli.pfnGetProtocolMenu = fnGetProtocolMenu;
- cli.pfnConvertMenu = fnConvertMenu;
cli.pfnReloadExtraIcons = fnReloadExtraIcons;
cli.pfnSetAllExtraIcons = fnSetAllExtraIcons;
diff --git a/src/mir_app/src/clistmenus.cpp b/src/mir_app/src/clistmenus.cpp
index 79518f6aa9..5effa2ea0f 100644
--- a/src/mir_app/src/clistmenus.cpp
+++ b/src/mir_app/src/clistmenus.cpp
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
typedef struct {
WORD id;
int iconId;
- CLISTMENUITEM mi;
+ TMO_MenuItem mi;
}
CListIntMenuItem, *lpCListIntMenuItem;
@@ -79,15 +79,14 @@ static INT_PTR statusHotkeys[MAX_STATUS_COUNT];
TMO_IntMenuItem **hStatusMainMenuHandles;
int hStatusMainMenuHandlesCnt;
-typedef struct
+struct tStatusMenuHandles
{
int protoindex;
int protostatus[MAX_STATUS_COUNT];
TMO_IntMenuItem *menuhandle[MAX_STATUS_COUNT];
-}
-tStatusMenuHandles, *lpStatusMenuHandles;
+};
-lpStatusMenuHandles hStatusMenuHandles;
+tStatusMenuHandles *hStatusMenuHandles;
int hStatusMenuHandlesCnt;
struct BuildContactParam
@@ -179,38 +178,35 @@ MIR_APP_DLL(HMENU) Menu_GetMainMenu(void)
return Menu_BuildMainMenu();
}
-MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(CLISTMENUITEM *mi, int _hLang)
+MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi, int _hLang)
{
- TMO_MenuItem tmi;
- if (!cli.pfnConvertMenu(mi, &tmi))
- return 0;
-
MainMenuExecParam *mmep = (MainMenuExecParam*)mir_alloc(sizeof(MainMenuExecParam));
if (mmep == NULL)
return 0;
//we need just one parametr.
- mmep->szServiceName = mir_strdup(mi->pszService);
- mmep->szMenuName = tmi.name.t;
- tmi.ownerdata = mmep;
+ mmep->szServiceName = mir_strdup(pmi->pszService);
+ mmep->szMenuName = pmi->name.t;
+ pmi->ownerdata = mmep;
- TMO_IntMenuItem *pimi = Menu_AddItem(hMainMenuObject, &tmi);
+ TMO_IntMenuItem *pimi = Menu_AddItem(hMainMenuObject, pmi);
pimi->hLangpack = _hLang;
mmep->pimi = pimi;
- char* name;
+ const char* name;
bool needFree = false;
- if (mi->pszService)
- name = mi->pszService;
- else if (mi->flags & CMIF_UNICODE) {
- name = mir_t2a(mi->name.t);
+ if (pmi->pszService)
+ name = pmi->pszService;
+ else if (pmi->flags & CMIF_UNICODE) {
+ name = mir_t2a(pmi->name.t);
needFree = true;
}
- else name = mi->name.a;
+ else name = pmi->name.a;
Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, name);
- if (needFree) mir_free(name);
+ if (needFree)
+ mir_free((void*)name);
return pimi;
}
@@ -249,21 +245,17 @@ struct ContactMenuExecParam
/////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(CLISTMENUITEM *mi, const char *pszProto, int _hLang)
+MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(TMO_MenuItem *pmi, const char *pszProto, int _hLang)
{
- TMO_MenuItem tmi;
- if (!cli.pfnConvertMenu(mi, &tmi))
- return 0;
-
// owner data
ContactMenuExecParam *cmep = (ContactMenuExecParam*)mir_calloc(sizeof(ContactMenuExecParam));
- cmep->szServiceName = mir_strdup(mi->pszService);
+ cmep->szServiceName = mir_strdup(pmi->pszService);
if (pszProto != NULL)
cmep->pszContactOwner = mir_strdup(pszProto);
- tmi.ownerdata = cmep;
+ pmi->ownerdata = cmep;
// may be need to change how UniqueName is formed?
- TMO_IntMenuItem *pimi = Menu_AddItem(hContactMenuObject, &tmi);
+ TMO_IntMenuItem *pimi = Menu_AddItem(hContactMenuObject, pmi);
pimi->hLangpack = _hLang;
cmep->pimi = pimi;
@@ -271,15 +263,15 @@ MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(CLISTMENUITEM *mi, const char *psz
pszProto = "";
char buf[256];
- if (mi->pszService) {
- mir_snprintf(buf, "%s/%s", pszProto, (mi->pszService) ? mi->pszService : "");
+ if (pmi->pszService) {
+ mir_snprintf(buf, "%s/%s", pszProto, (pmi->pszService) ? pmi->pszService : "");
Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
}
- else if (mi->name.t) {
- if (tmi.flags & CMIF_UNICODE)
- mir_snprintf(buf, "%s/NoService/%S", pszProto, mi->name.t);
+ else if (pmi->name.t) {
+ if (pmi->flags & CMIF_UNICODE)
+ mir_snprintf(buf, "%s/NoService/%S", pszProto, pmi->name.t);
else
- mir_snprintf(buf, "%s/NoService/%s", pszProto, mi->name.a);
+ mir_snprintf(buf, "%s/NoService/%s", pszProto, pmi->name.a);
Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
}
return pimi;
@@ -376,32 +368,28 @@ struct StatusMenuExecParam
/////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(CLISTMENUITEM *mi, const char *pszProto, int _hLangpack)
+MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *pmi, const char *pszProto, int _hLangpack)
{
- TMO_MenuItem tmi;
- if (!cli.pfnConvertMenu(mi, &tmi))
- return 0;
-
- TMO_IntMenuItem *pRoot = MO_GetIntMenuItem(mi->hParentMenu);
+ TMO_IntMenuItem *pRoot = MO_GetIntMenuItem(pmi->root);
// owner data
StatusMenuExecParam *smep = NULL;
- if (mi->pszService) {
+ if (pmi->pszService) {
smep = (StatusMenuExecParam*)mir_calloc(sizeof(StatusMenuExecParam));
smep->custom = TRUE;
- smep->svc = mir_strdup(mi->pszService);
+ smep->svc = mir_strdup(pmi->pszService);
smep->szProto = mir_strdup(pszProto);
- tmi.ownerdata = smep;
+ pmi->ownerdata = smep;
}
- TMO_IntMenuItem *pimi = Menu_AddItem(hStatusMenuObject, &tmi);
+ TMO_IntMenuItem *pimi = Menu_AddItem(hStatusMenuObject, pmi);
pimi->hLangpack = _hLangpack;
if (smep)
smep->hMenuItem = pimi;
char buf[MAX_PATH + 64];
char *p = (pRoot) ? mir_t2a(pRoot->mi.name.t) : NULL;
- mir_snprintf(buf, "%s/%s", (p) ? p : "", mi->pszService ? mi->pszService : "");
+ mir_snprintf(buf, "%s/%s", (p) ? p : "", pmi->pszService ? pmi->pszService : "");
mir_free(p);
Menu_ConfigureItem(pimi, MCI_OPT_UNIQUENAME, buf);
@@ -1062,23 +1050,6 @@ static int MenuProtoAck(WPARAM, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-int fnConvertMenu(CLISTMENUITEM *mi, TMO_MenuItem *pmi)
-{
- if (mi == NULL || pmi == NULL)
- return FALSE;
-
- memset(pmi, 0, sizeof(TMO_MenuItem));
- pmi->root = mi->hParentMenu;
- pmi->flags = mi->flags;
- pmi->hIcolibItem = mi->icolibItem;
- pmi->name.a = mi->name.a;
- pmi->position = mi->position;
- pmi->hLangpack = mi->hLangpack;
- return TRUE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
static MenuProto* FindProtocolMenu(const char *proto)
{
for (int i = 0; i < cli.menuProtoCount; i++)
@@ -1108,7 +1079,7 @@ static INT_PTR HotkeySetStatus(WPARAM, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// PROTOCOL MENU
-MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(CLISTMENUITEM *mi, const char *pszProto, int _hLangpack)
+MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(TMO_MenuItem *mi, const char *pszProto, int _hLangpack)
{
if (mi == NULL)
return NULL;
@@ -1197,11 +1168,11 @@ void InitCustomMenus(void)
// add exit command to menu
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 0x7fffffff;
mi.pszService = "CloseAction";
mi.name.a = LPGEN("E&xit");
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
Menu_AddMainMenuItem(&mi);
cli.currentStatusMenuItem = ID_STATUS_OFFLINE;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index d73eee5893..bc38c7728a 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -326,18 +326,18 @@ int LoadCLUIModule(void)
db_get_b(NULL, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
CreateServiceFunction("CList/DeleteContactCommand", MenuItem_DeleteContact);
mi.position = 2000070000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.name.a = LPGEN("De&lete");
mi.pszService = "CList/DeleteContactCommand";
Menu_AddContactMenuItem(&mi);
CreateServiceFunction("CList/RenameContactCommand", MenuItem_RenameContact);
mi.position = 2000050000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.name.a = LPGEN("&Rename");
mi.pszService = "CList/RenameContactCommand";
hRenameMenuItem = Menu_AddContactMenuItem(&mi);
@@ -345,7 +345,7 @@ int LoadCLUIModule(void)
CreateServiceFunction("CList/AddToListContactCommand", MenuItem_AddContactToList);
mi.position = -2050000000;
mi.flags |= CMIF_NOTONLIST;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT);
mi.name.a = LPGEN("&Add permanently to list");
mi.pszService = "CList/AddToListContactCommand";
Menu_AddContactMenuItem(&mi);
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp
index 35da0d8310..724a1216ed 100644
--- a/src/mir_app/src/findadd.cpp
+++ b/src/mir_app/src/findadd.cpp
@@ -1028,9 +1028,9 @@ int LoadFindAddModule(void)
HookEvent(ME_PROTO_ACCLISTCHANGED, OnSystemModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, FindAddPreShutdown);
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 500020000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.name.a = LPGEN("&Find/add contacts...");
mi.pszService = MS_FINDADD_FINDADD;
hMainMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/src/mir_app/src/framesmenu.cpp b/src/mir_app/src/framesmenu.cpp
index 72f2aa24b4..d5b3c81c17 100644
--- a/src/mir_app/src/framesmenu.cpp
+++ b/src/mir_app/src/framesmenu.cpp
@@ -45,18 +45,12 @@ INT_PTR FreeOwnerDataFrameMenu(WPARAM, LPARAM lParam)
static INT_PTR AddContextFrameMenuItem(WPARAM, LPARAM lParam)
{
- CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
-
- TMO_MenuItem tmi;
- if (!cli.pfnConvertMenu(mi, &tmi))
- return NULL;
-
- tmi.root = mi->hParentMenu;
+ TMO_MenuItem *pmi = (TMO_MenuItem*)lParam;
FrameMenuExecParam *fmep = new FrameMenuExecParam();
- fmep->szServiceName = mir_strdup(mi->pszService);
- tmi.ownerdata = fmep;
- return (INT_PTR)Menu_AddItem(hFrameMenuObject, &tmi);
+ fmep->szServiceName = mir_strdup(pmi->pszService);
+ pmi->ownerdata = fmep;
+ return (INT_PTR)Menu_AddItem(hFrameMenuObject, pmi);
}
// called with:
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index df4fbe6bd5..d848d09c17 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -356,41 +356,41 @@ INT_PTR Meta_OnOff(WPARAM, LPARAM)
void InitMenus()
{
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
// main menu item
- mi.icolibItem = GetIconHandle(I_MENUOFF);
+ mi.hIcolibItem = GetIconHandle(I_MENUOFF);
mi.name.a = LPGEN("Toggle metacontacts off");
mi.pszService = "MetaContacts/OnOff";
mi.position = 500010000;
hMenuOnOff = Menu_AddMainMenuItem(&mi);
// contact menu items
- mi.icolibItem = GetIconHandle(I_CONVERT);
+ mi.hIcolibItem = GetIconHandle(I_CONVERT);
mi.position = -200010;
mi.name.a = LPGEN("Convert to metacontact");
mi.pszService = "MetaContacts/Convert";
hMenuConvert = Menu_AddContactMenuItem(&mi);
- mi.icolibItem = GetIconHandle(I_ADD);
+ mi.hIcolibItem = GetIconHandle(I_ADD);
mi.position = -200009;
mi.name.a = LPGEN("Add to existing metacontact...");
mi.pszService = "MetaContacts/AddTo";
hMenuAdd = Menu_AddContactMenuItem(&mi);
- mi.icolibItem = GetIconHandle(I_EDIT);
+ mi.hIcolibItem = GetIconHandle(I_EDIT);
mi.position = -200010;
mi.name.a = LPGEN("Edit metacontact...");
mi.pszService = "MetaContacts/Edit";
hMenuEdit = Menu_AddContactMenuItem(&mi);
- mi.icolibItem = GetIconHandle(I_SETDEFAULT);
+ mi.hIcolibItem = GetIconHandle(I_SETDEFAULT);
mi.position = -200009;
mi.name.a = LPGEN("Set as metacontact default");
mi.pszService = "MetaContacts/Default";
hMenuDefault = Menu_AddContactMenuItem(&mi);
- mi.icolibItem = GetIconHandle(I_REMOVE);
+ mi.hIcolibItem = GetIconHandle(I_REMOVE);
mi.position = -200008;
mi.name.a = LPGEN("Delete metacontact");
mi.pszService = "MetaContacts/Delete";
@@ -398,12 +398,12 @@ void InitMenus()
mi.position = -99000;
mi.flags = CMIF_HIDDEN;
- mi.icolibItem = 0;
+ mi.hIcolibItem = 0;
mi.name.a = LPGEN("Subcontacts");
hMenuRoot = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_HIDDEN;
- mi.hParentMenu = hMenuRoot;
+ mi.root = hMenuRoot;
for (int i = 0; i < MAX_CONTACTS; i++) {
mi.position--;
mi.name.a = "";
diff --git a/src/mir_app/src/movetogroup.cpp b/src/mir_app/src/movetogroup.cpp
index 55e90eac34..569521472c 100644
--- a/src/mir_app/src/movetogroup.cpp
+++ b/src/mir_app/src/movetogroup.cpp
@@ -30,7 +30,7 @@ LIST<HANDLE> lphGroupsItems(5);
//service
//wparam - hcontact
-//lparam .popupposition from CLISTMENUITEM
+//lparam .popupposition from TMO_MenuItem
#define MTG_MOVE "MoveToGroup/Move"
@@ -67,8 +67,8 @@ static TCHAR* PrepareGroupName(TCHAR* str)
static void AddGroupItem(HGENMENU hRoot, TCHAR* name, int pos, WPARAM param, bool checked)
{
- CLISTMENUITEM mi = { 0 };
- mi.hParentMenu = hRoot;
+ TMO_MenuItem mi = { 0 };
+ mi.root = hRoot;
mi.position = pos;
mi.name.t = PrepareGroupName(name);
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
@@ -88,10 +88,10 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM)
OBJLIST<GroupItemSort> groups(10, GroupItemSort::compare);
if (!hMoveToGroupItem) {
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 100000;
mi.name.a = LPGEN("&Move to group");
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUP);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUP);
hMoveToGroupItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp
index 1733efbc26..76d34ace71 100644
--- a/src/mir_app/src/options.cpp
+++ b/src/mir_app/src/options.cpp
@@ -1293,8 +1293,8 @@ static INT_PTR AddOptionsPage(WPARAM wParam, LPARAM lParam)
static int OptModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { 0 };
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
+ TMO_MenuItem mi = { 0 };
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.position = 1900000000;
mi.name.a = LPGEN("&Options...");
mi.pszService = "Options/OptionsCommand";
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index cd98784e71..d4cbfc84f7 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -1018,8 +1018,8 @@ static INT_PTR OptProtosShow(WPARAM, LPARAM)
int OptProtosLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { 0 };
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_ACCMGR);
+ TMO_MenuItem mi = { 0 };
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_ACCMGR);
mi.position = 1900000000;
mi.name.a = LPGEN("&Accounts...");
mi.pszService = MS_PROTO_SHOWACCMGR;