summaryrefslogtreecommitdiff
path: root/plugins/Watrack
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Watrack')
-rw-r--r--plugins/Watrack/i_gui.inc24
-rw-r--r--plugins/Watrack/lastfm/lastfm.pas4
-rw-r--r--plugins/Watrack/myshows/myshows.pas4
-rw-r--r--plugins/Watrack/popup/popups.pas6
-rw-r--r--plugins/Watrack/proto/proto.pas5
-rw-r--r--plugins/Watrack/stat/statlog.pas4
-rw-r--r--plugins/Watrack/waticons.pas3
-rw-r--r--plugins/Watrack/watrack.dpr2
8 files changed, 22 insertions, 30 deletions
diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc
index 2a219c8140..709584b066 100644
--- a/plugins/Watrack/i_gui.inc
+++ b/plugins/Watrack/i_gui.inc
@@ -12,8 +12,8 @@ begin
if DisablePlugin<>dsPermanent then
ttb.dwFlags:=ttb.dwFlags or TTBBF_PUSHED;
- ttb.hIconDn :=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnEnable));
- ttb.hIconUp :=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnDisable));
+ ttb.hIconDn :=IcoLib_GetIcon(IcoBtnEnable,0);
+ ttb.hIconUp :=IcoLib_GetIcon(IcoBtnDisable,0);
ttb.wParamUp :=1;
// ttb.wParamDown :=0;
ttb.pszService:=MS_WAT_PLUGINSTATUS;
@@ -37,7 +37,7 @@ begin
mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnEnable));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnEnable,0);
mi.szName.a :='Disable WATrack';
mi.pszService :=MS_WAT_PLUGINSTATUS;
mi.popupPosition:=MenuDisablePos;
@@ -54,12 +54,12 @@ begin
mi.flags :=CMIM_NAME+CMIM_FLAGS+CMIM_ICON+f1;
if f1<>0 then
begin
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnDisable));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnDisable,0);
mi.szName.a:='Enable WATrack';
end
else
begin
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnEnable));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnEnable,0);
mi.szName.a:='Disable WATrack';
end;
CallService(MS_CLIST_MODIFYMENUITEM,hMenuDisable,lparam(@mi));
@@ -91,21 +91,15 @@ begin
mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
- mi.hIcon:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnEnable));
+ mi.hIcon:=IcoLib_GetIcon(IcoBtnEnable,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuDisable,tlparam(@mi));
-// toptoolbar
+ // toptoolbar
if ServiceExists(MS_TTB_GETBUTTONOPTIONS)<>0 then
begin
-{
- CallService(MS_TTB_GETBUTTONOPTIONS,(ttbInfo shl 16)+TTBO_ALLDATA,tlparam(@ttb));
- ttb.hIconUp:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnInfo));
- ttb.hIconDn:=ttb.hIconUp;
- CallService(MS_TTB_SETBUTTONOPTIONS,(ttbInfo shl 16)+TTBO_ALLDATA,tlparam(@ttb));
-}
CallService(MS_TTB_GETBUTTONOPTIONS,(ttbState shl 16)+TTBO_ALLDATA,tlparam(@ttb));
- ttb.hIconDn:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnEnable));
- ttb.hIconUp:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnDisable));
+ ttb.hIconDn:=IcoLib_GetIcon(IcoBtnEnable,0);
+ ttb.hIconUp:=IcoLib_GetIcon(IcoBtnDisable,0);
CallService(MS_TTB_SETBUTTONOPTIONS,(ttbState shl 16)+TTBO_ALLDATA,tlparam(@ttb));
end;
diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas
index 677d7aa4c5..8c552d4b1a 100644
--- a/plugins/Watrack/lastfm/lastfm.pas
+++ b/plugins/Watrack/lastfm/lastfm.pas
@@ -144,7 +144,7 @@ begin
FillChar(mi,SizeOf(mi),0);
mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,tlparam(IcoLastFM));
+ mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuLast,tlparam(@mi));
end;
@@ -207,7 +207,7 @@ begin
mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoLastFM));
+ mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0);
mi.szName.a :='Disable scrobbling';
mi.pszService :=MS_WAT_LASTFM;
mi.popupPosition:=500050000;
diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas
index ff9e2975a5..8749d91f2a 100644
--- a/plugins/Watrack/myshows/myshows.pas
+++ b/plugins/Watrack/myshows/myshows.pas
@@ -173,7 +173,7 @@ begin
FillChar(mi,SizeOf(mi),0);
mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,tLParam(IcoMyShows));
+ mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuMyShows,tlParam(@mi));
end;
@@ -240,7 +240,7 @@ begin
mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,tlParam(IcoMyShows));
+ mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0);
mi.szName.a :='Disable scrobbling';
mi.pszService :=MS_WAT_MYSHOWS;
mi.popupPosition:=500050000;
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas
index eea51ae883..2e95e7f05b 100644
--- a/plugins/Watrack/popup/popups.pas
+++ b/plugins/Watrack/popup/popups.pas
@@ -349,7 +349,7 @@ begin
FillChar(mi,SizeOf(mi),0);
mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnInfo));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuInfo,tlparam(@mi));
if ActionList<>nil then
begin
@@ -387,7 +387,7 @@ begin
FillChar(ttb,SizeOf(ttb),0);
ttb.cbSize :=SizeOf(ttb);
ttb.dwFlags :=TTBBF_VISIBLE{ or TTBBF_SHOWTOOLTIP};
- ttb.hIconUp :=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnInfo));
+ ttb.hIconUp :=IcoLib_GetIcon(IcoBtnInfo,0);
ttb.hIconDn :=ttb.hIconUp;
ttb.pszService:=MS_WAT_SHOWMUSICINFO;
ttb.name :='Music Info';
@@ -486,7 +486,7 @@ begin
FillChar(mi,SizeOf(mi),0);
mi.cbSize :=SizeOf(mi);
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnInfo));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0);
mi.szName.a :='Music Info';
mi.pszService :=MS_WAT_SHOWMUSICINFO;
mi.popupPosition:=MenuInfoPos;
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas
index 8da9d20b12..e26ce14f17 100644
--- a/plugins/Watrack/proto/proto.pas
+++ b/plugins/Watrack/proto/proto.pas
@@ -459,7 +459,7 @@ begin
mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
- mi.hIcon:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnContext));
+ mi.hIcon:=IcoLib_GetIcon(IcoBtnContext,0);
CallService(MS_CLIST_MODIFYMENUITEM,hContactMenuItem,tlparam(@mi));
end;
@@ -506,8 +506,7 @@ begin
mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
mi.flags :=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST;
-// mi.popupPosition:=MenuUserInfoPos;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnContext));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnContext,0);
mi.szName.a :='Get user''s Music Info';
mi.pszService :=MS_WAT_GETCONTACTINFO;
hContactMenuItem:=Menu_AddContactMenuItem(@mi);
diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas
index 3d82b93223..886a22057c 100644
--- a/plugins/Watrack/stat/statlog.pas
+++ b/plugins/Watrack/stat/statlog.pas
@@ -559,7 +559,7 @@ begin
FillChar(mi,SizeOf(mi),0);
mi.cbSize:=sizeof(mi);
mi.flags :=CMIM_ICON;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnReport));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnReport,0);
CallService(MS_CLIST_MODIFYMENUITEM,hMenuReport,tlparam(@mi));
end;
@@ -602,7 +602,7 @@ begin
mi.cbSize :=sizeof(mi);
mi.flags :=0;
mi.szPopupName.a:=PluginShort;
- mi.hIcon :=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnReport));
+ mi.hIcon :=IcoLib_GetIcon(IcoBtnReport,0);
mi.szName.a :='Create WATrack report';
mi.pszService :=MS_WAT_MAKEREPORT;
mi.popupPosition:=MenuReportPos;
diff --git a/plugins/Watrack/waticons.pas b/plugins/Watrack/waticons.pas
index 3de092b5c7..de0c5c17d0 100644
--- a/plugins/Watrack/waticons.pas
+++ b/plugins/Watrack/waticons.pas
@@ -190,8 +190,7 @@ end;
function GetIcon(action:integer;stat:integer):cardinal;
begin
- result:=CallService(MS_SKIN2_GETICON,0,
- lparam(CtrlIcoLib[action][stat].name));
+ result:=IcoLib_GetIcon(CtrlIcoLib[action][stat].name,0);
end;
function GetIconDescr(action:integer):pAnsiChar;
diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr
index c122d50e77..91edbcfd01 100644
--- a/plugins/Watrack/watrack.dpr
+++ b/plugins/Watrack/watrack.dpr
@@ -550,7 +550,7 @@ begin
dbetd.textService:=nil;
dbetd.iconService:=nil;
p:='WATrack_Info';
- dbetd.eventIcon :=CallService(MS_SKIN2_GETICON,0,tlparam(p)); //!! from popups
+ dbetd.eventIcon :=IcoLib_GetIcon(p,0);
for i:=0 to HIGH(cdbetd) do
begin