diff options
191 files changed, 484 insertions, 621 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index e3940e143d..ccd53cca61 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -52,7 +52,6 @@ type // Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
PCLISTMENUITEM = ^TCLISTMENUITEM;
TCLISTMENUITEM = record
- cbSize : int; // size in bytes of this structure
szName : TChar; // [TRANSLATED-BY-CORE] text of the menu item
flags : dword;
position : int; // approx position on the menu, lower numbers go nearer the top
diff --git a/include/m_clist.h b/include/m_clist.h index 86c98c8326..a6c7f06483 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int hLangpack;
#if defined MIR_APP_EXPORTS
- typedef struct _tagIntMenuItem* HGENMENU;
+ typedef struct TMO_IntMenuItem* HGENMENU;
#else
DECLARE_HANDLE(HGENMENU);
#endif
@@ -86,8 +86,9 @@ extern int hLangpack; // WARNING: do not use Translate(TS) for p(t)szName or p(t)szPopupName as they
// are translated by the core, which may lead to double translation.
// Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
-typedef struct {
- int cbSize; //size in bytes of this structure
+
+struct CLISTMENUITEM
+{
union {
char* pszName; //[TRANSLATED-BY-CORE] text of the menu item
TCHAR* ptszName; //Unicode text of the menu item
@@ -115,8 +116,7 @@ typedef struct { //applies to all contacts. If it applies to multiple but not all
//protocols, add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU
int hLangpack; //plugin's hLangpack (added automatically)
-}
- CLISTMENUITEM;
+};
#define HGENMENU_ROOT ((HGENMENU)-1)
diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc index 9c508a167f..a36c8d511c 100644 --- a/plugins/Actman/ua/i_uaplaces.inc +++ b/plugins/Actman/ua/i_uaplaces.inc @@ -377,7 +377,6 @@ begin if not res then
begin
FillChar(clmi,SizeOf(clmi),0);
- clmi.cbSize:=SizeOf(clmi);
if (UAMenuItem.menu_opt and UAF_NOTRANS)<>0 then
clmi.flags :=CMIF_UNICODE or CMIF_KEEPUNTRANSLATED
else
@@ -425,7 +424,6 @@ begin // Now Menu Item preparing
{}{}
FillChar(clmi,SizeOf(clmi),0);
- clmi.cbSize:=SizeOf(clmi);
if (UAMenuItem.menu_opt and UAF_NOTRANS)<>0 then
clmi.flags :=CMIF_UNICODE or CMIF_KEEPUNTRANSLATED
else
@@ -488,7 +486,6 @@ begin result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=SizeOf(mi);
for i:=0 to HIGH(UActionList) do
begin
@@ -792,8 +789,6 @@ end; function OnTabButtonPressed(wParam:WPARAM;lParam:LPARAM):int; cdecl;
var
cbcd:pCustomButtonClickData;
-// tabb:BBButton;
-// pc:pWideChar;
i:integer;
begin
result:=0;
@@ -807,49 +802,6 @@ begin begin
if cbcd.dwButtonId=dwActID then
begin
-{
- FillChar(tabb,SizeOf(tabb),0);
- tabb.cbSize :=SizeOf(tabb);
- tabb.dwButtonID :=cbcd.dwButtonId;
- tabb.pszModuleName:=MODULE_NAME;
- if (flags and UAF_2STATE)<>0 then
- begin
- CallService(MS_BB_GETBUTTONSTATE,cbcd.hContact,TLPARAM(@tabb));
- if IsLocalItem(UActionList[i]) then
- begin
- if DBReadByte(hContact,opt_ua,szNameID)<>0 then
- end
- else
- begin
- if (tabb.bbbFlags and BBSF_PUSHED)<>0 then
- begin
- pc:=szTabBTooltipPressed;
- if pc=nil then pc:=szTabBTooltip;
- tabb.hIcon:=hIcolibIconPressed;
- end
- else
- begin
- pc:=szTabBTooltip;
- tabb.hIcon:=hIcolibIcon;
- end;
- if pc=nil then pc:=szActDescr;
- tabb.szTooltip.w:=pc;
- tabb.bbbFlags :=BBBF_ISIMBUTTON or BBBF_ISLSIDEBUTTON or
- BBBF_ISCHATBUTTON or BBBF_ISPUSHBUTTON;
- end
- else
- begin
- tabb.hIcon:=hIcolibIcon;
- tabb.szTooltip.w:=szTabBTooltip;
- if tabb.szTooltip.w=nil then tabb.szTooltip.w:=szActDescr;
- tabb.bbbFlags :=BBBF_ISIMBUTTON or BBBF_ISLSIDEBUTTON or
- BBBF_ISCHATBUTTON;
- end;
-
- tabb.iButtonWidth:=0;
- tabb.dwDefPos :=(TABTOOLBAR_INITPOS+wSortIndex*10) and $7FFF;
- CallService(MS_BB_MODIFYBUTTON,0,TLPARAM(@tabb));
-}
ServiceCallWithFParam(cbcd.hContact,0,cbcd.dwButtonId);
result:=1;
break;
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index d134effb4d..4b63376b7e 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -90,7 +90,7 @@ static int OnAccListChanged(WPARAM, LPARAM) if (hMainMenuItem)
return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 500020001;
mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 207d5ee626..e3ff863496 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -448,7 +448,7 @@ int ReloadFont(WPARAM, LPARAM) void FixMainMenu()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
if (options.hide_with_clist || options.auto_showhide)
mi.flags = CMIM_FLAGS | CMIF_GRAYED;
@@ -548,7 +548,7 @@ int CreateFrame() // create menu item
CreateServiceFunction(MODULE "/ShowHideReminders", ShowHideMenuFunc);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ALL;
mi.hIcon = hIconMenuShowHide;
mi.pszName = LPGEN("Show reminders");
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp index f5bcd72416..58106e397e 100644 --- a/plugins/Alarms/src/options.cpp +++ b/plugins/Alarms/src/options.cpp @@ -692,7 +692,7 @@ void AddMenuItem() {
if (hMainMenuItem) return;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ALL;
mi.icolibItem = IcoLib_GetIconHandle("alarms_menu_set");
mi.pszName = "Set alarm";
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index 8205f686af..86e775bc9c 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -144,7 +144,7 @@ int onPrebuildContactMenu(WPARAM hContact, LPARAM) if (!proto)
return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIM_NAME;
if (db_get_b((MCONTACT)hContact, "AuthState", "ShowIcons", 1))
mi.ptszName = LPGENT("Disable AuthState icons");
@@ -200,7 +200,7 @@ extern "C" int __declspec(dllexport) Load(void) if (bContactMenuItem) {
hAuthMenuSelected = CreateServiceFunction("AuthState/MenuItem", onAuthMenuSelected);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -1999901005;
mi.flags = CMIF_TCHAR;
mi.ptszName = LPGENT("Enable AuthState icons");
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 89cdb08aed..c512924897 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -436,7 +436,7 @@ static HGENMENU hMainMenuItem,hTrayMenuItem; void SetShutdownMenuItem(bool fActive)
{
/* main menu */
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 2001090000;
if (fActive)
{
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index 76184a0a7c..cadd9fcc14 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -514,7 +514,7 @@ void InitMenuItem() {
CreateServiceFunction(MS_AVATARHISTORY_SHOWDIALOG, ShowDialogSvc);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = LPGENT("View Avatar History");
mi.flags = CMIF_TCHAR;
mi.position = 1000090010;
diff --git a/plugins/AvatarHistory/src/icolib.cpp b/plugins/AvatarHistory/src/icolib.cpp index d20629af6f..7975c0ff2d 100644 --- a/plugins/AvatarHistory/src/icolib.cpp +++ b/plugins/AvatarHistory/src/icolib.cpp @@ -24,7 +24,7 @@ static void ReleaseIconEx(HICON hIcon) static void IcoLibUpdateMenus()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIM_ICON;
mi.hIcon = createDefaultOverlayedIcon(FALSE);
Menu_ModifyItem(hMenu, &mi);
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 1f103b66d0..4da30e3d49 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -96,7 +96,7 @@ int ToolbarModuleLoaded(WPARAM wParam,LPARAM lParam) void InitMenuItems()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1000090000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.pszName = LPGEN("View &History");
@@ -119,7 +119,7 @@ void InitMenuItems() void InitTaskMenuItems()
{
if (Options::instance->taskOptions.size() > 0) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (hTaskMainMenu == NULL) {
mi.position = 500060005;
mi.flags = CMIF_ROOTPOPUP;
@@ -132,7 +132,6 @@ void InitTaskMenuItems() std::vector<HGENMENU>::iterator it = taskMenus.begin();
for (; it != taskMenus.end() && taskIt != Options::instance->taskOptions.end(); ++it, ++taskIt) {
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.hParentMenu = hTaskMainMenu;
mi.ptszName = (TCHAR*)taskIt->taskName.c_str();
@@ -141,7 +140,6 @@ void InitTaskMenuItems() for (; it != taskMenus.end(); ++it) {
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS | CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | CMIF_HIDDEN;
mi.hParentMenu = hTaskMainMenu;
Menu_ModifyItem((HGENMENU)*it, &mi);
@@ -150,7 +148,6 @@ void InitTaskMenuItems() int pos = (int)taskMenus.size();
for (; taskIt != Options::instance->taskOptions.end(); ++taskIt) {
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.hParentMenu = hTaskMainMenu;
@@ -161,7 +158,7 @@ void InitTaskMenuItems() }
}
else if (hTaskMainMenu != NULL) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_ROOTPOPUP | CMIF_HIDDEN;
Menu_ModifyItem(hTaskMainMenu, &mi);
}
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 0ab8b3476f..381b057440 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -545,7 +545,7 @@ static INT_PTR ContactClickStartChatting(WPARAM hContact, LPARAM) static int MessagePrebuild(WPARAM hContact, LPARAM)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
if (!blInit || (db_get_b(hContact, "CList", "NotOnList", 0) == 1)) {
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
@@ -602,7 +602,7 @@ extern "C" int __declspec(dllexport) Load(void) CreateServiceFunction(SERV_CONTACT_NOT_TO_CHAT, ContactClickNotToChat);
CreateServiceFunction(SERV_CONTACT_START_CHATTING, ContactClickStartChatting);
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -50010002; //TODO: check the warning
mi.pszName = BOLTUN_AUTO_CHAT;
mi.pszService = SERV_CONTACT_AUTO_CHAT;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 623685f7d6..9ef985d950 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -524,7 +524,7 @@ static int GenMenuInit(WPARAM, LPARAM) // Modify menu item text before to show t TCHAR buf[128] = { 0 };
mir_sntprintf(buf, _T("%s [%s]"), TranslateT("Hide"), GetBossKeyText());
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_TCHAR | CMIM_NAME;
mi.ptszName = buf;
@@ -535,7 +535,7 @@ static int GenMenuInit(WPARAM, LPARAM) // Modify menu item text before to show t void BossKeyMenuItemInit(void) // Add menu item
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = 2000100000;
mi.pszPopupName = 0;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 9a94559966..be0812a19e 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -438,7 +438,7 @@ int onPrebuildContactMenu(WPARAM hContact, LPARAM) if (!proto)
return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
if (db_get_b(hContact, MODULE_NAME, "MissYou", 0)) {
mi.ptszName = LPGENT("Disable Miss You");
@@ -617,7 +617,7 @@ int ModulesLoaded(WPARAM, LPARAM) if (options.enableMissYou) {
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, onPrebuildContactMenu);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[2].hIcolib;
mi.position = 200000;
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 4243dd9f06..7278db9364 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -43,7 +43,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) int MainInit(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position=10;
mi.flags=0;
mi.hIcon= LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index cf16902329..2714c2fdb7 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -238,7 +238,7 @@ void addProtoStatusMenuItem(char *protoName) if (!ServiceExists(buf)) CreateServiceFunctionParam(buf, showList, (LPARAM)protoName); - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR; mi.icolibItem = forms[0].hIcoLibItem; mi.ptszName = _T(MODULENAME); diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 1d03a33b44..7bbccfe061 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -275,7 +275,7 @@ static int PrebuildMainMenu(WPARAM wParam, LPARAM lParam) {
// we have to use ME_CLIST_PREBUILDMAINMENU instead of updating menu items only on settings change, because "popup_enabled" and "popup_disabled" icons are not always available yet in ModulesLoaded
if (bPopupExists) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIM_NAME | CMIM_ICON;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY)) {
mi.ptszName = LPGENT("Disable c&lient change notification");
@@ -335,7 +335,7 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam) CreateServiceFunction(MS_CCN_TOGGLEPOPUPS, srvTogglePopups);
HookEvent(ME_CLIST_PREBUILDMAINMENU, PrebuildMainMenu);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
mi.ptszName = LPGENT("Disable c&lient change notification");
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index 6d854811f8..6bb4984b54 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -761,7 +761,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, H if (_fCluiFramesModuleNotStarted)
return NULL;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszPopupName = (char *)root;
mi.popupPosition = frameid;
mi.position = popuppos++;
@@ -933,7 +933,7 @@ static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam, LPARAM) if (_fCluiFramesModuleNotStarted) return -1;
int pos = id2pos(wParam);
if (pos >= 0 && pos < g_nFramesCount) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_CHILDPOPUP | CMIF_TCHAR;
if (g_pfwFrames[pos].visible) mi.flags |= CMIF_CHECKED;
mi.ptszName = g_pfwFrames[pos].TitleBar.tbname ? g_pfwFrames[pos].TitleBar.tbname : g_pfwFrames[pos].name;
@@ -984,7 +984,7 @@ static int CLUIFramesModifyMainMenuItems(WPARAM wParam, LPARAM) int pos = id2pos(wParam);
if (pos >= 0 && pos < g_nFramesCount) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_CHILDPOPUP | CMIF_TCHAR;
if (g_pfwFrames[pos].visible) mi.flags |= CMIF_CHECKED;
mi.ptszName = g_pfwFrames[pos].TitleBar.tbname ? g_pfwFrames[pos].TitleBar.tbname : g_pfwFrames[pos].name;
@@ -1631,7 +1631,7 @@ static int CLUIFramesLoadMainMenu() }
// create root menu
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index 308c441f7a..276448b477 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -192,7 +192,7 @@ static int OnBuildGroupMenu(WPARAM, LPARAM) {
if (MirandaExiting()) return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CMIF_CHECKED : 0);
Menu_ModifyItem(hHideOfflineUsersMenuItem, &mi);
@@ -237,7 +237,7 @@ void GroupMenus_Init(void) //add exit command to menu
GroupMenuParam gmp;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1900000;
mi.pszService = "CloseAction";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
@@ -348,7 +348,7 @@ static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM) if (gray1 && gray2) gray1 = FALSE; //should not be cause CLCItems_IsShowOfflineGroup return false if group->hideOffline
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | ((group->hideOffline && !gray1) ? CMIF_CHECKED : 0) | (gray1 ? CMIF_GRAYED : 0);
Menu_ModifyItem(hHideOfflineUsersHereMenuItem, &mi);
@@ -487,7 +487,7 @@ void InitSubGroupMenus(void) // add exit command to menu
GroupMenuParam gmp;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1000;
mi.icolibItem = iconItem.hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
@@ -515,7 +515,6 @@ void InitSubGroupMenus(void) hShowOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = 900001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 41dce30d7c..b2bbe07d35 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -99,7 +99,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) BOOL bModifyMenu = FALSE;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.icolibItem = iconList[bContactRate].hIcolib;
mi.pszPopupName = (char *)-1;
mi.position = 0;
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index a90a5e69aa..47c96ad7f7 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -320,7 +320,7 @@ void InitTrayMenus(void) MO_SetMenuObjectParam(hTrayMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSTRAY/TrayMenuonAddService");
// add exit command to menu
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 900000;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index bc79b2372a..7970ff7f31 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -336,7 +336,7 @@ HRESULT CLUI::RegisterAvatarMenu() {
Icon_RegisterT(g_hInst, LPGENT("Contact list"), iconItem, _countof(iconItem));
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
CreateServiceFunction("CList/ShowContactAvatar", CLUI::Service_Menu_ShowContactAvatar);
mi.position = 2000150000;
mi.icolibItem = iconItem[0].hIcolib;
@@ -2335,7 +2335,7 @@ LRESULT CLUI::OnListSizeChangeNotify(NMCLISTCONTROL * pnmc) SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, FALSE);
HMONITOR hMon = MonitorFromWindow(pcli->hwndContactTree, MONITOR_DEFAULTTONEAREST);
- MONITORINFO mi = { sizeof(mi) };
+ MONITORINFO mi = { 0 };
if (GetMonitorInfo(hMon, &mi))
rcWorkArea = mi.rcWork;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index e4cc7df2c4..af7a4dad79 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -580,7 +580,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU if (FramesSysNotStarted) return NULL; - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); mi.pszPopupName = (char *)root; mi.popupPosition = frameid; @@ -594,7 +594,6 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU popuppos += 100000; mi.hIcon = NULL; - mi.cbSize = sizeof(mi); mi.pszPopupName = (char *)root; mi.popupPosition = frameid; mi.position = popuppos++; @@ -774,7 +773,7 @@ static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam, LPARAM) mir_cslock lck(csFrameHook); int pos = id2pos((INT_PTR)wParam); if (pos >= 0 && pos < nFramescount) { - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.flags = CMIM_NAME | CMIF_CHILDPOPUP | CMIF_TCHAR; mi.ptszName = Frames[pos].TitleBar.tbname ? Frames[pos].TitleBar.tbname : Frames[pos].name; ModifyMItem((WPARAM)contMITitle, (LPARAM)&mi); @@ -833,7 +832,7 @@ INT_PTR CLUIFramesModifyMainMenuItems(WPARAM wParam, LPARAM) int pos = id2pos((INT_PTR)wParam); if (pos >= 0 && pos < nFramescount) { - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.flags = CMIM_NAME | CMIF_CHILDPOPUP | CMIF_TCHAR; mi.ptszName = Frames[pos].TitleBar.tbname ? Frames[pos].TitleBar.tbname : Frames[pos].name; Menu_ModifyItem(Frames[pos].MenuHandles.MITitle, &mi); @@ -1477,7 +1476,7 @@ static int CLUIFramesLoadMainMenu() } // create root menu - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME); mi.flags = CMIF_ROOTHANDLE; mi.position = 3000090000; diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index c294072ba4..8da3711764 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -199,7 +199,7 @@ INT_PTR HideOfflineRootHelper(WPARAM, LPARAM) static int OnBuildGroupMenu(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | (cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CMIF_CHECKED : 0);
Menu_ModifyItem(hHideOfflineUsersMenuItem, &mi);
@@ -251,117 +251,104 @@ void InitGroupMenus(void) MO_SetMenuObjectParam(hGroupMenuObject, OPT_USERDEFINEDITEMS, TRUE);
MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
- {
- //add exit command to menu
- GroupMenuParam gmp;
-
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.position = 1900000;
- mi.pszService = "CloseAction";
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- mi.pszName = LPGEN("E&xit");
- AddGroupMenuItem(0, (LPARAM)&mi);
-
- memset(&mi, 0, sizeof(mi));
- mi.cbSize = 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.cbSize = 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.cbSize = 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.cbSize = 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.cbSize = 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.cbSize = 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.cbSize = 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.cbSize = sizeof(mi);
- 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.cbSize = sizeof(mi);
- mi.position = 100001;
- mi.hIcon = NULL;
- mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.pszName = LPGEN("&Hide offline users");
- gmp.lParam = 0;
- gmp.wParam = -1;
- hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
-
- memset(&mi, 0, sizeof(mi));
- mi.cbSize = 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.cbSize = 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.cbSize = sizeof(mi);
- mi.position = 100004;
- mi.hIcon = NULL;
- mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.pszName = LPGEN("Disable &groups");
- hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
- }
+ // add exit command to menu
+ GroupMenuParam gmp;
+
+ CLISTMENUITEM mi = { 0 };
+ mi.position = 1900000;
+ mi.pszService = "CloseAction";
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
+ 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.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.pszService = MS_CLIST_SETHIDEOFFLINE;
+ mi.pszName = LPGEN("&Hide offline users");
+ 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);
}
HANDLE hSubGroupMenuObject;
@@ -385,7 +372,7 @@ static int OnBuildSubGroupMenu(WPARAM wParam, LPARAM) return 0;
//contact->group
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | (group->hideOffline ? CMIF_CHECKED : 0);
Menu_ModifyItem(hHideOfflineUsersHereMenuItem, &mi);
return 0;
@@ -524,7 +511,7 @@ void InitSubGroupMenus(void) //add exit command to menu
GroupMenuParam gmp;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
@@ -534,7 +521,6 @@ void InitSubGroupMenus(void) hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = 1001;
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
@@ -544,7 +530,6 @@ void InitSubGroupMenus(void) hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = 900001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
@@ -554,7 +539,6 @@ void InitSubGroupMenus(void) AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = 900002;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index da922b17af..e9d4461e99 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -381,7 +381,7 @@ int InitCustomMenus(void) CreateServiceFunction("CloseAction", CloseAction);
CreateServiceFunction("CList/SetContactIgnore", SetContactIgnore);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 200000;
mi.pszPopupName = (char *)-1;
mi.pszService = "CList/SetContactIgnore";
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 237f6ad276..b238151dee 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -165,7 +165,7 @@ static void ShowConsole(int show) RedrawWindow(pActive->hList, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW | RDW_ERASE);
if (hMenu) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = show ? LPGENT("Hide Console") : LPGENT("Show Console");
mi.flags = CMIM_NAME | CMIF_TCHAR;
Menu_ModifyItem(hMenu, &mi);
@@ -1163,7 +1163,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM) if (hwndConsole && IsWindow(hwndConsole)) {
HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.hIcon = hIcons[0];
mi.position = 1900000000;
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index f1264fe660..30eb931822 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -135,7 +135,7 @@ static int HookModulesLoaded(WPARAM, LPARAM) modules[0] = MODULENAME;
CallService("DBEditorpp/RegisterModule", (WPARAM)modules, 1);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszName = LPGEN("Contacts");
mi.position = -2000009990; //position in menu
mi.pszService = MS_CONTACTS_SEND;
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 5cdccfc845..b7ce54db1b 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -255,7 +255,7 @@ static int ModulesLoaded(WPARAM, LPARAM) FoldersPathChanged(0, 0);
}
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.popupPosition = 2000089999;
mi.position = 2000089999;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
diff --git a/plugins/CyrTranslit/src/MirandaContact.cpp b/plugins/CyrTranslit/src/MirandaContact.cpp index 80baac3387..d7b32a9f8a 100644 --- a/plugins/CyrTranslit/src/MirandaContact.cpp +++ b/plugins/CyrTranslit/src/MirandaContact.cpp @@ -63,7 +63,7 @@ void MirandaContact::save(MCONTACT hContact, bool bValue) void MirandaContact::addMenuItem()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszName = MENU_ITEM_TEXT;
mi.flags = 0;
mi.position = 65535;
@@ -96,7 +96,7 @@ int MirandaContact::onPreBuildContactMenu(WPARAM wParam, LPARAM) MCONTACT hContact = MCONTACT(wParam);
if (!CallService(MS_DB_CONTACT_IS, wParam, 0)) return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
if ( bIsActive(hContact))
mi.flags |= CMIF_CHECKED;
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 4ac0e56d8f..8e9f9d2d40 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -299,7 +299,7 @@ static int OnOptionsInit(PVOID obj, WPARAM wParam, LPARAM) void CDb3Mmap::UpdateMenuItem()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME;
mi.icolibItem = iconList[1].hIcolib;
mi.pszName = GetMenuTitle();
@@ -315,7 +315,7 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM) HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, db);
// main menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszName = LPGEN("Database");
mi.position = 500000000;
mi.flags = CMIF_ROOTHANDLE;
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index b132390c45..468e965476 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -113,7 +113,7 @@ int ModulesLoaded(WPARAM, LPARAM) IcoLibRegister();
// Register menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1900000001;
mi.icolibItem = GetIcoLibHandle(ICO_DBE_BUTT);
mi.pszPopupName = "Database";
@@ -122,7 +122,6 @@ int ModulesLoaded(WPARAM, LPARAM) Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = 1900000001;
mi.flags = 0;
mi.icolibItem = GetIcoLibHandle(ICO_REGUSER);
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index 5392ab2d9e..7e1d9d76d4 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -99,7 +99,7 @@ int ModulesLoad(WPARAM, LPARAM) CreateServiceFunction(MS_AB_BACKUP, ABService);
CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszPopupName = LPGEN("Database");
mi.pszName = LPGEN("Backup profile");
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp index b03f25104a..9255a758ed 100644 --- a/plugins/Dropbox/src/dropbox_menus.cpp +++ b/plugins/Dropbox/src/dropbox_menus.cpp @@ -16,7 +16,6 @@ INT_PTR CDropbox::SendFilesToDropboxCommand(void *obj, WPARAM hContact, LPARAM) void CDropbox::InitializeMenus()
{
CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(CLISTMENUITEM);
mi.pszService = MODULE"/SendFilesToDropbox";
mi.pszName = LPGEN("Upload files to Dropbox");
mi.position = -2000020000 + CMI_SEND_FILES;
diff --git a/plugins/Exchange/src/hooked_events.cpp b/plugins/Exchange/src/hooked_events.cpp index 5df16e1cc1..7ee2eec3b6 100644 --- a/plugins/Exchange/src/hooked_events.cpp +++ b/plugins/Exchange/src/hooked_events.cpp @@ -61,7 +61,6 @@ int OnModulesLoaded(WPARAM, LPARAM) UpdateTimers();
CLISTMENUITEM cl = {0};
- cl.cbSize = sizeof(CLISTMENUITEM);
cl.hIcon = hiMailIcon;
cl.position = 10000000;
cl.pszService = MS_EXCHANGE_CHECKEMAIL;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 5b69b107fa..e1f327433e 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -91,7 +91,7 @@ void InitMenuItems() {
TCHAR stzName[256];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
@@ -102,10 +102,9 @@ void InitMenuItems() hMenu = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.ptszName = stzName;
- CLISTMENUITEM mi2 = { sizeof(mi2) };
+ CLISTMENUITEM mi2 = { 0 };
mi2.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR;
mi2.pszService = MS_FTPFILE_CONTACTMENU;
@@ -162,7 +161,6 @@ void InitMenuItems() }
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 1e405a38c4..279307f86f 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -174,7 +174,7 @@ static int OnModulesLoaded(WPARAM wparam, LPARAM lparam) hHookSkinIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, OnSkinIconsChanged);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 200011;
mi.hIcon = hIcons[ICON_MAIN];
mi.pszName = LPGEN("File As Message...");
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index 35c42ab534..93c7bc7ecf 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -684,7 +684,7 @@ static INT_PTR OnMainMenu_HideAll(WPARAM wParam, LPARAM lParam) db_set_b(NULL, MODULE, "HideAll", (BYTE)fcOpt.bHideAll);
OnStatusChanged();
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
clmi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE));
clmi.ptszName = fcOpt.bHideAll ? LPGENT("Show all thumbs") : LPGENT("Hide all thumbs");
@@ -717,7 +717,7 @@ static void LoadMenus() // Remove thumb menu item
CreateServiceFunction(MODULE "/RemoveThumb", OnContactMenu_Remove);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_HIDE));
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index 784b4db6ab..77480035dc 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -133,7 +133,7 @@ extern "C" int __declspec(dllexport) Load() hOptionsInitial = HookEvent(ME_OPT_INITIALISE, OptInit);
CreateServiceFunction("GmailMNotifier/MenuCommand", PluginMenuCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = 0;
mi.hIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_ONLINE);
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 8750275df3..257a89b772 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -1473,8 +1473,6 @@ void InitGuiElements() { CLISTMENUITEM mi;
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.flags = 0;
mi.pszContactOwner = NULL; //all contacts
mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = -2000019955;
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 1629bfcf18..7343d10006 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -623,7 +623,7 @@ static int nProtoAck(WPARAM /*wParam*/, LPARAM lParam) { /////////////////////////////////////////////////////////////////////
INT_PTR nToggelAcceptConnections(WPARAM wparam, LPARAM /*lparam*/) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON;
if (!hDirectBoundPort) {
@@ -924,7 +924,7 @@ int nSystemShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/) { indexCreationMode = (eIndexCreationMode) db_get_b(NULL, MODULE, "IndexCreationMode", 2);
if (db_get_b(NULL, MODULE, "AddAcceptConMenuItem", 1)) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.pszContactOwner = NULL; //all contacts
mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 8f6e6aa3f7..630b8d68ef 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -58,7 +58,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction("Linklist/MenuCommand", LinkList_Main);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
mi.ptszName = LPGENT("&Create Linklist");
diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr index ccaaba045d..3b350fc6de 100644 --- a/plugins/HistoryPlusPlus/historypp.dpr +++ b/plugins/HistoryPlusPlus/historypp.dpr @@ -252,11 +252,8 @@ begin InitEventFilters;
ReadEventFilters;
+ // create contact item in contact menu
ZeroMemory(@menuitem,SizeOf(menuItem));
-
- //create contact item in contact menu
- menuItem.cbSize := SizeOf(menuItem);
- menuItem.pszContactOwner := nil; //all contacts
menuItem.flags := CMIF_UNICODE;
menuItem.Position := 1000090000;
@@ -461,7 +458,6 @@ begin NotifyAllForms(HM_NOTF_ICONS2CHANGED,0,0);
//change menu icons
ZeroMemory(@menuitem,SizeOf(menuItem));
- menuItem.cbSize := SizeOf(menuItem);
menuItem.flags := CMIM_ICON;
menuItem.hIcon := hppIcons[HPP_ICON_CONTACTHISTORY].handle;
CallService(MS_CLIST_MODIFYMENUITEM, MenuHandles[miContact].Handle, LPARAM(@menuItem));
@@ -491,7 +487,6 @@ begin if (PrevShowHistoryCount xor ShowHistoryCount) or (count <> MenuCount) then
begin
ZeroMemory(@menuitem, SizeOf(menuItem));
- menuItem.cbSize := SizeOf(menuItem);
menuItem.flags := CMIM_FLAGS;
if hLast = 0 then
menuItem.flags := menuItem.flags or CMIF_HIDDEN;
diff --git a/plugins/HistoryPlusPlus/historypp.dproj b/plugins/HistoryPlusPlus/historypp.dproj index 240b4619fc..88f6028e9f 100644 --- a/plugins/HistoryPlusPlus/historypp.dproj +++ b/plugins/HistoryPlusPlus/historypp.dproj @@ -8,7 +8,7 @@ <AppType>Library</AppType>
<FrameworkType>VCL</FrameworkType>
<ProjectVersion>13.4</ProjectVersion>
- <Platform Condition="'$(Platform)'==''">Win32</Platform>
+ <Platform Condition="'$(Platform)'==''">Win64</Platform>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 5e435604ac..ec35504690 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -15,7 +15,7 @@ namespace mu HANDLE addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName /* = NULL */, int popupPosition /* = 0 */, DWORD hotKey /* = 0 */)
{
// TODO: support for unicode-core with unicode-aware CList
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
@@ -30,7 +30,7 @@ namespace mu HANDLE addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, DWORD hotKey /* = 0 */, const char* pszContactOwner /* = NULL */)
{
// TODO: support for unicode-core with unicode-aware CList
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
@@ -44,7 +44,7 @@ namespace mu int modifyMenuItem(HANDLE hMenuItem, DWORD toModify, const TCHAR* pszName /* = NULL */, DWORD flags /* = 0 */, HICON hIcon /* = NULL */, DWORD hotKey /* = 0 */)
{
// TODO: support for unicode-core with unicode-aware CList
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = (TCHAR*)pszName;
mi.flags = toModify | flags | CMIF_TCHAR;
mi.hIcon = hIcon;
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp index 58201979cb..b7d5222cd5 100644 --- a/plugins/IEHistory/src/IEHistory.cpp +++ b/plugins/IEHistory/src/IEHistory.cpp @@ -75,7 +75,7 @@ extern "C" int __declspec(dllexport) Load(void) InitServices(); /// menu items - CLISTMENUITEM menuItem = { sizeof(CLISTMENUITEM) }; + CLISTMENUITEM menuItem = { 0 }; menuItem.ptszName = LPGENT("View &history"); menuItem.flags = CMIF_TCHAR; menuItem.position = 1000090000; diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 55e85c3266..1925a1bcf5 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -115,7 +115,6 @@ extern "C" __declspec(dllexport) int Load(void) // menu item
CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(mi);
mi.icolibItem = GetIconHandle(IDI_IMPORT);
mi.pszName = LPGEN("&Import...");
mi.position = 500050000;
diff --git a/plugins/ImportTXT/importtxt.dpr b/plugins/ImportTXT/importtxt.dpr index 869953b556..e5e8b896b2 100644 --- a/plugins/ImportTXT/importtxt.dpr +++ b/plugins/ImportTXT/importtxt.dpr @@ -120,18 +120,14 @@ begin SrvITxt := CreateServiceFunction(IMPORT_TXT_SERVICE, @ContactMenuCommand);
SrvIWiz := CreateServiceFunction(IMPORT_WIZ_SERVICE, @MainMenuCommand);
FillChar(mi, sizeof(mi), 0);
- mi.cbSize := sizeof(mi);
- mi.flags := 0;
mi.position := 1000090050;
mi.hIcon := LoadIcon(hInstance, MAKEINTRESOURCE(IDI_DEFAULT));
mi.szName.a := 'Import history';
mi.pszService := IMPORT_TXT_SERVICE;
- mi.pszContactOwner := nil; // All contacts
Menu_AddContacTMenuItem(@mi);
mi.position := 500050010;
mi.pszService := IMPORT_WIZ_SERVICE;
- mi.pszContactOwner := nil;
Menu_AddMainMenuItem(@mi);
HookEvent(ME_SYSTEM_MODULESLOADED, @OnModulesLoaded);
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 22f811d67e..875c4e11e6 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -159,7 +159,7 @@ void UpdateGlobalStatusMenus() {
BOOL enabled = ListeningToEnabled(NULL, TRUE);
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS
| (enabled ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
@@ -193,7 +193,7 @@ void RebuildMenu() TCHAR text[512];
mir_sntprintf(text, TranslateT("Send to %s"), info->account);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 100000 + i;
mi.pszPopupName = (char *) hMainMenuGroup;
mi.popupPosition = 500080000 + i;
@@ -245,7 +245,7 @@ int AccListChanged(WPARAM wParam, LPARAM lParam) TCHAR text[512];
mir_sntprintf(text, TranslateT("Send to %s"), info->account);
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = text;
Menu_ModifyItem(info->hMenu, &clmi);
@@ -298,7 +298,7 @@ int ModulesLoaded(WPARAM, LPARAM) }
// Add main menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 500080000;
mi.ptszName = LPGENT("Listening to");
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
@@ -715,7 +715,7 @@ INT_PTR EnableListeningTo(char *proto,BOOL enabled) ProtocolInfo *info = GetProtoInfo(proto);
if (info != NULL)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS
| (enabled ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 2ff07d5fde..e59c66c188 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1743,7 +1743,7 @@ extern "C" int __declspec(dllexport) Load(void) //function that will be called on menu click
hMenuService = CreateServiceFunction("LotusNotify/MenuCommand", PluginMenuCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF; //on top menu position
mi.flags = CMIF_TCHAR;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 18e67d1720..1693a1490c 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -467,7 +467,7 @@ INT_PTR onHide(WPARAM wparam, LPARAM) // following 4 functions should be self-explanatory
void ModifyVisibleSet(int mode, BOOL alpha)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON;
mi.hIcon = (mode) ? hIcon[1] : (alpha ? hIcon[3] : Skin_LoadIcon(SKINICON_OTHER_SMALLDOT));
Menu_ModifyItem(hmenuVis, &mi);
@@ -475,7 +475,7 @@ void ModifyVisibleSet(int mode, BOOL alpha) void ModifyInvisSet(int mode, BOOL alpha)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON;
mi.hIcon = (mode) ? hIcon[2] : (alpha ? hIcon[4] : Skin_LoadIcon(SKINICON_OTHER_SMALLDOT));
Menu_ModifyItem(hmenuOff, &mi);
@@ -483,7 +483,7 @@ void ModifyInvisSet(int mode, BOOL alpha) void ModifyCopyID(MCONTACT hContact, BOOL bShowID, BOOL bTrimID)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_UNICODE;
if (isMetaContact(hContact)) {
@@ -532,7 +532,7 @@ void ModifyStatusMsg(MCONTACT hContact) return;
}
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON;
HICON hIconSMsg = (HICON)CallProtoService(szProto, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
@@ -552,7 +552,7 @@ void ModifyCopyIP(MCONTACT hContact) return;
}
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON;
HICON hIconCIP = (HICON)CallProtoService(szProto, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
@@ -566,7 +566,7 @@ void ModifyCopyIP(MCONTACT hContact) void ModifyCopyMirVer(MCONTACT hContact)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON;
if (ServiceExists(MS_FP_GETCLIENTICONT)) {
@@ -745,7 +745,7 @@ INT_PTR onIgnore(WPARAM wparam, LPARAM lparam) static HGENMENU AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hRoot;
mi.popupPosition = param;
mi.position = pos;
@@ -758,7 +758,7 @@ static HGENMENU AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD fl static void ModifySubmenuItem(HGENMENU hItem, TCHAR *name, int checked, int hidden)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = name;
mi.flags = CMIM_FLAGS | CMIF_UNICODE;
if (checked)
@@ -788,7 +788,7 @@ int BuildMenu(WPARAM wparam, LPARAM) Menu_ShowItem(hmenuHide, bEnabled);
if (bEnabled) {
BYTE bHidden = db_get_b(hContact, "CList", "Hidden", 0);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags |= CMIM_ICON | CMIM_NAME | CMIF_UNICODE;
mi.hIcon = IcoLib_GetIcon(bHidden ? "miex_showil" : "miex_hidefl");
mi.ptszName = bHidden ? LPGENT("Show in list") : LPGENT("Hide from list");
@@ -971,7 +971,7 @@ static int PluginInit(WPARAM, LPARAM) ModuleLoad(0, 0);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_UNICODE;
mi.hIcon = NULL;
mi.pszContactOwner = NULL;
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp index e3e33c5adb..1eda3b7469 100644 --- a/plugins/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/src/svcs_menu.cpp @@ -158,7 +158,7 @@ void InitMenu() CreateServiceFunction(MS_OTR_MENUVERIFY, SVC_VerifyOTR); CreateServiceFunction(MS_OTR_MENUTOGGLEHTML, SVC_ToggleHTMLOTR); - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR; mi.position = -400000; @@ -179,7 +179,7 @@ void InitMenu() int SVC_PrebuildContactMenu(WPARAM hContact, LPARAM lParam) { - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_TCHAR; const char *proto = GetContactProto(hContact); diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index 1eb1177f0c..144d80eec2 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -114,7 +114,7 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) if (!bReplaceHistory)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = 0;
mi.pszContactOwner = NULL; //all contacts
mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 83f26077c1..3b605578f9 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -327,7 +327,7 @@ int CreateFrame() // Create menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.popupPosition = -0x7FFFFFFF;
mi.ptszPopupName = LPGENT("My details");
@@ -2240,7 +2240,7 @@ INT_PTR HideFrameFunc(WPARAM, LPARAM) void FixMainMenu()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR;
if (MyDetailsFrameVisible())
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index a2a6d38cae..76ed521dcd 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -86,7 +86,7 @@ static int MainInit(WPARAM, LPARAM) InitProtocolData();
// Add options to menu
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.popupPosition = 500050000;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 769ec125ae..e6c8f32234 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -290,9 +290,9 @@ static int IdleChangeEvent(WPARAM, LPARAM lParam) int PreBuildContactMenu(WPARAM hContact, LPARAM)
{
char *szProto = GetContactProto(hContact);
- CLISTMENUITEM miSetMsg = { sizeof(miSetMsg) };
+ CLISTMENUITEM miSetMsg = { 0 };
miSetMsg.flags = CMIM_FLAGS | CMIF_TCHAR | CMIF_HIDDEN;
- CLISTMENUITEM miReadMsg = { sizeof(miReadMsg) };
+ CLISTMENUITEM miReadMsg = { 0 };
miReadMsg.flags = CMIM_FLAGS | CMIF_TCHAR | CMIF_HIDDEN;
int iMode = szProto ? CallProtoService(szProto, PS_GETSTATUS, 0, 0) : 0;
int Flag1 = szProto ? CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) : 0;
@@ -325,7 +325,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) // if this contact supports sending/receiving messages
if ((Flag1 & PF1_IM) == PF1_IM) {
int iAutoreply = CContactSettings(g_ProtoStates[szProto].Status, hContact).Autoreply;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_FLAGS | CMIF_TCHAR;
switch (iAutoreply) {
case VAL_USEDEFAULT: mi.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_DOT)); break;
@@ -341,7 +341,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hAutoreplyUseDefaultContactMenuItem, (LPARAM)&mi);
}
else { // hide the Autoreply menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_TCHAR | CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hToggleSOEContactMenuItem, (LPARAM)&mi);
}
@@ -383,7 +383,7 @@ INT_PTR ToggleSendOnEvent(WPARAM hContact, LPARAM) if (hContact == NULL) {
int SendOnEvent = CContactSettings(g_ProtoStates[(LPSTR)NULL].Status).Autoreply;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
if (SendOnEvent) {
mi.ptszName = ENABLE_SOE_COMMAND;
@@ -623,7 +623,7 @@ int MirandaLoaded(WPARAM, LPARAM) int SendOnEvent = CContactSettings(g_ProtoStates[(char*)NULL].Status).Autoreply;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1000020000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.icolibItem = iconList[SendOnEvent ? 1 : 0].hIcolib;
@@ -632,7 +632,6 @@ int MirandaLoaded(WPARAM, LPARAM) g_hToggleSOEMenuItem = Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = -2000005000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE | CMIF_HIDDEN;
mi.ptszName = LPGENT("Read status message"); // never seen...
@@ -641,7 +640,6 @@ int MirandaLoaded(WPARAM, LPARAM) if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_USEMENUITEM)) {
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
mi.ptszName = LPGENT("Set status message"); // will never be shown
mi.position = 1000020000;
@@ -650,7 +648,6 @@ int MirandaLoaded(WPARAM, LPARAM) g_hContactMenuItem = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR | CMIF_ROOTPOPUP;
mi.hIcon = NULL;
mi.pszPopupName = (char*)-1;
diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp index 2646002591..9ab896ed7a 100644 --- a/plugins/NewEventNotify/src/menuitem.cpp +++ b/plugins/NewEventNotify/src/menuitem.cpp @@ -39,7 +39,7 @@ static INT_PTR MenuitemNotifyCmd(WPARAM wParam,LPARAM lParam) int MenuitemUpdate(BOOL bStatus)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (bStatus) {
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
mi.pszName = MENUITEM_DISABLE;
@@ -57,7 +57,7 @@ int MenuitemInit(BOOL bStatus) {
CreateServiceFunction(MS_NEN_MENUNOTIFY, MenuitemNotifyCmd);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
mi.pszPopupName = LPGEN("Popups");
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 69b6dc751e..66163f6b72 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1062,7 +1062,7 @@ INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM) {
db_set_b(0, MODULE, "TempDisable", opt.TempDisabled = !opt.TempDisabled);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
if (opt.TempDisabled) {
mi.ptszName = LPGENT("Enable status notification");
@@ -1080,7 +1080,7 @@ INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM) void InitMainMenuItem()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.ptszPopupName = ServiceExists(MS_POPUP_ADDPOPUPT) ? _T("Popups") : NULL;
mi.pszService = MS_STATUSCHANGE_MENUCOMMAND;
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index 9cb03cc152..3a97c32aae 100644 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -177,7 +177,7 @@ extern "C" int __declspec(dllexport) Load() CreateServiceFunction("/ImportGPGKeys",ImportGpGKeys);
// !!!!!!!! check it later
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
@@ -186,7 +186,6 @@ extern "C" int __declspec(dllexport) Load() hLoadPubKey = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
@@ -195,7 +194,6 @@ extern "C" int __declspec(dllexport) Load() hToggleEncryption = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFd;
mi.flags=CMIF_TCHAR;
mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
@@ -204,7 +202,6 @@ extern "C" int __declspec(dllexport) Load() hSendKey = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
@@ -213,7 +210,6 @@ extern "C" int __declspec(dllexport) Load() hExportGpgKeys = Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index df16fde641..4c49c3eb4a 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -227,7 +227,7 @@ INT_PTR ToggleEncryption(WPARAM w, LPARAM l) setSrmmIcon(hContact); setClistIcon(hContact); enc = enc?0:1; - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.flags = CMIM_NAME; enc?mi.pszName="Turn off GPG encryption":mi.pszName="Turn on GPG encryption"; Menu_ModifyItem(hToggleEncryption, &mi); @@ -238,7 +238,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM l) { MCONTACT hContact = db_mc_tryMeta(w); { - CLISTMENUITEM mi2 = { sizeof(mi2) }; + CLISTMENUITEM mi2 = { 0 }; LPSTR proto = GetContactProto(hContact); PROTOACCOUNT *acc = Proto_GetAccount(proto); std::string setting; @@ -263,7 +263,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM l) mi2.flags = CMIM_NAME | CMIF_TCHAR; Menu_ModifyItem(hSendKey, &mi2); } - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.flags = CMIM_NAME; TCHAR *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); if(!tmp[0]) diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp index bf9bf100d1..bf40363323 100644 --- a/plugins/NewsAggregator/Src/Menus.cpp +++ b/plugins/NewsAggregator/Src/Menus.cpp @@ -23,7 +23,7 @@ HGENMENU hService2[7]; void InitMenu()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszContactOwner = MODULE;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
@@ -75,7 +75,6 @@ void InitMenu() hService2[6] = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIM_ICON;
if (db_get_b(NULL, MODULE, "AutoUpdate", 1))
mi.icolibItem = GetIconHandle("enabled");
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index fa81455bb7..444800f8db 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -229,7 +229,7 @@ INT_PTR NewsAggrRecvMessage(WPARAM, LPARAM lParam) void UpdateMenu(bool State)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (!State) { // to enable auto-update
mi.ptszName = LPGENT("Auto Update Enabled");
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index 1cf1a3233a..fe6d15fc5f 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -146,7 +146,7 @@ int PrebuildContactMenu(WPARAM hContact, LPARAM lParam) char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_TCHAR;
if (chat_room) mi.flags |= CMIF_HIDDEN;
else {
@@ -246,7 +246,7 @@ void SrmmMenu_Load() int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
// create contact menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = -300010;
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 1fd92e6c59..4610f12156 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -141,7 +141,7 @@ extern "C" __declspec(dllexport) int Load() CreateServiceFunction("TestStringReplaceLine", testStringReplacer);
CreateServiceFunction("NIM_Contact/DoubleClick", doubleClick);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 600090000;
mi.pszPopupName = LPGEN("&Non-IM Contact");
mi.popupPosition = 600090000;
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 42ed98f0fb..8906f1d651 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -182,7 +182,7 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam) g_AddContListMI = (BOOL)db_get_dw(0,MODULENAME,"AddContactMenuItems",1);
// register menus
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszContactOwner = NULL;
mi.ptszPopupName = LPGENT("Notes && Reminders");
mi.flags = CMIF_TCHAR;
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index b6d2a36aa4..ac5e64c5f0 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -335,7 +335,6 @@ extern "C" int __declspec(dllexport) Load(void) // Add contact menu entry
CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(mi);
mi.popupPosition = 500085000;
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -500050004;
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp index 1219db8b77..7d7be76a58 100644 --- a/plugins/OpenFolder/src/openFolder.cpp +++ b/plugins/OpenFolder/src/openFolder.cpp @@ -97,7 +97,7 @@ extern "C" int __declspec(dllexport) Load() hotkey.DefHotKey = MAKEWORD( 'O', HOTKEYF_SHIFT | HOTKEYF_ALT );
Hotkey_Register(&hotkey);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp index 4438634c52..c84da5c676 100644 --- a/plugins/PackUpdater/Src/PackUpdater.cpp +++ b/plugins/PackUpdater/Src/PackUpdater.cpp @@ -70,7 +70,7 @@ extern "C" __declspec(dllexport) int Load(void) // Add cheking update menu item
CreateServiceFunction(MODNAME"/CheckUpdates", MenuCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcon = IcoLib_GetIcon("check_update");
@@ -80,7 +80,6 @@ extern "C" __declspec(dllexport) int Load(void) // Add empty updates folder menu item
CreateServiceFunction(MODNAME"/EmptyFolder", EmptyFolder);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcon = IcoLib_GetIcon("empty_folder");
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 925b22dc34..90ab2e97e5 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -291,7 +291,7 @@ INT_PTR ContactMenuService(WPARAM hContact, LPARAM lParam) void InitMenuItems()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
mi.position = 3000090005;
@@ -300,7 +300,6 @@ void InitMenuItems() hContactMenu = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.pszService = MS_PASTEIT_CONTACTMENU;
mi.hParentMenu = hContactMenu;
@@ -316,7 +315,7 @@ void InitMenuItems() mi.ptszName = LPGENT("Default web page");
HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
- CLISTMENUITEM mi2 = { sizeof(mi2) };
+ CLISTMENUITEM mi2 = { 0 };
mi2.pszService = MS_PASTEIT_CONTACTMENU;
mi2.hParentMenu = hDefWebMenu;
for (int i = 0; i < PasteToWeb::pages; ++i)
@@ -334,7 +333,7 @@ void InitMenuItems() void DefWebPageChanged()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
for (int i = 0; i < PasteToWeb::pages; i++) {
mi.flags = CMIM_FLAGS;
if (Options::instance->defWeb == i)
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp index 36d8b07f11..8cb8855d3e 100644 --- a/plugins/Ping/src/menu.cpp +++ b/plugins/Ping/src/menu.cpp @@ -6,7 +6,7 @@ HANDLE hEventMenuBuild; void InitMenus()
{
// main menu
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.popupPosition = 500099900;
mi.ptszPopupName = LPGENT("Ping");
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 71e4f54b16..b44d165833 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -991,7 +991,7 @@ void InitList() CreateServiceFunction(PLUG "/ShowWindow", PingPlugShowWindow);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.popupPosition = 1000200001;
mi.ptszPopupName = LPGENT("Ping");
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 69893a42c8..9aceb57cb0 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -84,7 +84,7 @@ extern "C" __declspec(dllexport) int Load(void) // Add cheking update menu item
InitCheck();
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 400010000;
#if MIRANDA_VER >= 0x0A00
mi.icolibItem = iconList[0].hIcolib;
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 56f302c5cd..c9f5a3c73b 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -110,7 +110,7 @@ static int IconsChanged(WPARAM, LPARAM) {
LoadActions();
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (PopupOptions.ModuleIsEnabled == TRUE) { // The module is enabled.
// The action to do is "disable popups" (show disabled) and we must write "enable popup" in the new item.
mi.hIcon = IcoLib_GetIcon(ICO_POPUP_ON, 0);
@@ -149,7 +149,7 @@ static int TTBLoaded(WPARAM, LPARAM) //===== EnableDisableMenuCommand ========================================================
INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (PopupOptions.ModuleIsEnabled) {
// The module is enabled.
// The action to do is "disable popups" (show disabled) and we must write "enable popup" in the new item.
@@ -185,7 +185,7 @@ INT_PTR svcShowHistory(WPARAM, LPARAM) void InitMenuItems(void)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
// support new genmenu style
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = HGENMENU_ROOT;
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index e0ba4db09c..05a94201c4 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -94,7 +94,7 @@ static IconItem iconList[] = static int OnModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -500200000;
mi.pszPopupName = LPGEN("Database");
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 445e641a62..97cbccc467 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -184,7 +184,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) hIml = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST,0,0);
// Add menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 500100001;
mi.flags = CMIF_TCHAR;
mi.ptszName = LPGENT("Quick Contacts...");
diff --git a/plugins/QuickSearch/quicksearch.dpr b/plugins/QuickSearch/quicksearch.dpr index 764200acdc..621aaabbe0 100644 --- a/plugins/QuickSearch/quicksearch.dpr +++ b/plugins/QuickSearch/quicksearch.dpr @@ -52,7 +52,6 @@ var begin
result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
mi.hIcon:=IcoLib_GetIcon(QS_QS,0);
CallService(MS_CLIST_MODIFYMENUITEM,MainMenuItem,tlparam(@mi));
diff --git a/plugins/QuickSearch/sr_global.pas b/plugins/QuickSearch/sr_global.pas index 2f7e59c2c0..d667d282c7 100644 --- a/plugins/QuickSearch/sr_global.pas +++ b/plugins/QuickSearch/sr_global.pas @@ -242,7 +242,6 @@ begin if MainMenuItem<>0 then exit;
ZeroMemory(@cmi,sizeof(cmi));
- cmi.cbSize :=sizeof(cmi) ;
cmi.szName.a :=qs_name;
cmi.position :=500050000;
// cmi.pszPopupName:=nil;
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas index 70287137f5..cfb87558a2 100644 --- a/plugins/QuickSearch/sr_window.pas +++ b/plugins/QuickSearch/sr_window.pas @@ -810,7 +810,6 @@ begin cmcolumn:=col;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=SizeOf(mi);
if mnuhandle=0 then
begin
mi.flags :=CMIF_UNICODE;
@@ -836,7 +835,6 @@ begin // Due to stupid miranda logic, we need to clear tails at service processing, not earlier
if doit then
begin
- mi.cbSize:=SizeOf(mi);
mi.flags :=CMIM_FLAGS or CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM,mnuhandle,LPARAM(@mi));
end;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 289696bb4d..908f8074c5 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -44,7 +44,7 @@ namespace void UpdateMenu(bool bAutoUpdate)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (bAutoUpdate) { // to enable auto-update
mi.pszName = LPGEN("Auto Update Enabled");
@@ -133,7 +133,7 @@ namespace void InitMenu()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = LPGENT("Quotes");
mi.flags = CMIF_TCHAR | CMIF_ROOTPOPUP;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
@@ -187,7 +187,6 @@ namespace HookEvent(ME_CLIST_PREBUILDCONTACTMENU, Quotes_PrebuildContactMenu);
memset(&mi, 0, sizeof(mi));
- mi.cbSize = sizeof(mi);
mi.pszContactOwner = QUOTES_PROTOCOL_NAME;
hMenuRoot = NULL;
if (bSubGroups)
diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp index 64f5012243..ddde8e2a73 100644 --- a/plugins/Quotes/src/QuoteInfoDlg.cpp +++ b/plugins/Quotes/src/QuoteInfoDlg.cpp @@ -273,7 +273,7 @@ namespace {
void enable_menu(HGENMENU hMenu, bool bEnable)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS;
if (false == bEnable)
clmi.flags |= CMIF_GRAYED;
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 7cb7e674a3..1ef0dfab7a 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -460,7 +460,7 @@ int Create_TopToolbarShowList(WPARAM wParam, LPARAM lParam) int Create_MenuitemShowList(void)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.icolibItem = icon.hIcolib;
mi.pszName = msLastUC_ShowListName;
mi.pszService = msLastUC_ShowList;
@@ -501,7 +501,7 @@ int OnMsgEvent(WPARAM wParam, LPARAM lParam) static int OnPrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR;
if (db_get_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0)
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index 440b36c5c4..dde56c4f29 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -126,10 +126,8 @@ extern "C" int __declspec(dllexport) Load() CreateServiceFunction("RemovePersonalSettings/RemoveAll",RemoveAllService);
memset(&mi, 0, sizeof(mi));
- mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFF;
- mi.flags=0;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.position = -0x7FFFFFFF;
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.pszName = LPGEN("Remove Personal Settings...");
mi.pszService="RemovePersonalSettings/RemoveAll";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp index bf61367c2c..8d7d267b97 100644 --- a/plugins/Restart/src/restart.cpp +++ b/plugins/Restart/src/restart.cpp @@ -46,7 +46,7 @@ extern "C" __declspec(dllexport) int Load(void) hRestartMe = CreateServiceFunction("System/RestartMe", RestartMe);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.icolibItem = icon.hIcolib;
mi.pszName = LPGEN("Restart");
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index 9125b87dc7..0b897825c1 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -28,7 +28,7 @@ int LoadModules(void) char szServiceFunction[MAX_PATH];
mir_snprintf(szServiceFunction,_countof(szServiceFunction),"%s%s",PROTOCOL_NAMEA,SMS_SEND);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 300050000;
mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
mi.ptszName = SMS_SEND_STR;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index fc46292811..017091d033 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -440,14 +440,14 @@ static int MetaContactChanged(WPARAM hMeta, LPARAM) return 0;
}
-static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
+static int OnModulesLoaded(WPARAM, LPARAM)
{
ReloadGlobals();
LoadGlobalIcons();
LoadMsgLogIcons();
- ModuleLoad(0, 0);
+ ModuleLoad(0, 0);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.icolibItem = Skin_GetIconHandle( SKINICON_EVENT_MESSAGE );
@@ -464,7 +464,7 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) HookEvent(ME_MC_DEFAULTTCHANGED, MetaContactChanged);
RestoreUnreadMessageAlerts();
- Chat_ModulesLoaded(wParam, lParam);
+ OptionsInit();
RegisterStatusIcons();
return 0;
}
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index dc6dbbf80b..085870dd16 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -38,7 +38,7 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) static HGENMENU AddMenuItem(LPCSTR name, int pos, HICON hicon, LPCSTR service, int flags = 0, WPARAM wParam = 0)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = flags | CMIF_HIDDEN;
mi.position = pos;
mi.hIcon = hicon;
@@ -50,7 +50,7 @@ static HGENMENU AddMenuItem(LPCSTR name, int pos, HICON hicon, LPCSTR service, i static HGENMENU AddSubItem(HANDLE rootid, LPCSTR name, int pos, int poppos, LPCSTR service, WPARAM wParam = 0)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_CHILDPOPUP | CMIF_HIDDEN;
mi.position = pos;
mi.popupPosition = poppos;
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index 59a5f30230..575f068818 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -70,7 +70,7 @@ int __cdecl onRebuildContactMenu(WPARAM hContact, LPARAM lParam) hContact = db_mc_getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
pUinKey ptr = getUinKey(hContact);
int i;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
ShowStatusIconNotify(hContact);
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 27a7b6746c..a2dc3b077d 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -40,7 +40,7 @@ int BuildContactMenu(WPARAM wparam, LPARAM) MCONTACT hContact = (MCONTACT)wparam;
char *szProto = GetContactProto(hContact);
- CLISTMENUITEM cmi = { sizeof(cmi) };
+ CLISTMENUITEM cmi = { 0 };
if (!IsWatchedProtocol(szProto) || db_get_b(hContact, szProto, "ChatRoom", false) || !db_get_b(NULL, S_MOD, "MenuItem", 1))
cmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
else {
@@ -74,7 +74,7 @@ void InitMenuitem() {
CreateServiceFunction("LastSeenUserDetails", MenuitemClicked);
- CLISTMENUITEM cmi = { sizeof(cmi) };
+ CLISTMENUITEM cmi = { 0 };
cmi.position = -0x7FFFFFFF;
cmi.flags = CMIF_TCHAR;
cmi.ptszName = LPGENT("<none>");
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 3aa8128ab6..e08fb1b63b 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -271,7 +271,7 @@ DLL_EXPORT int Load(void) srv_reg(EditBitmap); srv_reg(Send2ImageShack); /// menu items - CLISTMENUITEM mi={sizeof(mi)}; + CLISTMENUITEM mi = { 0 }; mi.flags=CMIF_ROOTHANDLE|CMIF_TCHAR/*|CMIF_ICONFROMICOLIB*/; mi.hParentMenu=HGENMENU_ROOT; mi.icolibItem=GetIconHandle(ICO_MAINXS); diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 919392bc50..10c2929aec 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -793,7 +793,7 @@ static int PluginInit(WPARAM, LPARAM) Hotkey_Register(&hkd);
// Main menu
- CLISTMENUITEM cl = { sizeof(cl) };
+ CLISTMENUITEM cl = { 0 };
cl.position = 1000000000;
cl.flags = CMIM_ALL;
@@ -820,7 +820,6 @@ static int PluginInit(WPARAM, LPARAM) Menu_AddMainMenuItem(&cl);
memset(&cl, 0, sizeof(cl));
- cl.cbSize = sizeof(cl);
cl.flags = CMIM_ICON;
cl.icolibItem = iconList[4].hIcolib;
Menu_ModifyItem(hmSaveCurrentSession, &cl);
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index f87f1b2c09..b8c2f8bf39 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -62,7 +62,7 @@ INT_PTR ToggleEnable(WPARAM wParam, LPARAM lParam) BOOL fEnabled = !db_get_b(NULL, protocolname, KEY_ENABLED, 1);
db_set_b(NULL, protocolname, KEY_ENABLED, fEnabled);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
mi.ptszName = fEnabled ? LPGENT("Disable Auto&reply") : LPGENT("Enable Auto&reply");
mi.icolibItem = fEnabled ? iconList[0].hIcolib : iconList[1].hIcolib;
@@ -77,7 +77,7 @@ INT_PTR Toggle(WPARAM w, LPARAM l) db_set_b(hContact, protocolname, "TurnedOn", on);
on = !on;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
mi.ptszName = on ? LPGENT("Turn off Autoanswer") : LPGENT("Turn on Autoanswer");
mi.icolibItem = on ? iconList[0].hIcolib : iconList[1].hIcolib;
@@ -89,7 +89,7 @@ INT OnPreBuildContactMenu(WPARAM w, LPARAM l) {
MCONTACT hContact = (MCONTACT)w;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
BOOL on = !db_get_b(hContact, protocolname, "TurnedOn", 0);
mi.ptszName = on ? LPGENT("Turn off Autoanswer") : LPGENT("Turn on Autoanswer");
@@ -138,7 +138,7 @@ INT CheckDefaults(WPARAM, LPARAM) gbVarsServiceExist = TRUE;
BOOL fEnabled = db_get_b(NULL, protocolname, KEY_ENABLED, 1);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
mi.ptszName = fEnabled ? LPGENT("Disable Auto&reply") : LPGENT("Enable Auto&reply");
mi.icolibItem = fEnabled ? iconList[0].hIcolib : iconList[1].hIcolib;
@@ -270,7 +270,7 @@ extern "C" int __declspec(dllexport)Load(void) CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
CreateServiceFunction(protocolname"/ToggleAutoanswer",Toggle);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 500090000;
mi.ptszName = _T("");
mi.pszService = protocolname"/ToggleEnable";
diff --git a/plugins/SimpleAR/src/Options.cpp b/plugins/SimpleAR/src/Options.cpp index 25055aca41..a4b54633e4 100644 --- a/plugins/SimpleAR/src/Options.cpp +++ b/plugins/SimpleAR/src/Options.cpp @@ -92,7 +92,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara BOOL fEnabled = IsDlgButtonChecked(hwndDlg, IDC_ENABLEREPLIER) == 1;
db_set_b(NULL, protocolname, KEY_ENABLED, (BYTE)fEnabled);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
mi.ptszName = fEnabled ? LPGENT("Disable Auto&reply") : LPGENT("Enable Auto&reply");
mi.icolibItem = fEnabled ? iconList[0].hIcolib : iconList[1].hIcolib;
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index d130a8314d..b520f6924e 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -366,8 +366,7 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM lParam) int iHidden = szProto ? db_get_b(hContact, szProto, "ChatRoom", 0) : 0;
int iStatus;
- CLISTMENUITEM clmi = { sizeof(clmi) };
- clmi.cbSize = sizeof(clmi);
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden) {
iHidden = 1;
@@ -424,7 +423,7 @@ int LoadAwayMsgModule(void) hWindowList = WindowList_Create();
hWindowList2 = WindowList_Create();
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index b577217bf0..94e87a8682 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1453,7 +1453,7 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam) if (!iStatusMsgFlags || !iStatusMenuItemCount)
return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
if (!db_get_b(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1))
mi.flags |= CMIF_HIDDEN;
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index 3738dfb9f8..27d071f390 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -50,7 +50,7 @@ static IconItem icon = { LPGEN("Button smiley"), "SmileyAdd_ButtonSmiley", IDI_S static int ModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTPOPUP;
mi.popupPosition = 2000070050;
mi.position = 2000070050;
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 4af2b720d4..4be61bcd09 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -292,7 +292,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) CMString cat;
opt.ReadContactCategory(wParam, cat);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hContactMenuItem;
mi.flags = CMIF_CHILDPOPUP | CMIM_FLAGS | CMIF_TCHAR;
mi.pszService = MS_SMILEYADD_CUSTOMCATMENU;
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 8547c18c1c..17bd44b006 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -292,7 +292,7 @@ static INT_PTR SilenceConnection(WPARAM wParam, LPARAM lParam) static INT_PTR InitMenu()
{
- CLISTMENUITEM mi = {sizeof(mi)};
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ALL;
mi.position = 100000000;
mi.icolibItem = GetIconHandle(MENU_NAME);
@@ -305,7 +305,7 @@ static INT_PTR InitMenu() void UpdateMenu()
{
- CLISTMENUITEM mi = {sizeof(mi)};
+ CLISTMENUITEM mi = { 0 };
mi.pszName = (Enabled == 1 ? DISABLE_SILENCE : ENABLE_SILENCE);
mi.flags = CMIM_NAME | CMIM_ALL;
mi.icolibItem = (Enabled == 1 ? GetIconHandle(DISABLE_SILENCE) : GetIconHandle(ENABLE_SILENCE));
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index d8a5b7df9a..3daa46c40b 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -92,7 +92,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM) char servicename[128]; int i, count; - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.popupPosition = 2000100000; mi.flags = CMIF_TCHAR; mcount = 0; diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp index 96a7d63f51..916d4b9123 100755 --- a/plugins/StopSpamMod/src/init.cpp +++ b/plugins/StopSpamMod/src/init.cpp @@ -148,7 +148,7 @@ extern "C" int __declspec(dllexport) Load() CreateServiceFunction("/RemoveTmp", (MIRANDASERVICE)RemoveTmp);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position=-0x7FFFFFFF;
mi.flags=0;
mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp index 31679de87b..ace2300843 100644 --- a/plugins/StopSpamPlus/src/stopspam.cpp +++ b/plugins/StopSpamPlus/src/stopspam.cpp @@ -48,7 +48,7 @@ extern "C" int __declspec(dllexport) Load(void) // Add deliting temporary contacts
hTempRemove = CreateServiceFunction(MS_STOPSPAM_REMTEMPCONTACTS, RemoveTempContacts);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index 9ffc5e7bc1..a3c8960ba9 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -598,7 +598,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO void DestroyGCMenu(HMENU *hMenu, int iIndex)
{
- MENUITEMINFO mi = { sizeof(mi) };
+ MENUITEMINFO mi = { 0 };
mi.fMask = MIIM_SUBMENU;
while (GetMenuItemInfo(*hMenu, iIndex, TRUE, &mi)) {
if (mi.hSubMenu != NULL)
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 4e6216befb..8707a2f165 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -135,7 +135,7 @@ void CGlobals::reloadSystemModulesChanged() g_bPopupAvail = ServiceExists(MS_POPUP_ADDPOPUPT) != 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
@@ -325,7 +325,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM) if (nen_options.bTraySupport)
::CreateSystrayIcon(TRUE);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -500050005;
mi.hIcon = PluginConfig.g_iconContainer;
mi.pszContactOwner = NULL;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index fe42c570b9..8959c00006 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -46,7 +46,7 @@ static INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM) Disabled = !Disabled;
if (PluginConfig.g_bPopupAvail) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_NAME;
if (!Disabled) {
@@ -545,7 +545,7 @@ int TN_ModuleInit() if (PluginConfig.g_bPopupAvail && ShowMenu) {
hTypingNotify = CreateServiceFunction("TypingNotify/EnableDisableMenuCommand", EnableDisableMenuCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (!Disabled) {
mi.pszName = LPGEN("Disable &typing notification");
mi.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED));
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 5fff652c5f..5f3a0b551f 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -1108,7 +1108,7 @@ INT_PTR MenuCommand_TrafficShowHide(WPARAM wParam,LPARAM lParam) void Traffic_AddMainMenuItem(void)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = 0;
mi.hIcon = NULL;
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp index 4ca983f323..a3cb2e2e1b 100644 --- a/plugins/UserGuide/src/main.cpp +++ b/plugins/UserGuide/src/main.cpp @@ -84,7 +84,7 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP(&pluginInfo);
hShowGuide = CreateServiceFunction("UserGuide/ShowGuide", ShowGuideFile);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 500000;
mi.flags = CMIF_TCHAR;
mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_HELP);
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index 1293c0aa2d..c1b188ea00 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -85,7 +85,7 @@ void RebuildContact() RemoveMenuItems (hMenuItem, _countof(hMenuItem));
// support new genmenu style
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE;
mi.hParentMenu = HGENMENU_ROOT;
@@ -181,7 +181,7 @@ void RebuildMain() RemoveMenuItems (hMenuItem, _countof(hMenuItem));
// support new genmenu style
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE;
mi.hParentMenu = HGENMENU_ROOT;
@@ -322,7 +322,7 @@ void RebuildGroup() char text[200];
mir_strcpy(text, "UserInfo");
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
char* tDest = text + mir_strlen(text);
@@ -419,7 +419,7 @@ void RebuildSubGroup() char text[200];
mir_strcpy(text, "UserInfo");
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
char* tDest = text + mir_strlen(text);
@@ -549,7 +549,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam) char text[ 200 ];
mir_strcpy( text, pcli->menuProtos[i].szProto);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
char* tDest = text + mir_strlen( text );
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index f14670ce3c..1b8ee4a1bc 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -183,7 +183,7 @@ void SvcEMailRebuildMenu() if (!ghMenuItem) {
// insert contact menuitem
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EMAIL);
mi.pszName = "&E-mail";
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp index 93a0ba9b55..9e1b7d10b8 100644 --- a/plugins/UserInfoEx/src/svc_homepage.cpp +++ b/plugins/UserInfoEx/src/svc_homepage.cpp @@ -153,7 +153,7 @@ void SvcHomepageRebuildMenu() if (!ghMenuItem) {
// insert contact menuitem
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
mi.pszName = LPGEN("&Homepage");
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 9d483e7654..be63013024 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -610,7 +610,7 @@ class CContactUpdater : public CContactQueue // reset menu
if (hMenuItemRefresh)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME|CMIM_ICON;
clmi.pszName = LPGEN("Refresh contact details");
clmi.hIcon = IcoLib_GetIcon(ICO_BTN_UPDATE);
@@ -727,7 +727,7 @@ public: // if there are contacts in the queue, change the main menu item to indicate it is meant for canceling.
if (hMenuItemRefresh && Size() > 0)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME|CMIM_ICON;
clmi.pszName = LPGEN("Abort Refreshing Contact Details");
clmi.hIcon = IcoLib_GetIcon(ICO_BTN_CANCEL);
diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc index 709584b066..40f6683522 100644 --- a/plugins/Watrack/i_gui.inc +++ b/plugins/Watrack/i_gui.inc @@ -34,7 +34,6 @@ var mi:TCListMenuItem;
begin
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
mi.hIcon :=IcoLib_GetIcon(IcoBtnEnable,0);
@@ -50,7 +49,6 @@ var p:PAnsiChar;
begin
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_NAME+CMIM_FLAGS+CMIM_ICON+f1;
if f1<>0 then
begin
@@ -88,7 +86,6 @@ var begin
result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
mi.hIcon:=IcoLib_GetIcon(IcoBtnEnable,0);
diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas index 8c552d4b1a..bc7d3bf727 100644 --- a/plugins/Watrack/lastfm/lastfm.pas +++ b/plugins/Watrack/lastfm/lastfm.pas @@ -114,7 +114,6 @@ begin exit
end;
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_FLAGS+flag;
CallService(MS_CLIST_MODIFYMENUITEM,hMenuLast,tlparam(@mi));
end;
@@ -142,7 +141,6 @@ var begin
result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuLast,tlparam(@mi));
@@ -166,7 +164,6 @@ var mi:TCListMenuItem;
begin
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_NAME;
if odd(lfm_on) then
begin
@@ -204,7 +201,6 @@ begin DestroyIcon(sid.hDefaultIcon);
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0);
diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas index 8749d91f2a..d70c7da8a3 100644 --- a/plugins/Watrack/myshows/myshows.pas +++ b/plugins/Watrack/myshows/myshows.pas @@ -143,7 +143,6 @@ begin exit
end;
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_FLAGS+flag;
CallService(MS_CLIST_MODIFYMENUITEM,hMenuMyShows,tlParam(@mi));
end;
@@ -171,7 +170,6 @@ var begin
result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuMyShows,tlParam(@mi));
@@ -199,7 +197,6 @@ var mi:TCListMenuItem;
begin
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_NAME;
if odd(msh_on) then
begin
@@ -237,7 +234,6 @@ begin DestroyIcon(sid.hDefaultIcon);
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0);
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas index 4f896d0224..fe01254a62 100644 --- a/plugins/Watrack/popup/popups.pas +++ b/plugins/Watrack/popup/popups.pas @@ -334,7 +334,6 @@ begin exit
end;
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_FLAGS+flag;
CallService(MS_CLIST_MODIFYMENUITEM,hMenuInfo,tlparam(@mi));
end;
@@ -347,7 +346,6 @@ var begin
result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuInfo,tlparam(@mi));
@@ -484,7 +482,6 @@ begin sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
FillChar(mi,SizeOf(mi),0);
- mi.cbSize :=SizeOf(mi);
mi.szPopupName.a:=PluginShort;
mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0);
mi.szName.a :='Music Info';
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas index 625e4fa031..dffc70e380 100644 --- a/plugins/Watrack/proto/proto.pas +++ b/plugins/Watrack/proto/proto.pas @@ -303,7 +303,6 @@ var mi:TCListMenuItem;
begin
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
if IsMirandaUser(hContact)<=0 then
mi.flags:=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST or CMIM_FLAGS or CMIF_HIDDEN
else
@@ -330,7 +329,6 @@ var begin
result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
mi.hIcon:=IcoLib_GetIcon(IcoBtnContext,0);
@@ -377,7 +375,6 @@ begin RegisterIcons;
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
mi.flags :=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST;
mi.hIcon :=IcoLib_GetIcon(IcoBtnContext,0);
diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas index 886a22057c..461b4c31bf 100644 --- a/plugins/Watrack/stat/statlog.pas +++ b/plugins/Watrack/stat/statlog.pas @@ -544,7 +544,6 @@ begin exit
end;
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_FLAGS+flag;
CallService(MS_CLIST_MODIFYMENUITEM,hMenuReport,tlparam(@mi));
end;
@@ -557,7 +556,6 @@ var begin
result:=0;
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
mi.hIcon :=IcoLib_GetIcon(IcoBtnReport,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuReport,tlparam(@mi));
@@ -599,8 +597,6 @@ begin sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
- mi.flags :=0;
mi.szPopupName.a:=PluginShort;
mi.hIcon :=IcoLib_GetIcon(IcoBtnReport,0);
mi.szName.a :='Create WATrack report';
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index f1cee4e98b..91eac1360a 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -305,7 +305,7 @@ INT_PTR Mwin_MenuClicked(WPARAM wParam,LPARAM lParam) int BuildContactMenu(WPARAM wparam,LPARAM lparam)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS |
(db_get_dw((MCONTACT)wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0);
Menu_ModifyItem(hMwinMenu, &mi);
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index 93629e09cb..689f88976a 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -226,7 +226,7 @@ void UpdateMenu(BOOL State) opt.CAutoUpdate = State;
db_set_b(NULL, WEATHERPROTONAME, "AutoUpdate", (BYTE)State);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (State) { // to enable auto-update
mi.pszName = LPGEN("Auto Update Enabled");
@@ -251,7 +251,7 @@ void UpdatePopupMenu(BOOL State) opt.UsePopup = State;
db_set_b(NULL, WEATHERPROTONAME, "UsePopup", (BYTE)opt.UsePopup);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (State)
{ // to enable popup
mi.pszName = LPGEN("Disable &weather notification");
@@ -285,7 +285,7 @@ INT_PTR MenuitemNotifyCmd(WPARAM wParam,LPARAM lParam) // copied and modified form "modified MSN Protocol"
void AddMenuItems(void)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszContactOwner = WEATHERPROTONAME;
// contact menu
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 936ebef921..1becb0a577 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -169,7 +169,7 @@ extern "C" int __declspec(dllexport) Load() //value is 1 if menu is disabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 1);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
if ( db_get_b(NULL, MODULENAME, MENU_OFF, 0)) {
//value is 0 if menu is enabled
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index c46d9b9c3e..95b5993569 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -50,7 +50,7 @@ void ChangeMenuItem1() /*
* Enable or Disable auto updates
*/
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
@@ -68,7 +68,7 @@ void ChangeMenuItemCountdown() /*
* countdown
*/
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp index 6560ce3bd2..f3b4f8d1d3 100644 --- a/plugins/WhenWasIt/src/WhenWasIt.cpp +++ b/plugins/WhenWasIt/src/WhenWasIt.cpp @@ -80,7 +80,7 @@ extern "C" int __declspec(dllexport) Load(void) hAddBirthdayWndsList = WindowList_Create();
- CLISTMENUITEM cl = { sizeof(cl) };
+ CLISTMENUITEM cl = { 0 };
cl.position = 10000000;
cl.pszPopupName = LPGEN("Birthdays (When Was It)");
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 3e7a5a1d9d..412b1df9a0 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -223,7 +223,7 @@ static INT_PTR WumfMenuCommand(WPARAM,LPARAM) BOOL MajorTo0121 = FALSE;
int iResult = 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (WumfOptions.PopupsEnabled == TRUE) {
WumfOptions.PopupsEnabled = FALSE;
mi.pszName = LPGEN("Enable WUMF popups");
@@ -496,7 +496,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(MS_WUMF_SWITCHPOPUP, WumfMenuCommand);
CreateServiceFunction(MS_WUMF_CONNECTIONSSHOW, WumfShowConnections);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (WumfOptions.PopupsEnabled == FALSE) {
mi.pszName = LPGEN("Enable WUMF popups");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index e33b915fae..d94d9ea4c8 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -176,7 +176,7 @@ static int OnLoadInit(WPARAM, LPARAM) {
mir_getCI(NULL);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index fc5483e118..e4520895a1 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -141,7 +141,7 @@ void CheckMenuItems() int SystemModulesLoaded(WPARAM, LPARAM) { //Insert "Check mail (YAMN)" item to Miranda's menu - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.position = 0xb0000000; mi.icolibItem = g_GetIconHandle(0); mi.pszName = LPGEN("Check &mail (All Account)"); diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 57691eefe9..4132c98e32 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -195,7 +195,7 @@ void UpdateMenu() {
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszName = (isEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups"));
mi.hIcon = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp index 35c7a61640..f5dcbf2ed2 100644 --- a/plugins/YAPP/src/yapp.cpp +++ b/plugins/YAPP/src/yapp.cpp @@ -73,7 +73,7 @@ int ReloadFont(WPARAM wParam, LPARAM lParam) int IconsChanged(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.hIcon = IcoLib_GetIcon(db_get_b(0, "Popup", "ModuleIsEnabled", 1) ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
mi.flags = CMIM_ICON;
@@ -182,7 +182,7 @@ void InitMenuItems(void) {
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE|CMIF_TCHAR;
mi.hParentMenu = HGENMENU_ROOT;
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp index aca9c5de92..24d882f309 100644 --- a/plugins/ZeroNotification/src/main.cpp +++ b/plugins/ZeroNotification/src/main.cpp @@ -95,7 +95,7 @@ static DWORD MakeCheckBoxTreeFlags(HWND hwndTree) //Update the name on the menu
static void UpdateMenuItem()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (db_get_b(NULL, "Skin", "UseSound", 1))
mi.ptszName = DISABLE_SOUND;
else
@@ -240,7 +240,7 @@ extern "C" __declspec(dllexport) int Load(void) if (!db_get_b(NULL, MODNAME, "HideMenu", 1)) {
hSoundMenu = CreateServiceFunction(MODNAME "/MenuCommand", NoSoundMenuCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
UpdateMenuItem();
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc index 3d44553244..3ccdccc045 100644 --- a/plugins/mRadio/i_tray.inc +++ b/plugins/mRadio/i_tray.inc @@ -90,7 +90,6 @@ begin // build menu from sorted list
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
mi.Flags :=CMIF_KEEPUNTRANSLATED or CMIF_UNICODE or CMIF_ROOTHANDLE;
mi.szPopupName:=TChar(trayparent);
pc:=StrCopyE(@buf,'mRadio/Choose');
@@ -138,7 +137,6 @@ var ico:pAnsiChar;
begin
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
mi.flags :=CMIF_UNICODE;
mi.szName.w:=cPluginName;
mi.hIcon :=IcoLib_GetIcon(IcoBtnSettings,0);
@@ -148,7 +146,6 @@ begin trayradioparent:=Menu_AddMainMenuItem(@mi);
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
mi.szPopupName:=TChar(trayradioparent);
if PluginStatus=ID_STATUS_ONLINE then
@@ -241,7 +238,6 @@ var ico:pAnsiChar;
begin
FillChar(mi,sizeof(mi),0);
- mi.cbSize:=sizeof(mi);
mi.flags:=CMIM_NAME or CMIF_UNICODE;
if PluginStatus=ID_STATUS_ONLINE then
diff --git a/plugins/mRadio/i_visual.inc b/plugins/mRadio/i_visual.inc index 68a7479312..915c001aa0 100644 --- a/plugins/mRadio/i_visual.inc +++ b/plugins/mRadio/i_visual.inc @@ -8,7 +8,6 @@ var mi:TCListMenuItem;
begin
FillChar(mi,SizeOf(mi),0);
- mi.cbSize:=sizeof(mi);
if StrCmp(Proto_GetProtoName(hContact),PluginName)<>0 then
begin
mi.flags:=CMIM_FLAGS or CMIF_HIDDEN;
@@ -52,7 +51,6 @@ var mi:TCListMenuItem;
begin
FillChar(mi, sizeof(mi), 0);
- mi.cbSize :=sizeof(mi);
// mi.popupPosition:=MenuUserInfoPos;
mi.pszService:=MS_RADIO_RECORD;
mi.szName.a :='Start/Stop Record';
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 5df30f65a6..5eb4e8d814 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -708,7 +708,7 @@ int __cdecl CAimProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONRENAME:
if (hMenuRoot) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &clmi);
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index ed7bbf2c48..71b3a3b620 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -181,7 +181,7 @@ int CAimProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) DBVARIANT dbv;
if (!getString(hContact, AIM_KEY_SN, &dbv)) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_FLAGS;
switch(pd_mode) {
case 1:
@@ -218,7 +218,7 @@ void CAimProto::InitMainMenus(void) //Do not put any services below HTML get away message!!!
char service_name[200];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
@@ -266,7 +266,7 @@ void CAimProto::InitContactMenus(void) //Do not put any services below HTML get away message!!!
char service_name[200];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = service_name;
mi.pszContactOwner = m_szModuleName;
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 868593fad7..efd24e16dc 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -107,7 +107,7 @@ void InitContactMenus() {
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000006000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszName = LPGEN("Visit profile");
@@ -212,12 +212,12 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) mir_strncpy(text, m_szModuleName, 100);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
- CLISTMENUITEM miRoot = { sizeof(miRoot) };
+ CLISTMENUITEM miRoot = { 0 };
miRoot.popupPosition = 500085000;
miRoot.hParentMenu = HGENMENU_ROOT;
miRoot.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
@@ -293,7 +293,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) void FacebookProto::ToggleStatusMenuItems(BOOL bEnable)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS | ((bEnable) ? 0 : CMIF_GRAYED);
Menu_ModifyItem(m_hMenuRoot, &clmi);
diff --git a/protocols/GTalkExt/src/menu.cpp b/protocols/GTalkExt/src/menu.cpp index 50e88caa18..db59455c4f 100644 --- a/protocols/GTalkExt/src/menu.cpp +++ b/protocols/GTalkExt/src/menu.cpp @@ -44,7 +44,7 @@ int InitMenus(WPARAM wParam, LPARAM lParam) mir_snprintf(szServiceName, _countof(szServiceName), "%s/%s", szModuleName, MS_GTALKEXT_OPENMAILBOX);
CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)szModuleName);
- CLISTMENUITEM cmi = { sizeof(cmi) };
+ CLISTMENUITEM cmi = { 0 };
cmi.flags = CMIF_CHILDPOPUP;
cmi.hParentMenu = HGENMENU(wParam);
cmi.hIcon = g_hPopupIcon;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index b5f5c81243..a70b5a6710 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -212,7 +212,7 @@ static int gg_prebuildcontactmenu(WPARAM hContact, LPARAM lParam) if (gg == NULL)
return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR;
if ( gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) ||
gg->isChatRoom(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
@@ -242,7 +242,7 @@ void GGPROTO::block_init() mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_BLOCKUSER);
CreateProtoService(GGS_BLOCKUSER, &GGPROTO::blockuser);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = -500050000;
mi.icolibItem = iconList[8].hIcolib;
@@ -266,7 +266,7 @@ void GGPROTO::block_uninit() // Menus initialization
void GGPROTO::menus_init()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hGCRoot, hCLRoot, hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 8a98d9428c..ec5cf9c603 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -765,7 +765,7 @@ int GGPROTO::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) case EV_PROTO_ONRENAME:
if (hMenuRoot) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &mi);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index d7a3c77528..9019e9278b 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -59,7 +59,7 @@ void GGPROTO::gc_menus_init(HGENMENU hRoot) if (gc_enabled) {
char service[64];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hRoot;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index f138aeecb1..3fbda53b9d 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -73,7 +73,7 @@ int GGPROTO::img_init() CreateProtoService(GGS_SENDIMAGE, &GGPROTO::img_sendimg);
// Send image contact menu item
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = -2000010000;
mi.icolibItem = iconList[11].hIcolib;
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index d8a4001f43..b82554d567 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -519,7 +519,7 @@ void GGPROTO::import_init(HGENMENU hRoot) mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_IMPORT_SERVER);
CreateProtoService(GGS_IMPORT_SERVER, &GGPROTO::import_server);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hRoot;
mi.position = 2000500001;
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index deff5e16c0..eb1f590f35 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -63,7 +63,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) for (int i=0; i < g_Instances.getCount(); i++) {
gg = g_Instances[i];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
if (gg->m_iStatus > ID_STATUS_OFFLINE) {
++items;
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index c0fabf5a18..2e7339e74d 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -420,7 +420,7 @@ void GGPROTO::sessions_menus_init(HGENMENU hRoot) mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_CONCUR_SESS);
CreateProtoService(GGS_CONCUR_SESS, &GGPROTO::sessions_view);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hRoot;
mi.position = (hMenuRoot) ? 2050000001 : 200003;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index bc4c6ae607..f9e373e44b 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -2298,7 +2298,7 @@ void CIrcProto::OnIrcDisconnected() memcpy(m_nick, m_pNick, sizeof(m_nick));
setTString("Nick", m_pNick);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_GRAYED;
Menu_ModifyItem(hMenuJoin, &mi);
Menu_ModifyItem(hMenuList, &mi);
@@ -2329,7 +2329,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) bPerformDone = true;
nickflag = true;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
Menu_ModifyItem(hMenuJoin, &mi);
Menu_ModifyItem(hMenuList, &mi);
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 59a7924475..378aee6063 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -841,7 +841,7 @@ int __cdecl CIrcProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONRENAME:
if (hMenuRoot) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &mi);
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index eda6f4f40d..d8296b0fec 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -730,7 +730,7 @@ void CConnectPrefsDlg::OnApply() m_proto->m_oldStyleModes = m_oldStyle.GetState();
m_proto->m_useServer = m_useServer.GetState();
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
if (!m_proto->m_useServer)
mi.flags |= CMIF_GRAYED;
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 466e4c35dc..fc4a4ff834 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -26,7 +26,7 @@ void CIrcProto::InitMainMenus(void) char temp[MAXMODULELABELLENGTH];
char *d = temp + mir_snprintf(temp, _countof(temp), m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = temp;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -139,7 +139,7 @@ void InitContactMenus(void) char temp[MAXMODULELABELLENGTH];
char *d = temp + mir_snprintf(temp, _countof(temp), "IRC");
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = temp;
mi.pszName = LPGEN("Channel &settings");
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index 8114a6e72d..7ada6453fc 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -111,7 +111,7 @@ void g_MenuInit(void) char str[MAXMODULELABELLENGTH], *pszDest = str + 3;
mir_strcpy(str, "ICQ");
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = str;
// "Request authorization"
@@ -204,7 +204,7 @@ int CIcqProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], m_bHideXStatusUI ? 0 : bXStatus != 0);
if (bXStatus && !m_bHideXStatusUI) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_ICON;
if (bXStatus > 0 && bXStatus <= XSTATUS_COUNT)
clmi.hIcon = getXStatusIcon(bXStatus, LR_SHARED);
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index d9d87ad116..a82e72e5dd 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -780,7 +780,7 @@ void CIcqProto::setXStatusEx(BYTE bXStatus, BYTE bQuiet) BYTE bOldXStatus = getByte(DBSETTING_XSTATUS_ID, 0);
if (!m_bHideXStatusUI) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
if (bOldXStatus <= XSTATUS_COUNT) {
mi.flags = CMIM_FLAGS;
Menu_ModifyItem(hXStatusItems[bOldXStatus], &mi);
@@ -859,7 +859,7 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus) mir_snprintf(szItem, _countof(szItem), Translate("%s Custom Status"), m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszPopupName = szItem;
mi.popupPosition = 500084000;
mi.position = 2000040000;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 3ba484b46c..0f5f9633db 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -196,7 +196,7 @@ void g_MenuInit(void) //////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
// "Request authorization"
mi.pszName = LPGEN("Request authorization");
@@ -357,7 +357,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) if ( ptrT( getTStringA(hContact, bIsChatRoom?(char*)"ChatRoomID":(char*)"jid")) != NULL) {
Menu_ShowItem(g_hMenuConvert, TRUE);
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.pszName = bIsChatRoom ? (char *)LPGEN("&Convert to Contact") : (char *)LPGEN("&Convert to Chat Room");
clmi.flags = CMIM_NAME | CMIM_FLAGS;
Menu_ModifyItem(g_hMenuConvert, &clmi);
@@ -369,7 +369,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hMenuDirectPresence[0], TRUE);
for (int i=0; i < _countof(PresenceModeArray); i++) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_ICON | CMIM_FLAGS;
clmi.hIcon = (HICON)Skin_LoadProtoIcon(m_szModuleName, PresenceModeArray[i].mode);
Menu_ModifyItem(g_hMenuDirectPresence[i+1], &clmi);
@@ -415,7 +415,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hMenuResourcesRoot, TRUE);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_ICON | CMIM_FLAGS;
mi.icolibItem = m_hProtoIcon;
Menu_ModifyItem(g_hMenuResourcesRoot, &mi);
@@ -455,7 +455,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) }
if (i < item->arResources.getCount()) {
pResourceStatus r(item->arResources[i]);
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_CHILDPOPUP | CMIF_TCHAR;
if (item->resourceMode == RSMODE_MANUAL && item->m_pManualResource == r)
clmi.flags |= CMIF_CHECKED;
@@ -605,7 +605,7 @@ void CJabberProto::MenuInit() strncpy(text, m_szModuleName, sizeof(text)-1);
char* tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hJabberRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -798,7 +798,7 @@ void CJabberProto::UpdatePriorityMenu(short priority) TCHAR szName[128];
mir_sntprintf(szName, TranslateT("Resource priority [%d]"), (int)priority);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIM_NAME | CMIF_KEEPUNTRANSLATED;
mi.ptszName = szName;
Menu_ModifyItem(m_hMenuPriorityRoot, &mi);
@@ -923,7 +923,7 @@ void CJabberProto::EnableMenuItems(BOOL bEnable) void CJabberProto::CheckMenuItems()
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS;
if (!m_menuItemsStatus)
clmi.flags |= CMIF_GRAYED;
@@ -1151,7 +1151,7 @@ CJabberProto* JabberChooseInstance(bool bIsLink) if (g_Instances[i]->m_options.ProcessXMPPLinks)
return g_Instances[i];
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
int nItems = 0, lastItemId = 0;
for (int i = 0; i < g_Instances.getCount(); i++) {
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index e7863ca056..7ade002960 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2090,7 +2090,7 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList(WPARAM, LPARAM, LPARAM iList) void CJabberProto::BuildPrivacyMenu()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 200005;
mi.pszContactOwner = m_szModuleName;
mi.icolibItem = GetIconHandle(IDI_AGENTS);
@@ -2123,7 +2123,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) char srvFce[MAX_PATH + 64], *svcName = srvFce + mir_strlen(m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 2000040000;
mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR;
mi.hParentMenu = m_hPrivacyMenuRoot;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index b314175b67..2d4c9fd1f8 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -1320,7 +1320,7 @@ int __cdecl CJabberProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARA case EV_PROTO_ONRENAME:
if (m_hMenuRoot) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = m_tszUserName;
Menu_ModifyItem(m_hMenuRoot, &clmi);
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 53959c0c83..3ae7a9bcea 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -465,7 +465,7 @@ void CPepGuiService::RebuildMenu() char szService[128];
mir_snprintf(szService, "%s/AdvStatusSet/%s", m_proto->m_szModuleName, m_name);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hJabberRoot;
mi.pszService = szService;
mi.position = 200010;
@@ -494,7 +494,7 @@ void CPepGuiService::UpdateMenuItem(HANDLE hIcolibIcon, TCHAR *text) if (!m_hMenuItem) return;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIM_ICON | CMIM_NAME;
mi.icolibItem = m_hIcolibItem;
mi.ptszName = m_szText ? m_szText : _T("<advanced status slot>");
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 2425c27ccc..981e58fa3d 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1060,7 +1060,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP dat->ppro->mraSetStringExW(NULL, szValueName, szBuff);
dat->ppro->mraSetStringExW(NULL, DBSETTING_XSTATUSNAME, szBuff);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = (CMIM_NAME | CMIF_UNICODE);
mi.ptszName = szBuff;
Menu_ModifyItem(dat->ppro->hXStatusMenuItems[dat->dwXStatus], &mi);
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index 5d2082a1fd..c8f74bae05 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -284,7 +284,7 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM) TCHAR szItem[MAX_PATH + 64];
mir_sntprintf(szItem, _countof(szItem), _T("%s Custom Status"), m_tszUserName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 2000060000;
mi.popupPosition = 500085000;
mi.ptszPopupName = szItem;
@@ -329,7 +329,7 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI strncpy(szServiceFunction, m_szModuleName, sizeof(szServiceFunction));
char *pszServiceFunctionName = szServiceFunction + mir_strlen(m_szModuleName);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hRootMenu, (*fnAddFunc)(CLISTMENUITEM*);
if (bIsMain) {
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index e257a86e54..90874396bc 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -131,7 +131,7 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) int listId = Lists_GetMask(szEmail);
bool noChat = !(listId & LIST_FL) || isMe || isChatRoom(hContact);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME;
mi.pszName = ((listId & LIST_BL) ? LPGEN("&Unblock") : LPGEN("&Block"));
Menu_ModifyItem(hBlockMenuItem, &mi);
@@ -276,7 +276,7 @@ void CMsnProto::MsnInitMainMenu(void) mir_strcpy(servicefunction, m_szModuleName);
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
@@ -344,7 +344,7 @@ void CMsnProto::MsnRemoveMainMenus(void) void CMsnProto::MSN_EnableMenuItems(bool bEnable)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
if (!bEnable)
mi.flags |= CMIF_GRAYED;
@@ -414,7 +414,7 @@ void MSN_InitContactMenu(void) mir_strcpy(servicefunction, "MSN");
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = servicefunction;
mir_strcpy(tDest, MSN_BLOCK);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 298f1e2892..6dcc54d15f 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -1232,7 +1232,7 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONRENAME:
if (mainMenuRoot) {
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_NAME | CMIF_TCHAR;
clmi.ptszName = m_tszUserName;
Menu_ModifyItem(mainMenuRoot, &clmi);
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index 836c94b507..6b2e6818c5 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -438,8 +438,7 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
MCONTACT hContact = (MCONTACT)wParam;
debugLog(_T("CSametimeProto::PrebuildContactMenu() hContact=[%x]"), hContact);
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 1 ? 0 : CMIF_HIDDEN);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hLeaveChatMenuItem, (LPARAM)&mi);
@@ -513,7 +512,7 @@ void CSametimeProto::InitConferenceMenu() char service[128];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.pszContactOwner = m_szModuleName;
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 11076a6284..551ab48a57 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -562,7 +562,7 @@ void CSametimeProto::InitSessionMenu() char service[128];
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.popupPosition = 500085001;
mi.position = 2000060000;
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index d840a8f143..8f5cc22832 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -60,7 +60,7 @@ void CSkypeProto::InitMenus() //hChooserMenu = MO_CreateMenuObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
- CLISTMENUITEM mi = { sizeof(CLISTMENUITEM) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
// Request authorization
@@ -112,7 +112,7 @@ int CSkypeProto::OnInitStatusMenu() mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hStatusMunuRoot = MO_GetProtoRootMenu(m_szModuleName);
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index f59c2284a4..e67c73b3ed 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -100,7 +100,7 @@ void CSteamProto::OnInitStatusMenu() mir_strncpy(text, m_szModuleName, 100);
char* tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hSteamRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -139,7 +139,6 @@ void CSteamProto::InitMenus() //////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(CLISTMENUITEM);
mi.flags = CMIF_TCHAR;
// "Request authorization"
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index 07b14b853e..66e1d9c6ee 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -264,7 +264,7 @@ void TlenProtocol::initMenuItems() strncpy_s(text, sizeof(text), m_szModuleName, _TRUNCATE);
char *pSvcName = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) }, clmi = { sizeof(clmi) };
+ CLISTMENUITEM mi = { 0 }, clmi = { sizeof(clmi) };
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
mi.pszContactOwner = m_szModuleName;
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 96b925d0b2..71233ee979 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -220,7 +220,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) }
}
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS;
Menu_ModifyItem(proto->hMenuMUC, &mi);
if (proto->hMenuChats != NULL)
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 8fd1cb213d..8445565213 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -1160,7 +1160,7 @@ int TlenProtocol::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lPara case EV_PROTO_ONEXIT: return PreShutdown(0, 0);
case EV_PROTO_ONRENAME:
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(hMenuRoot, &mi);
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index 4c3c43769f..6cc8af6278 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -340,7 +340,7 @@ void __cdecl TlenServerThread(ThreadData *info) info->proto->isOnline = FALSE;
info->proto->isConnected = FALSE;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_GRAYED;
Menu_ModifyItem(info->proto->hMenuMUC, &mi);
if (info->proto->hMenuChats != NULL)
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp index db4bd40ef1..62781c3046 100644 --- a/protocols/Tox/src/tox_menus.cpp +++ b/protocols/Tox/src/tox_menus.cpp @@ -41,7 +41,7 @@ void CToxProto::InitMenus() //hChooserMenu = MO_CreateMenuObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
- CLISTMENUITEM mi = { sizeof(CLISTMENUITEM) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
// Request authorization
@@ -80,7 +80,7 @@ int CToxProto::OnInitStatusMenu() mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hStatusMunuRoot = MO_GetProtoRootMenu(m_szModuleName);
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index fd3ba76d75..040ec7d13c 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -260,7 +260,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM) mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
mi.hParentMenu = hRoot;
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 71e6d0316b..2ffdc00f8b 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -86,7 +86,7 @@ void InitContactMenus() {
g_hMenuEvts[0] = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -2000006000;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 61c372f5a9..edde181f3c 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -191,7 +191,7 @@ void CVkProto::InitMenus() CreateProtoService(PS_SETSTATUSMSG, &CVkProto::SvcSetStatusMsg);
CreateProtoService(PS_WALLPOST, &CVkProto::SvcWallPost);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
char szService[100];
// Proto menu
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index 6916acabf6..913d7b5aab 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -51,7 +51,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) mir_strcpy(text, m_szModuleName);
char *tDest = text + mir_strlen(text);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = text;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -84,7 +84,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) void WhatsAppProto::ToggleStatusMenuItems(BOOL bEnable)
{
- CLISTMENUITEM clmi = { sizeof(clmi) };
+ CLISTMENUITEM clmi = { 0 };
clmi.flags = CMIM_FLAGS | ((bEnable) ? 0 : CMIF_GRAYED);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)m_hMenuRoot, (LPARAM)&clmi);
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index f0bbccc50a..02029be589 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -436,7 +436,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) if (dbid < 0)
dbid = pos;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.popupPosition = 500084000;
mi.pszPopupName = Translate("Start game");
mi.pszContactOwner = protocolname;
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 643f97f037..2bf698f078 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -241,7 +241,7 @@ void Xfire_gamelist::clearGamelist() { //erstellt ein dummyeintrag
void Xfire_gamelist::createDummyMenuItem()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 500090001;
mi.pszName = Translate("Please wait...");
mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 6349e85c56..e42b373204 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1114,7 +1114,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateDirectoryA(AvatarsFolder, NULL);
//erweiterte Kontextmenüpunkte
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.ptszPopupName = _T(protocolname);
mi.flags = CMIF_TCHAR;
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 2bafb22610..91d864b54b 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -640,7 +640,7 @@ int __cdecl CYahooProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM case EV_PROTO_ONRENAME:
if (mainMenuRoot) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
Menu_ModifyItem(mainMenuRoot, &mi);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 9d79dd8d07..8f283495a1 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -369,7 +369,7 @@ void CYahooProto::MenuMainInit(void) mir_strcpy(servicefunction, m_szModuleName);
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = servicefunction;
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
@@ -459,7 +459,7 @@ void CYahooProto::MenuContactInit(void) mir_strcpy(servicefunction, m_szModuleName);
char* tDest = servicefunction + mir_strlen(servicefunction);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.pszService = servicefunction;
mi.pszContactOwner = m_szModuleName;
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp index caaed0f169..2415198d4a 100644 --- a/src/core/stdaway/src/awaymsg.cpp +++ b/src/core/stdaway/src/awaymsg.cpp @@ -136,7 +136,7 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM) TCHAR str[128];
char *szProto = GetContactProto(hContact);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_HIDDEN | CMIF_TCHAR;
if (szProto != NULL) {
@@ -173,7 +173,7 @@ int LoadAwayMsgModule(void) hWindowList = WindowList_Create();
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000005000;
mi.flags = CMIF_NOTOFFLINE;
mi.pszName = LPGEN("Re&ad status message");
diff --git a/src/core/stdemail/src/email.cpp b/src/core/stdemail/src/email.cpp index 270e818e1b..52b6e64e5d 100644 --- a/src/core/stdemail/src/email.cpp +++ b/src/core/stdemail/src/email.cpp @@ -66,7 +66,7 @@ static int EMailPreBuildMenu(WPARAM hContact, LPARAM) int LoadSendRecvEMailModule(void)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
mi.pszName = LPGEN("&E-mail");
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 6be3bf587b..1a7ad53931 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -336,7 +336,7 @@ static int SRFileProtoAck(WPARAM, LPARAM lParam) static int SRFileModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000020000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.pszName = LPGEN("&File");
@@ -434,7 +434,7 @@ int LoadSendRecvFileModule(void) {
CreateServiceFunction("FtMgr/Show", FtMgrShowCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.position = 1900000000;
mi.pszName = LPGEN("File &transfers...");
diff --git a/src/core/stdhelp/src/help.cpp b/src/core/stdhelp/src/help.cpp index a6a09e1220..a8c70ad3aa 100644 --- a/src/core/stdhelp/src/help.cpp +++ b/src/core/stdhelp/src/help.cpp @@ -73,7 +73,7 @@ int LoadHelpModule(void) CreateServiceFunction("Help/WebsiteCommand", WebsiteCommand);
CreateServiceFunction("Help/BugCommand", BugCommand);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszPopupName = LPGEN("&Help");
mi.popupPosition = 2000090000;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index b11c854b13..330913a4a5 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -278,7 +278,7 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM) RegisterSRMMFonts();
LoadMsgLogIcons();
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index 12add45b25..8ea9ae4aa2 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -401,7 +401,7 @@ static int PreShutdownHistoryModule(WPARAM, LPARAM) int LoadHistoryModule(void)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1000090000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.pszName = LPGEN("View &history");
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp index bd467f3d49..ad3476c23a 100644 --- a/src/core/stdurl/url.cpp +++ b/src/core/stdurl/url.cpp @@ -119,7 +119,7 @@ static int SRUrlPreBuildMenu(WPARAM wParam, LPARAM) static int SRUrlModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = -2000040000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszName = LPGEN("Web page address (&URL)");
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 872312f824..ed003d3954 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -628,7 +628,7 @@ int LoadUserInfoModule(void) HookEvent(ME_DB_CONTACT_DELETED, UserInfoContactDelete);
HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownUserInfo);
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 1000050000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.pszName = LPGEN("User &details");
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp index 9a2c1991b8..c8abfa46a9 100644 --- a/src/mir_app/src/chat_clist.cpp +++ b/src/mir_app/src/chat_clist.cpp @@ -175,7 +175,7 @@ int PrebuildContactMenu(WPARAM hContact, LPARAM) if (db_get_b(hContact, szProto, "ChatRoom", 0)) {
// still hide it for offline protos
if (CallProtoService(szProto, PS_GETSTATUS, 0, 0) != ID_STATUS_OFFLINE) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME;
if (db_get_w(hContact, szProto, "Status", 0) == ID_STATUS_OFFLINE) {
if (ProtoServiceExists(szProto, PS_JOINCHAT)) {
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index 8aee7e22cc..fb3b35ea17 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -560,7 +560,7 @@ static int ModulesLoaded(WPARAM, LPARAM) HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged); HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu); - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.position = -2000090001; mi.flags = CMIF_DEFAULT; mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN); diff --git a/src/mir_app/src/clistmenus.cpp b/src/mir_app/src/clistmenus.cpp index 069f55920c..f61a541219 100644 --- a/src/mir_app/src/clistmenus.cpp +++ b/src/mir_app/src/clistmenus.cpp @@ -78,14 +78,14 @@ static const int statusModePf2List[MAX_STATUS_COUNT] = static INT_PTR statusHotkeys[MAX_STATUS_COUNT];
-PMO_IntMenuItem* hStatusMainMenuHandles;
+TMO_IntMenuItem **hStatusMainMenuHandles;
int hStatusMainMenuHandlesCnt;
typedef struct
{
int protoindex;
int protostatus[MAX_STATUS_COUNT];
- PMO_IntMenuItem menuhandle[MAX_STATUS_COUNT];
+ TMO_IntMenuItem *menuhandle[MAX_STATUS_COUNT];
}
tStatusMenuHandles, *lpStatusMenuHandles;
@@ -205,7 +205,7 @@ static INT_PTR AddMainMenuItem(WPARAM, LPARAM lParam) mmep->szMenuName = tmi.name.t;
tmi.ownerdata = mmep;
- PMO_IntMenuItem pimi = MO_AddNewMenuItem(hMainMenuObject, &tmi);
+ TMO_IntMenuItem *pimi = MO_AddNewMenuItem(hMainMenuObject, &tmi);
char* name;
bool needFree = false;
@@ -280,7 +280,7 @@ static INT_PTR AddContactMenuItem(WPARAM, LPARAM lParam) tmi.ownerdata = cmep;
//may be need to change how UniqueName is formed?
- PMO_IntMenuItem menuHandle = MO_AddNewMenuItem(hContactMenuObject, &tmi);
+ TMO_IntMenuItem *menuHandle = MO_AddNewMenuItem(hContactMenuObject, &tmi);
char buf[256];
if (mi->pszService)
mir_snprintf(buf, "%s/%s", (mi->pszContactOwner) ? mi->pszContactOwner : "", (mi->pszService) ? mi->pszService : "");
@@ -374,7 +374,7 @@ INT_PTR FreeOwnerDataContactMenu(WPARAM, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// STATUS MENU
-BOOL FindMenuHandleByGlobalID(HMENU hMenu, PMO_IntMenuItem id, MenuItemData* itdat)
+BOOL FindMenuHandleByGlobalID(HMENU hMenu, TMO_IntMenuItem *id, MenuItemData* itdat)
{
if (!itdat)
return FALSE;
@@ -392,7 +392,7 @@ BOOL FindMenuHandleByGlobalID(HMENU hMenu, PMO_IntMenuItem id, MenuItemData* itd if (inSub)
return inSub;
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)mii.dwItemData);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)mii.dwItemData);
if (pimi != NULL) {
if (pimi == id) {
itdat->OwnerMenu = hMenu;
@@ -411,7 +411,7 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) if (!pcpp)
return TRUE;
- PMO_IntMenuItem timi = MO_GetIntMenuItem(pcpp->MenuItemHandle);
+ TMO_IntMenuItem *timi = MO_GetIntMenuItem(pcpp->MenuItemHandle);
if (!timi)
return TRUE;
@@ -437,9 +437,9 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) timi->mi.flags &= ~CMIF_CHECKED;
if (reset || check) {
- PMO_IntMenuItem timiParent = MO_GetIntMenuItem(timi->mi.root);
+ TMO_IntMenuItem *timiParent = MO_GetIntMenuItem(timi->mi.root);
if (timiParent) {
- CLISTMENUITEM mi2 = { sizeof(mi2) };
+ CLISTMENUITEM mi2 = { 0 };
mi2.flags = CMIM_NAME | CMIF_TCHAR;
mi2.ptszName = TranslateTH(timi->mi.hLangpack, timi->mi.hIcon ? timi->mi.name.t : LPGENT("Custom status"));
@@ -546,11 +546,11 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) CallProtoServiceInt(NULL, smep->proto, PS_GETNAME, (WPARAM)_countof(szHumanName), (LPARAM)szHumanName);
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)smep->protoindex);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)smep->protoindex);
if (pimi == NULL)
return 0;
- PMO_IntMenuItem root = (PMO_IntMenuItem)pimi->mi.root;
+ TMO_IntMenuItem *root = (TMO_IntMenuItem*)pimi->mi.root;
TCHAR buf[256], *ptszName;
if (bIsLocked) {
pimi->mi.flags |= CMIF_CHECKED;
@@ -617,7 +617,7 @@ INT_PTR FreeOwnerDataStatusMenu(WPARAM, LPARAM lParam) static INT_PTR ShowHideMenuItem(WPARAM wParam, LPARAM lParam)
{
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)wParam);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)wParam);
if (pimi == NULL)
return 1;
@@ -628,7 +628,7 @@ static INT_PTR ShowHideMenuItem(WPARAM wParam, LPARAM lParam) else
tmi.flags |= CMIF_HIDDEN;
- return MO_ModifyMenuItem((PMO_IntMenuItem)wParam, &tmi);
+ return MO_ModifyMenuItem((TMO_IntMenuItem*)wParam, &tmi);
}
//wparam MenuItemHandle
@@ -639,7 +639,7 @@ static INT_PTR ModifyCustomMenuItem(WPARAM wParam, LPARAM lParam) if (!cli.pfnConvertMenu(mi, &tmi))
return 0;
- return MO_ModifyMenuItem((PMO_IntMenuItem)wParam, &tmi);
+ return MO_ModifyMenuItem((TMO_IntMenuItem*)wParam, &tmi);
}
INT_PTR MenuProcessCommand(WPARAM wParam, LPARAM lParam)
@@ -666,7 +666,7 @@ INT_PTR MenuProcessCommand(WPARAM wParam, LPARAM lParam) return MO_ProcessCommandByMenuIdent(LOWORD(wParam), lParam);
}
-BOOL FindMenuHanleByGlobalID(HMENU hMenu, PMO_IntMenuItem id, MenuItemData* itdat)
+BOOL FindMenuHanleByGlobalID(HMENU hMenu, TMO_IntMenuItem *id, MenuItemData* itdat)
{
if (!itdat)
return FALSE;
@@ -685,7 +685,7 @@ BOOL FindMenuHanleByGlobalID(HMENU hMenu, PMO_IntMenuItem id, MenuItemData* itda if (inSub)
return inSub;
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)mii.dwItemData);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)mii.dwItemData);
if (pimi != NULL) {
if (pimi == id) {
itdat->OwnerMenu = hMenu;
@@ -827,7 +827,7 @@ void RebuildMenuOrder(void) hStatusMenuObject = MO_CreateMenuObject("StatusMenu", LPGEN("Status menu"), "StatusMenuCheckService", "StatusMenuExecService");
MO_SetOptionsMenuObject(hStatusMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, (INT_PTR)"CLISTMENUS/FreeOwnerDataStatusMenu");
- hStatusMainMenuHandles = (PMO_IntMenuItem*)mir_calloc(_countof(statusModeList) * sizeof(PMO_IntMenuItem));
+ hStatusMainMenuHandles = (TMO_IntMenuItem**)mir_calloc(_countof(statusModeList) * sizeof(TMO_IntMenuItem*));
hStatusMainMenuHandlesCnt = _countof(statusModeList);
hStatusMenuHandles = (tStatusMenuHandles*)mir_calloc(sizeof(tStatusMenuHandles)*accounts.getCount());
@@ -866,7 +866,7 @@ void RebuildMenuOrder(void) smep->proto = mir_strdup(pa->szModuleName);
tmi.ownerdata = smep;
- PMO_IntMenuItem rootmenu = MO_AddNewMenuItem(hStatusMenuObject, &tmi);
+ TMO_IntMenuItem *rootmenu = MO_AddNewMenuItem(hStatusMenuObject, &tmi);
memset(&tmi, 0, sizeof(tmi));
tmi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE | CMIF_KEEPUNTRANSLATED;
@@ -888,7 +888,7 @@ void RebuildMenuOrder(void) }
else tmi.name.t = pa->tszAccountName;
- PMO_IntMenuItem menuHandle = MO_AddNewMenuItem(hStatusMenuObject, &tmi);
+ TMO_IntMenuItem *menuHandle = MO_AddNewMenuItem(hStatusMenuObject, &tmi);
((StatusMenuExecParam*)tmi.ownerdata)->protoindex = (int)menuHandle;
MO_ModifyMenuItem(menuHandle, &tmi);
@@ -1099,9 +1099,6 @@ int fnConvertMenu(CLISTMENUITEM *mi, TMO_MenuItem *pmi) if (mi == NULL || pmi == NULL)
return FALSE;
- if (mi->cbSize != sizeof(CLISTMENUITEM))
- return FALSE;
-
memset(pmi, 0, sizeof(TMO_MenuItem));
pmi->root = mi->hParentMenu;
pmi->flags = mi->flags;
@@ -1145,7 +1142,7 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam, LPARAM lParam) return 0;
// for new style menus the pszPopupName contains the root menu handle
- PMO_IntMenuItem pRoot = NULL;
+ TMO_IntMenuItem *pRoot = NULL;
if (mi->flags & CMIF_ROOTHANDLE)
pRoot = MO_GetIntMenuItem(mi->hParentMenu);
@@ -1195,7 +1192,7 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam, LPARAM lParam) tmi.ownerdata = smep;
}
- PMO_IntMenuItem menuHandle = MO_AddNewMenuItem(hStatusMenuObject, &tmi);
+ TMO_IntMenuItem *menuHandle = MO_AddNewMenuItem(hStatusMenuObject, &tmi);
if (smep)
smep->hMenuItem = menuHandle;
@@ -1314,7 +1311,7 @@ void InitCustomMenus(void) // add exit command to menu
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 0x7fffffff;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp index 556b4dc30d..68c98c2a11 100644 --- a/src/mir_app/src/clisttray.cpp +++ b/src/mir_app/src/clisttray.cpp @@ -723,7 +723,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam) HMENU hMenu = GetSubMenu(hMainMenu, 0);
TranslateMenu(hMenu);
- MENUITEMINFO mi = { sizeof(mi) };
+ MENUITEMINFO mi = { 0 };
mi.fMask = MIIM_SUBMENU | MIIM_TYPE;
mi.fType = MFT_STRING;
mi.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index fc8381b0e0..141ed13b8c 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -325,7 +325,7 @@ 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 = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
CreateServiceFunction("CList/DeleteContactCommand", MenuItem_DeleteContact);
mi.position = 2000070000;
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index 5186f627c7..ea9efe510c 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -1028,7 +1028,7 @@ int LoadFindAddModule(void) HookEvent(ME_PROTO_ACCLISTCHANGED, OnSystemModulesLoaded); HookEvent(ME_SYSTEM_PRESHUTDOWN, FindAddPreShutdown); - CLISTMENUITEM mi = { sizeof(mi) }; + CLISTMENUITEM mi = { 0 }; mi.position = 500020000; mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER); mi.pszName = LPGEN("&Find/add contacts..."); diff --git a/src/mir_app/src/genmenu.cpp b/src/mir_app/src/genmenu.cpp index ac481b7407..2c226f4aca 100644 --- a/src/mir_app/src/genmenu.cpp +++ b/src/mir_app/src/genmenu.cpp @@ -38,10 +38,10 @@ static void DumpMenuItem(TMO_IntMenuItem* pParent, int level = 0) memset(temp, '\t', level);
temp[ level ] = 0;
- for (PMO_IntMenuItem pimi = pParent; pimi != NULL; pimi = pimi->next) {
+ for (TMO_IntMenuItem *pimi = pParent; pimi != NULL; pimi = pimi->next) {
Netlib_Logf(NULL, "%sMenu item %08p [%08p]: %S", temp, pimi, pimi->mi.root, pimi->mi.name.t);
- PMO_IntMenuItem submenu = pimi->submenu.first;
+ TMO_IntMenuItem *submenu = pimi->submenu.first;
if (submenu)
DumpMenuItem(submenu, level+1);
}
@@ -76,7 +76,7 @@ int GetMenuObjbyId(const int id) return -1;
}
-LPTSTR GetMenuItemText(PMO_IntMenuItem pimi)
+LPTSTR GetMenuItemText(TMO_IntMenuItem *pimi)
{
if (pimi->mi.flags & CMIF_KEEPUNTRANSLATED)
return pimi->mi.name.t;
@@ -86,20 +86,20 @@ LPTSTR GetMenuItemText(PMO_IntMenuItem pimi) ///////////////////////////////////////////////////////////////////////////////
-PMO_IntMenuItem MO_RecursiveWalkMenu(PMO_IntMenuItem parent, pfnWalkFunc func, void* param)
+TMO_IntMenuItem *MO_RecursiveWalkMenu(TMO_IntMenuItem *parent, pfnWalkFunc func, void* param)
{
if (parent == NULL)
return FALSE;
- PMO_IntMenuItem pnext;
- for (PMO_IntMenuItem pimi = parent; pimi != NULL; pimi = pnext) {
- PMO_IntMenuItem submenu = pimi->submenu.first;
+ TMO_IntMenuItem *pnext;
+ for (TMO_IntMenuItem *pimi = parent; pimi != NULL; pimi = pnext) {
+ TMO_IntMenuItem *submenu = pimi->submenu.first;
pnext = pimi->next;
if (func(pimi, param)) // it can destroy the menu item
return pimi;
if (submenu) {
- PMO_IntMenuItem res = MO_RecursiveWalkMenu(submenu, func, param);
+ TMO_IntMenuItem *res = MO_RecursiveWalkMenu(submenu, func, param);
if (res)
return res;
}
@@ -124,7 +124,7 @@ int MO_MeasureMenuItem(LPMEASUREITEMSTRUCT mis) mis->itemWidth = 0;
mis->itemHeight = 0;
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)mis->itemData);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)mis->itemData);
if (pimi == NULL)
return FALSE;
@@ -150,7 +150,7 @@ int MO_DrawMenuItem(LPDRAWITEMSTRUCT dis) mir_cslock lck(csMenuHook);
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)dis->itemData);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)dis->itemData);
if (pimi == NULL || pimi->iconId == -1)
return FALSE;
@@ -224,7 +224,7 @@ INT_PTR MO_ProcessHotKeys(HANDLE menuHandle, INT_PTR vKey) if (objidx == -1)
return FALSE;
- for (PMO_IntMenuItem pimi = g_menus[objidx]->m_items.first; pimi != NULL; pimi = pimi->next) {
+ for (TMO_IntMenuItem *pimi = g_menus[objidx]->m_items.first; pimi != NULL; pimi = pimi->next) {
if (pimi->mi.hotKey == 0) continue;
if (HIWORD(pimi->mi.hotKey) != vKey) continue;
if (!(LOWORD(pimi->mi.hotKey) & MOD_ALT) != !(GetKeyState(VK_MENU) & 0x8000)) continue;
@@ -254,7 +254,7 @@ INT_PTR MO_GetProtoRootMenu(WPARAM wParam, LPARAM) mir_cslock lck(csMenuHook);
TIntMenuObject* pmo = g_menus[objidx];
- for (PMO_IntMenuItem p = pmo->m_items.first; p != NULL; p = p->next)
+ for (TMO_IntMenuItem *p = pmo->m_items.first; p != NULL; p = p->next)
if (!mir_strcmp(p->UniqName, szProto))
return (INT_PTR)p;
@@ -270,7 +270,7 @@ INT_PTR MO_GetMenuItem(WPARAM wParam, LPARAM lParam) if (!bIsGenMenuInited || mi == NULL)
return -1;
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)wParam);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)wParam);
mir_cslock lck(csMenuHook);
if (pimi == NULL)
return -1;
@@ -279,7 +279,7 @@ INT_PTR MO_GetMenuItem(WPARAM wParam, LPARAM lParam) return 0;
}
-static int FindDefaultItem(PMO_IntMenuItem pimi, void*)
+static int FindDefaultItem(TMO_IntMenuItem *pimi, void*)
{
if (pimi->mi.flags & (CMIF_GRAYED | CMIF_HIDDEN))
return FALSE;
@@ -292,7 +292,7 @@ INT_PTR MO_GetDefaultMenuItem(WPARAM wParam, LPARAM) if (!bIsGenMenuInited)
return -1;
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)wParam);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)wParam);
mir_cslock lck(csMenuHook);
return (pimi) ? (INT_PTR)MO_RecursiveWalkMenu(pimi, FindDefaultItem, NULL) : NULL;
}
@@ -301,7 +301,7 @@ INT_PTR MO_GetDefaultMenuItem(WPARAM wParam, LPARAM) // wparam MenuItemHandle
// lparam PMO_MenuItem
-int MO_ModifyMenuItem(PMO_IntMenuItem menuHandle, TMO_MenuItem *pmi)
+int MO_ModifyMenuItem(TMO_IntMenuItem *menuHandle, TMO_MenuItem *pmi)
{
int oldflags;
@@ -310,7 +310,7 @@ int MO_ModifyMenuItem(PMO_IntMenuItem menuHandle, TMO_MenuItem *pmi) mir_cslock lck(csMenuHook);
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)menuHandle);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)menuHandle);
if (pimi == NULL)
return -1;
@@ -369,13 +369,13 @@ INT_PTR MO_MenuItemGetOwnerData(WPARAM wParam, LPARAM) return -1;
mir_cslock lck(csMenuHook);
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)wParam);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)wParam);
return (pimi) ? (INT_PTR)pimi->mi.ownerdata : -1;
}
-PMO_IntMenuItem MO_GetIntMenuItem(HGENMENU wParam)
+TMO_IntMenuItem *MO_GetIntMenuItem(HGENMENU wParam)
{
- PMO_IntMenuItem result = (PMO_IntMenuItem)wParam;
+ TMO_IntMenuItem *result = (TMO_IntMenuItem*)wParam;
if (result == NULL || wParam == (HGENMENU)0xffff1234 || wParam == HGENMENU_ROOT)
return NULL;
@@ -394,7 +394,7 @@ PMO_IntMenuItem MO_GetIntMenuItem(HGENMENU wParam) /////////////////////////////////////////////////////////////////////////////////////////
// LOWORD(wparam) menuident
-static int FindMenuByCommand(PMO_IntMenuItem pimi, void* pCommand)
+static int FindMenuByCommand(TMO_IntMenuItem *pimi, void* pCommand)
{
return (pimi->iCommand == (int)pCommand);
}
@@ -404,7 +404,7 @@ int MO_ProcessCommandBySubMenuIdent(int menuID, int command, LPARAM lParam) if (!bIsGenMenuInited)
return -1;
- PMO_IntMenuItem pimi;
+ TMO_IntMenuItem *pimi;
{
mir_cslock lck(csMenuHook);
int objidx = GetMenuObjbyId(menuID);
@@ -422,7 +422,7 @@ INT_PTR MO_ProcessCommandByMenuIdent(WPARAM wParam, LPARAM lParam) if (!bIsGenMenuInited)
return -1;
- PMO_IntMenuItem pimi = NULL;
+ TMO_IntMenuItem *pimi = NULL;
{
mir_cslock lck(csMenuHook);
for (int i = 0; i < g_menus.getCount(); i++)
@@ -433,12 +433,12 @@ INT_PTR MO_ProcessCommandByMenuIdent(WPARAM wParam, LPARAM lParam) return (pimi) ? MO_ProcessCommand(pimi, lParam) : FALSE;
}
-int MO_ProcessCommand(PMO_IntMenuItem aHandle, LPARAM lParam)
+int MO_ProcessCommand(TMO_IntMenuItem *aHandle, LPARAM lParam)
{
if (!bIsGenMenuInited)
return -1;
- PMO_IntMenuItem pimi;
+ TMO_IntMenuItem *pimi;
{
mir_cslock lck(csMenuHook);
if ((pimi = MO_GetIntMenuItem(aHandle)) == NULL)
@@ -451,13 +451,13 @@ int MO_ProcessCommand(PMO_IntMenuItem aHandle, LPARAM lParam) return 1;
}
-int MO_SetOptionsMenuItem(PMO_IntMenuItem aHandle, int setting, INT_PTR value)
+int MO_SetOptionsMenuItem(TMO_IntMenuItem *aHandle, int setting, INT_PTR value)
{
if (!bIsGenMenuInited)
return -1;
mir_cslock lck(csMenuHook);
- PMO_IntMenuItem pimi = MO_GetIntMenuItem(aHandle);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem(aHandle);
if (pimi == NULL)
return -1;
@@ -548,7 +548,7 @@ static int FindParent(TMO_IntMenuItem* pimi, void* p) INT_PTR MO_RemoveMenuItem(WPARAM wParam, LPARAM)
{
mir_cslock lck(csMenuHook);
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)wParam);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)wParam);
if (pimi == NULL)
return -1;
@@ -557,7 +557,7 @@ INT_PTR MO_RemoveMenuItem(WPARAM wParam, LPARAM) pimi->submenu.first = NULL;
}
- PMO_IntMenuItem prev = MO_RecursiveWalkMenu(pimi->owner->first, FindParent, pimi);
+ TMO_IntMenuItem *prev = MO_RecursiveWalkMenu(pimi->owner->first, FindParent, pimi);
if (prev)
prev->next = pimi->next;
if (pimi->owner->first == pimi)
@@ -583,7 +583,7 @@ struct KillMenuItemsParam LIST<TMO_IntMenuItem> arItems;
};
-int KillMenuItems(PMO_IntMenuItem pimi, KillMenuItemsParam* param)
+int KillMenuItems(TMO_IntMenuItem *pimi, KillMenuItemsParam* param)
{
if (pimi->hLangpack == param->hLangpack)
param->arItems.insert(pimi);
@@ -608,7 +608,7 @@ MIR_APP_DLL(void) KillModuleMenus(int hLangpack) ///////////////////////////////////////////////////////////////////////////////
// we presume that this function is being called inside csMenuHook only
-static int PackMenuItems(PMO_IntMenuItem pimi, void*)
+static int PackMenuItems(TMO_IntMenuItem *pimi, void*)
{
pimi->iCommand = NextObjectMenuItemId++;
return FALSE;
@@ -631,7 +631,7 @@ static int GetNextObjectMenuItemId() // lparam = PMO_MenuItem
// return MenuItemHandle
-PMO_IntMenuItem MO_AddNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi)
+TMO_IntMenuItem *MO_AddNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi)
{
if (!bIsGenMenuInited || pmi == NULL)
return NULL;
@@ -676,7 +676,7 @@ PMO_IntMenuItem MO_AddNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi) if (p->mi.root == HGENMENU_ROOT)
p->mi.root = NULL;
- PMO_IntMenuItem pRoot = (p->mi.root != NULL) ? MO_GetIntMenuItem(p->mi.root) : NULL;
+ TMO_IntMenuItem *pRoot = (p->mi.root != NULL) ? MO_GetIntMenuItem(p->mi.root) : NULL;
if (pRoot)
p->owner = &pRoot->submenu;
else
@@ -694,7 +694,7 @@ PMO_IntMenuItem MO_AddNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi) // wparam = MenuObjectHandle
// lparam = PMO_MenuItem
-int FindRoot(PMO_IntMenuItem pimi, void* param)
+int FindRoot(TMO_IntMenuItem *pimi, void* param)
{
if (pimi->mi.name.t != NULL)
if (pimi->submenu.first && !mir_tstrcmp(pimi->mi.name.t, (TCHAR*)param))
@@ -703,7 +703,7 @@ int FindRoot(PMO_IntMenuItem pimi, void* param) return FALSE;
}
-PMO_IntMenuItem MO_AddOldNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi)
+TMO_IntMenuItem *MO_AddOldNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi)
{
if (!bIsGenMenuInited || pmi == NULL)
return NULL;
@@ -727,7 +727,7 @@ PMO_IntMenuItem MO_AddOldNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi) else
tszRoot = mir_a2t((char*)pmi->root);
- PMO_IntMenuItem oldroot = MO_RecursiveWalkMenu(g_menus[objidx]->m_items.first, FindRoot, tszRoot);
+ TMO_IntMenuItem *oldroot = MO_RecursiveWalkMenu(g_menus[objidx]->m_items.first, FindRoot, tszRoot);
mir_free(tszRoot);
if (oldroot == NULL) {
@@ -757,7 +757,7 @@ static int WhereToPlace(HMENU hMenu, TMO_MenuItem *mi) for (int i = GetMenuItemCount(hMenu) - 1; i >= 0; i--) {
GetMenuItemInfo(hMenu, i, TRUE, &mii);
if (mii.fType != MFT_SEPARATOR) {
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)mii.dwItemData);
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)mii.dwItemData);
if (pimi != NULL)
if (pimi->mi.position <= mi->position)
return i + 1;
@@ -777,7 +777,7 @@ static DWORD GetMenuItemType(HMENU hMenu, int uItem) return mii.fType;
}
-static UINT GetMenuItemTypeData(HMENU hMenu, int uItem, PMO_IntMenuItem& p)
+static UINT GetMenuItemTypeData(HMENU hMenu, int uItem, TMO_IntMenuItem* &p)
{
MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_DATA | MIIM_TYPE;
@@ -796,7 +796,7 @@ static void InsertSeparator(HMENU hMenu, int uItem) static void InsertMenuItemWithSeparators(HMENU hMenu, int uItem, MENUITEMINFO *lpmii)
{
- PMO_IntMenuItem pimi = MO_GetIntMenuItem((HGENMENU)lpmii->dwItemData), p;
+ TMO_IntMenuItem *pimi = MO_GetIntMenuItem((HGENMENU)lpmii->dwItemData), *p;
if (pimi == NULL)
return;
@@ -866,7 +866,7 @@ INT_PTR MO_BuildMenu(WPARAM wParam, LPARAM lParam) #define PUTPOSITIONSONMENU
#endif
-void GetMenuItemName(PMO_IntMenuItem pMenuItem, char* pszDest, size_t cbDestSize)
+void GetMenuItemName(TMO_IntMenuItem *pMenuItem, char* pszDest, size_t cbDestSize)
{
if (pMenuItem->UniqName)
mir_snprintf(pszDest, cbDestSize, "{%s}", pMenuItem->UniqName);
@@ -876,7 +876,7 @@ void GetMenuItemName(PMO_IntMenuItem pMenuItem, char* pszDest, size_t cbDestSize mir_snprintf(pszDest, cbDestSize, "{%s}", pMenuItem->mi.name.t);
}
-HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *param)
+HMENU BuildRecursiveMenu(HMENU hMenu, TMO_IntMenuItem *pRootMenu, ListParam *param)
{
if (param == NULL || pRootMenu == NULL)
return NULL;
@@ -890,7 +890,7 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para while (rootlevel == 0 && GetMenuItemCount(hMenu) > 0)
DeleteMenu(hMenu, 0, MF_BYPOSITION);
- for (PMO_IntMenuItem pmi = pRootMenu; pmi != NULL; pmi = pmi->next) {
+ for (TMO_IntMenuItem *pmi = pRootMenu; pmi != NULL; pmi = pmi->next) {
TMO_MenuItem *mi = &pmi->mi;
if (mi->flags & CMIF_HIDDEN)
continue;
@@ -1014,7 +1014,7 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para /////////////////////////////////////////////////////////////////////////////////////////
// iconlib in menu
-static int MO_ReloadIcon(PMO_IntMenuItem pmi, void*)
+static int MO_ReloadIcon(TMO_IntMenuItem *pmi, void*)
{
if (pmi->hIcolibItem) {
HICON newIcon = IcoLib_GetIconByHandle(pmi->hIcolibItem, false);
@@ -1042,7 +1042,7 @@ int OnIconLibChanges(WPARAM, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
-static int MO_RegisterIcon(PMO_IntMenuItem pmi, void*)
+static int MO_RegisterIcon(TMO_IntMenuItem *pmi, void*)
{
TCHAR *uname = (pmi->UniqName) ? mir_a2t(pmi->UniqName) : mir_tstrdup(pmi->CustomName),
*descr = GetMenuItemText(pmi);
@@ -1111,7 +1111,7 @@ int TryProcessDoubleClick(MCONTACT hContact) if (iMenuID != -1) {
NotifyEventHooks(hPreBuildContactMenuEvent, hContact, 0);
- PMO_IntMenuItem pimi = (PMO_IntMenuItem)MO_GetDefaultMenuItem((WPARAM)g_menus[iMenuID]->m_items.first, 0);
+ TMO_IntMenuItem *pimi = (TMO_IntMenuItem*)MO_GetDefaultMenuItem((WPARAM)g_menus[iMenuID]->m_items.first, 0);
if (pimi != NULL) {
MO_ProcessCommand(pimi, hContact);
return 0;
@@ -1154,7 +1154,7 @@ static INT_PTR SRVMO_SetOptionsMenuItem(WPARAM, LPARAM lParam) if (lpop == NULL)
return 0;
- return MO_SetOptionsMenuItem((PMO_IntMenuItem)lpop->Handle, lpop->Setting, lpop->Value);
+ return MO_SetOptionsMenuItem((TMO_IntMenuItem*)lpop->Handle, lpop->Setting, lpop->Value);
}
int InitGenMenu()
diff --git a/src/mir_app/src/genmenu.h b/src/mir_app/src/genmenu.h index 1c129f2197..acd498384f 100644 --- a/src/mir_app/src/genmenu.h +++ b/src/mir_app/src/genmenu.h @@ -31,14 +31,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MENUITEM_SIGNATURE 0xDEADBEEF
-typedef struct
+struct TIntMenuObject;
+struct TMO_IntMenuItem;
+
+struct TMO_LinkedList
{
- struct _tagIntMenuItem *first, // first element of submenu, or NULL
- *last; // last element of submenu, or NULL
-}
- TMO_LinkedList;
+ TMO_IntMenuItem
+ *first, // first element of submenu, or NULL
+ *last; // last element of submenu, or NULL
+};
-typedef struct _tagIntMenuItem
+struct TMO_IntMenuItem
{
DWORD signature;
int iCommand;
@@ -52,12 +55,11 @@ typedef struct _tagIntMenuItem int originalPosition;
int hLangpack;
- struct _tagIntMenuItem *next; // next item in list
- struct TIntMenuObject *parent;
- TMO_LinkedList *owner;
- TMO_LinkedList submenu;
-}
- TMO_IntMenuItem, *PMO_IntMenuItem;
+ TMO_IntMenuItem *next; // next item in list
+ TIntMenuObject *parent;
+ TMO_LinkedList *owner;
+ TMO_LinkedList submenu;
+};
struct TIntMenuObject : public MZeroedObject
{
@@ -99,41 +101,41 @@ extern LIST<TIntMenuObject> g_menus; #define SEPARATORPOSITIONINTERVAL 100000
//internal usage
-HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem, ListParam *param);
-void GetMenuItemName(PMO_IntMenuItem pMenuItem, char* pszDest, size_t cbDestSize);
+HMENU BuildRecursiveMenu(HMENU hMenu, TMO_IntMenuItem*, ListParam *param);
+void GetMenuItemName(TMO_IntMenuItem *pMenuItem, char* pszDest, size_t cbDestSize);
-PMO_IntMenuItem MO_GetIntMenuItem(HGENMENU);
+TMO_IntMenuItem* MO_GetIntMenuItem(HGENMENU);
-PMO_IntMenuItem MO_AddNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi);
-PMO_IntMenuItem MO_AddOldNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi);
+TMO_IntMenuItem* MO_AddNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi);
+TMO_IntMenuItem* MO_AddOldNewMenuItem(HANDLE menuobjecthandle, TMO_MenuItem *pmi);
int MO_DrawMenuItem(LPDRAWITEMSTRUCT dis);
int MO_MeasureMenuItem(LPMEASUREITEMSTRUCT mis);
-int MO_ModifyMenuItem(PMO_IntMenuItem menuHandle, TMO_MenuItem *pmiparam);
-int MO_ProcessCommand(PMO_IntMenuItem pimi, LPARAM lParam);
+int MO_ModifyMenuItem(TMO_IntMenuItem *menuHandle, TMO_MenuItem *pmiparam);
+int MO_ProcessCommand(TMO_IntMenuItem *pimi, LPARAM lParam);
INT_PTR MO_ProcessHotKeys(HANDLE menuHandle, INT_PTR vKey);
-int MO_SetOptionsMenuItem(PMO_IntMenuItem menuobjecthandle, int setting, INT_PTR value);
+int MO_SetOptionsMenuItem(TMO_IntMenuItem *menuobjecthandle, int setting, INT_PTR value);
int MO_SetOptionsMenuObject(HANDLE menuobjecthandle, int setting, INT_PTR value);
INT_PTR MO_ProcessCommandByMenuIdent(WPARAM wParam, LPARAM lParam);
int MO_ProcessCommandBySubMenuIdent(int menuID, int command, LPARAM lParam);
// function returns TRUE if the walk should be immediately stopped
-typedef int (*pfnWalkFunc)(PMO_IntMenuItem, void*);
+typedef int (*pfnWalkFunc)(TMO_IntMenuItem*, void*);
// returns the item, on which pfnWalkFunc returned TRUE
-PMO_IntMenuItem MO_RecursiveWalkMenu(PMO_IntMenuItem, pfnWalkFunc, void*);
+TMO_IntMenuItem *MO_RecursiveWalkMenu(TMO_IntMenuItem*, pfnWalkFunc, void*);
//general stuff
int InitGenMenu();
int UnitGenMenu();
-int FindRoot(PMO_IntMenuItem pimi, void* param);
+int FindRoot(TMO_IntMenuItem *pimi, void* param);
TMO_IntMenuItem * GetMenuItemByGlobalID(int globalMenuID);
BOOL FindMenuHanleByGlobalID(HMENU hMenu, int globalID, struct _MenuItemHandles * dat); //GenMenu.c
-LPTSTR GetMenuItemText(PMO_IntMenuItem);
+LPTSTR GetMenuItemText(TMO_IntMenuItem*);
int GenMenuOptInit(WPARAM wParam, LPARAM);
int GetMenuObjbyId(const int id);
diff --git a/src/mir_app/src/genmenuopt.cpp b/src/mir_app/src/genmenuopt.cpp index db302e59da..2b306e5623 100644 --- a/src/mir_app/src/genmenuopt.cpp +++ b/src/mir_app/src/genmenuopt.cpp @@ -46,7 +46,7 @@ struct MenuItemOptData : public MZeroedObject bool bShow; int id; - PMO_IntMenuItem pimi; + TMO_IntMenuItem *pimi; }; static int SortMenuItems(const MenuItemOptData *p1, const MenuItemOptData *p2) @@ -160,7 +160,7 @@ class CGenMenuOptionsPage : public CDlgBase LIST<MenuItemOptData> arItems(10, SortMenuItems); - for (PMO_IntMenuItem p = pimo->m_items.first; p != NULL; p = p->next) { + for (TMO_IntMenuItem *p = pimo->m_items.first; p != NULL; p = p->next) { if (p->mi.root != (HGENMENU)-1 && p->mi.root != NULL) continue; diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp index 1dce9747d4..1b07b97247 100644 --- a/src/mir_app/src/meta_menu.cpp +++ b/src/mir_app/src/meta_menu.cpp @@ -249,7 +249,7 @@ int Meta_ModifyMenu(WPARAM hMeta, LPARAM) if (cc == NULL)
return 0;
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
Menu_ShowItem(hMenuRoot, false);
if (cc->IsMeta()) {
@@ -346,7 +346,7 @@ int Meta_ModifyMenu(WPARAM hMeta, LPARAM) INT_PTR Meta_OnOff(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.flags = CMIM_NAME | CMIM_ICON;
bool bToggled = !db_mc_isEnabled();
@@ -371,7 +371,7 @@ INT_PTR Meta_OnOff(WPARAM, LPARAM) void InitMenus()
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
// main menu item
mi.icolibItem = GetIconHandle(I_MENUOFF);
diff --git a/src/mir_app/src/movetogroup.cpp b/src/mir_app/src/movetogroup.cpp index dabc638ad3..a8bd2771e4 100644 --- a/src/mir_app/src/movetogroup.cpp +++ b/src/mir_app/src/movetogroup.cpp @@ -67,7 +67,7 @@ static TCHAR* PrepareGroupName(TCHAR* str) static void AddGroupItem(HGENMENU hRoot, TCHAR* name, int pos, WPARAM param, bool checked)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hRoot;
mi.popupPosition = param; // param to pszService - only with CMIF_CHILDPOPUP !!!!!!
mi.position = pos;
@@ -88,7 +88,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) OBJLIST<GroupItemSort> groups(10, GroupItemSort::compare);
if (!hMoveToGroupItem) {
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.position = 100000;
mi.pszName = LPGEN("&Move to group");
mi.flags = CMIF_ROOTHANDLE;
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index b27baebe20..aee3be838e 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -1293,7 +1293,7 @@ static INT_PTR AddOptionsPage(WPARAM wParam, LPARAM lParam) static int OptModulesLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.position = 1900000000;
mi.pszName = LPGEN("&Options...");
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index 0c5ae404f3..d2b45a520a 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -1018,7 +1018,7 @@ static INT_PTR OptProtosShow(WPARAM, LPARAM) int OptProtosLoaded(WPARAM, LPARAM)
{
- CLISTMENUITEM mi = { sizeof(mi) };
+ CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_ACCMGR);
mi.position = 1900000000;
mi.pszName = LPGEN("&Accounts...");
|