summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2013-03-25 12:19:02 -0700
committersimon <none@none>2013-03-25 12:19:02 -0700
commita976f5c217ce97c70a7e151b9a490e6a6ebf1396 (patch)
tree8d86c9060ac05b34b1a9dfd25f03451e18dcc326 /indra/newview/llviewermenu.cpp
parentcc260a635674c56d8fab88a5cd4dd188b4c9ac9c (diff)
parent98a82c50d539451e1931826ca75fbc01d611806d (diff)
Pull and merge downstream code with CHUI viewer-development by way of viewer-lion
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp109
1 files changed, 64 insertions, 45 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0a0d084183..4c99e65c99 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -59,6 +59,7 @@
#include "llbuycurrencyhtml.h"
#include "llfloatergodtools.h"
#include "llfloaterinventory.h"
+#include "llfloaterimcontainer.h"
#include "llfloaterland.h"
#include "llfloaterpathfindingcharacters.h"
#include "llfloaterpathfindinglinksets.h"
@@ -107,6 +108,7 @@
#include "llviewerparcelmgr.h"
#include "llviewerstats.h"
#include "llvoavatarself.h"
+#include "llvoicevivox.h"
#include "llworldmap.h"
#include "pipeline.h"
#include "llviewerjoystick.h"
@@ -179,9 +181,6 @@ LLContextMenu* gDetachPieMenu = NULL;
LLContextMenu* gDetachScreenPieMenu = NULL;
LLContextMenu* gDetachBodyPartPieMenus[8];
-LLMenuItemCallGL* gAFKMenu = NULL;
-LLMenuItemCallGL* gBusyMenu = NULL;
-
//
// Local prototypes
@@ -474,8 +473,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);
- gBusyMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Busy", TRUE);
gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE);
gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE);
@@ -3309,15 +3306,6 @@ bool enable_freeze_eject(const LLSD& avatar_id)
return new_value;
}
-
-void login_done(S32 which, void *user)
-{
- llinfos << "Login done " << which << llendl;
-
- LLPanelLogin::closePanel();
-}
-
-
bool callback_leave_group(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -3535,7 +3523,8 @@ class LLTogglePanelPeopleTab : public view_listener_t
if ( panel_name == "friends_panel"
|| panel_name == "groups_panel"
- || panel_name == "nearby_panel")
+ || panel_name == "nearby_panel"
+ || panel_name == "blocked_panel")
{
return togglePeoplePanel(panel_name, param);
}
@@ -5582,16 +5571,6 @@ void toggle_debug_menus(void*)
// gExportDialog = LLUploadDialog::modalUploadDialog("Exporting selected objects...");
// }
//
-
-class LLCommunicateBlockList : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
- return true;
- }
-};
-
class LLWorldSetHomeLocation : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -5665,18 +5644,18 @@ class LLWorldSetAway : public view_listener_t
}
};
-class LLWorldSetBusy : public view_listener_t
+class LLWorldSetDoNotDisturb : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- if (gAgent.getBusy())
+ if (gAgent.isDoNotDisturb())
{
- gAgent.clearBusy();
+ gAgent.setDoNotDisturb(false);
}
else
{
- gAgent.setBusy();
- LLNotificationsUtil::add("BusyModeSet");
+ gAgent.setDoNotDisturb(true);
+ LLNotificationsUtil::add("DoNotDisturbModeSet");
}
return true;
}
@@ -5838,7 +5817,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
- gAgent.clearBusy();
+ gAgent.setDoNotDisturb(false);
}
LLViewerObject* objectp = selection->getPrimaryObject();
@@ -5871,12 +5850,12 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
void handle_give_money_dialog()
{
- LLNotification::Params params("BusyModePay");
+ LLNotification::Params params("DoNotDisturbModePay");
params.functor.function(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection()));
- if (gAgent.getBusy())
+ if (gAgent.isDoNotDisturb())
{
- // warn users of being in busy mode during a transaction
+ // warn users of being in do not disturb mode during a transaction
LLNotifications::instance().add(params);
}
else
@@ -7675,6 +7654,20 @@ void handle_web_content_test(const LLSD& param)
LLWeb::loadURLInternal(url);
}
+void handle_show_url(const LLSD& param)
+{
+ std::string url = param.asString();
+ if(gSavedSettings.getBOOL("UseExternalBrowser"))
+ {
+ LLWeb::loadURLExternal(url);
+ }
+ else
+ {
+ LLWeb::loadURLInternal(url);
+ }
+
+}
+
void handle_buy_currency_test(void*)
{
std::string url =
@@ -7928,6 +7921,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)
@@ -8154,11 +8163,7 @@ class LLWorldPostProcess : public view_listener_t
void handle_flush_name_caches()
{
- // Toggle display names on and off to flush
- bool use_display_names = LLAvatarNameCache::useDisplayNames();
- LLAvatarNameCache::setUseDisplayNames(!use_display_names);
- LLAvatarNameCache::setUseDisplayNames(use_display_names);
-
+ LLAvatarNameCache::cleanupClass();
if (gCacheName) gCacheName->clear();
}
@@ -8183,6 +8188,11 @@ public:
}
};
+void handle_voice_morphing_subscribe()
+{
+ LLWeb::loadURLExternal(LLTrans::getString("voice_morphing_url"));
+}
+
class LLToggleUIHints : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -8316,6 +8326,7 @@ void initialize_menus()
commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory));
+ enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed));
// Agent
commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
@@ -8361,14 +8372,21 @@ 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");
-
- // Communicate
- view_listener_t::addMenu(new LLCommunicateBlockList(), "Communicate.BlockList");
-
+
+ // Communicate > Voice morphing > Subscribe...
+ commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe));
+ LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance();
+ enable.add("Communicate.VoiceMorphing.NoVoiceMorphing.Check"
+ , boost::bind(&LLVivoxVoiceClient::onCheckVoiceEffect, voice_clientp, "NoVoiceMorphing"));
+ commit.add("Communicate.VoiceMorphing.NoVoiceMorphing.Click"
+ , boost::bind(&LLVivoxVoiceClient::onClickVoiceEffect, voice_clientp, "NoVoiceMorphing"));
+
// World menu
view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
@@ -8376,7 +8394,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation");
view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome");
view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway");
- view_listener_t::addMenu(new LLWorldSetBusy(), "World.SetBusy");
+ view_listener_t::addMenu(new LLWorldSetDoNotDisturb(), "World.SetDoNotDisturb");
view_listener_t::addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark");
view_listener_t::addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation");
@@ -8492,6 +8510,7 @@ void initialize_menus()
// Advanced > UI
commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser
commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater
+ commit.add("Advanced.ShowURL", boost::bind(&handle_show_url, _2));
view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest");
view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr");
view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory");