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/Watrack/i_gui.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/Watrack/i_gui.inc')
-rw-r--r-- | plugins/Watrack/i_gui.inc | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc index 40f6683522..7b1dd90843 100644 --- a/plugins/Watrack/i_gui.inc +++ b/plugins/Watrack/i_gui.inc @@ -45,22 +45,12 @@ end; procedure ChangeMenuIcons(f1:cardinal);
var
- mi:tClistMenuItem;
p:PAnsiChar;
begin
- FillChar(mi,sizeof(mi),0);
- mi.flags :=CMIM_NAME+CMIM_FLAGS+CMIM_ICON+f1;
if f1<>0 then
- begin
- mi.hIcon :=IcoLib_GetIcon(IcoBtnDisable,0);
- mi.szName.a:='Enable WATrack';
- end
+ Menu_ModifyItem(hMenuDisable, 'Enable WATrack', IcoLib_GetIcon(IcoBtnDisable,0), f1)
else
- begin
- mi.hIcon :=IcoLib_GetIcon(IcoBtnEnable,0);
- mi.szName.a:='Disable WATrack';
- end;
- CallService(MS_CLIST_MODIFYMENUITEM,hMenuDisable,lparam(@mi));
+ Menu_ModifyItem(hMenuDisable, 'Disable WATrack', IcoLib_GetIcon(IcoBtnEnable,0));
if ServiceExists(MS_TTB_SETBUTTONSTATE)<>0 then
begin
@@ -81,15 +71,10 @@ end; function IconChanged(wParam:WPARAM;lParam:LPARAM):int;cdecl;
var
- mi:TCListMenuItem;
ttb:m_api.TTBButton;
begin
result:=0;
- FillChar(mi,SizeOf(mi),0);
- mi.flags :=CMIM_ICON;
-
- mi.hIcon:=IcoLib_GetIcon(IcoBtnEnable,0);
- CallService(MS_CLIST_MODIFYMENUITEM,hMenuDisable,tlparam(@mi));
+ Menu_ModifyItem(hMenuDisable, nil, IcoLib_GetIcon(IcoBtnEnable,0));
// toptoolbar
if ServiceExists(MS_TTB_GETBUTTONOPTIONS)<>0 then
|