summaryrefslogtreecommitdiff
path: root/plugins/YAPP
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/YAPP')
-rw-r--r--plugins/YAPP/src/services.cpp1
-rw-r--r--plugins/YAPP/src/yapp.cpp15
2 files changed, 4 insertions, 12 deletions
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp
index c314328c05..e80b50203a 100644
--- a/plugins/YAPP/src/services.cpp
+++ b/plugins/YAPP/src/services.cpp
@@ -194,7 +194,6 @@ static INT_PTR GetOpaque(WPARAM wParam, LPARAM lParam)
void UpdateMenu()
{
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
-
if (isEnabled) {
Menu_ModifyItem(hMenuItem, LPGENT("Disable Popups"), IcoLib_GetIcon(ICO_POPUP_ON));
Menu_ModifyItem(hMenuRoot, NULL, IcoLib_GetIcon(ICO_POPUP_ON));
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index 323712e943..c937996dcf 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -168,18 +168,11 @@ void InitMenuItems(void)
{
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE|CMIF_TCHAR;
- mi.hParentMenu = HGENMENU_ROOT;
-
- // Build main menu
- mi.position = 500010000;
- mi.ptszName = LPGENT("Popups");
- mi.hIcon = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
- hMenuRoot = Menu_AddMainMenuItem(&mi);
+ hMenuRoot = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 500010000, IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0));
- // Add item to main menu
- mi.hParentMenu = (HGENMENU)hMenuRoot;
+ CLISTMENUITEM mi = { 0 };
+ mi.flags = CMIF_TCHAR;
+ mi.hParentMenu = hMenuRoot;
mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.pszService= MS_POPUP_SHOWHISTORY;