summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp49
1 files changed, 22 insertions, 27 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 9bd4e12761..bae619c66d 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4177,27 +4177,6 @@ class LLViewToggleUI : public view_listener_t
}
};
-class LLEditDuplicate : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- if(LLEditMenuHandler::gEditMenuHandler)
- {
- LLEditMenuHandler::gEditMenuHandler->duplicate();
- }
- return true;
- }
-};
-
-class LLEditEnableDuplicate : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate();
- return new_value;
- }
-};
-
void handle_duplicate_in_place(void*)
{
LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL;
@@ -6560,10 +6539,10 @@ class LLMuteParticle : public view_listener_t
if (id.notNull())
{
- std::string name;
- gCacheName->getFullName(id, name);
+ LLAvatarName av_name;
+ LLAvatarNameCache::get(id, &av_name);
- LLMute mute(id, name, LLMute::AGENT);
+ LLMute mute(id, av_name.getUserName(), LLMute::AGENT);
if (LLMuteList::getInstance()->isMuted(mute.mID))
{
LLMuteList::getInstance()->remove(mute);
@@ -8402,6 +8381,15 @@ class LLToolsSelectTool : public view_listener_t
{
LLToolMgr::getInstance()->getCurrentToolset()->selectToolByIndex(5);
}
+
+ // Note: if floater is not visible LLViewerWindow::updateLayout() will
+ // attempt to open it, but it won't bring it to front or de-minimize.
+ if (gFloaterTools && (gFloaterTools->isMinimized() || !gFloaterTools->isShown() || !gFloaterTools->isFrontmost()))
+ {
+ gFloaterTools->setMinimized(FALSE);
+ gFloaterTools->openFloater();
+ gFloaterTools->setVisibleAndFrontmost(TRUE);
+ }
return true;
}
};
@@ -8618,7 +8606,12 @@ public:
void handle_voice_morphing_subscribe()
{
- LLWeb::loadURLExternal(LLTrans::getString("voice_morphing_url"));
+ LLWeb::loadURL(LLTrans::getString("voice_morphing_url"));
+}
+
+void handle_premium_voice_morphing_subscribe()
+{
+ LLWeb::loadURL(LLTrans::getString("premium_voice_morphing_url"));
}
class LLToggleUIHints : public view_listener_t
@@ -8696,7 +8689,6 @@ void initialize_edit_menu()
view_listener_t::addMenu(new LLEditDelete(), "Edit.Delete");
view_listener_t::addMenu(new LLEditSelectAll(), "Edit.SelectAll");
view_listener_t::addMenu(new LLEditDeselect(), "Edit.Deselect");
- view_listener_t::addMenu(new LLEditDuplicate(), "Edit.Duplicate");
view_listener_t::addMenu(new LLEditTakeOff(), "Edit.TakeOff");
view_listener_t::addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
view_listener_t::addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
@@ -8706,7 +8698,6 @@ void initialize_edit_menu()
view_listener_t::addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
view_listener_t::addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
view_listener_t::addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
- view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
}
@@ -8814,6 +8805,8 @@ void initialize_menus()
// Communicate > Voice morphing > Subscribe...
commit.add("Communicate.VoiceMorphing.Subscribe", boost::bind(&handle_voice_morphing_subscribe));
+ // Communicate > Voice morphing > Premium perk...
+ commit.add("Communicate.VoiceMorphing.PremiumPerk", boost::bind(&handle_premium_voice_morphing_subscribe));
LLVivoxVoiceClient * voice_clientp = LLVivoxVoiceClient::getInstance();
enable.add("Communicate.VoiceMorphing.NoVoiceMorphing.Check"
, boost::bind(&LLVivoxVoiceClient::onCheckVoiceEffect, voice_clientp, "NoVoiceMorphing"));
@@ -9115,6 +9108,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLObjectAttachToAvatar(true), "Object.AttachToAvatar");
view_listener_t::addMenu(new LLObjectAttachToAvatar(false), "Object.AttachAddToAvatar");
view_listener_t::addMenu(new LLObjectReturn(), "Object.Return");
+ commit.add("Object.Duplicate", boost::bind(&LLSelectMgr::duplicate, LLSelectMgr::getInstance()));
view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
view_listener_t::addMenu(new LLObjectMute(), "Object.Mute");
@@ -9136,6 +9130,7 @@ void initialize_menus()
enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1));
view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn");
+ enable.add("Object.EnableDuplicate", boost::bind(&LLSelectMgr::canDuplicate, LLSelectMgr::getInstance()));
view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute));