summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/llagentwearables.cpp8
-rw-r--r--indra/newview/llagentwearables.h6
-rw-r--r--indra/newview/llappearancemgr.cpp8
-rw-r--r--indra/newview/llbottomtray.cpp2
-rw-r--r--indra/newview/llbottomtray.h4
-rw-r--r--indra/newview/llchiclet.cpp131
-rw-r--r--indra/newview/llchiclet.h36
-rw-r--r--indra/newview/llnearbychatbar.cpp9
-rw-r--r--indra/newview/llnearbychatbar.h7
-rw-r--r--indra/newview/llspeakbutton.cpp174
-rw-r--r--indra/newview/llspeakbutton.h82
-rw-r--r--indra/newview/llviewermenu.cpp102
-rw-r--r--indra/newview/llvovolume.cpp15
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Alpha.pngbin0 -> 253 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Tattoo.pngbin0 -> 253 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml3
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_UpOff.pngbin0 -> 466 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.pngbin0 -> 536 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_customize.xml31
-rw-r--r--indra/newview/skins/default/xui/en/floater_sell_land.xml66
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml22
-rw-r--r--indra/newview/skins/default/xui/en/widgets/talk_button.xml4
25 files changed, 359 insertions, 368 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index b8d27b5e7b..cba9b09dc0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -376,6 +376,7 @@ set(viewer_SOURCE_FILES
llsky.cpp
llslurl.cpp
llspatialpartition.cpp
+ llspeakbutton.cpp
llspeakers.cpp
llsplitbutton.cpp
llsprite.cpp
@@ -862,6 +863,7 @@ set(viewer_HEADER_FILES
llsky.h
llslurl.h
llspatialpartition.h
+ llspeakbutton.h
llspeakers.h
llsplitbutton.h
llsprite.h
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 8c76a219a0..3fc1055acd 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1392,6 +1392,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
const LLUUID &item_id = getWearableItemID(type,i);
popWearable(type,i);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
+ LLAppearanceManager::removeItemLinks(item_id,false);
//queryWearableCache(); // moved below
if (old_wearable)
@@ -1408,6 +1409,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
const LLUUID &item_id = getWearableItemID(type,index);
popWearable(type, index);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
+ LLAppearanceManager::removeItemLinks(item_id,false);
//queryWearableCache(); // moved below
@@ -1721,10 +1723,8 @@ void LLAgentWearables::queryWearableCache()
// MULTI_WEARABLE: need a way to specify by wearable rather than by type.
// User has picked "remove from avatar" from a menu.
// static
-void LLAgentWearables::userRemoveWearable(void* userdata)
+void LLAgentWearables::userRemoveWearable(EWearableType& type)
{
- EWearableType type = (EWearableType)(intptr_t)userdata;
-
if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&&
//!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT)))
{
@@ -1734,7 +1734,7 @@ void LLAgentWearables::userRemoveWearable(void* userdata)
}
// static
-void LLAgentWearables::userRemoveAllClothes(void* userdata)
+void LLAgentWearables::userRemoveAllClothes()
{
// We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
if (gFloaterCustomize)
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 97de785c87..317f4a7e4f 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -191,9 +191,9 @@ public:
//--------------------------------------------------------------------
public:
// MULTI-WEARABLE: assuming one wearable per type. Need upstream changes.
- static void userRemoveWearable(void* userdata); // userdata is EWearableType
- static void userRemoveAllClothes(void* userdata); // userdata is NULL
-
+ static void userRemoveWearable(EWearableType& type);
+ static void userRemoveAllClothes();
+
typedef std::vector<LLViewerObject*> llvo_vec_t;
static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index a50b39c10d..41cd77b45d 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1103,14 +1103,16 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )
bool linked_already = false;
for (S32 i=0; i<item_array.count(); i++)
{
+ // Are these links to the same object?
const LLViewerInventoryItem* inv_item = item_array.get(i).get();
if (inv_item->getLinkedUUID() == item->getLinkedUUID())
{
linked_already = true;
- break;
}
- // Are of same type but are not the same - new item will replace old.
- if (areMatchingWearables(vitem,inv_item))
+ // Are these links to different items of the same wearable
+ // type? If so, new item will replace old.
+ // MULTI-WEARABLES: revisit if more than one per type is allowed.
+ else if (areMatchingWearables(vitem,inv_item))
{
gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
gInventory.purgeObject(inv_item->getUUID());
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index ddcee5f453..a17ba79078 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -47,7 +47,7 @@
LLBottomTray::LLBottomTray(const LLSD&)
: mChicletPanel(NULL),
mSysWell(NULL),
- mTalkBtn(NULL),
+ mSpeakBtn(NULL),
mNearbyChatBar(NULL),
mToolbarStack(NULL)
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index a28f1e42ec..02588a1975 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -43,7 +43,7 @@ class LLChicletPanel;
class LLLineEditor;
class LLLayoutStack;
class LLNotificationChiclet;
-class LLTalkButton;
+class LLSpeakButton;
class LLNearbyChatBar;
class LLIMChiclet;
@@ -110,7 +110,7 @@ protected:
LLChicletPanel* mChicletPanel;
LLNotificationChiclet* mSysWell;
- LLTalkButton* mTalkBtn;
+ LLSpeakButton* mSpeakBtn;
LLNearbyChatBar* mNearbyChatBar;
LLLayoutStack* mToolbarStack;
LLMenuGL* mBottomTrayContextMenu;
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 6fd7e6b07d..53c4bb32ca 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -51,10 +51,9 @@
#include "lltransientfloatermgr.h"
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
-static LLDefaultChildRegistry::Register<LLTalkButton> t2("talk_button");
-static LLDefaultChildRegistry::Register<LLNotificationChiclet> t3("chiclet_notification");
-static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t4("chiclet_im_p2p");
-static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t5("chiclet_im_group");
+static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification");
+static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p");
+static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group");
S32 LLNotificationChiclet::mUreadSystemNotifications = 0;
@@ -1247,130 +1246,6 @@ bool LLChicletPanel::isAnyIMFloaterDoked()
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
-// *TODO Vadim: Move this out of llchiclet.cpp.
-
-LLTalkButton::Params::Params()
- : speak_button("speak_button")
- , show_button("show_button")
- , monitor("monitor")
-{
- // See widgets/talk_button.xml
-}
-
-LLTalkButton::LLTalkButton(const Params& p)
-: LLUICtrl(p)
-, mPrivateCallPanel(NULL)
-, mOutputMonitor(NULL)
-, mSpeakBtn(NULL)
-, mShowBtn(NULL)
-{
- LLRect rect = p.rect();
- LLRect speak_rect(0, rect.getHeight(), rect.getWidth(), 0);
- LLRect show_rect = p.show_button.rect();
- show_rect.set(0, rect.getHeight(), show_rect.getWidth(), 0);
-
- speak_rect.mRight -= show_rect.getWidth();
- show_rect.mLeft = speak_rect.getWidth();
- show_rect.mRight = rect.getWidth();
-
- LLButton::Params speak_params = p.speak_button;
- speak_params.rect(speak_rect);
- mSpeakBtn = LLUICtrlFactory::create<LLButton>(speak_params);
- addChild(mSpeakBtn);
- LLTransientFloaterMgr::getInstance()->addControlView(mSpeakBtn);
-
- mSpeakBtn->setClickedCallback(boost::bind(&LLTalkButton::onClick_SpeakBtn, this));
- mSpeakBtn->setToggleState(FALSE);
-
- LLButton::Params show_params = p.show_button;
- show_params.rect(show_rect);
- mShowBtn = LLUICtrlFactory::create<LLButton>(show_params);
- addChild(mShowBtn);
- LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn);
-
- mShowBtn->setClickedCallback(boost::bind(&LLTalkButton::onClick_ShowBtn, this));
- mShowBtn->setToggleState(FALSE);
-
- static const S32 MONITOR_RIGHT_PAD = 2;
-
- LLRect monitor_rect = p.monitor.rect();
- S32 monitor_height = monitor_rect.getHeight();
- monitor_rect.mLeft = speak_rect.getWidth() - monitor_rect.getWidth() - MONITOR_RIGHT_PAD;
- monitor_rect.mRight = speak_rect.getWidth() - MONITOR_RIGHT_PAD;
- monitor_rect.mBottom = (rect.getHeight() / 2) - (monitor_height / 2);
- monitor_rect.mTop = monitor_rect.mBottom + monitor_height;
-
- LLOutputMonitorCtrl::Params monitor_params = p.monitor;
- monitor_params.draw_border(false);
- monitor_params.rect(monitor_rect);
- monitor_params.auto_update(true);
- monitor_params.speaker_id(gAgentID);
- mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_params);
- mSpeakBtn->addChild(mOutputMonitor);
-
- // never show "muted" because you can't mute yourself
- mOutputMonitor->setIsMuted(false);
- mOutputMonitor->setIsAgentControl(true);
-}
-
-LLTalkButton::~LLTalkButton()
-{
-}
-
-void LLTalkButton::setSpeakBtnToggleState(bool state)
-{
- mSpeakBtn->setToggleState(state);
-}
-
-void LLTalkButton::onClick_SpeakBtn()
-{
- bool speaking = mSpeakBtn->getToggleState();
- gVoiceClient->setUserPTTState(speaking);
-}
-
-void LLTalkButton::onClick_ShowBtn()
-{
- if(!mShowBtn->getToggleState())
- {
- mPrivateCallPanel->onClickClose(mPrivateCallPanel);
- delete mPrivateCallPanel;
- mPrivateCallPanel = NULL;
- mShowBtn->setToggleState(FALSE);
- return;
- }
-
- S32 x = mSpeakBtn->getRect().mLeft;
- S32 y = 0;
-
- localPointToScreen(x, y, &x, &y);
-
- mPrivateCallPanel = new LLVoiceControlPanel;
- getRootView()->addChild(mPrivateCallPanel);
-
- y = LLBottomTray::getInstance()->getRect().getHeight() + mPrivateCallPanel->getRect().getHeight();
-
- LLRect rect;
- rect.setLeftTopAndSize(x, y, mPrivateCallPanel->getRect().getWidth(), mPrivateCallPanel->getRect().getHeight());
- mPrivateCallPanel->setRect(rect);
-
-
- LLAvatarListItem* item = new LLAvatarListItem();
- item->showLastInteractionTime(false);
- item->showInfoBtn(true);
- item->showSpeakingIndicator(true);
- item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE);
-
- mPrivateCallPanel->addItem(item);
- mPrivateCallPanel->setVisible(TRUE);
- mPrivateCallPanel->setFrontmost(TRUE);
-
- mShowBtn->setToggleState(TRUE);
-}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
LLChicletNotificationCounterCtrl::LLChicletNotificationCounterCtrl(const Params& p)
: LLTextBox(p)
, mCounter(0)
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index a830240b7d..b50702205c 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -853,42 +853,6 @@ protected:
bool mShowControls;
};
-/*
- * Button displaying voice chat status. Displays voice chat options When clicked.
-*/
-class LLTalkButton : public LLUICtrl
-{
-public:
-
- struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
- {
- Optional<LLButton::Params> speak_button,
- show_button;
-
- Optional<LLOutputMonitorCtrl::Params> monitor;
-
- Params();
- };
-
- /*virtual*/ ~LLTalkButton();
-
- void setSpeakBtnToggleState(bool state);
-
-protected:
- friend class LLUICtrlFactory;
- LLTalkButton(const Params& p);
-
- void onClick_SpeakBtn();
-
- void onClick_ShowBtn();
-
-private:
- LLButton* mSpeakBtn;
- LLButton* mShowBtn;
- LLVoiceControlPanel* mPrivateCallPanel;
- LLOutputMonitorCtrl* mOutputMonitor;
-};
-
template<class T>
T* LLChicletPanel::createChiclet(const LLUUID& session_id, S32 index)
{
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index d7a5ff289c..bcb4edd7c1 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -36,6 +36,7 @@
#include "lltrans.h"
#include "llnearbychatbar.h"
+#include "llspeakbutton.h"
#include "llbottomtray.h"
#include "llagent.h"
#include "llgesturemgr.h"
@@ -233,11 +234,11 @@ BOOL LLNearbyChatBar::postBuild()
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
- mTalkBtn = getParent()->getChild<LLTalkButton>("talk");
+ mSpeakBtn = getParent()->getChild<LLSpeakButton>("talk");
// Speak button should be initially disabled because
// it takes some time between logging in to world and connecting to voice channel.
- mTalkBtn->setEnabled(FALSE);
+ mSpeakBtn->setEnabled(FALSE);
// Registering Chat Bar to receive Voice client status change notifications.
gVoiceClient->addObserver(this);
@@ -696,7 +697,7 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe
void LLNearbyChatBar::setPTTState(bool state)
{
- mTalkBtn->setSpeakBtnToggleState(state);
+ mSpeakBtn->setSpeakBtnToggleState(state);
}
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
@@ -752,7 +753,7 @@ void LLNearbyChatBar::onChange(EStatusType status, const std::string &channelURI
break;
}
- mTalkBtn->setEnabled(enable);
+ mSpeakBtn->setEnabled(enable);
}
// Creating the object registers with the dispatcher.
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index 0307eee7bf..aa25b6aa68 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -37,11 +37,14 @@
#include "llcombobox.h"
#include "llgesturemgr.h"
#include "llchat.h"
-#include "llchiclet.h"
#include "llvoiceclient.h"
#include "lloutputmonitorctrl.h"
#include "llspeakers.h"
+
+class LLSpeakButton;
+
+
class LLGestureComboBox
: public LLComboBox
, public LLGestureManagerObserver
@@ -125,7 +128,7 @@ protected:
static S32 sLastSpecialChatChannel;
LLLineEditor* mChatBox;
- LLTalkButton* mTalkBtn;
+ LLSpeakButton* mSpeakBtn;
LLOutputMonitorCtrl* mOutputMonitor;
LLLocalSpeakerMgr* mSpeakerMgr;
};
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
new file mode 100644
index 0000000000..cd765b0338
--- /dev/null
+++ b/indra/newview/llspeakbutton.cpp
@@ -0,0 +1,174 @@
+/**
+* @file llspeakbutton.cpp
+* @brief LLSpeakButton class implementation
+*
+* $LicenseInfo:firstyear=2002&license=viewergpl$
+*
+* Copyright (c) 2002-2009, Linden Research, Inc.
+*
+* Second Life Viewer Source Code
+* The source code in this file ("Source Code") is provided by Linden Lab
+* to you under the terms of the GNU General Public License, version 2.0
+* ("GPL"), unless you have obtained a separate licensing agreement
+* ("Other License"), formally executed by you and Linden Lab. Terms of
+* the GPL can be found in doc/GPL-license.txt in this distribution, or
+* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+*
+* There are special exceptions to the terms and conditions of the GPL as
+* it is applied to this Source Code. View the full text of the exception
+* in the file doc/FLOSS-exception.txt in this software distribution, or
+* online at
+* http://secondlifegrid.net/programs/open_source/licensing/flossexception
+*
+* By copying, modifying or distributing this software, you acknowledge
+* that you have read and understood your obligations described above,
+* and agree to abide by those obligations.
+*
+* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+* COMPLETENESS OR PERFORMANCE.
+* $/LicenseInfo$
+*/
+
+#include "llviewerprecompiledheaders.h" // must be first include
+
+#include "llagent.h"
+#include "llbottomtray.h"
+#include "llfloaterreg.h"
+#include "llvoiceclient.h"
+#include "llvoicecontrolpanel.h"
+#include "lltransientfloatermgr.h"
+
+#include "llavatariconctrl.h"
+#include "llbutton.h"
+#include "llpanel.h"
+#include "lltextbox.h"
+#include "lloutputmonitorctrl.h"
+#include "llgroupmgr.h"
+
+#include "llspeakbutton.h"
+
+static LLDefaultChildRegistry::Register<LLSpeakButton> t1("talk_button");
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLSpeakButton::Params::Params()
+ : speak_button("speak_button")
+ , show_button("show_button")
+ , monitor("monitor")
+{
+ // See widgets/talk_button.xml
+}
+
+LLSpeakButton::LLSpeakButton(const Params& p)
+: LLUICtrl(p)
+, mPrivateCallPanel(NULL)
+, mOutputMonitor(NULL)
+, mSpeakBtn(NULL)
+, mShowBtn(NULL)
+{
+ LLRect rect = p.rect();
+ LLRect speak_rect(0, rect.getHeight(), rect.getWidth(), 0);
+ LLRect show_rect = p.show_button.rect();
+ show_rect.set(0, rect.getHeight(), show_rect.getWidth(), 0);
+
+ speak_rect.mRight -= show_rect.getWidth();
+ show_rect.mLeft = speak_rect.getWidth();
+ show_rect.mRight = rect.getWidth();
+
+ LLButton::Params speak_params = p.speak_button;
+ speak_params.rect(speak_rect);
+ mSpeakBtn = LLUICtrlFactory::create<LLButton>(speak_params);
+ addChild(mSpeakBtn);
+ LLTransientFloaterMgr::getInstance()->addControlView(mSpeakBtn);
+
+ mSpeakBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_SpeakBtn, this));
+ mSpeakBtn->setToggleState(FALSE);
+
+ LLButton::Params show_params = p.show_button;
+ show_params.rect(show_rect);
+ mShowBtn = LLUICtrlFactory::create<LLButton>(show_params);
+ addChild(mShowBtn);
+ LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn);
+
+ mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this));
+ mShowBtn->setToggleState(FALSE);
+
+ static const S32 MONITOR_RIGHT_PAD = 2;
+
+ LLRect monitor_rect = p.monitor.rect();
+ S32 monitor_height = monitor_rect.getHeight();
+ monitor_rect.mLeft = speak_rect.getWidth() - monitor_rect.getWidth() - MONITOR_RIGHT_PAD;
+ monitor_rect.mRight = speak_rect.getWidth() - MONITOR_RIGHT_PAD;
+ monitor_rect.mBottom = (rect.getHeight() / 2) - (monitor_height / 2);
+ monitor_rect.mTop = monitor_rect.mBottom + monitor_height;
+
+ LLOutputMonitorCtrl::Params monitor_params = p.monitor;
+ monitor_params.draw_border(false);
+ monitor_params.rect(monitor_rect);
+ monitor_params.auto_update(true);
+ monitor_params.speaker_id(gAgentID);
+ mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_params);
+ mSpeakBtn->addChild(mOutputMonitor);
+
+ // never show "muted" because you can't mute yourself
+ mOutputMonitor->setIsMuted(false);
+ mOutputMonitor->setIsAgentControl(true);
+}
+
+LLSpeakButton::~LLSpeakButton()
+{
+}
+
+void LLSpeakButton::setSpeakBtnToggleState(bool state)
+{
+ mSpeakBtn->setToggleState(state);
+}
+
+void LLSpeakButton::onClick_SpeakBtn()
+{
+ bool speaking = mSpeakBtn->getToggleState();
+ gVoiceClient->setUserPTTState(speaking);
+}
+
+void LLSpeakButton::onClick_ShowBtn()
+{
+ if(!mShowBtn->getToggleState())
+ {
+ mPrivateCallPanel->onClickClose(mPrivateCallPanel);
+ delete mPrivateCallPanel;
+ mPrivateCallPanel = NULL;
+ mShowBtn->setToggleState(FALSE);
+ return;
+ }
+
+ S32 x = mSpeakBtn->getRect().mLeft;
+ S32 y = 0;
+
+ localPointToScreen(x, y, &x, &y);
+
+ mPrivateCallPanel = new LLVoiceControlPanel;
+ getRootView()->addChild(mPrivateCallPanel);
+
+ y = LLBottomTray::getInstance()->getRect().getHeight() + mPrivateCallPanel->getRect().getHeight();
+
+ LLRect rect;
+ rect.setLeftTopAndSize(x, y, mPrivateCallPanel->getRect().getWidth(), mPrivateCallPanel->getRect().getHeight());
+ mPrivateCallPanel->setRect(rect);
+
+
+ LLAvatarListItem* item = new LLAvatarListItem();
+ item->showLastInteractionTime(false);
+ item->showInfoBtn(true);
+ item->showSpeakingIndicator(true);
+ item->reshape(mPrivateCallPanel->getRect().getWidth(), item->getRect().getHeight(), FALSE);
+
+ mPrivateCallPanel->addItem(item);
+ mPrivateCallPanel->setVisible(TRUE);
+ mPrivateCallPanel->setFrontmost(TRUE);
+
+ mShowBtn->setToggleState(TRUE);
+}
+
diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h
new file mode 100644
index 0000000000..f59ded2133
--- /dev/null
+++ b/indra/newview/llspeakbutton.h
@@ -0,0 +1,82 @@
+/**
+* @file llspeakbutton.h
+* @brief LLSpeakButton class header file
+*
+* $LicenseInfo:firstyear=2002&license=viewergpl$
+*
+* Copyright (c) 2002-2009, Linden Research, Inc.
+*
+* Second Life Viewer Source Code
+* The source code in this file ("Source Code") is provided by Linden Lab
+* to you under the terms of the GNU General Public License, version 2.0
+* ("GPL"), unless you have obtained a separate licensing agreement
+* ("Other License"), formally executed by you and Linden Lab. Terms of
+* the GPL can be found in doc/GPL-license.txt in this distribution, or
+* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+*
+* There are special exceptions to the terms and conditions of the GPL as
+* it is applied to this Source Code. View the full text of the exception
+* in the file doc/FLOSS-exception.txt in this software distribution, or
+* online at
+* http://secondlifegrid.net/programs/open_source/licensing/flossexception
+*
+* By copying, modifying or distributing this software, you acknowledge
+* that you have read and understood your obligations described above,
+* and agree to abide by those obligations.
+*
+* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+* COMPLETENESS OR PERFORMANCE.
+* $/LicenseInfo$
+*/
+
+#ifndef LL_LLSPEAKBUTTON_H
+#define LL_LLSPEAKBUTTON_H
+
+#include "llinitparam.h"
+#include "lluictrl.h"
+
+class LLVoiceControlPanel;
+class LLButton;
+class LLOutputMonitorCtrl;
+
+/*
+ * Button displaying voice chat status. Displays voice chat options when
+ * clicked.
+*/
+class LLSpeakButton : public LLUICtrl
+
+{
+public:
+
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<LLButton::Params>
+ speak_button,
+ show_button;
+
+ Optional<LLOutputMonitorCtrl::Params> monitor;
+
+ Params();
+ };
+
+ /*virtual*/ ~LLSpeakButton();
+
+ void setSpeakBtnToggleState(bool state);
+
+protected:
+ friend class LLUICtrlFactory;
+ LLSpeakButton(const Params& p);
+
+ void onClick_SpeakBtn();
+
+ void onClick_ShowBtn();
+
+private:
+ LLButton* mSpeakBtn;
+ LLButton* mShowBtn;
+ LLVoiceControlPanel* mPrivateCallPanel;
+ LLOutputMonitorCtrl* mOutputMonitor;
+};
+
+#endif // LL_LLSPEAKBUTTON_H
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 300ebf4e24..b30acd47f1 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7444,52 +7444,10 @@ class LLEditEnableTakeOff : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string clothing = userdata.asString();
- bool new_value = false;
- if (clothing == "shirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SHIRT);
- }
- if (clothing == "pants")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_PANTS);
- }
- if (clothing == "shoes")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SHOES);
- }
- if (clothing == "socks")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SOCKS);
- }
- if (clothing == "jacket")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_JACKET);
- }
- if (clothing == "gloves")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_GLOVES);
- }
- if (clothing == "undershirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT);
- }
- if (clothing == "underpants")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS);
- }
- if (clothing == "skirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SKIRT);
- }
- if (clothing == "alpha")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_ALPHA);
- }
- if (clothing == "tattoo")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_TATTOO);
- }
- return new_value;
+ EWearableType type = LLWearableDictionary::typeNameToType(clothing);
+ if (type >= WT_SHAPE && type < WT_COUNT)
+ return LLAgentWearables::selfHasWearable(type);
+ return false;
}
};
@@ -7498,53 +7456,13 @@ class LLEditTakeOff : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string clothing = userdata.asString();
- if (clothing == "shirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SHIRT);
- }
- else if (clothing == "pants")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_PANTS);
- }
- else if (clothing == "shoes")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SHOES);
- }
- else if (clothing == "socks")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SOCKS);
- }
- else if (clothing == "jacket")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_JACKET);
- }
- else if (clothing == "gloves")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_GLOVES);
- }
- else if (clothing == "undershirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_UNDERSHIRT);
- }
- else if (clothing == "underpants")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_UNDERPANTS);
- }
- else if (clothing == "skirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SKIRT);
- }
- else if (clothing == "alpha")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_ALPHA);
- }
- else if (clothing == "tattoo")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_TATTOO);
- }
- else if (clothing == "all")
+ if (clothing == "all")
+ LLAgentWearables::userRemoveAllClothes();
+ else
{
- LLAgentWearables::userRemoveAllClothes(NULL);
+ EWearableType type = LLWearableDictionary::typeNameToType(clothing);
+ if (type >= WT_SHAPE && type < WT_COUNT)
+ LLAgentWearables::userRemoveWearable(type);
}
return true;
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 1d94e9118e..caeda3d1db 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1796,20 +1796,19 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index)
bool LLVOVolume::hasMediaPermission(const LLMediaEntry* media_entry, MediaPermType perm_type)
{
- // NOTE: This logic duplicates the logic in the server (in particular, in llmediaservice.cpp).
+ // NOTE: This logic ALMOST duplicates the logic in the server (in particular, in llmediaservice.cpp).
if (NULL == media_entry ) return false; // XXX should we assert here?
- // The agent has permissions to navigate if:
- // - agent has edit permissions, or
+ // The agent has permissions if:
// - world permissions are on, or
// - group permissions are on, and agent_id is in the group, or
// - agent permissions are on, and agent_id is the owner
- if (permModify())
- {
- return true;
- }
-
+ // *NOTE: We *used* to check for modify permissions here (i.e. permissions were
+ // granted if permModify() was true). However, this doesn't make sense in the
+ // viewer: we don't want to show controls or allow interaction if the author
+ // has deemed it so. See DEV-42115.
+
U8 media_perms = (perm_type == MEDIA_PERM_INTERACT) ? media_entry->getPermsInteract() : media_entry->getPermsControl();
// World permissions
diff --git a/indra/newview/skins/default/textures/icons/Inv_Alpha.png b/indra/newview/skins/default/textures/icons/Inv_Alpha.png
new file mode 100644
index 0000000000..e8d246c6fa
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Alpha.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Tattoo.png b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png
new file mode 100644
index 0000000000..e8d246c6fa
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 2b9ebd0573..cf7ab46dd5 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -67,7 +67,9 @@
<texture name="ComboButton_Over" file_name="widgets/ComboButton_Over.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_Press" file_name="widgets/ComboButton_Press.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="ComboButton_UpSelected" file_name="widgets/ComboButton_UpSelected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="Container" file_name="containers/Container.png" preload="false" />
<texture name="DisclosureArrow_Closed_Off" file_name="widgets/DisclosureArrow_Closed_Off.png" preload="true" />
@@ -89,6 +91,7 @@
<texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" />
<texture name="Favorite_Star_Press" file_name="navbar/Favorite_Star_Press.png" preload="false" />
<texture name="Favorite_Star_Over" file_name="navbar/Favorite_Star_Over.png" preload="false" />
+ <texture name="Favorite_Link_Over" file_name="navbar/Favorite_Link_Over.png" preload="false" />
<texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="false" scale.left="2" scale.top="0" scale.right="2" scale.bottom="0" />
<texture name="FileMenu_BG" file_name="navbar/FileMenu_BG.png" preload="false" />
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png
new file mode 100644
index 0000000000..2330cb420b
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpOff.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png
new file mode 100644
index 0000000000..b7b5c2e1d4
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml
index c021dd79de..f54b6eecfb 100644
--- a/indra/newview/skins/default/xui/en/floater_customize.xml
+++ b/indra/newview/skins/default/xui/en/floater_customize.xml
@@ -193,7 +193,7 @@
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -299,7 +299,7 @@ scratch and wear it.
left="8"
name="Create New"
top="104"
- width="120" />
+ width="140" />
<button
follows="right|bottom"
height="20"
@@ -342,9 +342,10 @@ scratch and wear it.
top="4"
width="18" />
<icon
+ follows="left|top"
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -399,7 +400,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -599,7 +600,7 @@ scratch and wear it.
<icon
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -654,7 +655,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -1015,7 +1016,7 @@ scratch and wear it.
<icon
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -1100,7 +1101,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -1221,7 +1222,7 @@ scratch and wear it.
<icon
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -1306,7 +1307,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -3378,16 +3379,6 @@ scratch and wear it.
layout="topleft"
name="panel_list" />
</scroll_container>
- <button
- bottom="536"
- follows="right|bottom"
- height="20"
- label="Make Outfit"
- label_selected="Make Outfit"
- layout="topleft"
- name="make_outfit_btn"
- right="-216"
- width="100" />
<button
bottom="536"
follows="right|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_sell_land.xml b/indra/newview/skins/default/xui/en/floater_sell_land.xml
index 8fedd0a89f..fd653895a2 100644
--- a/indra/newview/skins/default/xui/en/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_sell_land.xml
@@ -96,27 +96,16 @@
width="200">
To sell this parcel:
</text>
- <icon
- follows="top|left"
- height="64"
- image_name="badge_note.j2c"
- layout="topleft"
- left="0"
- name="step_price"
- top="206"
- width="64" />
<text
type="string"
length="1"
- bottom_delta="-38"
follows="top|left"
font="SansSerif"
height="16"
layout="topleft"
- left="72"
- name="price_label"
- right="-20">
- Set a price:
+ left="30"
+ name="price_label">
+ 1. Set a price:
</text>
<text
type="string"
@@ -124,9 +113,8 @@
follows="top|left"
height="16"
layout="topleft"
- left="72"
- name="price_text"
- right="-20">
+ left="40"
+ name="price_text">
Choose an appropriate price.
</text>
<text
@@ -134,7 +122,7 @@
length="1"
height="16"
layout="topleft"
- left="72"
+ left="40"
name="price_ld"
width="20">
L$
@@ -156,32 +144,22 @@
length="1"
height="16"
layout="topleft"
- left="72"
+ left="40"
name="price_per_m"
top_delta="25"
width="200">
(L$[PER_METER] per m²)
</text>
- <icon
- follows="top|left"
- height="64"
- image_name="badge_note.j2c"
- layout="topleft"
- left="0"
- name="step_sell_to"
- width="64" />
<text
type="string"
length="1"
- bottom_delta="-38"
follows="top|left"
font="SansSerif"
height="16"
layout="topleft"
- left="72"
- name="sell_to_label"
- right="-20">
- Sell the land to:
+ left="30"
+ name="sell_to_label">
+ 2. Sell the land to:
</text>
<text
type="string"
@@ -189,7 +167,7 @@
follows="top|left"
height="25"
layout="topleft"
- left="72"
+ left="40"
word_wrap="true"
name="sell_to_text"
right="-20">
@@ -235,26 +213,16 @@
name="sell_to_select_agent"
top_delta="0"
width="60" />
- <icon
- follows="top|left"
- height="64"
- image_name="badge_note.j2c"
- layout="topleft"
- left="0"
- name="step_sell_objects"
- width="64" />
<text
type="string"
length="1"
- bottom_delta="-38"
follows="top|left"
font="SansSerif"
height="16"
layout="topleft"
- left="72"
- name="sell_objects_label"
- right="-20">
- Sell the objects with the land?
+ left="30"
+ name="sell_objects_label">
+ 3. Sell the objects with the land?
</text>
<text
type="string"
@@ -264,7 +232,7 @@
height="25"
layout="topleft"
word_wrap="true"
- left="72"
+ left="40"
name="sell_objects_text">
Land owner&apos;s transferable objects on parcel will change ownership.
</text>
@@ -273,7 +241,7 @@
follows="top|right"
height="40"
layout="topleft"
- left="72"
+ left="40"
name="sell_objects"
right="420">
<radio_item
@@ -304,7 +272,7 @@
label="Show Objects"
layout="topleft"
name="show_objects"
- left="100"
+ left="70"
top_pad="10"
width="110" />
<text
diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
index 2bec745410..6dd44255bf 100644
--- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
@@ -13,4 +13,15 @@
function="CheckControl"
parameter="GroupListShowIcons" />
</menu_item_check>
+ <menu_item_check
+ label="Leave Selected Group"
+ layout="topleft"
+ name="Leave Selected Group">
+ <menu_item_check.on_click
+ function="People.Groups.ViewSort.Action"
+ parameter="show_icons" />
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="GroupListShowIcons" />
+ </menu_item_check>
</menu>
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 1da5f0e74d..dcfd0af36e 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -60,7 +60,7 @@
min_width="96"
name="speak_panel"
user_resize="false">
- <chiclet_talk
+ <talk_button
follows="right"
height="23"
speak_button.tab_stop="true"
@@ -293,4 +293,4 @@
top="0"
width="26"/>
</layout_stack>
-</panel> \ No newline at end of file
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index c8194a286b..ed21c5cc6c 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -95,6 +95,7 @@ background_visible="true"
layout="topleft"
left="10"
name="nearby_view_sort_btn"
+ picture_style="true"
top="5"
width="18" />
<button
@@ -106,6 +107,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="add_friend_btn"
+ picture_style="true"
top_delta="0"
tool_tip="Add selected resident to your friends List"
width="18" />
@@ -181,6 +183,7 @@ background_visible="true"
layout="topleft"
left="10"
name="friends_viewsort_btn"
+ picture_style="true"
top="5"
width="18" />
<button
@@ -192,6 +195,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="add_btn"
+ picture_style="true"
tool_tip="Offer friendship to a resident"
top_delta="0"
width="18" />
@@ -205,6 +209,7 @@ background_visible="true"
left_pad="10"
right="-10"
name="del_btn"
+ picture_style="true"
tool_tip="Remove selected person from your Friends list"
top_delta="0"
width="18" />
@@ -247,6 +252,7 @@ background_visible="true"
layout="topleft"
left="10"
name="groups_viewsort_btn"
+ picture_style="true"
top="7"
width="18" />
<button
@@ -258,6 +264,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="plus_btn"
+ picture_style="true"
tool_tip="Join group/Create new group"
top_delta="0"
width="18" />
@@ -270,21 +277,10 @@ background_visible="true"
layout="topleft"
left_pad="24"
name="activate_btn"
+ picture_style="true"
tool_tip="Activate selected group"
top_delta="5"
width="10" />
- <button
- follows="bottom|left"
- height="18"
- image_selected="TrashItem_Press"
- image_unselected="TrashItem_Off"
- layout="topleft"
- left_pad="10"
- right="-10"
- name="minus_btn"
- tool_tip="Leave selected group"
- top_delta="-5"
- width="18" />
</panel>
</panel>
<panel
@@ -327,6 +323,7 @@ background_visible="true"
layout="topleft"
left="10"
name="recent_viewsort_btn"
+ picture_style="true"
top="7"
width="18" />
<button
@@ -338,6 +335,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="add_friend_btn"
+ picture_style="true"
top_delta="0"
tool_tip="Add selected resident to your friends List"
width="18" />
diff --git a/indra/newview/skins/default/xui/en/widgets/talk_button.xml b/indra/newview/skins/default/xui/en/widgets/talk_button.xml
index 725492052c..00793b4ed6 100644
--- a/indra/newview/skins/default/xui/en/widgets/talk_button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/talk_button.xml
@@ -24,8 +24,8 @@
tab_stop="false"
is_toggle="true"
picture_style="true"
- image_selected="ComboButton_Selected"
- image_unselected="ComboButton_Off"
+ image_selected="ComboButton_UpSelected"
+ image_unselected="ComboButton_UpOff"
/>
<monitor
name="monitor"