From 74e2aad594ed234f83352c386410fd92e269b6f4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 28 May 2016 20:16:13 +0000 Subject: ugly, but standard git-svn-id: http://svn.miranda-ng.org/main/trunk@16883 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Watrack/global.pas | 5 +++-- plugins/Watrack/i_gui.inc | 2 +- plugins/Watrack/lastfm/lastfm.pas | 2 +- plugins/Watrack/myshows/myshows.pas | 2 +- plugins/Watrack/popup/popups.pas | 2 +- plugins/Watrack/proto/proto.pas | 2 +- plugins/Watrack/stat/statlog.pas | 2 +- plugins/Watrack/watrack.dpr | 2 ++ 8 files changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/Watrack/global.pas b/plugins/Watrack/global.pas index 748fcaa0f5..ea3943fc7d 100644 --- a/plugins/Watrack/global.pas +++ b/plugins/Watrack/global.pas @@ -3,13 +3,14 @@ unit Global; interface -uses windows,messages,wat_api; +uses windows,messages,wat_api,m_api; const hwndTooltip:HWND=0; var UserCP:dword; + hMenuRoot:HGENMENU; const DLGED_INIT = $1000; // dialog init, not activate Apply button @@ -53,7 +54,7 @@ procedure MakeHintW(wnd:HWND;id:integer;txt:pWideChar); implementation -uses common,commctrl,mirutils,m_api;//,templates; +uses common,commctrl,mirutils;//,templates; procedure MakeHint(wnd:HWND;id:integer;txt:pAnsiChar); var diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc index c00deaae3b..7c77ab6ad7 100644 --- a/plugins/Watrack/i_gui.inc +++ b/plugins/Watrack/i_gui.inc @@ -30,7 +30,7 @@ var mi:TMO_MenuItem; begin FillChar(mi, sizeof(mi), 0); - mi.root := Menu_CreateRoot(MO_MAIN, 'Watrack', 0, 0, 0); + mi.root := hMenuRoot; Menu_ConfigureItem(mi.root, MCI_OPT_UID, 'CAEA4B95-A873-429F-A083-BB2DF51E2E45'); SET_UID(@mi, '85F2D289-04D2-4C7F-A223-A629CED253F0'); diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas index 96e96ac642..2c0428de6b 100644 --- a/plugins/Watrack/lastfm/lastfm.pas +++ b/plugins/Watrack/lastfm/lastfm.pas @@ -182,7 +182,7 @@ begin FillChar(mi, sizeof(mi), 0); SET_UID(@mi, 'BB4DFDEF-E399-4EA2-8F33-488160F083E2'); - mi.root :=Menu_CreateRoot(MO_MAIN, 'Watrack', 500050000, 0, 0); + mi.root :=hMenuRoot; mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0); mi.szName.a :='Disable scrobbling'; mi.pszService:=MS_WAT_LASTFM; diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas index fa64138d7b..53925f857b 100644 --- a/plugins/Watrack/myshows/myshows.pas +++ b/plugins/Watrack/myshows/myshows.pas @@ -213,7 +213,7 @@ begin FillChar(mi, sizeof(mi), 0); SET_UID(@mi, '201D5C0E-E7BA-4DAA-B80D-C9691CA296F5'); - mi.root :=Menu_CreateRoot(MO_MAIN, 'Watrack', 500050000, 0, 0); + mi.root :=hMenuRoot; mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0); mi.szName.a :='Disable scrobbling'; mi.pszService:=MS_WAT_MYSHOWS; diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas index ec01503bc4..689a825a9d 100644 --- a/plugins/Watrack/popup/popups.pas +++ b/plugins/Watrack/popup/popups.pas @@ -473,7 +473,7 @@ begin FillChar(mi,SizeOf(mi),0); SET_UID(@mi, '225458FC-C423-4B20-A798-2DB423506F80'); - mi.root :=Menu_CreateRoot(MO_MAIN, 'Watrack', MenuInfoPos, 0, 0); + mi.root :=hMenuRoot; mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0); mi.szName.a :='Music Info'; mi.pszService:=MS_WAT_SHOWMUSICINFO; diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas index bcb997a081..cd8d52a79d 100644 --- a/plugins/Watrack/proto/proto.pas +++ b/plugins/Watrack/proto/proto.pas @@ -354,7 +354,7 @@ begin RegisterIcons; FillChar(mi, sizeof(mi), 0); - mi.root := Menu_CreateRoot(MO_CONTACT, 'Watrack', 0, 0, 0); + mi.root := Menu_CreateRoot(MO_CONTACT, 'WATrack', 0, 0, 0); Menu_ConfigureItem(mi.root, MCI_OPT_UID, 'CAEA4B95-A873-429F-A083-BB2DF51E2E45'); SET_UID(@mi, '47D372B2-AA27-42B3-A3CB-85D3CE5F6A95'); diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas index 7ae6f96cb7..c65c9c0e47 100644 --- a/plugins/Watrack/stat/statlog.pas +++ b/plugins/Watrack/stat/statlog.pas @@ -583,7 +583,7 @@ begin FillChar(mi, sizeof(mi), 0); SET_UID(@mi, '40F4D15E-7D15-4E7B-A624-2F794586D960'); - mi.root := Menu_CreateRoot(MO_MAIN, 'Watrack', MenuReportPos, 0, 0); + mi.root := hMenuRoot; mi.hIcon := IcoLib_GetIcon(IcoBtnReport,0); mi.szName.a := 'Create WATrack report'; mi.pszService := MS_WAT_MAKEREPORT; diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr index 91edbcfd01..f653ec22ea 100644 --- a/plugins/Watrack/watrack.dpr +++ b/plugins/Watrack/watrack.dpr @@ -655,6 +655,8 @@ begin DisablePlugin:=dsPermanent; + hMenuRoot:=Menu_CreateRoot(MO_MAIN, 'WATrack', 500050000, 0, 0); + hHookWATLoaded:=CreateHookableEvent(ME_WAT_MODULELOADED); hHookWATStatus:=CreateHookableEvent(ME_WAT_NEWSTATUS); -- cgit v1.2.3