diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 21:27:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 21:27:15 +0000 |
commit | fbfa53dcd5e9622613286c32ee2cab42aec0897e (patch) | |
tree | e7305d55dd44df287c22b3eac0b73bb456ff1672 /plugins/mRadio/i_tray.inc | |
parent | 88790eed4ffd9ca555c8f9b73cb014a93b57a34f (diff) |
Menu_ModifyItem applied to the pascal code
git-svn-id: http://svn.miranda-ng.org/main/trunk@14335 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio/i_tray.inc')
-rw-r--r-- | plugins/mRadio/i_tray.inc | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc index 3ccdccc045..7ed794c1a7 100644 --- a/plugins/mRadio/i_tray.inc +++ b/plugins/mRadio/i_tray.inc @@ -232,45 +232,21 @@ begin end;
function TrayPrebuild(wParam:WPARAM;lParam:LPARAM):int; cdecl;
-var
- mi:tClistMenuItem;
- playstr:pWideChar;
- ico:pAnsiChar;
begin
- FillChar(mi,sizeof(mi),0);
-
- mi.flags:=CMIM_NAME or CMIF_UNICODE;
if PluginStatus=ID_STATUS_ONLINE then
- begin
- playstr:='mRadio off';
- end
+ Menu_ModifyItem(trayprotoh, 'mRadio off')
else
- begin
- playstr:='mRadio on';
- end;
- mi.szName.w:=playstr;
- CallService(MS_CLIST_MODIFYMENUITEM,trayprotoh,tlparam(@mi));
+ Menu_ModifyItem(trayprotoh, 'mRadio on');
if gVolume<0 then
- begin
- ico:=IcoBtnOff;
- end
+ Menu_ModifyItem(traymute, nil, IcoLib_GetIcon(IcoBtnOff,0))
else
- begin
- ico:=IcoBtnOn;
- end;
- mi.flags:=CMIM_FLAGS or CMIM_ICON;
- mi.hIcon:=IcoLib_GetIcon(ico,0);
- CallService(MS_CLIST_MODIFYMENUITEM,traymute,tlparam(@mi));
- mi.hIcon:=0;
+ Menu_ModifyItem(traymute, nil, IcoLib_GetIcon(IcoBtnOn,0));
- mi.flags:=CMIM_NAME or CMIF_UNICODE;
if CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)<>RD_STATUS_PLAYING then
- playstr:='Play'
+ Menu_ModifyItem(trayplay, 'Play')
else
- playstr:='Pause';
- mi.szName.w:=playstr;
- CallService(MS_CLIST_MODIFYMENUITEM,trayplay,tlparam(@mi));
+ Menu_ModifyItem(trayplay, 'Pause');
MakeStationsMenu();
result:=0;
|