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/Clist_modern | |
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/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp | 8 | ||||
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp | 9 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmenus.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 4 |
5 files changed, 12 insertions, 13 deletions
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;
|