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:
@@ -2416,7 +2416,9 @@ LLControlVariable *LLView::findControl(const std::string& name)
|
||||
{
|
||||
return mParentView->findControl(name);
|
||||
}
|
||||
return LLUI::sConfigGroup->getControl(name);
|
||||
if (LLControlVariable* control = LLUI::sConfigGroup->getControl(name))
|
||||
return control;
|
||||
return LLUI::sAccountGroup->getControl(name);
|
||||
}
|
||||
|
||||
const S32 FLOATER_H_MARGIN = 15;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -534,6 +534,11 @@
|
||||
</menu_item_call>
|
||||
<menu_item_separator bottom="-167" enabled="true" height="8" label="-----------" left="0"
|
||||
mouse_opaque="true" name="separator3" width="185" />
|
||||
<menu
|
||||
create_jump_keys="true"
|
||||
label="Status"
|
||||
name="Status"
|
||||
tear_off="true">
|
||||
<menu_item_call bottom="-186" enabled="true" height="19" label="Fake Away Status" left="0"
|
||||
mouse_opaque="true" name="Fake Away Status" width="185">
|
||||
<on_click function="World.FakeAway" userdata="" />
|
||||
@@ -546,6 +551,34 @@
|
||||
mouse_opaque="true" name="Set Busy" width="185">
|
||||
<on_click function="World.SetBusy" userdata="" />
|
||||
</menu_item_call>
|
||||
<menu create_jump_keys="true" label="Autoresponse" name="Autoresponse" tear_off="true">
|
||||
<menu_item_check label="Repeat" name="Repeat">
|
||||
<on_click function="TogglePerAccountControl" userdata="AscentInstantMessageResponseRepeat"/>
|
||||
<on_check control="AscentInstantMessageResponseRepeat"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Only send when away" name="Only send when away">
|
||||
<on_click function="TogglePerAccountControl" userdata="AutoresponseOnlyIfAway"/>
|
||||
<on_check control="AutoresponseOnlyIfAway"/>
|
||||
</menu_item_check>
|
||||
<menu_item_separator/>
|
||||
<menu_item_check label="General" name="General">
|
||||
<on_click function="TogglePerAccountControl" userdata="AutoresponseAnyone"/>
|
||||
<on_check control="AutoresponseAnyone"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="•Friends Only" name="Friends Only">
|
||||
<on_click function="TogglePerAccountControl" userdata="AutoresponseAnyoneFriendsOnly"/>
|
||||
<on_check control="AutoresponseAnyoneFriendsOnly"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Non-Friends" name="Non-Friends">
|
||||
<on_click function="TogglePerAccountControl" userdata="AutoresponseNonFriends"/>
|
||||
<on_check control="AutoresponseNonFriends"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Muted" name="Muted">
|
||||
<on_click function="TogglePerAccountControl" userdata="AutoresponseMuted"/>
|
||||
<on_check control="AutoresponseMuted"/>
|
||||
</menu_item_check>
|
||||
</menu>
|
||||
</menu>
|
||||
<menu_item_call bottom="-281" enabled="false" height="19" label="Stop Animating My Avatar" left="0"
|
||||
mouse_opaque="true" name="Stop Animating My Avatar" width="250">
|
||||
<on_click function="Tools.StopAllAnimations" userdata="" />
|
||||
@@ -1038,6 +1071,10 @@
|
||||
<on_click function="ToggleControl" userdata="Nimble"/>
|
||||
<on_check control="Nimble"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Phantom" mouse_opaque="true" name="Phantom">
|
||||
<on_click function="ToggleControl" userdata="Phantom"/>
|
||||
<on_check control="Phantom"/>
|
||||
</menu_item_check>
|
||||
<menu_item_separator mouse_opaque="true" name="separators3"/>
|
||||
<menu_item_check label="Region Tracker" name="Region Tracker">
|
||||
<on_click function="ShowFloater" userdata="region_tracker"/>
|
||||
|
||||
Reference in New Issue
Block a user