Issue 1836: Autoresponse Improvement, adds World->Status->Autoresponse submenu

Moves Fake Away, Busy, and Away into a submenu of World called Status, from upstream.

Tweak to LLView::findControl to work with per account controls too.
TogglePerAccountControl added for when a control a menu is using is not in the main group.
This commit is contained in:
Inusaito Sayori
2015-04-24 23:41:19 -04:00
parent a6ae79f9b1
commit 193fc27ba2
3 changed files with 51 additions and 1 deletions

View File

@@ -7325,6 +7325,16 @@ class LLToggleControl : public view_listener_t
}
};
class LLTogglePerAccountControl : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLControlVariable* control(gSavedPerAccountSettings.getControl(userdata.asString()));
control->set(!control->get());
return true;
}
};
BOOL menu_check_control( void* user_data)
{
return gSavedSettings.getBOOL((char*)user_data);
@@ -9448,6 +9458,7 @@ void initialize_menus()
addMenu(new LLPromptShowURL(), "PromptShowURL");
addMenu(new LLShowAgentProfile(), "ShowAgentProfile");
addMenu(new LLToggleControl(), "ToggleControl");
addMenu(new LLTogglePerAccountControl(), "TogglePerAccountControl");
addMenu(new LLGoToObject(), "GoToObject");
addMenu(new LLPayObject(), "PayObject");