diff options
author | George Hazan <ghazan@miranda.im> | 2022-03-09 16:01:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-03-09 16:01:32 +0300 |
commit | d387ed11456e40f36f359cb3aa9f74a54b8f369b (patch) | |
tree | 58b3c950a6f00ee6664e794ec4a385cc3b10cb34 /protocols/Weather/src/weather_svcs.cpp | |
parent | b5c43418ddb50192686929bac0a6b3190aa6b600 (diff) |
popup control moved from main menu to Options - Popups - Enabled items
Diffstat (limited to 'protocols/Weather/src/weather_svcs.cpp')
-rw-r--r-- | protocols/Weather/src/weather_svcs.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/protocols/Weather/src/weather_svcs.cpp b/protocols/Weather/src/weather_svcs.cpp index 113669d968..7a7dff321c 100644 --- a/protocols/Weather/src/weather_svcs.cpp +++ b/protocols/Weather/src/weather_svcs.cpp @@ -26,7 +26,6 @@ building/changing the weather menu items. #include "stdafx.h" -static HGENMENU hEnableDisablePopupMenu; static HGENMENU hEnableDisableMenu; extern VARSW g_pwszIconsName; @@ -302,18 +301,6 @@ void UpdateMenu(BOOL State) CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, !State ? TTBST_PUSHED : 0); } -void UpdatePopupMenu(BOOL State) -{ - // update option setting - opt.UsePopup = State; - g_plugin.setByte("UsePopup", (uint8_t)opt.UsePopup); - - if (State) // to enable popup - Menu_ModifyItem(hEnableDisablePopupMenu, LPGENW("Disable &weather notification"), g_plugin.getIconHandle(IDI_POPUP)); - else // to disable popup - Menu_ModifyItem(hEnableDisablePopupMenu, LPGENW("Enable &weather notification"), g_plugin.getIconHandle(IDI_NOPOPUP)); -} - // update the weather auto-update menu item when click on it INT_PTR EnableDisableCmd(WPARAM wParam, LPARAM lParam) { @@ -321,13 +308,6 @@ INT_PTR EnableDisableCmd(WPARAM wParam, LPARAM lParam) return 0; } -// update the weather popup menu item when click on it -INT_PTR MenuitemNotifyCmd(WPARAM, LPARAM) -{ - UpdatePopupMenu(!opt.UsePopup); - return 0; -} - // adding weather contact menus // copied and modified form "modified MSN Protocol" void AddMenuItems(void) @@ -420,16 +400,6 @@ void AddMenuItems(void) mi.pszService = MS_WEATHER_REFRESHALL; Menu_AddMainMenuItem(&mi); - SET_UID(mi, 0xdc5411cb, 0xb7c7, 0x443b, 0x88, 0x5a, 0x90, 0x24, 0x43, 0xde, 0x54, 0x3e); - CreateServiceFunction(MODULENAME "/PopupMenu", MenuitemNotifyCmd); - mi.name.a = LPGEN("Weather Notification"); - mi.hIcolibItem = g_plugin.getIconHandle(IDI_POPUP); - mi.position = 0; - mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 0); - mi.pszService = MODULENAME "/PopupMenu"; - hEnableDisablePopupMenu = Menu_AddMainMenuItem(&mi); - UpdatePopupMenu(opt.UsePopup); - if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) { SET_UID(mi, 0xe193fe9b, 0xf6ad, 0x41ac, 0x95, 0x29, 0x45, 0x4, 0x44, 0xb1, 0xeb, 0x5d); mi.pszService = "Weather/mwin_menu"; |