diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-28 17:41:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-28 17:41:48 +0000 |
commit | 59cd198e89782263777c57dcd54704ecb1e10212 (patch) | |
tree | 9515cc2c31c1254c330e79906bb669279af9b8a5 /plugins/Clist_nicer | |
parent | ca2afc50a432cefe892c6877710642bce6bd57c9 (diff) |
finally CLISTEVENT removed completely
git-svn-id: http://svn.miranda-ng.org/main/trunk@14430 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 30 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp | 73 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistmenus.cpp | 4 |
3 files changed, 49 insertions, 58 deletions
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index d22724ac95..d8b1a8c031 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -566,7 +566,7 @@ int CLUIFramesGetalClientFrame(void) ///////////////////////////////////////////////////////////////////////////////////////// -static HGENMENU addFrameMenuItem(CLISTMENUITEM *pmi, int frameid, bool bMain) +static HGENMENU addFrameMenuItem(TMO_MenuItem *pmi, int frameid, bool bMain) { HGENMENU res = (bMain) ? Menu_AddMainMenuItem(pmi) : Menu_AddContextFrameMenuItem(pmi); if (pmi->pszService != NULL) @@ -582,9 +582,9 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo int framepos = id2pos(frameid); FrameMenuHandles &fmh = (frameid == -1) ? cont : Frames[framepos].MenuHandles; - CLISTMENUITEM mi = { 0 }; - mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); - mi.hParentMenu = root; + TMO_MenuItem mi = { 0 }; + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); + mi.root = root; mi.position = popuppos++; mi.name.a = LPGEN("&FrameTitle"); mi.flags = CMIF_GRAYED; @@ -592,7 +592,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo popuppos += 100000; - mi.icolibItem = NULL; + mi.hIcolibItem = NULL; mi.position = popuppos++; mi.name.a = LPGEN("&Visible"); mi.flags = CMIF_CHECKED; @@ -645,7 +645,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo popuppos += 100000; // alignment root - mi.hParentMenu = root; + mi.root = root; mi.position = popuppos++; mi.name.a = LPGEN("&Align"); mi.flags = 0; @@ -653,7 +653,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo fmh.MIAlignRoot = addFrameMenuItem(&mi, frameid, bMain); // align top - mi.hParentMenu = fmh.MIAlignRoot; + mi.root = fmh.MIAlignRoot; mi.position = popuppos++; mi.name.a = LPGEN("&Top"); mi.pszService = CLUIFRAMESSETALIGNALTOP; @@ -672,11 +672,11 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo fmh.MIAlignBottom = addFrameMenuItem(&mi, frameid, bMain); // position root - mi.hParentMenu = root; + mi.root = root; mi.position = popuppos++; mi.name.a = LPGEN("&Position"); mi.pszService = NULL; - mi.hParentMenu = addFrameMenuItem(&mi, frameid, bMain); + mi.root = addFrameMenuItem(&mi, frameid, bMain); mi.position = popuppos++; mi.name.a = LPGEN("&Up"); @@ -1338,18 +1338,18 @@ static int CLUIFramesLoadMainMenu() } // create root menu - CLISTMENUITEM mi = { 0 }; - mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME); + TMO_MenuItem mi = { 0 }; + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME); mi.position = 3000090000; mi.name.a = LPGEN("Frames"); mi.pszService = 0; cont.MainMenuItem = Menu_AddMainMenuItem(&mi); // create frames menu - mi.hParentMenu = cont.MainMenuItem; + mi.root = cont.MainMenuItem; int separator = (int)3000200000; for (int i = 0; i < nFramescount; i++) { - mi.icolibItem = Frames[i].TitleBar.hicon; + mi.hIcolibItem = Frames[i].TitleBar.hicon; mi.flags = CMIF_TCHAR; mi.position = separator; mi.name.t = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name; @@ -1364,7 +1364,7 @@ static int CLUIFramesLoadMainMenu() separator += 100000; // create "show all frames" menu - mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); mi.flags = 0; mi.position = separator++; mi.name.a = LPGEN("Show all frames"); @@ -1372,7 +1372,7 @@ static int CLUIFramesLoadMainMenu() Menu_AddMainMenuItem(&mi); // create "show all titlebars" menu - mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP); + mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP); mi.position = separator++; mi.name.a = LPGEN("Show all title bars"); mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB; diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index fd96059baf..137fe1b888 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -64,29 +64,24 @@ static INT_PTR BuildGroupMenu(WPARAM, LPARAM) static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
- TMO_MenuItem tmi;
- CLISTMENUITEM *mi = (CLISTMENUITEM *)lParam;
- if (!pcli->pfnConvertMenu(mi, &tmi))
- return NULL;
-
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)mir_calloc(sizeof(GroupMenuExecParam));
if (mmep == NULL)
return 0;
- //we need just one parametr.
- mmep->szServiceName = mir_strdup(mi->pszService);
- mmep->Param1 = 0; // mi->popupPosition; !!!!!!!!!!!!!!!!!!
+ TMO_MenuItem *pmi = (TMO_MenuItem*)lParam;
+ // we need just one parametr.
+ mmep->szServiceName = mir_strdup(pmi->pszService);
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
- tmi.ownerdata = mmep;
+ pmi->ownerdata = mmep;
- HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, &tmi);
+ HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, pmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
+ mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -232,64 +227,64 @@ void InitGroupMenus(void) // add exit command to menu
GroupMenuParam gmp;
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 1900000;
mi.pszService = "CloseAction";
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
mi.name.a = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.name.a = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 200000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.name.a = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300000;
mi.pszService = "";
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
mi.name.a = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
mi.name.a = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 390100;
- mi.icolibItem = iconItem[1].hIcolib;
+ mi.hIcolibItem = iconItem[1].hIcolib;
mi.name.a = LPGEN("Appearance");
hAppearanceMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 400000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.name.a = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500000;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "CLN/About";
mi.name.a = LPGEN("&About the contact list...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.flags = 0;
mi.position = 100000;
- mi.icolibItem = iconItem[0].hIcolib;
+ mi.hIcolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.name.a = LPGEN("&New group");
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100001;
- mi.icolibItem = NULL;
- mi.icolibItem = NULL;
+ mi.hIcolibItem = NULL;
+ mi.hIcolibItem = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
mi.name.a = LPGEN("&Hide offline users");
gmp.lParam = 0; gmp.wParam = -1;
@@ -331,7 +326,7 @@ SubGroupMenuExecParam, *lpSubGroupMenuExecParam; static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
{
- ClcGroup *group = (ClcGroup *)wParam;
+ ClcGroup *group = (ClcGroup*)wParam;
if (group != 0) // contact->group
Menu_ModifyItem(hHideOfflineUsersHereMenuItem, NULL, INVALID_HANDLE_VALUE, group->hideOffline ? CMIF_CHECKED : 0);
return 0;
@@ -348,28 +343,24 @@ static INT_PTR BuildSubGroupMenu(WPARAM wParam, LPARAM) static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
- TMO_MenuItem tmi;
- CLISTMENUITEM *mi = (CLISTMENUITEM *)lParam;
- if (!pcli->pfnConvertMenu(mi, &tmi))
- return NULL;
-
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)mir_alloc(sizeof(SubGroupMenuExecParam));
if (mmep == NULL)
return 0;
- //we need just one parametr.
+ TMO_MenuItem *pmi = (TMO_MenuItem*)lParam;
+
+ // we need just one parametr.
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
- mmep->szServiceName = mir_strdup(mi->pszService);
- mmep->Param1 = 0; // mi->popupPosition; !!!!!!!!!!!!!!!!!!!!!!!!!
+ mmep->szServiceName = mir_strdup(pmi->pszService);
if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
- tmi.ownerdata = mmep;
- HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, &tmi);
+ pmi->ownerdata = mmep;
+ HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, pmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
+ mir_snprintf(buf, "%s/%s", pmi->pszService, pmi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -460,9 +451,9 @@ void InitSubGroupMenus(void) // add exit command to menu
GroupMenuParam gmp;
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 1000;
- mi.icolibItem = iconItem[0].hIcolib;
+ mi.hIcolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.name.a = LPGEN("&New subgroup");
gmp.lParam = 0;
@@ -470,8 +461,8 @@ void InitSubGroupMenus(void) hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 1001;
- mi.icolibItem = NULL;
- mi.icolibItem = NULL;
+ mi.hIcolibItem = NULL;
+ mi.hIcolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.name.a = LPGEN("&Hide offline users in here");
gmp.lParam = 0;
@@ -480,7 +471,7 @@ void InitSubGroupMenus(void) memset(&mi, 0, sizeof(mi));
mi.position = 900001;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.name.a = LPGEN("&Rename group");
gmp.lParam = 0;
@@ -488,7 +479,7 @@ void InitSubGroupMenus(void) AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 900002;
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.name.a = LPGEN("&Delete group");
gmp.lParam = 0;
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index b82d0f7e5d..458f460bc0 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -381,10 +381,10 @@ int InitCustomMenus(void) CreateServiceFunction("CloseAction", CloseAction);
CreateServiceFunction("CList/SetContactIgnore", SetContactIgnore);
- CLISTMENUITEM mi = { 0 };
+ TMO_MenuItem mi = { 0 };
mi.position = 200000;
mi.pszService = "CList/SetContactIgnore";
- mi.icolibItem = iconItem[1].hIcolib;
+ mi.hIcolibItem = iconItem[1].hIcolib;
mi.name.a = LPGEN("&Contact list settings...");
Menu_AddContactMenuItem(&mi);
|