summaryrefslogtreecommitdiff
path: root/plugins/mRadio/i_visual.inc
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-22 21:27:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-22 21:27:15 +0000
commitfbfa53dcd5e9622613286c32ee2cab42aec0897e (patch)
treee7305d55dd44df287c22b3eac0b73bb456ff1672 /plugins/mRadio/i_visual.inc
parent88790eed4ffd9ca555c8f9b73cb014a93b57a34f (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_visual.inc')
-rw-r--r--plugins/mRadio/i_visual.inc33
1 files changed, 6 insertions, 27 deletions
diff --git a/plugins/mRadio/i_visual.inc b/plugins/mRadio/i_visual.inc
index 915c001aa0..f3ab3615a5 100644
--- a/plugins/mRadio/i_visual.inc
+++ b/plugins/mRadio/i_visual.inc
@@ -4,45 +4,24 @@ var
hCMenuItemPlay:THANDLE;
function OnContactMenu(hContact:WPARAM;lParam:LPARAM):int;cdecl;
-var
- mi:TCListMenuItem;
begin
- FillChar(mi,SizeOf(mi),0);
if StrCmp(Proto_GetProtoName(hContact),PluginName)<>0 then
- begin
- mi.flags:=CMIM_FLAGS or CMIF_HIDDEN;
- CallService(MS_CLIST_MODIFYMENUITEM,hCMenuItemPlay,tlparam(@mi));
- end
+ Menu_ShowItem(hCMenuItemPlay, 0)
else
begin
// play/Stop
- mi.flags:=CMIM_FLAGS or CMIM_ICON or CMIM_NAME;
if THANDLE(hContact)<>ActiveContact then
- begin
- mi.szName.a:='Start broadcasting';
- mi.hIcon:=IcoLib_GetIcon(IcoBtnOn,0);
- end
+ Menu_ModifyItem(hCMenuItemPlay, 'Start broadcasting', IcoLib_GetIcon(IcoBtnOn,0))
else
- begin
- mi.szName.a:='Stop broadcasting';
- mi.hIcon:=IcoLib_GetIcon(IcoBtnOff,0);
- end;
- CallService(MS_CLIST_MODIFYMENUITEM,hCMenuItemPlay,tlparam(@mi));
+ Menu_ModifyItem(hCMenuItemPlay, 'Stop broadcasting', IcoLib_GetIcon(IcoBtnOff,0));
// record
- mi.flags:=CMIM_FLAGS or CMIM_ICON or CMIM_NAME;
if Service_RadioRecord(0,1)<>0 then
- begin
- mi.szName.a:='Stop record';
- mi.hIcon:=IcoLib_GetIcon(IcoBtnRecDn,0);
- end
+ Menu_ModifyItem(hCMenuItemRec, 'Stop record', IcoLib_GetIcon(IcoBtnRecDn,0))
else
- begin
- mi.szName.a:='Start record';
- mi.hIcon:=IcoLib_GetIcon(IcoBtnRecUp,0);
- end;
+ Menu_ModifyItem(hCMenuItemRec, 'Start record', IcoLib_GetIcon(IcoBtnRecUp,0));
end;
- CallService(MS_CLIST_MODIFYMENUITEM,hCMenuItemRec,tlparam(@mi));
+
result:=0;
end;