diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
commit | 30707c980d1560b358dbf2671a4d2a26a1e8173c (patch) | |
tree | 74aee5adaaac976e1398274ca64c5461a60f1feb /plugins/PasteIt/src/PasteIt.cpp | |
parent | 335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (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/PasteIt/src/PasteIt.cpp')
-rw-r--r-- | plugins/PasteIt/src/PasteIt.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index e2164c2492..d74ed92621 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -337,10 +337,10 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) bool bIsContact = false;
char *szProto = GetContactProto((HANDLE)wParam);
- if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND) bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) ? true : false;
+ if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND)
+ bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) ? true : false;
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS;
if (!bIsContact) mi.flags |= CMIF_HIDDEN;
@@ -385,10 +385,7 @@ void InitIcolib() void InitMenuItems()
{
- CLISTMENUITEM mi = {0};
- CLISTMENUITEM mi2 = {0};
-
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
mi.icolibItem = hMainIcon;
mi.position = 3000090005;
@@ -413,7 +410,7 @@ void InitMenuItems() mi.ptszName = _T("Default web page");
HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
- mi2.cbSize = sizeof(mi2);
+ CLISTMENUITEM mi2 = { sizeof(mi2) };
mi2.pszService = MS_PASTEIT_CONTACTMENU;
mi2.hParentMenu = hDefWebMenu;
for(int i = 0 ; i < PasteToWeb::pages; ++i)
@@ -431,16 +428,11 @@ void InitMenuItems() void DefWebPageChanged()
{
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
-
- for (int i = 0; i < PasteToWeb::pages; i++)
- {
+ CLISTMENUITEM mi = { sizeof(mi) };
+ for (int i = 0; i < PasteToWeb::pages; i++) {
mi.flags = CMIM_FLAGS;
if (Options::instance->defWeb == i)
- {
mi.flags |= CMIF_CHECKED;
- }
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hWebPageMenus[i], (LPARAM)&mi);
}
|