diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 13:35:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 13:35:02 +0000 |
commit | b3506557a58f53ed0fc3a96c4ec4a3b8098a542d (patch) | |
tree | 520a1cb861afa7600c0553ce8b2558f725a70ed1 /plugins | |
parent | 4625aafb053a002f0223bfbe76abfbec629feacf (diff) |
- CLISTMENUITEM::cbSize - atavism removed;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14325 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
125 files changed, 288 insertions, 421 deletions
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';
|