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 /indra/newview/llviewermenu.cpp | |
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.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
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"); |