diff options
Diffstat (limited to 'indra/llui/llmenugl.h')
-rw-r--r-- | indra/llui/llmenugl.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index e8d6043e54..baa6e9624d 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -950,16 +950,18 @@ public: LLUICtrl::EnableCallbackRegistry::currentRegistrar().add(name, boost::bind(&view_listener_t::handleEvent, listener, _2)); } - static void addCommit(view_listener_t* listener, const std::string& name) + typedef LLUICtrl::CommitCallbackInfo cb_info; + static void addCommit(view_listener_t *listener, const std::string &name, cb_info::EUntrustedCall handle_untrusted = cb_info::UNTRUSTED_ALLOW) { - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add(name, boost::bind(&view_listener_t::handleEvent, listener, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add(name, + cb_info([listener](LLUICtrl*, const LLSD& param){ return listener->handleEvent(param); }, handle_untrusted)); } - static void addMenu(view_listener_t* listener, const std::string& name) + static void addMenu(view_listener_t *listener, const std::string &name, cb_info::EUntrustedCall handle_untrusted = cb_info::UNTRUSTED_ALLOW) { // For now, add to both click and enable registries addEnable(listener, name); - addCommit(listener, name); + addCommit(listener, name, handle_untrusted); } static void cleanup() |