Pulled apart LLInventoryPanel and LLInventoryView. TODO: LLInventoryView needs to be chopped apart into a floater (LLFloaterInventory) and a panel (LLPanelMainInventory).
This commit is contained in:
@@ -2381,6 +2381,25 @@ void LLView::registerEventListener(std::string name, LLSimpleListener* function)
|
||||
|
||||
}
|
||||
|
||||
struct LLSignalListener : LLSimpleListener
|
||||
{
|
||||
LLSignalListener(LLView::event_signal_t::slot_type &cb)
|
||||
{
|
||||
mSignal.connect(cb);
|
||||
}
|
||||
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
mSignal(event, userdata);
|
||||
return true;
|
||||
}
|
||||
LLView::event_signal_t mSignal;
|
||||
};
|
||||
|
||||
void LLView::registerEventListener(std::string name, event_signal_t::slot_type &cb)
|
||||
{
|
||||
registerEventListener(name, new LLSignalListener(cb));
|
||||
}
|
||||
|
||||
void LLView::deregisterEventListener(std::string name)
|
||||
{
|
||||
dispatch_list_t::iterator itor = mDispatchList.find(name);
|
||||
|
||||
Reference in New Issue
Block a user