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/WhoUsesMyFiles/src/wumfplug.c | |
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/WhoUsesMyFiles/src/wumfplug.c')
-rw-r--r-- | plugins/WhoUsesMyFiles/src/wumfplug.c | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.c b/plugins/WhoUsesMyFiles/src/wumfplug.c index d7ba2a65bd..c9f07b99ad 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.c +++ b/plugins/WhoUsesMyFiles/src/wumfplug.c @@ -271,17 +271,14 @@ static INT_PTR WumfMenuCommand(WPARAM wParam,LPARAM lParam) {
BOOL MajorTo0121 = FALSE;
int iResult = 0;
- CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(mi);
- if (WumfOptions.PopupsEnabled == TRUE)
- {
+ CLISTMENUITEM mi = { sizeof(mi) };
+ if (WumfOptions.PopupsEnabled == TRUE) {
WumfOptions.PopupsEnabled = FALSE;
mi.pszName = Translate("Enable WUMF popups");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
}
- else
- {
+ else {
WumfOptions.PopupsEnabled = TRUE;
mi.pszName = Translate("Disable WUMF popups");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
@@ -579,37 +576,34 @@ int OptionsInit(WPARAM wparam,LPARAM lparam) __declspec(dllexport) int Load(void)
{
- CLISTMENUITEM mi = { 0 };
-
mir_getLP(&pluginInfo);
- ZeroMemory(&mi, sizeof(mi));
- mi.cbSize = sizeof(mi);
LoadOptions();
CreateServiceFunction(MS_WUMF_SWITCHPOPUP, WumfMenuCommand);
CreateServiceFunction(MS_WUMF_CONNECTIONSSHOW, WumfShowConnections);
- if (WumfOptions.PopupsEnabled == FALSE)
- {
- mi.pszName = Translate("Enable WUMF popups");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
- }
- else
{
- mi.pszName = Translate("Disable WUMF popups");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
+ CLISTMENUITEM mi = { sizeof(mi) };
+ if (WumfOptions.PopupsEnabled == FALSE) {
+ mi.pszName = Translate("Enable WUMF popups");
+ mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
+ }
+ else {
+ mi.pszName = Translate("Disable WUMF popups");
+ mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
+ }
+ mi.pszService = MS_WUMF_SWITCHPOPUP;
+ mi.popupPosition = 1999990000;
+ mi.pszPopupName = Translate("PopUps");
+ hMenuItem = (HANDLE)Menu_AddMainMenuItem(&mi);
+
+ mi.pszName = Translate("WUMF: Show connections");
+ mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
+ mi.pszService = MS_WUMF_CONNECTIONSSHOW;
+ mi.popupPosition = 1999990000;
+ mi.pszPopupName = NULL;
+ Menu_AddMainMenuItem(&mi);
}
- mi.pszService = MS_WUMF_SWITCHPOPUP;
- mi.popupPosition = 1999990000;
- mi.pszPopupName = Translate("PopUps");
- hMenuItem = (HANDLE)Menu_AddMainMenuItem(&mi);
-
- mi.pszName = Translate("WUMF: Show connections");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
- mi.pszService = MS_WUMF_CONNECTIONSSHOW;
- mi.popupPosition = 1999990000;
- mi.pszPopupName = NULL;
- Menu_AddMainMenuItem(&mi);
HookEvent(ME_OPT_INITIALISE,OptionsInit);
HookEvent(ME_TTB_MODULELOADED, InitTopToolbar);
|