diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-09 14:41:50 -0800 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-09 14:41:50 -0800 |
commit | 4f58b4088a469d907eb33f1e338569016ba4c1f1 (patch) | |
tree | 0931835f84ea4bc20bc2489597ab8d55a6804222 | |
parent | 5790565ec6a2885fbe494c04c687e98cabf514a6 (diff) |
CHUI-517: Altering the behavior and copy of the main menu status choices. Busy has been replaced with Do Not Disturb. And both status options have been switched to be indicated with a check rather than alternating text.
-rwxr-xr-x | indra/newview/llagent.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llviewermenu.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 37 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 6 |
5 files changed, 44 insertions, 44 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 9c3a7ac45b..d548ca8fb9 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1356,12 +1356,7 @@ void LLAgent::setAFK() { sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_START); setControlFlags(AGENT_CONTROL_AWAY | AGENT_CONTROL_STOP); - LL_INFOS("AFK") << "Setting Away" << LL_ENDL; gAwayTimer.start(); - if (gAFKMenu) - { - gAFKMenu->setLabel(LLTrans::getString("AvatarSetNotAway")); - } } } @@ -1380,11 +1375,6 @@ void LLAgent::clearAFK() { sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP); clearControlFlags(AGENT_CONTROL_AWAY); - LL_INFOS("AFK") << "Clearing Away" << LL_ENDL; - if (gAFKMenu) - { - gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway")); - } } } @@ -1402,13 +1392,7 @@ BOOL LLAgent::getAFK() const void LLAgent::setDoNotDisturb(bool pIsDotNotDisturb) { mIsDoNotDisturb = pIsDotNotDisturb; - EAnimRequest animRequest = (pIsDotNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP); - - sendAnimationRequest(ANIM_AGENT_DO_NOT_DISTURB, animRequest); - if (gDoNotDisturbMenu) - { - gDoNotDisturbMenu->setLabel(LLTrans::getString((pIsDotNotDisturb ? "AvatarSetAvailable" : "AvatarSetDoNotDisturb"))); - } + sendAnimationRequest(ANIM_AGENT_DO_NOT_DISTURB, (pIsDotNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP)); LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(pIsDotNotDisturb); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ac6110f84f..511807ec2f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -178,9 +178,6 @@ LLContextMenu* gDetachPieMenu = NULL; LLContextMenu* gDetachScreenPieMenu = NULL; LLContextMenu* gDetachBodyPartPieMenus[8]; -LLMenuItemCallGL* gAFKMenu = NULL; -LLMenuItemCallGL* gDoNotDisturbMenu = NULL; - // // Local prototypes @@ -470,8 +467,6 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost); gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost); - gAFKMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Away", TRUE); - gDoNotDisturbMenu = gMenuBarView->getChild<LLMenuItemCallGL>("set_do_not_disturb", TRUE); gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); @@ -7843,6 +7838,22 @@ class LLViewCheckRenderType : public view_listener_t } }; +class LLViewStatusAway : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return (gAgent.isInitialized() && gAgent.getAFK()); + } +}; + +class LLViewStatusDoNotDisturb : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return (gAgent.isInitialized() && gAgent.isDoNotDisturb()); + } +}; + class LLViewShowHUDAttachments : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8276,8 +8287,10 @@ void initialize_menus() view_listener_t::addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips"); view_listener_t::addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); view_listener_t::addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); + view_listener_t::addMenu(new LLViewStatusAway(), "View.Status.CheckAway"); + view_listener_t::addMenu(new LLViewStatusDoNotDisturb(), "View.Status.CheckDoNotDisturb"); view_listener_t::addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); - + // Me > Movement view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index e8665a6ef6..139f898b76 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -187,8 +187,6 @@ extern LLContextMenu* gDetachPieMenu; extern LLContextMenu* gAttachBodyPartPieMenus[8]; extern LLContextMenu* gDetachBodyPartPieMenus[8]; -extern LLMenuItemCallGL* gAFKMenu; -extern LLMenuItemCallGL* gDoNotDisturbMenu; extern LLMenuItemCallGL* gMutePieMenu; extern LLMenuItemCallGL* gMuteObjectPieMenu; extern LLMenuItemCallGL* gBuyPassPieMenu; diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index f6a307d9d0..b1e3a2d41f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -130,19 +130,22 @@ label="Status" name="Status" tear_off="true"> - <menu_item_call - label="Away" - name="Set Away"> - <menu_item_call.on_click + <menu_item_check + label="Away"> + <menu_item_check.on_check + function="View.Status.CheckAway" /> + <menu_item_check.on_click function="World.SetAway" /> - </menu_item_call> - <menu_item_call - label="Busy" - name="set_do_not_disturb"> - <menu_item_call.on_click + </menu_item_check> + <menu_item_check + label="Do Not Disturb"> + <menu_item_check.on_check + function="View.Status.CheckDoNotDisturb" /> + <menu_item_check.on_click function="World.SetDoNotDisturb"/> - </menu_item_call> - </menu> + </menu_item_check> + + </menu> <menu_item_separator/> @@ -254,8 +257,7 @@ parameter="speak" /> </menu_item_check> <menu_item_check - label="Conversations Log..." - name="ConversationsLog"> + label="Conversation Log..."> <menu_item_check.on_check function="Floater.Visible" parameter="conversation" /> @@ -318,6 +320,15 @@ function="SideTray.PanelPeopleTab" parameter="blocked_panel" /> </menu_item_call> + <menu_item_separator/> + <menu_item_check + label="Do Not Disturb"> + <menu_item_check.on_check + function="View.Status.CheckDoNotDisturb" /> + <menu_item_check.on_click + function="World.SetDoNotDisturb"/> + </menu_item_check> + </menu> <menu create_jump_keys="true" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 04b6326769..f873bfe6c7 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2074,12 +2074,6 @@ For AI Character: Get the closest navigable point to the point provided. </string> - <!-- Avatar busy/away mode --> - <string name="AvatarSetNotAway">Not Away</string> - <string name="AvatarSetAway">Away</string> - <string name="AvatarSetAvailable">Not Busy</string> - <string name="AvatarSetDoNotDisturb">Busy</string> - <!-- Wearable Types --> <string name="shape">Shape</string> <string name="skin">Skin</string> |