diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-26 18:21:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-26 18:21:10 +0000 |
commit | 68924bfc1a213e619563c2cffb6d44b5b5346f6d (patch) | |
tree | 139f501b225080e4f895dbd40083df5956c3e339 /plugins | |
parent | b7a7d90f054d48dfda64e8a11d4f5cbb3fe2a521 (diff) |
next slice of cutting out unused menu features - popupPosition
git-svn-id: http://svn.miranda-ng.org/main/trunk@14400 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
64 files changed, 179 insertions, 460 deletions
diff --git a/plugins/Alarms/src/stdafx.h b/plugins/Alarms/src/stdafx.h index 0bc8575e9d..0b184aef19 100644 --- a/plugins/Alarms/src/stdafx.h +++ b/plugins/Alarms/src/stdafx.h @@ -14,6 +14,7 @@ #include <m_protosvc.h>
#include <m_langpack.h>
#include <m_popup.h>
+#include <m_clist.h>
#include <m_idle.h>
#include <m_clui.h>
#include <m_cluiframes.h>
diff --git a/plugins/AuthState/src/stdafx.h b/plugins/AuthState/src/stdafx.h index 213e900423..dc1fceea6d 100644 --- a/plugins/AuthState/src/stdafx.h +++ b/plugins/AuthState/src/stdafx.h @@ -26,6 +26,7 @@ #include <newpluginapi.h>
#include <m_database.h>
#include <m_protocols.h>
+#include <m_clist.h>
#include <m_options.h>
#include <m_langpack.h>
#include <m_icolib.h>
diff --git a/plugins/AutoShutdown/src/stdafx.h b/plugins/AutoShutdown/src/stdafx.h index f557ed810f..65e8dc8596 100644 --- a/plugins/AutoShutdown/src/stdafx.h +++ b/plugins/AutoShutdown/src/stdafx.h @@ -51,8 +51,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_file.h>
#include <m_idle.h>
#include <win2k.h>
-#include <m_cluiframes.h>
#include <m_clistint.h>
+#include <m_cluiframes.h>
#include <m_fontservice.h>
#include <m_icolib.h>
#include <m_hotkeys.h>
diff --git a/plugins/BASS_interface/src/stdafx.h b/plugins/BASS_interface/src/stdafx.h index e69ef0f03c..2afa76cc75 100644 --- a/plugins/BASS_interface/src/stdafx.h +++ b/plugins/BASS_interface/src/stdafx.h @@ -12,9 +12,9 @@ Copyright (C) 2010, 2011 tico-tico #include <m_database.h>
#include <m_options.h>
#include <win2k.h>
-#include <m_cluiframes.h>
#include <m_clui.h>
#include <m_clistint.h>
+#include <m_cluiframes.h>
#include <m_fontservice.h>
#include <m_button_int.h>
#include <m_icolib.h>
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 1bfc47a413..9c35ce146f 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -142,9 +142,9 @@ void InitTaskMenuItems() mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.hParentMenu = hTaskMainMenu;
- mi.popupPosition = pos++;
mi.ptszName = (TCHAR*)taskIt->taskName.c_str();
HGENMENU menu = Menu_AddMainMenuItem(&mi);
+ Menu_ConfigureItem(menu, MCI_OPT_EXECPARAM, pos++);
taskMenus.push_back(menu);
}
}
diff --git a/plugins/Boltun/src/stdafx.h b/plugins/Boltun/src/stdafx.h index 06ca9c2e2e..e75e59ffdd 100644 --- a/plugins/Boltun/src/stdafx.h +++ b/plugins/Boltun/src/stdafx.h @@ -29,13 +29,14 @@ #include <string>
#include <list>
-#include "newpluginapi.h"
-#include "m_clist.h"
-#include "m_system_cpp.h"
-#include "m_database.h"
-#include "m_options.h"
-#include "m_langpack.h"
-#include "m_skin.h"
+#include <newpluginapi.h>
+#include <m_clist.h>
+#include <m_system_cpp.h>
+#include <m_database.h>
+#include <m_genmenu.h>
+#include <m_options.h>
+#include <m_langpack.h>
+#include <m_skin.h>
#include "resource.h"
#include "version.h"
diff --git a/plugins/Clist_modern/clist_modern_10.vcxproj b/plugins/Clist_modern/clist_modern_10.vcxproj index f0bab6adda..cf99c372d8 100644 --- a/plugins/Clist_modern/clist_modern_10.vcxproj +++ b/plugins/Clist_modern/clist_modern_10.vcxproj @@ -194,9 +194,6 @@ <ClCompile Include="src\CLUIFrames\cluiframes.cpp">
<PrecompiledHeaderFile>../hdr/modern_commonheaders.h</PrecompiledHeaderFile>
</ClCompile>
- <ClCompile Include="src\CLUIFrames\framesmenu.cpp">
- <PrecompiledHeaderFile>../hdr/modern_commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
<ClCompile Include="src\CLUIFrames\groupmenu.cpp">
<PrecompiledHeaderFile>../hdr/modern_commonheaders.h</PrecompiledHeaderFile>
</ClCompile>
diff --git a/plugins/Clist_modern/clist_modern_10.vcxproj.filters b/plugins/Clist_modern/clist_modern_10.vcxproj.filters index e6e68ac8f9..7c1674cd34 100644 --- a/plugins/Clist_modern/clist_modern_10.vcxproj.filters +++ b/plugins/Clist_modern/clist_modern_10.vcxproj.filters @@ -153,9 +153,6 @@ <ClCompile Include="src\CLUIFrames\cluiframes.cpp">
<Filter>Source Files\CLUIFrames</Filter>
</ClCompile>
- <ClCompile Include="src\CLUIFrames\framesmenu.cpp">
- <Filter>Source Files\CLUIFrames</Filter>
- </ClCompile>
<ClCompile Include="src\CLUIFrames\groupmenu.cpp">
<Filter>Source Files\CLUIFrames</Filter>
</ClCompile>
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index 06cb843063..8f364c467f 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -758,7 +758,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp CLISTMENUITEM mi = { 0 };
mi.hParentMenu = root;
- mi.popupPosition = frameid;
+ // mi.popupPosition = frameid; !!!!!!!!!!!!!!!!!!!!!!!!!!
mi.position = popuppos++;
mi.pszName = LPGEN("&Visible");
mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
@@ -3526,8 +3526,6 @@ int LoadCLUIFramesModule(void) g_nFramesCount = 0;
- InitFramesMenus();
-
HookEvent(ME_SYSTEM_MODULESLOADED, CLUIFrameOnModulesLoad);
HookEvent(ME_CLIST_PREBUILDFRAMEMENU, CLUIFramesModifyContextMenuForFrame);
HookEvent(ME_CLIST_PREBUILDMAINMENU, CLUIFrameOnMainMenuBuild);
diff --git a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp deleted file mode 100644 index fc512f7ea9..0000000000 --- a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include "../hdr/modern_commonheaders.h"
-#include "../hdr/modern_commonprototypes.h"
-
-//========================== Frames
-HANDLE hFrameMenuObject;
-static HANDLE hPreBuildFrameMenuEvent;
-
-//contactmenu exec param(ownerdata)
-//also used in checkservice
-typedef struct{
- char *szServiceName;
- int Frameid;
- INT_PTR param1;
-}FrameMenuExecParam, *lpFrameMenuExecParam;
-
-INT_PTR FreeOwnerDataFrameMenu(WPARAM, LPARAM lParam)
-{
- lpFrameMenuExecParam cmep = (lpFrameMenuExecParam)lParam;
- if (cmep != NULL){
- mir_free(cmep->szServiceName);
- mir_free(cmep);
- }
- return 0;
-}
-
-static INT_PTR AddContextFrameMenuItem(WPARAM, LPARAM lParam)
-{
- CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
-
- TMO_MenuItem tmi;
- if (!pcli->pfnConvertMenu(mi, &tmi))
- return NULL;
-
- tmi.root = (mi->flags & CMIF_ROOTHANDLE) ? mi->hParentMenu : NULL;
-
- lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)mir_alloc(sizeof(FrameMenuExecParam));
- if (fmep == NULL)
- return 0;
-
- fmep->szServiceName = mir_strdup(mi->pszService);
- fmep->Frameid = mi->popupPosition;
- fmep->param1 = (INT_PTR)mi->pszContactOwner;
- tmi.ownerdata = fmep;
- return (INT_PTR)Menu_AddItem(hFrameMenuObject, &tmi);
-}
-
-//called with:
-//wparam - ownerdata
-//lparam - lparam from winproc
-INT_PTR FrameMenuExecService(WPARAM wParam, LPARAM lParam)
-{
- lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)wParam;
- if (fmep == NULL)
- return -1;
-
- CallService(fmep->szServiceName, lParam, fmep->param1);
- return 0;
-}
-
-//true - ok,false ignore
-INT_PTR FrameMenuCheckService(WPARAM wParam, LPARAM)
-{
- TCheckProcParam *pcpp = (TCheckProcParam*)wParam;
- if (pcpp == NULL)
- return FALSE;
-
- TMO_MenuItem mi;
- if (Menu_GetItemInfo(pcpp->MenuItemHandle, mi) == 0) {
- lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)mi.ownerdata;
- if (fmep != NULL) {
- //pcpp->wParam - frameid
- if (((WPARAM)fmep->Frameid == pcpp->wParam) || fmep->Frameid == -1)
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam)
-{
- NotifyEventHooks(hPreBuildFrameMenuEvent, wParam, lParam);
- return 0;
-}
-
-static INT_PTR BuildContextFrameMenu(WPARAM wParam, LPARAM lParam)
-{
- HMENU hMenu = CreatePopupMenu();
- ContextFrameMenuNotify(wParam, -1);
- Menu_Build(hMenu, hFrameMenuObject, wParam, lParam);
- return (INT_PTR)hMenu;
-}
-
-//========================== Frames end
-
-int InitFramesMenus(void)
-{
- CreateServiceFunction("FrameMenuExecService", FrameMenuExecService);
- CreateServiceFunction("FrameMenuCheckService", FrameMenuCheckService);
- CreateServiceFunction("FrameMenuFreeService", FreeOwnerDataFrameMenu);
-
- CreateServiceFunction("CList/AddContextFrameMenuItem", AddContextFrameMenuItem);
- CreateServiceFunction(MS_CLIST_MENUBUILDFRAMECONTEXT, BuildContextFrameMenu);
- CreateServiceFunction(MS_CLIST_FRAMEMENUNOTIFY, ContextFrameMenuNotify);
- hPreBuildFrameMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDFRAMEMENU);
-
- // frame menu object
- hFrameMenuObject = Menu_AddObject("FrameMenu", LPGEN("Frame menu"), "FrameMenuCheckService", "FrameMenuExecService");
- Menu_ConfigureObject(hFrameMenuObject, MCO_OPT_FREE_SERVICE, "FrameMenuFreeService");
- return 0;
-}
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index b9f6f06870..b901fa7678 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -62,8 +62,8 @@ INT_PTR BuildGroupMenu(WPARAM, LPARAM) static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
{
- CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
TMO_MenuItem tmi;
+ CLISTMENUITEM *mi = (CLISTMENUITEM *)lParam;
if (!pcli->pfnConvertMenu(mi, &tmi))
return NULL;
@@ -73,7 +73,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) //we need just one parametr.
mmep->szServiceName = mir_strdup(mi->pszService);
- mmep->Param1 = mi->popupPosition;
+ mmep->Param1 = 0; // mi->popupPosition; !!!!!!!!!!!!!!!!!!
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
@@ -89,12 +89,6 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) return (INT_PTR)hNewItem;
}
-int GroupMenuCheckService(WPARAM, LPARAM)
-{
- //not used
- return 0;
-};
-
INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam)
{
MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
@@ -149,7 +143,7 @@ INT_PTR FreeOwnerDataGroupMenu(WPARAM, LPARAM lParam) INT_PTR HideGroupsHelper(WPARAM, LPARAM)
{
- int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
+ int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
db_set_b(NULL, "CList", "HideEmptyGroups", (BYTE)newVal);
SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0);
return 0;
@@ -157,17 +151,15 @@ INT_PTR HideGroupsHelper(WPARAM, LPARAM) INT_PTR UseGroupsHelper(WPARAM, LPARAM)
{
- int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE)&CLS_USEGROUPS);
+ int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
db_set_b(NULL, "CList", "UseGroups", (BYTE)newVal);
- SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
+ SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal,0);
return 0;
}
INT_PTR HideOfflineRootHelper(WPARAM, LPARAM)
{
- SendMessage(
- pcli->hwndContactTree,
- CLM_SETHIDEOFFLINEROOT,
+ SendMessage(pcli->hwndContactTree, CLM_SETHIDEOFFLINEROOT,
!SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0),
0);
return 0;
@@ -199,12 +191,18 @@ static int OnBuildGroupMenu(WPARAM, LPARAM) return 0;
}
-static IconItemT iconItem = { LPGENT("New group"), "NewGroup", IDI_NEWGROUP2 };
+static IconItemT iconItem[] =
+{
+ { LPGENT("New group"), "NewGroup", IDI_NEWGROUP2 }
+};
void GroupMenus_Init(void)
{
- Icon_RegisterT(g_hInst, LPGENT("Contact list"), &iconItem, 1);
+ Icon_RegisterT(g_hInst, LPGENT("Contact list"), iconItem, _countof(iconItem));
+}
+void InitGroupMenus(void)
+{
CreateServiceFunction("CLISTMENUSGroup/ExecService", GroupMenuExecService);
CreateServiceFunction("CLISTMENUSGroup/FreeOwnerDataGroupMenu", FreeOwnerDataGroupMenu);
CreateServiceFunction("CLISTMENUSGroup/GroupMenuonAddService", GroupMenuonAddService);
@@ -226,7 +224,7 @@ void GroupMenus_Init(void) Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
- //add exit command to menu
+ // add exit command to menu
GroupMenuParam gmp;
CLISTMENUITEM mi = { 0 };
@@ -250,13 +248,13 @@ void GroupMenus_Init(void) mi.position = 300000;
mi.pszService = "";
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
mi.pszName = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
mi.pszName = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
@@ -274,10 +272,10 @@ void GroupMenus_Init(void) mi.flags = 0;
mi.position = 100000;
- mi.icolibItem = iconItem.hIcolib;
+ mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
mi.pszName = LPGEN("&New group");
- hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
+ hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
mi.position = 100001;
@@ -375,7 +373,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) //we need just one parametr.
mmep->szServiceName = mir_strdup(mi->pszService);
- mmep->Param1 = mi->popupPosition;
+ mmep->Param1 = 0; // mi->popupPosition; !!!!!!!!!!!!!!!!!!
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
@@ -472,7 +470,7 @@ void InitSubGroupMenus(void) CLISTMENUITEM mi = { 0 };
mi.position = 1000;
- mi.icolibItem = iconItem.hIcolib;
+ mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&New subgroup");
gmp.lParam = 0;
diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h index d67cacb842..7ea8b2d8dc 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h @@ -201,7 +201,6 @@ int GetContactIconC(ClcCacheEntry *cacheEntry); // int GetContactIndex(ClcGroup *group, ClcContact *contact); //clcidents.c
int GetStatusForContact(MCONTACT hContact, char *szProto); //clistsettings.c
int InitCustomMenus(void); //clistmenus.c
-int InitFramesMenus(void); //framesmenus.c
int LoadMoveToGroup(); //movetogroup.c
int LoadStatusBarData(); //modern_statusbar.c
int MenuModulesLoaded(WPARAM wParam, LPARAM lParam); //clistmenu.c
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 77de5d473f..fb18a985cd 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -138,8 +138,8 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) mi.icolibItem = iconList[i].hIcolib;
mi.ptszName = rates[i];
mi.pszService = CLUI_FAVSETRATE;
- mi.popupPosition = i;
hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hFavoriteContactMenuItems[i], MCI_OPT_EXECPARAM, i);
}
}
@@ -149,10 +149,10 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) Menu_ModifyItem(hShowIfOflineItem, NULL, INVALID_HANDLE_VALUE, mi.flags);
else {
mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
- mi.popupPosition = i + 100000000;
mi.position = -100000000;
mi.ptszName = LPGENT("Show even if offline");
hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hShowIfOflineItem, MCI_OPT_EXECPARAM, i + 100000000);
}
return 0;
diff --git a/plugins/Clist_nicer/clist_nicer_10.vcxproj b/plugins/Clist_nicer/clist_nicer_10.vcxproj index 3ecc98f72c..1ec643fc74 100644 --- a/plugins/Clist_nicer/clist_nicer_10.vcxproj +++ b/plugins/Clist_nicer/clist_nicer_10.vcxproj @@ -189,7 +189,6 @@ </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\CLUIFrames\cluiframes.cpp" />
- <ClCompile Include="src\CLUIFrames\framesmenu.cpp" />
<ClCompile Include="src\CLUIFrames\groupmenu.cpp" />
<ClCompile Include="src\Coolsb\coolsblib.cpp" />
<ClCompile Include="src\Coolsb\coolscroll.cpp" />
diff --git a/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters b/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters index 6d4ffdcf72..29bb3c0e63 100644 --- a/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters +++ b/plugins/Clist_nicer/clist_nicer_10.vcxproj.filters @@ -105,9 +105,6 @@ <ClCompile Include="src\CLUIFrames\cluiframes.cpp">
<Filter>Source Files\CLUIFrames</Filter>
</ClCompile>
- <ClCompile Include="src\CLUIFrames\framesmenu.cpp">
- <Filter>Source Files\CLUIFrames</Filter>
- </ClCompile>
<ClCompile Include="src\CLUIFrames\groupmenu.cpp">
<Filter>Source Files\CLUIFrames</Filter>
</ClCompile>
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index 6591280c40..298addb76f 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -36,9 +36,6 @@ void MF_UpdateThread(LPVOID); HANDLE hStatusBarShowToolTipEvent, hStatusBarHideToolTipEvent; HANDLE g_hEventThread = 0; -//not needed,now use MS_CLIST_FRAMEMENUNOTIFY service -//HANDLE hPreBuildFrameMenuEvent;//external event from clistmenus - LOGFONT TitleBarLogFont = {0}; extern HINSTANCE g_hInst; @@ -59,7 +56,6 @@ extern HINSTANCE g_hInst; static int UpdateTBToolTip(int framepos); INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam); int CLUIFrameResizeFloatingFrame(int framepos); -extern int InitFramesMenus(void); static int CLUIFramesReSort(); boolean FramesSysNotStarted = TRUE; @@ -577,8 +573,6 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE FrameMenuHandles &fmh = (frameid == -1) ? cont : Frames[framepos].MenuHandles; CLISTMENUITEM mi = { 0 }; - mi.popupPosition = frameid; - mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); mi.hParentMenu = root; mi.position = popuppos++; @@ -673,7 +667,6 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE // position root mi.hParentMenu = root; - mi.popupPosition = frameid; mi.position = popuppos++; mi.pszName = LPGEN("&Position"); mi.flags = CMIF_ROOTHANDLE; @@ -1373,7 +1366,6 @@ static int CLUIFramesLoadMainMenu() Frames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi); CLUIFramesCreateMenuForFrame(Frames[i].id, Frames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem); CLUIFramesModifyMainMenuItems(Frames[i].id, 0); - //NotifyEventHooks(hPreBuildFrameMenuEvent,i,(LPARAM)Frames[i].MenuHandles.MainMenuItem); CallService(MS_CLIST_FRAMEMENUNOTIFY, (WPARAM)Frames[i].id, (LPARAM)Frames[i].MenuHandles.MainMenuItem); separator++; } @@ -3030,7 +3022,6 @@ int LoadCLUIFramesModule(void) GapBetweenFrames = cfg::dat.gapBetweenFrames; nFramescount = 0; - InitFramesMenus(); HookEvent(ME_SYSTEM_MODULESLOADED, CLUIFrameOnModulesLoad); HookEvent(ME_CLIST_PREBUILDFRAMEMENU, CLUIFramesModifyContextMenuForFrame); diff --git a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp deleted file mode 100644 index 3b7d343b8f..0000000000 --- a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp +++ /dev/null @@ -1,112 +0,0 @@ -#include <commonheaders.h>
-#include "cluiframes.h"
-
-//========================== Frames
-HANDLE hFrameMenuObject;
-static HANDLE hPreBuildFrameMenuEvent;
-
-//contactmenu exec param(ownerdata)
-//also used in checkservice
-typedef struct{
- char *szServiceName;
- int Frameid;
- INT_PTR param1;
-} FrameMenuExecParam, *lpFrameMenuExecParam;
-
-INT_PTR FreeOwnerDataFrameMenu(WPARAM, LPARAM lParam)
-{
- lpFrameMenuExecParam cmep = (lpFrameMenuExecParam)lParam;
- if (cmep != NULL){
- mir_free(cmep->szServiceName);
- mir_free(cmep);
- }
- return 0;
-}
-
-static INT_PTR AddContextFrameMenuItem(WPARAM, LPARAM lParam)
-{
- CLISTMENUITEM *mi = (CLISTMENUITEM *)lParam;
-
- TMO_MenuItem tmi;
- if (!pcli->pfnConvertMenu(mi, &tmi))
- return NULL;
-
- tmi.root = (mi->flags & CMIF_ROOTHANDLE) ? mi->hParentMenu : NULL;
-
- lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)mir_alloc(sizeof(FrameMenuExecParam));
- if (fmep == NULL)
- return 0;
-
- fmep->szServiceName = mir_strdup(mi->pszService);
- fmep->Frameid = mi->popupPosition;
- fmep->param1 = (INT_PTR)mi->pszContactOwner;
- tmi.ownerdata = fmep;
- return (INT_PTR)Menu_AddItem(hFrameMenuObject, &tmi);
-}
-
-//called with:
-//wparam - ownerdata
-//lparam - lparam from winproc
-INT_PTR FrameMenuExecService(WPARAM wParam, LPARAM lParam)
-{
- lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)wParam;
- if (fmep == NULL)
- return -1;
-
- CallService(fmep->szServiceName, lParam, fmep->param1);
- RedrawWindow(pcli->hwndContactList, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_UPDATENOW | RDW_ALLCHILDREN);
- return 0;
-}
-
-//true - ok,false ignore
-INT_PTR FrameMenuCheckService(WPARAM wParam, LPARAM)
-{
- TCheckProcParam *pcpp = (TCheckProcParam*)wParam;
- if (pcpp == NULL)
- return FALSE;
-
- TMO_MenuItem mi;
- if (Menu_GetItemInfo(pcpp->MenuItemHandle, mi) == 0) {
- lpFrameMenuExecParam fmep = (lpFrameMenuExecParam)mi.ownerdata;
- if (fmep != NULL) {
- //pcpp->wParam - frameid
- if (((WPARAM)fmep->Frameid == pcpp->wParam) || fmep->Frameid == -1)
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static INT_PTR ContextFrameMenuNotify(WPARAM wParam, LPARAM lParam)
-{
- NotifyEventHooks(hPreBuildFrameMenuEvent, wParam, lParam);
- return 0;
-}
-
-static INT_PTR BuildContextFrameMenu(WPARAM wParam, LPARAM lParam)
-{
- ContextFrameMenuNotify(wParam, -1);
-
- HMENU hMenu = CreatePopupMenu();
- Menu_Build(hMenu, hFrameMenuObject, wParam, lParam);
- return (INT_PTR)hMenu;
-}
-
-//========================== Frames end
-
-int InitFramesMenus(void)
-{
- CreateServiceFunction("FrameMenuExecService", FrameMenuExecService);
- CreateServiceFunction("FrameMenuCheckService", FrameMenuCheckService);
- CreateServiceFunction("FrameMenuFreeService", FreeOwnerDataFrameMenu);
-
- CreateServiceFunction("CList/AddContextFrameMenuItem", AddContextFrameMenuItem);
- CreateServiceFunction(MS_CLIST_MENUBUILDFRAMECONTEXT, BuildContextFrameMenu);
- CreateServiceFunction(MS_CLIST_FRAMEMENUNOTIFY, ContextFrameMenuNotify);
- hPreBuildFrameMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDFRAMEMENU);
-
- // frame menu object
- hFrameMenuObject = Menu_AddObject("FrameMenu", LPGEN("Frame menu"), "FrameMenuCheckService", "FrameMenuExecService");
- Menu_ConfigureObject(hFrameMenuObject, MCO_OPT_FREE_SERVICE, "FrameMenuFreeService");
- return 0;
-}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index 34e8222803..86bff0d6a2 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -3,7 +3,7 @@ Miranda NG: the free IM client for Microsoft* Windows*
Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org),
-Copyright (c) 2000-03 Miranda ICQ/IM project,
+Copyright (c) 2000-08 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -46,10 +46,12 @@ HGENMENU hNewSubGroupMenuItem; void InitSubGroupMenus(void);
//Groupmenu exec param(ownerdata)
-typedef struct {
+typedef struct
+{
char *szServiceName;
- int Param1,Param2;
-} GroupMenuExecParam, *lpGroupMenuExecParam;
+ int Param1, Param2;
+}
+GroupMenuExecParam, *lpGroupMenuExecParam;
static INT_PTR BuildGroupMenu(WPARAM, LPARAM)
{
@@ -67,13 +69,13 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) if (!pcli->pfnConvertMenu(mi, &tmi))
return NULL;
- lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)mir_alloc(sizeof(GroupMenuExecParam));
+ 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 = mi->popupPosition;
+ mmep->Param1 = 0; // mi->popupPosition; !!!!!!!!!!!!!!!!!!
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
@@ -89,14 +91,9 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) return (INT_PTR)hNewItem;
}
-INT_PTR GroupMenuCheckService(WPARAM, LPARAM)
-{
- return 0;
-}
-
INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam)
{
- MENUITEMINFO *mii = (MENUITEMINFO *)wParam;
+ MENUITEMINFO *mii = (MENUITEMINFO*)wParam;
if (mii == NULL)
return 0;
@@ -107,13 +104,11 @@ INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) }
if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- //mi.fType = MFT_STRING;
mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
}
if (hGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- //mi.fType = MFT_STRING;
mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
}
if (hAppearanceMenuItemProxy == (HANDLE)lParam) {
@@ -128,8 +123,8 @@ INT_PTR GroupMenuonAddService(WPARAM wParam, LPARAM lParam) mii->fMask |= MIIM_SUBMENU;
mii->hSubMenu = (HMENU)hMenuOldContext;
}
- return (TRUE);
-};
+ return TRUE;
+}
//called with:
//wparam - ownerdata
@@ -143,9 +138,7 @@ INT_PTR GroupMenuExecService(WPARAM wParam, LPARAM lParam) mmep->Param1 = 0;
CallService(mmep->szServiceName, mmep->Param1, lParam);
}
- else
- CallService(mmep->szServiceName, mmep->Param1, mmep->Param2);
-
+ else CallService(mmep->szServiceName, mmep->Param1, mmep->Param2);
}
return 1;
}
@@ -157,6 +150,7 @@ INT_PTR FreeOwnerDataGroupMenu(WPARAM, LPARAM lParam) mir_free(mmep->szServiceName);
mir_free(mmep);
}
+
return 0;
}
@@ -189,13 +183,13 @@ static int OnBuildGroupMenu(WPARAM, LPARAM) int flags = (cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CMIF_CHECKED : 0);
Menu_ModifyItem(hHideOfflineUsersMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
- flags = (SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) ? CMIF_CHECKED : 0);
+ flags = SendMessage(pcli->hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) ? CMIF_CHECKED : 0;
Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
- flags = (GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS ? CMIF_CHECKED : 0);
+ flags = GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS ? CMIF_CHECKED : 0;
Menu_ModifyItem(hHideEmptyGroupsMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
- flags = (GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS ? 0 : CMIF_CHECKED);
+ flags = GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS ? 0 : CMIF_CHECKED;
Menu_ModifyItem(hDisableGroupsMenuItem, NULL, INVALID_HANDLE_VALUE, flags);
Menu_ModifyItem(hGroupMainMenuItemProxy, NULL, INVALID_HANDLE_VALUE, flags);
@@ -245,108 +239,95 @@ void InitGroupMenus(void) mi.pszName = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.pszName = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 200000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 300000;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
mi.pszName = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 300100;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
mi.pszName = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 390100;
- mi.pszService = "";
mi.icolibItem = iconItem[1].hIcolib;
mi.pszName = LPGEN("Appearance");
hAppearanceMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 400000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 500000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "CLN/About";
mi.pszName = LPGEN("&About the contact list...");
AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
+ mi.flags = 0;
mi.position = 100000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&New group");
- gmp.lParam = 0;
- gmp.wParam = POPUP_NEWGROUP;
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 100001;
mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
mi.pszName = LPGEN("&Hide offline users");
- gmp.lParam = 0;
- gmp.wParam = -1;
+ gmp.lParam = 0; gmp.wParam = -1;
hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 100002;
- mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
mi.pszName = LPGEN("Hide &offline users out here");
hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 100003;
- mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
mi.pszName = LPGEN("Hide &empty groups");
hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 100004;
- mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
mi.pszName = LPGEN("Disable &groups");
hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
}
+//////////////////////////////END Group MENU/////////////////////////
+
+//////////////////////////////SubGroup MENU/////////////////////////
HANDLE hSubGroupMenuObject;
HANDLE hSubGroupMainMenuItemProxy;
-//HANDLE hHideShowMainMenuItem;
HANDLE hSubGroupStatusMenuItemProxy;
HANDLE hPreBuildSubGroupMenuEvent;
HGENMENU hHideOfflineUsersHereMenuItem;
//SubGroupmenu exec param(ownerdata)
-typedef struct {
+typedef struct
+{
char *szServiceName;
int Param1, Param2;
-} SubGroupMenuExecParam, *lpSubGroupMenuExecParam;
+}
+SubGroupMenuExecParam, *lpSubGroupMenuExecParam;
static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM)
{
@@ -379,7 +360,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) //we need just one parametr.
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
mmep->szServiceName = mir_strdup(mi->pszService);
- mmep->Param1 = mi->popupPosition;
+ mmep->Param1 = 0; // mi->popupPosition; !!!!!!!!!!!!!!!!!!!!!!!!!
if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
@@ -488,9 +469,9 @@ void InitSubGroupMenus(void) gmp.wParam = POPUP_NEWSUBGROUP;
hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 1001;
mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&Hide offline users in here");
gmp.lParam = 0;
@@ -506,7 +487,6 @@ void InitSubGroupMenus(void) gmp.wParam = POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- memset(&mi, 0, sizeof(mi));
mi.position = 900002;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 3ab828ca0f..cbbc44a885 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -256,7 +256,7 @@ static int ModulesLoaded(WPARAM, LPARAM) }
CLISTMENUITEM mi = { 0 };
- mi.popupPosition = 2000089999;
+ // mi.popupPosition = 2000089999; !!!!!!!!!!!!!!!!!!!!!!!
mi.position = 2000089999;
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.icolibItem = GetIconHandle(IDI_VI);
@@ -266,7 +266,6 @@ static int ModulesLoaded(WPARAM, LPARAM) mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hMenuRoot;
- mi.popupPosition = 0;
mi.position = 2000089995;
mi.ptszName = LPGENT("Copy to clipboard");
@@ -286,21 +285,18 @@ static int ModulesLoaded(WPARAM, LPARAM) mi.pszService = MS_CRASHDUMPER_VIEWINFO;
Menu_AddMainMenuItem(&mi);
- mi.popupPosition = 1;
mi.position = 2000089998;
mi.ptszName = LPGENT("Show with DLLs");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_VIEWINFO;
- Menu_AddMainMenuItem(&mi);
+ Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
- mi.popupPosition = 0;
mi.position = 2000089999;
mi.ptszName = LPGENT("Upload");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_UPLOAD;
Menu_AddMainMenuItem(&mi);
- mi.popupPosition = 0;
mi.position = 2000089999;
mi.ptszName = LPGENT("Copy link to clipboard");
mi.icolibItem = GetIconHandle(IDI_LINKTOCLIP);//need icon
@@ -315,12 +311,11 @@ static int ModulesLoaded(WPARAM, LPARAM) Menu_AddMainMenuItem(&mi);
}
- mi.popupPosition = 1;
mi.position = 2000099991;
mi.ptszName = LPGENT("Open online Version Info");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszService = MS_CRASHDUMPER_URL;
- Menu_AddMainMenuItem(&mi);
+ Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
HOTKEYDESC hk = { 0 };
hk.cbSize = sizeof(hk);
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index f039edde87..f0f4efad27 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -122,8 +122,8 @@ void InitMenuItems() }
mi.icolibItem = iconList[i].hIcolib;
- mi.popupPosition = i + 1000;
hSubMenu[i] = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hSubMenu[i], MCI_OPT_EXECPARAM, i + 1000);
mi.flags |= CMIF_ROOTHANDLE;
mi.hParentMenu = hMainMenu;
@@ -131,9 +131,9 @@ void InitMenuItems() mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.popupPosition = mi2.position = i + UploadJob::FTP_RAWFILE;
mi2.ptszName = LPGENT("Upload file(s)");
- Menu_AddContactMenuItem(&mi2);
+ HGENMENU tmp = Menu_AddContactMenuItem(&mi2);
+ Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, mi2.position = i + UploadJob::FTP_RAWFILE);
mi2.pszService = MS_FTPFILE_MAINMENU;
mi2.hParentMenu = hMainSubMenu[i];
@@ -141,9 +141,9 @@ void InitMenuItems() mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.popupPosition = i + UploadJob::FTP_ZIPFILE;
mi2.ptszName = LPGENT("Zip and upload file(s)");
- Menu_AddContactMenuItem(&mi2);
+ tmp = Menu_AddContactMenuItem(&mi2);
+ Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFILE);
mi2.pszService = MS_FTPFILE_MAINMENU;
mi2.hParentMenu = hMainSubMenu[i];
@@ -151,9 +151,9 @@ void InitMenuItems() mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.popupPosition = i + UploadJob::FTP_ZIPFOLDER;
mi2.ptszName = LPGENT("Zip and upload folder");
- Menu_AddContactMenuItem(&mi2);
+ tmp = Menu_AddContactMenuItem(&mi2);
+ Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFOLDER);
mi2.pszService = MS_FTPFILE_MAINMENU;
mi2.hParentMenu = hMainSubMenu[i];
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp index fceb2edb9b..28536605e8 100644 --- a/plugins/HistoryStats/src/main.cpp +++ b/plugins/HistoryStats/src/main.cpp @@ -161,8 +161,7 @@ void AddMainMenu() 1910000000,
IconLib::getIcon(IconLib::iiMenuCreateStatistics),
con::SvcCreateStatistics,
- bInPopup ? LPGENT("Statistics") : NULL, // MEMO: implicit translation
- bInPopup ? 1910000000 : 0);
+ bInPopup ? LPGENT("Statistics") : NULL);
g_hMenuShowStatistics = mu::clist::addMainMenuItem(
LPGENT("Show statistics"), // MEMO: implicit translation
@@ -170,8 +169,7 @@ void AddMainMenu() 1910000001,
IconLib::getIcon(IconLib::iiMenuShowStatistics),
con::SvcShowStatistics,
- bInPopup ? LPGENT("Statistics") : NULL, // MEMO: implicit translation
- bInPopup ? 1910000000 : 0);
+ bInPopup ? LPGENT("Statistics") : NULL);
g_hMenuConfigure = mu::clist::addMainMenuItem(
bInPopup ? LPGENT("Configure...") : LPGENT("Configure statistics..."), // MEMO: implicit translation
@@ -179,8 +177,7 @@ void AddMainMenu() 1910000002,
IconLib::getIcon(IconLib::iiMenuConfigure),
con::SvcConfigure,
- bInPopup ? LPGENT("Statistics") : NULL, // MEMO: implicit translation
- bInPopup ? 1910000000 : 0);
+ bInPopup ? LPGENT("Statistics") : NULL);
}
/*
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 0edf3fa601..0446013c4d 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -12,7 +12,7 @@ namespace mu namespace clist
{
- HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName /* = NULL */, int popupPosition /* = 0 */)
+ HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName /* = NULL */)
{
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
@@ -22,7 +22,6 @@ namespace mu mi.hIcon = hIcon;
mi.pszService = const_cast<char*>(pszService);
mi.ptszPopupName = (TCHAR*)pszPopupName;
- mi.popupPosition = popupPosition;
return Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index 080b0fb931..e05b36c078 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -13,7 +13,7 @@ namespace mu namespace clist
{
- HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName = NULL, int popupPosition = 0);
+ HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName = NULL);
HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const char* pszContactOwner = NULL);
const TCHAR* getContactDisplayName(MCONTACT hContact);
const TCHAR* getStatusModeDescription(int nStatusMode);
diff --git a/plugins/ListeningTo/src/commons.h b/plugins/ListeningTo/src/commons.h index 8ac3c7d235..895d445d3b 100644 --- a/plugins/ListeningTo/src/commons.h +++ b/plugins/ListeningTo/src/commons.h @@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. #include <m_protosvc.h>
#include <m_langpack.h>
#include <m_database.h>
+#include <m_clistint.h>
#include <m_options.h>
#include <m_xstatus.h>
#include <m_clui.h>
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 8ca0d1aead..116786208f 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. #include "commons.h"
+CLIST_INTERFACE *pcli;
int hLangpack;
PLUGININFOEX pluginInfo={
@@ -56,10 +57,10 @@ int TopToolBarLoaded(WPARAM wParam, LPARAM lParam); int SettingChanged(WPARAM wParam,LPARAM lParam);
INT_PTR MainMenuClicked(WPARAM wParam, LPARAM lParam);
-BOOL ListeningToEnabled(char *proto, BOOL ignoreGlobal = FALSE);
+bool ListeningToEnabled(char *proto, bool ignoreGlobal = false);
INT_PTR ListeningToEnabled(WPARAM wParam, LPARAM lParam);
INT_PTR EnableListeningTo(WPARAM wParam,LPARAM lParam);
-INT_PTR EnableListeningTo(char *proto = NULL,BOOL enabled = FALSE);
+INT_PTR EnableListeningTo(char *proto = NULL, bool enabled = false);
INT_PTR GetTextFormat(WPARAM wParam,LPARAM lParam);
TCHAR* GetParsedFormat(LISTENINGTOINFO *lti);
INT_PTR GetParsedFormat(WPARAM wParam,LPARAM lParam);
@@ -112,6 +113,7 @@ static IconItem iconList[] = extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
CoInitialize(NULL);
@@ -157,7 +159,7 @@ extern "C" int __declspec(dllexport) Unload(void) void UpdateGlobalStatusMenus()
{
- BOOL enabled = ListeningToEnabled(NULL, TRUE);
+ bool enabled = ListeningToEnabled(NULL, true);
Menu_SetChecked(proto_items[0].hMenu, enabled);
Menu_EnableItem(proto_items[0].hMenu, opts.enable_sending);
@@ -193,7 +195,7 @@ void RebuildMenu() CLISTMENUITEM mi = { 0 };
mi.position = 100000 + i;
mi.hParentMenu = hMainMenuGroup;
- mi.popupPosition = 500080000 + i;
+ mi.position = 500080000 + i;
mi.pszService = MS_LISTENINGTO_MAINMENU;
mi.ptszName = text;
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR
@@ -299,7 +301,7 @@ int ModulesLoaded(WPARAM, LPARAM) hMainMenuGroup = Menu_AddMainMenuItem(&mi);
mi.hParentMenu = hMainMenuGroup;
- mi.popupPosition = 500080000;
+ // mi.popupPosition = 500080000; !!!!!!!!!!!!!!!
mi.position = 0;
mi.pszService = MS_LISTENINGTO_MAINMENU;
mi.hIcon = NULL;
@@ -307,7 +309,7 @@ int ModulesLoaded(WPARAM, LPARAM) // Add all protos
mi.ptszName = LPGENT("Send to all protocols");
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR
- | (ListeningToEnabled(NULL, TRUE) ? CMIF_CHECKED : 0)
+ | (ListeningToEnabled(NULL, true) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
proto_items.resize(1);
proto_items[0].hMenu = Menu_AddMainMenuItem(&mi);
@@ -441,14 +443,14 @@ int PreShutdown(WPARAM, LPARAM) static INT_PTR TopToolBarClick(WPARAM, LPARAM)
{
- EnableListeningTo(NULL, !ListeningToEnabled(NULL, TRUE));
+ EnableListeningTo(NULL, !ListeningToEnabled(NULL, true));
return 0;
}
// Toptoolbar hook to put an icon in the toolbar
int TopToolBarLoaded(WPARAM, LPARAM)
{
- BOOL enabled = ListeningToEnabled(NULL, TRUE);
+ BOOL enabled = ListeningToEnabled(NULL, true);
CreateServiceFunction(MS_LISTENINGTO_TTB, TopToolBarClick);
@@ -477,7 +479,7 @@ INT_PTR MainMenuClicked(WPARAM wParam, LPARAM lParam) return 0;
}
-BOOL ListeningToEnabled(char *proto, BOOL ignoreGlobal)
+bool ListeningToEnabled(char *proto, bool ignoreGlobal)
{
if (!ignoreGlobal && !opts.enable_sending)
return FALSE;
@@ -498,7 +500,7 @@ BOOL ListeningToEnabled(char *proto, BOOL ignoreGlobal) {
char setting[256];
mir_snprintf(setting, "%sEnabled", proto);
- return (BOOL) db_get_b(NULL, MODULE_NAME, setting, FALSE);
+ return db_get_b(NULL, MODULE_NAME, setting, false) != 0;
}
}
@@ -684,7 +686,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL) }
}
-INT_PTR EnableListeningTo(char *proto,BOOL enabled)
+INT_PTR EnableListeningTo(char *proto, bool enabled)
{
if (!loaded)
return -1;
@@ -727,12 +729,12 @@ INT_PTR EnableListeningTo(char *proto,BOOL enabled) INT_PTR EnableListeningTo(WPARAM wParam,LPARAM lParam)
{
- return EnableListeningTo((char*)wParam,(BOOL)lParam);
+ return EnableListeningTo((char*)wParam, lParam != 0);
}
INT_PTR HotkeysEnable(WPARAM,LPARAM lParam)
{
- return EnableListeningTo(lParam, TRUE);
+ return EnableListeningTo(lParam, true);
}
INT_PTR HotkeysDisable(WPARAM wParam,LPARAM lParam)
diff --git a/plugins/ListeningTo/src/options.h b/plugins/ListeningTo/src/options.h index b0848e871c..8c14185eb3 100644 --- a/plugins/ListeningTo/src/options.h +++ b/plugins/ListeningTo/src/options.h @@ -42,22 +42,22 @@ Boston, MA 02111-1307, USA. struct Options {
- BOOL enable_sending;
- BOOL enable_music;
- BOOL enable_radio;
- BOOL enable_video;
- BOOL enable_others;
+ bool enable_sending;
+ bool enable_music;
+ bool enable_radio;
+ bool enable_video;
+ bool enable_others;
TCHAR templ[1024];
TCHAR unknown[128];
- BOOL override_contact_template;
- BOOL show_adv_icon;
+ bool override_contact_template;
+ bool show_adv_icon;
int adv_icon_slot;
- BOOL get_info_from_watrack;
- BOOL enable_other_players;
- BOOL enable_code_injection;
+ bool get_info_from_watrack;
+ bool enable_other_players;
+ bool enable_code_injection;
int time_to_pool;
WORD xstatus_set;
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 846b1bb65d..8937e6f198 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -737,13 +737,15 @@ static HGENMENU AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD fl {
CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hRoot;
- mi.popupPosition = param;
mi.position = pos;
mi.ptszName = name;
mi.hIcon = icon;
mi.flags = CMIF_UNICODE | CMIF_ROOTHANDLE | flag;
mi.pszService = service;
- return Menu_AddContactMenuItem(&mi);
+
+ HGENMENU res = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, param);
+ return res;
}
static void ModifySubmenuItem(HGENMENU hItem, int checked, int hidden)
diff --git a/plugins/MirOTR/src/stdafx.h b/plugins/MirOTR/src/stdafx.h index 450ebdc342..b675f3314c 100644 --- a/plugins/MirOTR/src/stdafx.h +++ b/plugins/MirOTR/src/stdafx.h @@ -27,6 +27,7 @@ using namespace std; #include <m_langpack.h> #include <m_database.h> #include <m_message.h> +#include <m_clist.h>
#include <m_popup.h> #include <m_protosvc.h> #include <m_contacts.h> diff --git a/plugins/MyDetails/src/commons.h b/plugins/MyDetails/src/commons.h index 735b1751ae..afefec9dd1 100644 --- a/plugins/MyDetails/src/commons.h +++ b/plugins/MyDetails/src/commons.h @@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. #include <m_skin.h>
#include <m_protosvc.h>
#include <m_database.h>
+#include <m_clist.h>
#include <m_langpack.h>
#include <m_contacts.h>
#include <m_options.h>
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index efeaad5c0f..f4f98dd258 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -329,13 +329,13 @@ int CreateFrame() CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.popupPosition = -0x7FFFFFFF;
mi.ptszPopupName = LPGENT("My details");
mi.position = 1; // 500010000
mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
mi.ptszName = LPGENT("Show my details");
mi.pszService = MODULE_NAME"/ShowHideMyDetails";
hMenuShowHideFrame = Menu_AddMainMenuItem(&mi);
+ Menu_ConfigureItem(hMenuShowHideFrame, MCI_OPT_EXECPARAM, -0x7FFFFFFF);
if (db_get_b(0, MODULE_NAME, SETTING_FRAME_VISIBLE, 1) == 1) {
ShowWindow(hwnd_container, SW_SHOW);
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index 88dc26a77c..9fb9ce467c 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -88,7 +88,7 @@ static int MainInit(WPARAM, LPARAM) // Add options to menu
CLISTMENUITEM mi = { 0 };
- mi.popupPosition = 500050000;
+ mi.position = 500050000;
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.ptszName = LPGENT("My details");
@@ -96,7 +96,6 @@ static int MainInit(WPARAM, LPARAM) mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hMenuRoot;
- mi.popupPosition = 0;
mi.icolibItem = NULL;
if (protocols->CanSetAvatars()) {
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 5eab194bd1..5a404dce92 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -645,7 +645,6 @@ int MirandaLoaded(WPARAM, LPARAM) mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
mi.hParentMenu = g_hToggleSOEContactMenuItem;
- mi.popupPosition = 1000020000;
mi.position = 1000020000;
mi.icolibItem = iconList[1].hIcolib;
diff --git a/plugins/New_GPG/src/commonheaders.h b/plugins/New_GPG/src/commonheaders.h index 6cc28e31b6..c3ff37eede 100644 --- a/plugins/New_GPG/src/commonheaders.h +++ b/plugins/New_GPG/src/commonheaders.h @@ -63,6 +63,7 @@ using std::fstream; #include <m_jabber.h> #include <m_icq.h> #include <m_message.h> +#include <m_clist.h>
#include <m_cluiframes.h> #include <m_icolib.h> #include <m_extraicons.h> diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp index 89fd65cdd1..b92ec6f3e5 100644 --- a/plugins/NewsAggregator/Src/Menus.cpp +++ b/plugins/NewsAggregator/Src/Menus.cpp @@ -29,7 +29,7 @@ void InitMenu() // adding main menu items
mi.ptszPopupName = LPGENT("News Aggregator");
- mi.popupPosition = 500099000;
+ // mi.popupPosition = 500099000; !!!!!!!!!!!!!!!!!!!!!!!
mi.position = 10100001;
if (db_get_b(NULL, MODULE, "AutoUpdate", 1))
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 4610f12156..35793bfe8d 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -144,7 +144,7 @@ extern "C" __declspec(dllexport) int Load() CLISTMENUITEM mi = { 0 };
mi.position = 600090000;
mi.pszPopupName = LPGEN("&Non-IM Contact");
- mi.popupPosition = 600090000;
+ // mi.popupPosition = 600090000; !!!!!!!!!!!!!!!!!!!!
mi.pszName = LPGEN("&Add Non-IM Contact");
mi.pszService = "AddLCcontact";
mi.icolibItem = icoList[0].hIcolib;
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 5ff5cf9a86..16aa865de1 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -337,7 +337,7 @@ extern "C" int __declspec(dllexport) Load(void) // Add contact menu entry
CLISTMENUITEM mi = { 0 };
- mi.popupPosition = 500085000;
+ // mi.popupPosition = 500085000; !!!!!!!!!!!!!!!!!!!!!
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -500050004;
mi.icolibItem = iconList[0].hIcolib;
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index a19f1f2e7c..21e4945c32 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -303,17 +303,15 @@ void InitMenuItems() mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.pszService = MS_PASTEIT_CONTACTMENU;
mi.hParentMenu = hContactMenu;
- mi.popupPosition = FROM_CLIPBOARD;
mi.ptszName = LPGENT("Paste from clipboard");
- Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(Menu_AddContactMenuItem(&mi), MCI_OPT_EXECPARAM, FROM_CLIPBOARD);
- mi.popupPosition = FROM_FILE;
mi.ptszName = LPGENT("Paste from file");
- Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(Menu_AddContactMenuItem(&mi), MCI_OPT_EXECPARAM, FROM_FILE);
- mi.popupPosition = DEF_PAGES_START - 1;
mi.ptszName = LPGENT("Default web page");
HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hDefWebMenu, MCI_OPT_EXECPARAM, DEF_PAGES_START - 1);
CLISTMENUITEM mi2 = { 0 };
mi2.pszService = MS_PASTEIT_CONTACTMENU;
@@ -324,8 +322,8 @@ void InitMenuItems() if (Options::instance->defWeb == i)
mi2.flags |= CMIF_CHECKED;
mi2.ptszName = pasteToWebs[i]->GetName();
- mi2.popupPosition = mi2.position = DEF_PAGES_START + i;
hWebPageMenus[i] = Menu_AddContactMenuItem(&mi2);
+ Menu_ConfigureItem(hWebPageMenus[i], MCI_OPT_EXECPARAM, mi2.position = DEF_PAGES_START + i);
}
hPrebuildContactMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
diff --git a/plugins/Ping/src/common.h b/plugins/Ping/src/common.h index b044c440d5..79dfbcf6f5 100644 --- a/plugins/Ping/src/common.h +++ b/plugins/Ping/src/common.h @@ -23,8 +23,8 @@ #include <m_database.h>
#include <m_protosvc.h>
#include <m_clui.h>
-#include <m_cluiframes.h>
#include <m_clistint.h>
+#include <m_cluiframes.h>
#include <m_fontservice.h>
#include <m_icolib.h>
#include <win2k.h>
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp index 8cb8855d3e..564d2ee8bf 100644 --- a/plugins/Ping/src/menu.cpp +++ b/plugins/Ping/src/menu.cpp @@ -8,7 +8,7 @@ void InitMenus() // main menu
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.popupPosition = 500099900;
+ // mi.popupPosition = 500099900; !!!!!!!!!!!!!!!!!!!!
mi.ptszPopupName = LPGENT("Ping");
mi.position = 2000060000;
mi.hIcon = hIconResponding;
@@ -16,9 +16,7 @@ void InitMenus() mi.pszService = PLUG "/EnableAll";
Menu_AddMainMenuItem(&mi);
- mi.popupPosition = 500299901;
mi.position = 2000060001;
- mi.popupPosition = 0;
mi.hIcon = hIconDisabled;
mi.ptszName = LPGENT("Disable all pings");
mi.pszService = PLUG "/DisableAll";
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 1534edbfee..e5c6061d6b 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -993,7 +993,7 @@ void InitList() CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.popupPosition = 1000200001;
+ // mi.popupPosition = 1000200001; !!!!!!!!!!!!!
mi.ptszPopupName = LPGENT("Ping");
mi.position = 3000320001;
mi.hIcon = 0;//LoadIcon( hInst, 0);
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 2adce19774..ab37a4f16b 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -201,7 +201,6 @@ void InitMenuItems(void) // Popup History
CreateServiceFunction(MENUCOMMAND_HISTORY, svcShowHistory);
mi.position = 1000000000;
- mi.popupPosition = 1999990000;
mi.ptszName = LPGENT("Popup History");
mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.pszService = MENUCOMMAND_HISTORY;
diff --git a/plugins/ProfileManager/src/Common.h b/plugins/ProfileManager/src/Common.h index 1d8c64d6bc..322407e554 100644 --- a/plugins/ProfileManager/src/Common.h +++ b/plugins/ProfileManager/src/Common.h @@ -5,6 +5,7 @@ #include <newpluginapi.h>
#include <m_langpack.h>
#include <m_genmenu.h>
+#include <m_clist.h>
#include <m_utils.h>
#include <win2k.h>
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 23c9b5b191..837220368f 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -159,17 +159,17 @@ namespace }
mi.ptszName = LPGENT("Refresh");
- mi.popupPosition = 0;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_REFRESH);
mi.pszService = "Quotes/RefreshContact";
g_hMenuRefresh = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(g_hMenuRefresh, MCI_OPT_EXECPARAM, INT_PTR(0));
CreateServiceFunction(mi.pszService, QuotesMenu_RefreshContact);
mi.ptszName = LPGENT("Open Log File...");
- mi.popupPosition = 1;
mi.icolibItem = NULL;
mi.pszService = "Quotes/OpenLogFile";
g_hMenuOpenLogFile = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(g_hMenuOpenLogFile, MCI_OPT_EXECPARAM, 1);
CreateServiceFunction(mi.pszService, QuotesMenu_OpenLogFile);
#ifdef CHART_IMPLEMENT
@@ -182,14 +182,14 @@ namespace #endif
mi.ptszName = LPGENT("Edit Settings...");
-#ifdef CHART_IMPLEMENT
- mi.popupPosition = 3;
-#else
- mi.popupPosition = 2;
-#endif
mi.icolibItem = NULL;
mi.pszService = "Quotes/EditSettings";
g_hMenuEditSettings = Menu_AddContactMenuItem(&mi);
+#ifdef CHART_IMPLEMENT
+ Menu_ConfigureItem(g_hMenuEditSettings, MCI_OPT_EXECPARAM, 3);
+#else
+ Menu_ConfigureItem(g_hMenuEditSettings, MCI_OPT_EXECPARAM, 2);
+#endif
CreateServiceFunction(mi.pszService, QuotesMenu_EditSettings);
}
diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h index 7ee55294c5..ecc31d20b9 100644 --- a/plugins/Quotes/src/stdafx.h +++ b/plugins/Quotes/src/stdafx.h @@ -23,6 +23,7 @@ #include <m_database.h>
#include <win2k.h>
#include <m_xml.h>
+#include <m_clist.h>
#include <m_langpack.h>
#include <m_options.h>
#include <m_protosvc.h>
diff --git a/plugins/Restart/src/Common.h b/plugins/Restart/src/Common.h index 9a508effa5..1f4daccd36 100644 --- a/plugins/Restart/src/Common.h +++ b/plugins/Restart/src/Common.h @@ -6,6 +6,7 @@ #include <newpluginapi.h>
#include <m_langpack.h>
#include <m_genmenu.h>
+#include <m_clist.h>
#include <m_utils.h>
#include <win2k.h>
diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h index 18908fb146..482289edce 100644 --- a/plugins/SecureIM/src/commonheaders.h +++ b/plugins/SecureIM/src/commonheaders.h @@ -24,6 +24,7 @@ #include <m_database.h>
#include <m_protosvc.h>
#include <m_langpack.h>
+#include <m_clist.h>
#include <m_options.h>
#include <m_skin.h>
#include <m_popup.h>
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index a7f46db025..7fb923a5bb 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -53,11 +53,12 @@ static HGENMENU AddSubItem(HANDLE rootid, LPCSTR name, int pos, int poppos, LPCS CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE | CMIF_HIDDEN;
mi.position = pos;
- mi.popupPosition = poppos;
mi.pszName = (char*)name;
mi.pszPopupName = (char*)rootid;
mi.pszService = (char*)service;
- return Menu_AddContactMenuItem(&mi);
+ HGENMENU res = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, poppos);
+ return res;
}
static int onModuleLoad(WPARAM, LPARAM)
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 94e87a8682..2eb4e4f36b 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1463,7 +1463,7 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam) mi.position = 2000200000;
Menu_AddStatusMenuItem(&mi);
- mi.popupPosition = 500084000;
+ // mi.popupPosition = 500084000; !!!!!!!!!!!!!!!!!!!!!!!
mi.position = 2000040000;
for (int i = 0; i < count; ++i)
diff --git a/plugins/SmileyAdd/src/general.h b/plugins/SmileyAdd/src/general.h index 7497c25396..964eea0f8b 100644 --- a/plugins/SmileyAdd/src/general.h +++ b/plugins/SmileyAdd/src/general.h @@ -36,6 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <sys/stat.h>
#include <time.h>
#include <gdiplus.h>
+#include <m_clist.h>
#include <commctrl.h>
#include <richedit.h>
#include <delayimp.h>
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index 44aed70e7e..51c13ae50d 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -52,7 +52,6 @@ static int ModulesLoaded(WPARAM, LPARAM) {
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE;
- mi.popupPosition = 2000070050;
mi.position = 2000070050;
mi.icolibItem = icon.hIcolib;
mi.hParentMenu = HGENMENU_ROOT;
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 5dd9c3bf07..44de589741 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -305,10 +305,8 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) continue;
const int ind = i + 3;
-
- mi.position = ind;
- mi.popupPosition = ind;
- mi.ptszName = (TCHAR*)smc[i].GetDisplayName().c_str();
+ mi.position = ind;
+ mi.ptszName = (TCHAR*)smc[i].GetDisplayName().c_str();
if (cat == smc[i].GetName()) {
mi.flags |= CMIF_CHECKED;
@@ -316,27 +314,28 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) }
hMenu = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hMenu, MCI_OPT_EXECPARAM, ind);
menuHandleArray.insert(hMenu);
mi.flags &= ~CMIF_CHECKED;
}
- mi.position = 1;
- mi.popupPosition = 1;
- mi.ptszName = _T("<None>");
+ mi.position = 1;
+ mi.ptszName = _T("<None>");
if (cat == _T("<None>")) {
mi.flags |= CMIF_CHECKED;
nonecheck = false;
}
hMenu = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hMenu, MCI_OPT_EXECPARAM, 1);
menuHandleArray.insert(hMenu);
- mi.position = 2;
- mi.popupPosition = 2;
- mi.ptszName = LPGENT("Protocol specific");
+ mi.position = 2;
+ mi.ptszName = LPGENT("Protocol specific");
if (nonecheck) mi.flags |= CMIF_CHECKED; else mi.flags &= ~CMIF_CHECKED;
hMenu = Menu_AddContactMenuItem(&mi);
+ Menu_ConfigureItem(hMenu, MCI_OPT_EXECPARAM, 2);
menuHandleArray.insert(hMenu);
}
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 3daa46c40b..697793b8da 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -93,7 +93,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM) int i, count; CLISTMENUITEM mi = { 0 }; - mi.popupPosition = 2000100000; + mi.position = 2000100000; mi.flags = CMIF_TCHAR; mcount = 0; count = GetProfileCount(0, 0); diff --git a/plugins/TopToolBar/src/common.h b/plugins/TopToolBar/src/common.h index e5e4ac6e1e..a7a9322a7d 100644 --- a/plugins/TopToolBar/src/common.h +++ b/plugins/TopToolBar/src/common.h @@ -12,8 +12,9 @@ #include <newpluginapi.h>
#include <m_database.h>
#include <m_skin.h>
-#include <m_cluiframes.h>
+#include <m_clist.h>
#include <m_clui.h>
+#include <m_cluiframes.h>
#include <m_clc.h>
#include <m_clistint.h>
#include <m_findadd.h>
diff --git a/plugins/TrafficCounter/src/commonheaders.h b/plugins/TrafficCounter/src/commonheaders.h index cbdc585e94..4a2a56be57 100644 --- a/plugins/TrafficCounter/src/commonheaders.h +++ b/plugins/TrafficCounter/src/commonheaders.h @@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_langpack.h>
#include <m_clui.h>
#include <m_clc.h>
+#include <m_clist.h>
#include <m_options.h>
#include <m_protosvc.h>
#include <m_cluiframes.h>
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index cd38f94387..aebdd2bdd1 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -98,7 +98,6 @@ void RebuildContact() case 5:
//cascade all
mi.position = 1000050000;
- mi.popupPosition = 1000050000;
mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
mi.pszName = MODULELONGNAME;
mhRoot = Menu_AddContactMenuItem(&mi);
@@ -108,7 +107,6 @@ void RebuildContact() case 9:
//cascade Ex/Import
mi.position = 1000050100;
- mi.popupPosition = 1000050100;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
mi.pszName = LPGEN("Export/import contact");
mhExIm = Menu_AddContactMenuItem(&mi);
@@ -119,7 +117,6 @@ void RebuildContact() //disable Menu
return;
}
- mi.popupPosition = NULL;
// ContactDetailsPS's menuitem
mi.hParentMenu = mhRoot;
@@ -191,7 +188,6 @@ void RebuildMain() case 5:
//cascade all
mi.position = 500050000;
- mi.popupPosition = 500050000;
mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
mi.pszName = MODULELONGNAME;
mhRoot = Menu_AddMainMenuItem(&mi);
@@ -201,7 +197,6 @@ void RebuildMain() case 9:
//cascade Ex/Import
mi.position = 500050000;
- mi.popupPosition = 500050000;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
mi.pszName = LPGEN("Export/import contact");
mhExIm = Menu_AddMainMenuItem(&mi);
@@ -212,7 +207,6 @@ void RebuildMain() //disable Menue
return;
}
- mi.popupPosition = NULL;
// details dialog
{
@@ -336,7 +330,6 @@ void RebuildGroup() case 5:
//cascade all
mi.position = 250000;
- mi.popupPosition = 250000;
mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
mi.pszName = MODULELONGNAME;
mhRoot = Menu_AddGroupMenuItem(0, &mi);
@@ -346,7 +339,6 @@ void RebuildGroup() case 9:
//cascade Ex/Import
mi.position = 250100;
- mi.popupPosition = 250100;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
mi.pszName = LPGEN("Export/import contact");
mhExIm = Menu_AddGroupMenuItem(0, &mi);
@@ -357,7 +349,6 @@ void RebuildGroup() //disable Menue
return;
}
- mi.popupPosition = NULL;
// VCard's Ex/Import menuitems
{ mi.hParentMenu = mhExIm;
@@ -433,7 +424,6 @@ void RebuildSubGroup() case 5:
//cascade all
mi.position = 1050000;
- mi.popupPosition = 1050000;
mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
mi.pszName = MODULELONGNAME;
mhRoot = Menu_AddSubGroupMenuItem(0, &mi);
@@ -443,7 +433,6 @@ void RebuildSubGroup() case 9:
//cascade Ex/Import
mi.position = 1050100;
- mi.popupPosition = 1050100;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
mi.pszName = LPGEN("Export/import group");
mhExIm = Menu_AddSubGroupMenuItem(0, &mi);
@@ -454,7 +443,6 @@ void RebuildSubGroup() //disable Menue
return;
}
- mi.popupPosition = NULL;
// VCard's Ex/Import menuitems
{ mi.hParentMenu = mhExIm;
diff --git a/plugins/Utils/mir_buffer.h b/plugins/Utils/mir_buffer.h index ac7c909860..c8388bd731 100644 --- a/plugins/Utils/mir_buffer.h +++ b/plugins/Utils/mir_buffer.h @@ -463,7 +463,7 @@ static void ReplaceVars(Buffer<TCHAR> *buffer, MCONTACT hContact, TCHAR **variab size_t foundLen = i - j + 1;
if (foundLen == 9 && _tcsncmp(&buffer->str[j], _T("%contact%"), 9) == 0)
{
- buffer->replace(j, i + 1, (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
+ buffer->replace(j, i + 1, pcli->pfnGetContactDisplayName(hContact, 0));
}
else if (foundLen == 6 && _tcsncmp(&buffer->str[j], _T("%date%"), 6) == 0)
{
diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc index 7b1dd90843..81e4c35beb 100644 --- a/plugins/Watrack/i_gui.inc +++ b/plugins/Watrack/i_gui.inc @@ -36,10 +36,10 @@ begin FillChar(mi, sizeof(mi), 0);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=IcoLib_GetIcon(IcoBtnEnable,0);
- mi.szName.a :='Disable WATrack';
- mi.pszService :=MS_WAT_PLUGINSTATUS;
- mi.popupPosition:=MenuDisablePos;
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnEnable,0);
+ mi.szName.a :='Disable WATrack';
+ mi.pszService:=MS_WAT_PLUGINSTATUS;
+ mi.position :=MenuDisablePos;
hMenuDisable:=Menu_AddMainMenuItem(@mi);
end;
diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas index 12a144a8a7..ae56647617 100644 --- a/plugins/Watrack/lastfm/lastfm.pas +++ b/plugins/Watrack/lastfm/lastfm.pas @@ -183,10 +183,10 @@ begin FillChar(mi, sizeof(mi), 0);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0);
- mi.szName.a :='Disable scrobbling';
- mi.pszService :=MS_WAT_LASTFM;
- mi.popupPosition:=500050000;
+ mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0);
+ mi.szName.a :='Disable scrobbling';
+ mi.pszService:=MS_WAT_LASTFM;
+ mi.position :=500050000; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
hMenuLast:=Menu_AddMainMenuItem(@mi);
end;
diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas index af79485133..e6c5c6cb21 100644 --- a/plugins/Watrack/myshows/myshows.pas +++ b/plugins/Watrack/myshows/myshows.pas @@ -214,10 +214,10 @@ begin FillChar(mi, sizeof(mi), 0);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0);
- mi.szName.a :='Disable scrobbling';
- mi.pszService :=MS_WAT_MYSHOWS;
- mi.popupPosition:=500050000;
+ mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0);
+ mi.szName.a :='Disable scrobbling';
+ mi.pszService:=MS_WAT_MYSHOWS;
+ mi.position :=500050000;
hMenuMyShows:=Menu_AddMainMenuItem(@mi);
end;
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas index d714facb52..cd548e9e88 100644 --- a/plugins/Watrack/popup/popups.pas +++ b/plugins/Watrack/popup/popups.pas @@ -474,11 +474,11 @@ begin FillChar(mi,SizeOf(mi),0);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0);
- mi.szName.a :='Music Info';
- mi.pszService :=MS_WAT_SHOWMUSICINFO;
- mi.popupPosition:=MenuInfoPos;
- hMenuInfo :=Menu_AddMainMenuItem(@mi);
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0);
+ mi.szName.a :='Music Info';
+ mi.pszService:=MS_WAT_SHOWMUSICINFO;
+ mi.position :=MenuInfoPos;
+ hMenuInfo:=Menu_AddMainMenuItem(@mi);
ActionList:=nil;
if ServiceExists(MS_POPUP_ADDPOPUPW)<>0 then
diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas index c1a9fe0a76..ea6b5baf54 100644 --- a/plugins/Watrack/stat/statlog.pas +++ b/plugins/Watrack/stat/statlog.pas @@ -583,11 +583,11 @@ begin FillChar(mi, sizeof(mi), 0);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=IcoLib_GetIcon(IcoBtnReport,0);
- mi.szName.a :='Create WATrack report';
- mi.pszService :=MS_WAT_MAKEREPORT;
- mi.popupPosition:=MenuReportPos;
- hMenuReport :=Menu_AddMainMenuItem(@mi);
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnReport,0);
+ mi.szName.a :='Create WATrack report';
+ mi.pszService:=MS_WAT_MAKEREPORT;
+ mi.position :=MenuReportPos; // !!!!!!!!!!!!!!!!!!!!!
+ hMenuReport:=Menu_AddMainMenuItem(@mi);
plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
end;
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index 278525c496..b4ea9a0f6c 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -323,7 +323,7 @@ void AddMenuItems(void) // adding main menu items
mi.pszPopupName = LPGEN("Weather");
- mi.popupPosition = 500099000;
+ // mi.popupPosition = 500099000; !!!!!!!!!!!!!!!!!!!!!
CreateServiceFunction(MS_WEATHER_ENABLED, EnableDisableCmd);
mi.pszName = LPGEN("Enable/Disable Weather Update");
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 676bedd73c..3fa6e3d6dc 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -502,15 +502,13 @@ extern "C" __declspec(dllexport) int Load(void) mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
}
mi.pszService = MS_WUMF_SWITCHPOPUP;
- mi.popupPosition = 1999990000;
+ // mi.popupPosition = 1999990000; !!!!!!!!!!!!!!!!!!!!!!!!!
mi.pszPopupName = LPGEN("Popups");
hMenuItem = Menu_AddMainMenuItem(&mi);
mi.pszName = LPGEN("WUMF: Show connections");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
mi.pszService = MS_WUMF_CONNECTIONSSHOW;
- mi.popupPosition = 1999990000;
- mi.pszPopupName = NULL;
Menu_AddMainMenuItem(&mi);
HookEvent(ME_OPT_INITIALISE,OptionsInit);
diff --git a/plugins/mRadio/i_visual.inc b/plugins/mRadio/i_visual.inc index fd70445bb5..6495962d9d 100644 --- a/plugins/mRadio/i_visual.inc +++ b/plugins/mRadio/i_visual.inc @@ -33,12 +33,10 @@ var mi:TCListMenuItem;
begin
FillChar(mi, sizeof(mi), 0);
-// mi.popupPosition:=MenuUserInfoPos;
mi.pszService:=MS_RADIO_RECORD;
mi.szName.a :='Start/Stop Record';
hCMenuItemRec:=Menu_AddContactMenuItem(@mi);
-//!! mi.flags :=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST;
mi.hIcon :=IcoLib_GetIcon(IcoBtnOn,0);
mi.pszService :=MS_RADIO_PLAYSTOP;
mi.szName.a :='Start/Stop broadcasting';
|