From 30707c980d1560b358dbf2671a4d2a26a1e8173c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 21:45:37 +0000 Subject: various menu initialization quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/main.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'plugins/Popup') diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 67c805844c..764a7acc20 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -179,9 +179,7 @@ static int IconsChanged(WPARAM wParam,LPARAM lParam) { LoadActions(); - CLISTMENUITEM mi = { 0 }; - mi.cbSize = sizeof(mi); - + CLISTMENUITEM mi = { sizeof(mi) }; 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); @@ -225,9 +223,8 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM wp, LPARAM lp) { int iResult = 0; int iResultRoot = 0; - CLISTMENUITEM mi = { 0 }; - mi.cbSize = sizeof(mi); + CLISTMENUITEM mi = { sizeof(mi) }; 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. @@ -261,11 +258,9 @@ INT_PTR svcShowHistory(WPARAM, LPARAM) return 0; } -void InitMenuItems(void) { - CLISTMENUITEM mi={0}; - - // Common - mi.cbSize = sizeof(mi); +void InitMenuItems(void) +{ + CLISTMENUITEM mi = { sizeof(mi) }; // support new genmenu style mi.flags = CMIF_ROOTHANDLE|CMIF_TCHAR; mi.hParentMenu = HGENMENU_ROOT; -- cgit v1.2.3