summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
commit30707c980d1560b358dbf2671a4d2a26a1e8173c (patch)
tree74aee5adaaac976e1398274ca64c5461a60f1feb /plugins/FTPFileYM/src
parent335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff)
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/src')
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index dea3d4457f..3ca4573d00 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -124,11 +124,9 @@ static void InitIcolib()
void InitMenuItems()
{
- CLISTMENUITEM mi = {0};
- CLISTMENUITEM mi2 = {0};
TCHAR stzName[256];
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
mi.icolibItem = hIconlibItem[ServerList::FTP_COUNT];
mi.position = 3000090001;
@@ -141,7 +139,7 @@ void InitMenuItems()
mi.cbSize = sizeof(mi);
mi.ptszName = stzName;
- mi2.cbSize = sizeof(mi2);
+ CLISTMENUITEM mi2 = { sizeof(mi2) };
mi2.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR;
mi2.pszService = MS_FTPFILE_CONTACTMENU;
@@ -256,8 +254,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
bHideRoot = false;
}
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS;
if (opt.bUseSubmenu)
@@ -287,11 +284,8 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
void PrebuildMainMenu()
{
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
-
- for (int i = 0; i < ServerList::FTP_COUNT; i++)
- {
+ CLISTMENUITEM mi = { sizeof(mi) };
+ for (int i=0; i < ServerList::FTP_COUNT; i++) {
mi.flags = CMIM_FLAGS;
if (!ftpList[i]->bEnabled)
mi.flags |= opt.bHideInactive ? CMIF_HIDDEN : CMIF_GRAYED;