From 3b44da50baf9b321f040c5e5b5b0d7fb12ab7d5f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 8 Dec 2016 19:48:45 +0300 Subject: fix for dynamically created toolbar icons in Actman --- plugins/Actman/actman.dpr | 7 +++++++ plugins/Actman/ua/i_uavars.inc | 24 ++++++++++++------------ plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc | 4 ++-- 3 files changed, 21 insertions(+), 14 deletions(-) (limited to 'plugins') diff --git a/plugins/Actman/actman.dpr b/plugins/Actman/actman.dpr index bd2e759ccc..c54f7fbfef 100644 --- a/plugins/Actman/actman.dpr +++ b/plugins/Actman/actman.dpr @@ -180,6 +180,12 @@ begin end; end; +function DoAddButton(wParam:WPARAM;lParam:LPARAM):int;cdecl; +begin + Srmm_AddButton(pBBButton(lParam)); + result := 0; +end; + function DoCallContactService(wParam:WPARAM;lParam:LPARAM):int;cdecl; var ccs:PCCSDATA; @@ -241,6 +247,7 @@ begin CreateServiceFunction('Utils/OpenURL',@DoOpenUrl); CreateServiceFunction('Proto/CallContactService', @DoCallContactService); + CreateServiceFunction('Actman/ButtonsBar/AddButton', @DoAddButton); HookEvent(ME_SYSTEM_MODULESLOADED,@OnModulesLoaded); end; diff --git a/plugins/Actman/ua/i_uavars.inc b/plugins/Actman/ua/i_uavars.inc index ff4401a516..8ad6b45027 100644 --- a/plugins/Actman/ua/i_uavars.inc +++ b/plugins/Actman/ua/i_uavars.inc @@ -105,20 +105,20 @@ const NamesArray: array [0..NumTypes-1] of tNameRec = ( (name:'TopToolbar'; service:'TopToolBar/AddButton'; mask:UAF_REGTTBB ; atype:uaTTB; enable:false), - (name:'TabSRMM toolbar' ; service:'TabSRMM/ButtonsBar/AddButton'; - mask:UAF_REGTABB ; atype:uaTAB; enable:false), - (name:'Core Hotkey' ; service:nil{MS_HOTKEY_REGISTER}; + (name:'TabSRMM toolbar'; service:'Actman/ButtonsBar/AddButton'; + mask:UAF_REGTABB; atype:uaTAB; enable:false), + (name:'Core Hotkey'; service:nil; mask:UAF_REGHOTKEY; atype:uaHotkey; enable:false), - (name:'Main menu' ; service:nil; - mask:0; atype:uaMenu+(ORD(main_menu ) shl 8); enable:false), - (name:'Contact menu' ; service:nil; + (name:'Main menu'; service:nil; + mask:0; atype:uaMenu+(ORD(main_menu) shl 8); enable:false), + (name:'Contact menu'; service:nil; mask:0; atype:uaMenu+(ORD(contact_menu) shl 8); enable:false), - (name:'Tray menu' ; service:nil; - mask:0; atype:uaMenu+(ORD(tray_menu ) shl 8); enable:false), - (name:'Protocol menus' ; service:nil; - mask:0; atype:uaMenu+(ORD(proto_menu ) shl 8); enable:false), - (name:'Status menu' ; service:nil; - mask:0; atype:uaMenu+(ORD(status_menu ) shl 8); enable:false) + (name:'Tray menu'; service:nil; + mask:0; atype:uaMenu+(ORD(tray_menu) shl 8); enable:false), + (name:'Protocol menus'; service:nil; + mask:0; atype:uaMenu+(ORD(proto_menu) shl 8); enable:false), + (name:'Status menu'; service:nil; + mask:0; atype:uaMenu+(ORD(status_menu) shl 8); enable:false) ); var diff --git a/plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc b/plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc index 593773019a..58fa0bfa04 100644 --- a/plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc +++ b/plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc @@ -16,14 +16,14 @@ const // lParam = 0; // This event will be send after module loaded and after each toolbar reset // You should add your buttons on this event - ME_MSG_TOOLBARLOADED:PAnsiChar = 'TabSRMM/ButtonsBar/ModuleLoaded'; + ME_MSG_TOOLBARLOADED:PAnsiChar = 'SRMM/ButtonsBar/ModuleLoaded'; /////////////////////////////////////////////////// // ButtonClicked event // wParam = (HANDLE)hContact; // lParam = (CustomButtonClickData *)&CustomButtonClickData; // catch to show a popup menu, etc. - ME_MSG_BUTTONPRESSED:PAnsiChar = 'TabSRMM/ButtonsBar/ButtonPressed'; + ME_MSG_BUTTONPRESSED:PAnsiChar = 'SRMM/ButtonsBar/ButtonPressed'; //event flags BBCF_RIGHTBUTTON = 1; -- cgit v1.2.3