summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llsd.cpp32
-rw-r--r--indra/llcommon/llsd.h6
-rw-r--r--indra/llmessage/llareslistener.cpp2
-rw-r--r--indra/llui/llflatlistview.cpp10
-rw-r--r--indra/llui/llfloaterreglistener.cpp2
-rw-r--r--indra/llui/llnotifications.cpp12
-rw-r--r--indra/newview/llagentwearables.cpp1
-rw-r--r--indra/newview/llavatarlistitem.cpp2
-rw-r--r--indra/newview/llchathistory.cpp6
-rw-r--r--indra/newview/llcurrencyuimanager.cpp6
-rw-r--r--indra/newview/lleventnotifier.cpp2
-rw-r--r--indra/newview/llfloaterabout.cpp2
-rw-r--r--indra/newview/llfloatermediasettings.cpp17
-rw-r--r--indra/newview/llfloatermediasettings.h3
-rw-r--r--indra/newview/llfloatertestinspectors.cpp4
-rw-r--r--indra/newview/llfloaterwhitelistentry.cpp2
-rw-r--r--indra/newview/llgroupactions.cpp2
-rw-r--r--indra/newview/llgrouplist.cpp2
-rw-r--r--indra/newview/lllocationinputctrl.cpp8
-rw-r--r--indra/newview/llmaniptranslate.cpp2
-rw-r--r--indra/newview/llnavigationbar.cpp2
-rw-r--r--indra/newview/llpanelblockedlist.cpp2
-rw-r--r--indra/newview/llpanellandmarks.cpp4
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp51
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.h4
-rw-r--r--indra/newview/llpanelmediasettingssecurity.cpp138
-rw-r--r--indra/newview/llpanelmediasettingssecurity.h16
-rw-r--r--indra/newview/llpanelpeople.cpp2
-rw-r--r--indra/newview/llpanelprofile.cpp2
-rw-r--r--indra/newview/llstartup.cpp6
-rw-r--r--indra/newview/lltooldraganddrop.cpp32
-rw-r--r--indra/newview/lluilistener.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp11
-rw-r--r--indra/newview/llviewermenu.cpp3
-rw-r--r--indra/newview/llviewerobject.h1
-rw-r--r--indra/newview/llwearable.cpp10
-rw-r--r--indra/newview/llwearable.h4
-rw-r--r--indra/newview/llworldmapview.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml15
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml24
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_security.xml35
41 files changed, 288 insertions, 205 deletions
diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index 9140ebb3f3..c863d4e266 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -355,7 +355,7 @@ namespace
using LLSD::Impl::erase; // Unhiding erase(LLSD::Integer)
using LLSD::Impl::ref; // Unhiding ref(LLSD::Integer)
virtual LLSD get(const LLSD::String&) const;
- LLSD& insert(const LLSD::String& k, const LLSD& v);
+ void insert(const LLSD::String& k, const LLSD& v);
virtual void erase(const LLSD::String&);
LLSD& ref(const LLSD::String&);
virtual const LLSD& ref(const LLSD::String&) const;
@@ -394,14 +394,9 @@ namespace
return (i != mData.end()) ? i->second : LLSD();
}
- LLSD& ImplMap::insert(const LLSD::String& k, const LLSD& v)
+ void ImplMap::insert(const LLSD::String& k, const LLSD& v)
{
mData.insert(DataMap::value_type(k, v));
- #ifdef LL_MSVC7
- return *((LLSD*)this);
- #else
- return *dynamic_cast<LLSD*>(this);
- #endif
}
void ImplMap::erase(const LLSD::String& k)
@@ -450,7 +445,7 @@ namespace
virtual int size() const;
virtual LLSD get(LLSD::Integer) const;
void set(LLSD::Integer, const LLSD&);
- LLSD& insert(LLSD::Integer, const LLSD&);
+ void insert(LLSD::Integer, const LLSD&);
void append(const LLSD&);
virtual void erase(LLSD::Integer);
LLSD& ref(LLSD::Integer);
@@ -499,14 +494,10 @@ namespace
mData[index] = v;
}
- LLSD& ImplArray::insert(LLSD::Integer i, const LLSD& v)
+ void ImplArray::insert(LLSD::Integer i, const LLSD& v)
{
if (i < 0) {
- #ifdef LL_MSVC7
- return *((LLSD*)this);
- #else
- return *dynamic_cast<LLSD*>(this);
- #endif
+ return;
}
DataVector::size_type index = i;
@@ -516,11 +507,6 @@ namespace
}
mData.insert(mData.begin() + index, v);
- #ifdef LL_MSVC7
- return *((LLSD*)this);
- #else
- return *dynamic_cast<LLSD*>(this);
- #endif
}
void ImplArray::append(const LLSD& v)
@@ -763,11 +749,12 @@ LLSD LLSD::emptyMap()
bool LLSD::has(const String& k) const { return safe(impl).has(k); }
LLSD LLSD::get(const String& k) const { return safe(impl).get(k); }
+void LLSD::insert(const String& k, const LLSD& v) { makeMap(impl).insert(k, v); }
-LLSD& LLSD::insert(const String& k, const LLSD& v)
+LLSD& LLSD::with(const String& k, const LLSD& v)
{
makeMap(impl).insert(k, v);
- return *dynamic_cast<LLSD*>(this);
+ return *this;
}
void LLSD::erase(const String& k) { makeMap(impl).erase(k); }
@@ -788,8 +775,9 @@ int LLSD::size() const { return safe(impl).size(); }
LLSD LLSD::get(Integer i) const { return safe(impl).get(i); }
void LLSD::set(Integer i, const LLSD& v){ makeArray(impl).set(i, v); }
+void LLSD::insert(Integer i, const LLSD& v) { makeArray(impl).insert(i, v); }
-LLSD& LLSD::insert(Integer i, const LLSD& v)
+LLSD& LLSD::with(Integer i, const LLSD& v)
{
makeArray(impl).insert(i, v);
return *this;
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 552bb57498..135133c19c 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -223,8 +223,9 @@ public:
bool has(const String&) const;
LLSD get(const String&) const;
- LLSD& insert(const String&, const LLSD&);
+ void insert(const String&, const LLSD&);
void erase(const String&);
+ LLSD& with(const String&, const LLSD&);
LLSD& operator[](const String&);
LLSD& operator[](const char* c) { return (*this)[String(c)]; }
@@ -238,9 +239,10 @@ public:
LLSD get(Integer) const;
void set(Integer, const LLSD&);
- LLSD& insert(Integer, const LLSD&);
+ void insert(Integer, const LLSD&);
void append(const LLSD&);
void erase(Integer);
+ LLSD& with(Integer, const LLSD&);
const LLSD& operator[](Integer) const;
LLSD& operator[](Integer);
diff --git a/indra/llmessage/llareslistener.cpp b/indra/llmessage/llareslistener.cpp
index 7db3675b77..97efa96d53 100644
--- a/indra/llmessage/llareslistener.cpp
+++ b/indra/llmessage/llareslistener.cpp
@@ -34,7 +34,7 @@ LLAresListener::LLAresListener(LLAres* llares):
"On failure, returns an array containing only the original URI, so\n"
"failure case can be processed like success case.",
&LLAresListener::rewriteURI,
- LLSD().insert("uri", LLSD()).insert("reply", LLSD()));
+ LLSD().with("uri", LLSD()).with("reply", LLSD()));
}
/// This UriRewriteResponder subclass packages returned URIs as an LLSD
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index ddfb0f8534..f4a5f1c990 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -39,8 +39,8 @@
static const LLDefaultChildRegistry::Register<LLFlatListView> flat_list_view("flat_list_view");
-const LLSD SELECTED_EVENT = LLSD().insert("selected", true);
-const LLSD UNSELECTED_EVENT = LLSD().insert("selected", false);
+const LLSD SELECTED_EVENT = LLSD().with("selected", true);
+const LLSD UNSELECTED_EVENT = LLSD().with("selected", false);
static const std::string COMMENT_TEXTBOX = "comment_text";
@@ -530,7 +530,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
if ( !selectNextItemPair(true, reset_selection) && reset_selection)
{
// If case we are in accordion tab notify parent to go to the previous accordion
- notifyParent(LLSD().insert("action","select_prev"));
+ notifyParent(LLSD().with("action","select_prev"));
}
break;
}
@@ -539,7 +539,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
if ( !selectNextItemPair(false, reset_selection) && reset_selection)
{
// If case we are in accordion tab notify parent to go to the next accordion
- notifyParent(LLSD().insert("action","select_next"));
+ notifyParent(LLSD().with("action","select_next"));
}
break;
}
@@ -570,7 +570,7 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
// In case we are in accordion tab notify parent to show selected rectangle
LLRect screen_rc;
localRectToScreen(selected_rc, &screen_rc);
- notifyParent(LLSD().insert("scrollToShowRect",screen_rc.getValue()));
+ notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue()));
handled = TRUE;
}
diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp
index 029d3b6810..082d7c1573 100644
--- a/indra/llui/llfloaterreglistener.cpp
+++ b/indra/llui/llfloaterreglistener.cpp
@@ -28,7 +28,7 @@ LLFloaterRegListener::LLFloaterRegListener():
add("getBuildMap",
"Return on [\"reply\"] data about all registered LLFloaterReg floater names",
&LLFloaterRegListener::getBuildMap,
- LLSD().insert("reply", LLSD()));
+ LLSD().with("reply", LLSD()));
LLSD requiredName;
requiredName["name"] = LLSD();
add("showInstance",
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 05f2d3a9cf..86989012ee 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -711,7 +711,7 @@ LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListe
// only about new notifications
for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
{
- slot(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
+ slot(LLSD().with("sigtype", "load").with("id", (*it)->id()));
}
// and then connect the signal so that all future notifications will also be
// forwarded.
@@ -722,7 +722,7 @@ LLBoundListener LLNotificationChannelBase::connectAtFrontChangedImpl(const LLEve
{
for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
{
- slot(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
+ slot(LLSD().with("sigtype", "load").with("id", (*it)->id()));
}
return mChanged.connect(slot, boost::signals2::at_front);
}
@@ -907,7 +907,7 @@ void LLNotificationChannel::setComparator(LLNotificationComparator comparator)
mItems.swap(s2);
// notify clients that we've been resorted
- mChanged(LLSD().insert("sigtype", "sort"));
+ mChanged(LLSD().with("sigtype", "sort"));
}
bool LLNotificationChannel::isEmpty() const
@@ -1443,7 +1443,7 @@ void LLNotifications::add(const LLNotificationPtr pNotif)
llerrs << "Notification added a second time to the master notification channel." << llendl;
}
- updateItem(LLSD().insert("sigtype", "add").insert("id", pNotif->id()), pNotif);
+ updateItem(LLSD().with("sigtype", "add").with("id", pNotif->id()), pNotif);
}
void LLNotifications::cancel(LLNotificationPtr pNotif)
@@ -1454,7 +1454,7 @@ void LLNotifications::cancel(LLNotificationPtr pNotif)
llerrs << "Attempted to delete nonexistent notification " << pNotif->getName() << llendl;
}
pNotif->cancel();
- updateItem(LLSD().insert("sigtype", "delete").insert("id", pNotif->id()), pNotif);
+ updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif);
}
void LLNotifications::update(const LLNotificationPtr pNotif)
@@ -1462,7 +1462,7 @@ void LLNotifications::update(const LLNotificationPtr pNotif)
LLNotificationSet::iterator it=mItems.find(pNotif);
if (it != mItems.end())
{
- updateItem(LLSD().insert("sigtype", "change").insert("id", pNotif->id()), pNotif);
+ updateItem(LLSD().with("sigtype", "change").with("id", pNotif->id()), pNotif);
}
}
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 15983ee78a..3114a37ada 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -703,6 +703,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
void LLAgentWearables::wearableUpdated(LLWearable *wearable)
{
mAvatarObject->wearableUpdated(wearable->getType(), TRUE);
+ wearable->refreshName();
wearable->setLabelUpdated();
// Hack pt 2. If the wearable we just loaded has definition version 24,
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index efc9538fa6..3bee5c353f 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -260,7 +260,7 @@ void LLAvatarListItem::setAvatarIconVisible(bool visible)
void LLAvatarListItem::onInfoBtnClick()
{
- LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarId));
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarId));
/* TODO fix positioning of inspector
localPointToScreen(mXPos, mYPos, &mXPos, &mYPos);
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 078c2518c6..6e1bb961a5 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -78,7 +78,7 @@ public:
{
LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT));
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().insert("blocked_to_select", getAvatarId()));
+ LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId()));
}
}
@@ -160,11 +160,11 @@ public:
{
if (mSourceType == CHAT_SOURCE_OBJECT)
{
- LLFloaterReg::showInstance("inspect_object", LLSD().insert("object_id", mAvatarID));
+ LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", mAvatarID));
}
else if (mSourceType == CHAT_SOURCE_AGENT)
{
- LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID));
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarID));
}
//if chat source is system, you may add "else" here to define behaviour.
}
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index 319cbf8209..544711a862 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -85,6 +85,7 @@ public:
S32 mUSDCurrencyEstimatedCost;
bool mLocalCurrencyEstimated;
std::string mLocalCurrencyEstimatedCost;
+ bool mSupportsInternationalBilling;
std::string mSiteConfirm;
bool mBought;
@@ -137,6 +138,7 @@ LLCurrencyUIManager::Impl::Impl(LLPanel& dialog)
mError(false),
mUserCurrencyBuy(2000), // note, this is a default, real value set in llfloaterbuycurrency.cpp
mUserEnteredCurrencyBuy(false),
+ mSupportsInternationalBilling(false),
mBought(false),
mTransactionType(TransactionNone), mTransaction(0),
mCurrencyChanged(false)
@@ -207,6 +209,7 @@ void LLCurrencyUIManager::Impl::finishCurrencyInfo()
if (mLocalCurrencyEstimated)
{
mLocalCurrencyEstimatedCost = currency["estimatedLocalCost"].asString();
+ mSupportsInternationalBilling = true;
}
S32 newCurrencyBuy = currency["currencyBuy"].asInt();
@@ -464,6 +467,9 @@ void LLCurrencyUIManager::Impl::updateUI()
mPanel.childSetTextArg("currency_est", "[LOCALAMOUNT]", getLocalEstimate());
mPanel.childSetVisible("currency_est", hasEstimate() && mUserCurrencyBuy > 0);
+ mPanel.childSetVisible("currency_links", mSupportsInternationalBilling);
+ mPanel.childSetVisible("exchange_rate_note", mSupportsInternationalBilling);
+
if (mPanel.childIsEnabled("buy_btn")
||mPanel.childIsVisible("currency_est")
|| mPanel.childIsVisible("error_web"))
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index 9c8af16535..b64799bd86 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -197,7 +197,7 @@ bool LLEventNotification::handleResponse(const LLSD& notification, const LLSD& r
break;
}
case 1:
- LLFloaterReg::showInstance("search", LLSD().insert("category", "events").insert("id", S32(getEventID())));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "events").with("id", S32(getEventID())));
break;
case 2:
break;
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 58c0c19761..68fc69b4f7 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -312,7 +312,7 @@ public:
add("getInfo",
"Request an LLSD::Map containing information used to populate About box",
&LLFloaterAboutListener::getInfo,
- LLSD().insert("reply", LLSD()));
+ LLSD().with("reply", LLSD()));
}
private:
diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index f7ce826a39..16a76723eb 100644
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -58,7 +58,6 @@ LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key)
mMultipleMedia(false),
mMultipleValidMedia(false)
{
-// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_media_settings.xml");
}
////////////////////////////////////////////////////////////////////////////////
@@ -216,7 +215,6 @@ void LLFloaterMediaSettings::clearValues( bool editable)
sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions, editable);
}
-
////////////////////////////////////////////////////////////////////////////////
// static
void LLFloaterMediaSettings::onBtnOK( void* userdata )
@@ -271,20 +269,6 @@ const std::string LLFloaterMediaSettings::getHomeUrl()
}
////////////////////////////////////////////////////////////////////////////////
-//
-bool LLFloaterMediaSettings::passesWhiteList( const std::string& test_url )
-{
- // sanity check - don't think this can happen
- if ( mPanelMediaSettingsSecurity )
- // version in security dialog code is specialized so we pass in
- // empty string for first parameter since it's not used
- return mPanelMediaSettingsSecurity->passesWhiteList( "", test_url );
- else
- // this is all we can do
- return false;
-}
-
-////////////////////////////////////////////////////////////////////////////////
// virtual
void LLFloaterMediaSettings::draw()
{
@@ -316,3 +300,4 @@ void LLFloaterMediaSettings::draw()
LLFloater::draw();
}
+
diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h
index e2af1705bf..b72e3d855d 100644
--- a/indra/newview/llfloatermediasettings.h
+++ b/indra/newview/llfloatermediasettings.h
@@ -57,7 +57,7 @@ public:
LLPanelMediaSettingsSecurity* getPanelSecurity(){return mPanelMediaSettingsSecurity;};
const std::string getHomeUrl();
- bool passesWhiteList( const std::string& test_url );
+ //bool passesWhiteList( const std::string& test_url );
virtual void draw();
@@ -75,7 +75,6 @@ protected:
LLPanelMediaSettingsSecurity* mPanelMediaSettingsSecurity;
LLPanelMediaSettingsPermissions* mPanelMediaSettingsPermissions;
-
static void onBtnOK(void*);
static void onBtnCancel(void*);
static void onBtnApply(void*);
diff --git a/indra/newview/llfloatertestinspectors.cpp b/indra/newview/llfloatertestinspectors.cpp
index 09996b0b92..58d5197eaa 100644
--- a/indra/newview/llfloatertestinspectors.cpp
+++ b/indra/newview/llfloatertestinspectors.cpp
@@ -82,12 +82,12 @@ void LLFloaterTestInspectors::showAvatarInspector(LLUICtrl*, const LLSD& avatar_
id = avatar_id.asUUID();
}
// spawns off mouse position automatically
- LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", id));
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", id));
}
void LLFloaterTestInspectors::showObjectInspector(LLUICtrl*, const LLSD& object_id)
{
- LLFloaterReg::showInstance("inspect_object", LLSD().insert("object_id", object_id));
+ LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", object_id));
}
void LLFloaterTestInspectors::onClickAvatar2D()
diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp
index 551a5191fc..04dbd38153 100644
--- a/indra/newview/llfloaterwhitelistentry.cpp
+++ b/indra/newview/llfloaterwhitelistentry.cpp
@@ -81,7 +81,7 @@ void LLFloaterWhiteListEntry::onBtnOK( void* userdata )
{
std::string white_list_item = self->mWhiteListEdit->getText();
- panel->addWhiteListItem( white_list_item );
+ panel->addWhiteListEntry( white_list_item );
};
self->closeFloater();
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 6fe8ed0e4d..4adefdfcaf 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -113,7 +113,7 @@ LLGroupHandler gGroupHandler;
// static
void LLGroupActions::search()
{
- LLFloaterReg::showInstance("search", LLSD().insert("category", "groups"));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "groups"));
}
// static
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index cdb85f5b1c..97cf139f1d 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -329,7 +329,7 @@ void LLGroupListItem::setActive(bool active)
void LLGroupListItem::onInfoBtnClick()
{
- LLFloaterReg::showInstance("inspect_group", LLSD().insert("group_id", mGroupID));
+ LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", mGroupID));
}
void LLGroupListItem::onProfileBtnClick()
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 9d4dc2b285..d97f1d4d18 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -473,7 +473,7 @@ void LLLocationInputCtrl::draw()
void LLLocationInputCtrl::onInfoButtonClicked()
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "agent"));
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent"));
}
void LLLocationInputCtrl::onForSaleButtonClicked()
@@ -495,7 +495,7 @@ void LLLocationInputCtrl::onAddLandmarkButtonClicked()
}
else
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
}
}
@@ -844,12 +844,12 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
if(!landmark)
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
}
else
{
LLSideTray::getInstance()->showPanel("panel_places",
- LLSD().insert("type", "landmark").insert("id",landmark->getUUID()));
+ LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
}
else if (item == "cut")
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 932a3d8a83..765b504afe 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1440,7 +1440,7 @@ void LLManipTranslate::renderSnapGuides()
LLVector3 help_text_pos = selection_center_start + (snap_offset_meters_up * 3.f * mSnapOffsetAxis);
const LLFontGL* big_fontp = LLFontGL::getFontSansSerif();
- std::string help_text = "Move mouse cursor over ruler to snap";
+ std::string help_text = "Move mouse cursor over ruler";
LLColor4 help_text_color = LLColor4::white;
help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f);
hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 41376c4c09..e65b7d8a0c 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -561,7 +561,7 @@ void LLNavigationBar::handleLoginComplete()
void LLNavigationBar::invokeSearch(std::string search_text)
{
- LLFloaterReg::showInstance("search", LLSD().insert("category", "all").insert("id", LLSD(search_text)));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("id", LLSD(search_text)));
}
void LLNavigationBar::clearHistoryCache()
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 73cffaa7ed..ae703ebd8e 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -104,7 +104,7 @@ void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id)
void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect)
{
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().insert(BLOCKED_PARAM_NAME, idToSelect));
+ LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
}
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 413d8ed756..3af18bb751 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -596,11 +596,11 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
if(landmark)
{
LLSideTray::getInstance()->showPanel("panel_places",
- LLSD().insert("type", "landmark").insert("id",landmark->getUUID()));
+ LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
else
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
}
}
else if ("category" == command_name)
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index b1e7dd3d50..3fa0e7bf8f 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -59,6 +59,8 @@
#include "llfloatermediasettings.h"
#include "llfloatertools.h"
#include "lltrans.h"
+#include "lltextbox.h"
+#include "llpanelmediasettingssecurity.h"
const char *CHECKERBOARD_DATA_URL = "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%%22 height=%22100%%22 %3E%3Cdefs%3E%3Cpattern id=%22checker%22 patternUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%22128%22 height=%22128%22 viewBox=%220 0 128 128%22 %3E%3Crect x=%220%22 y=%220%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3Crect x=%2264%22 y=%2264%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3C/pattern%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22 fill=%22url(#checker)%22 /%3E%3C/svg%3E";
@@ -98,10 +100,12 @@ BOOL LLPanelMediaSettingsGeneral::postBuild()
mHomeURL = getChild< LLLineEditor >( LLMediaEntry::HOME_URL_KEY );
mWidthPixels = getChild< LLSpinCtrl >( LLMediaEntry::WIDTH_PIXELS_KEY );
mPreviewMedia = getChild<LLMediaCtrl>("preview_media");
+ mFailWhiteListText = getChild<LLTextBox>( "home_fails_whitelist_label" );
// watch commit action for HOME URL
childSetCommitCallback( LLMediaEntry::HOME_URL_KEY, onCommitHomeURL, this);
childSetCommitCallback( "current_url_reset_btn",onBtnResetCurrentUrl, this);
+
// interrogates controls and updates widgets as required
updateMediaPreview();
@@ -121,6 +125,11 @@ void LLPanelMediaSettingsGeneral::draw()
// housekeeping
LLPanel::draw();
+ // TODO: we need to call this repeatedly until the floater panels are fully
+ // created but once we have a valid answer, we should stop looking here - the
+ // commit callback will handle it
+ checkHomeUrlPassesWhitelist();
+
// enable/disable pixel values image entry based on auto scale checkbox
if ( mAutoScale->getValue().asBoolean() == false )
{
@@ -250,10 +259,6 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_
LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata;
self->mMediaEditable = editable;
- //llinfos << "---------------" << llendl;
- //llinfos << ll_pretty_print_sd(media_settings) << llendl;
- //llinfos << "---------------" << llendl;
-
if ( LLPanelMediaSettingsGeneral::isMultiple() )
{
self->clearValues(self, self->mMediaEditable);
@@ -316,7 +321,7 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_
data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() );
};
};
-
+
// interrogates controls and updates widgets as required
self->updateMediaPreview();
}
@@ -355,20 +360,35 @@ void LLPanelMediaSettingsGeneral::onClose(bool app_quitting)
}
////////////////////////////////////////////////////////////////////////////////
+//
+void LLPanelMediaSettingsGeneral::checkHomeUrlPassesWhitelist()
+{
+ // parent floater has not constructed the security panel yet
+ if ( mParent->getPanelSecurity() == 0 )
+ return;
+
+ std::string home_url = getHomeUrl();
+ if ( home_url.empty() || mParent->getPanelSecurity()->urlPassesWhiteList( home_url ) )
+ {
+ // Home URL is empty or passes the white list so hide the warning message
+ mFailWhiteListText->setVisible( false );
+ }
+ else
+ {
+ // Home URL does not pass the white list so show the warning message
+ mFailWhiteListText->setVisible( true );
+ };
+}
+
+////////////////////////////////////////////////////////////////////////////////
// static
void LLPanelMediaSettingsGeneral::onCommitHomeURL( LLUICtrl* ctrl, void *userdata )
{
LLPanelMediaSettingsGeneral* self =(LLPanelMediaSettingsGeneral *)userdata;
- // check url user is trying to enter for home URL will pass whitelist
- // and decline to accept it if it doesn't.
- std::string home_url = self->mHomeURL->getValue().asString();
- if ( ! self->mParent->passesWhiteList( home_url ) )
- {
- LLNotificationsUtil::add("WhiteListInvalidatesHomeUrl");
- return;
- };
-
+ // check home url passes whitelist and display warning if not
+ self->checkHomeUrlPassesWhitelist();
+
self->updateMediaPreview();
}
@@ -461,7 +481,7 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_
selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated );
// Note: we don't update the 'current URL' field until the media data itself changes
-
+
return all_face_media_navigated;
}
@@ -477,7 +497,6 @@ const std::string LLPanelMediaSettingsGeneral::getHomeUrl()
void LLPanelMediaSettingsGeneral::updateCurrentUrl()
{
// Get the current URL from the selection
-
const LLMediaEntry default_media_data;
std::string value_str = default_media_data.getCurrentURL();
struct functor_getter_current_url : public LLSelectedTEGetFunctor< std::string >
diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h
index f8b8f0d224..7782b25d63 100644
--- a/indra/newview/llpanelmediasettingsgeneral.h
+++ b/indra/newview/llpanelmediasettingsgeneral.h
@@ -42,6 +42,7 @@ class LLLineEditor;
class LLSpinCtrl;
class LLTextureCtrl;
class LLMediaCtrl;
+class LLTextBox;
class LLFloaterMediaSettings;
class LLPanelMediaSettingsGeneral : public LLPanel
@@ -87,6 +88,8 @@ private:
static bool isMultiple();
+ void checkHomeUrlPassesWhitelist();
+
LLComboBox* mControls;
LLCheckBoxCtrl* mAutoLoop;
LLCheckBoxCtrl* mFirstClick;
@@ -98,6 +101,7 @@ private:
LLLineEditor* mHomeURL;
LLLineEditor* mCurrentURL;
LLMediaCtrl* mPreviewMedia;
+ LLTextBox* mFailWhiteListText;
};
#endif // LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H
diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp
index 7ec53ed57a..d87c7608d5 100644
--- a/indra/newview/llpanelmediasettingssecurity.cpp
+++ b/indra/newview/llpanelmediasettingssecurity.cpp
@@ -46,8 +46,10 @@
#include "llsdutil.h"
#include "llselectmgr.h"
#include "llmediaentry.h"
+#include "lltextbox.h"
#include "llfloaterwhitelistentry.h"
#include "llfloatermediasettings.h"
+
////////////////////////////////////////////////////////////////////////////////
//
LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() :
@@ -55,9 +57,9 @@ LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() :
{
mCommitCallbackRegistrar.add("Media.whitelistAdd", boost::bind(&LLPanelMediaSettingsSecurity::onBtnAdd, this));
mCommitCallbackRegistrar.add("Media.whitelistDelete", boost::bind(&LLPanelMediaSettingsSecurity::onBtnDel, this));
+
// build dialog from XML
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_security.xml");
-
}
////////////////////////////////////////////////////////////////////////////////
@@ -66,6 +68,7 @@ BOOL LLPanelMediaSettingsSecurity::postBuild()
{
mEnableWhiteList = getChild< LLCheckBoxCtrl >( LLMediaEntry::WHITELIST_ENABLE_KEY );
mWhiteListList = getChild< LLScrollListCtrl >( LLMediaEntry::WHITELIST_KEY );
+ mHomeUrlFailsWhiteListText = getChild<LLTextBox>( "home_url_fails_whitelist" );
setDefaultBtn("whitelist_add");
@@ -84,30 +87,6 @@ void LLPanelMediaSettingsSecurity::draw()
{
// housekeeping
LLPanel::draw();
-
- // if list is empty, disable DEL button and checkbox to enable use of list
- if ( mWhiteListList->isEmpty() )
- {
- childSetEnabled( "whitelist_del", false );
- childSetEnabled( LLMediaEntry::WHITELIST_KEY, false );
- childSetEnabled( LLMediaEntry::WHITELIST_ENABLE_KEY, false );
- }
- else
- {
- childSetEnabled( "whitelist_del", true );
- childSetEnabled( LLMediaEntry::WHITELIST_KEY, true );
- childSetEnabled( LLMediaEntry::WHITELIST_ENABLE_KEY, true );
- };
-
- // if nothing is selected, disable DEL button
- if ( mWhiteListList->getSelectedValue().asString().empty() )
- {
- childSetEnabled( "whitelist_del", false );
- }
- else
- {
- childSetEnabled( "whitelist_del", true );
- };
}
////////////////////////////////////////////////////////////////////////////////
@@ -179,9 +158,8 @@ void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media
LLSD::array_iterator iter = url_list.beginArray();
while( iter != url_list.endArray() )
{
- // TODO: is iter guaranteed to be valid here?
- std::string url = *iter;
- list->addSimpleElement( url );
+ std::string entry = *iter;
+ self->addWhiteListEntry( entry );
++iter;
};
};
@@ -216,15 +194,18 @@ void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in )
fill_me_in[LLMediaEntry::WHITELIST_ENABLE_KEY] = (LLSD::Boolean)mEnableWhiteList->getValue();
// iterate over white list and extract items
- std::vector< LLScrollListItem* > white_list_items = mWhiteListList->getAllData();
- std::vector< LLScrollListItem* >::iterator iter = white_list_items.begin();
+ std::vector< LLScrollListItem* > whitelist_items = mWhiteListList->getAllData();
+ std::vector< LLScrollListItem* >::iterator iter = whitelist_items.begin();
+
// *NOTE: need actually set the key to be an emptyArray(), or the merge
// we do with this LLSD will think there's nothing to change.
fill_me_in[LLMediaEntry::WHITELIST_KEY] = LLSD::emptyArray();
- while( iter != white_list_items.end() )
+ while( iter != whitelist_items.end() )
{
- std::string white_list_url = (*iter)->getValue().asString();
- fill_me_in[ LLMediaEntry::WHITELIST_KEY ].append( white_list_url );
+ LLScrollListCell* cell = (*iter)->getColumn( ENTRY_COLUMN );
+ std::string whitelist_url = cell->getValue().asString();
+
+ fill_me_in[ LLMediaEntry::WHITELIST_KEY ].append( whitelist_url );
++iter;
};
}
@@ -260,11 +241,8 @@ const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string&
///////////////////////////////////////////////////////////////////////////////
// wrapper for testing a URL against the whitelist. We grab entries from
-// white list list box widget and build a list to test against. Can also
-// optionally pass the URL that you are trying to add to the widget since
-// it won't be added until this call returns.
-bool LLPanelMediaSettingsSecurity::passesWhiteList( const std::string& added_url,
- const std::string& test_url )
+// white list list box widget and build a list to test against.
+bool LLPanelMediaSettingsSecurity::urlPassesWhiteList( const std::string& test_url )
{
// the checkUrlAgainstWhitelist(..) function works on a vector
// of strings for the white list entries - in this panel, the white list
@@ -273,20 +251,18 @@ bool LLPanelMediaSettingsSecurity::passesWhiteList( const std::string& added_url
whitelist_strings.clear(); // may not be required - I forget what the spec says.
// step through whitelist widget entries and grab them as strings
- std::vector< LLScrollListItem* > white_list_items = mWhiteListList->getAllData();
- std::vector< LLScrollListItem* >::iterator iter = white_list_items.begin();
- while( iter != white_list_items.end() )
+ std::vector< LLScrollListItem* > whitelist_items = mWhiteListList->getAllData();
+ std::vector< LLScrollListItem* >::iterator iter = whitelist_items.begin();
+ while( iter != whitelist_items.end() )
{
- const std::string whitelist_url = (*iter)->getValue().asString();
+ LLScrollListCell* cell = (*iter)->getColumn( ENTRY_COLUMN );
+ std::string whitelist_url = cell->getValue().asString();
+
whitelist_strings.push_back( whitelist_url );
++iter;
};
- // add in the URL that might be added to the whitelist so we can test that too
- if ( added_url.length() )
- whitelist_strings.push_back( added_url );
-
// possible the URL is just a fragment so we validize it
const std::string valid_url = makeValidUrl( test_url );
@@ -296,32 +272,68 @@ bool LLPanelMediaSettingsSecurity::passesWhiteList( const std::string& added_url
///////////////////////////////////////////////////////////////////////////////
//
-void LLPanelMediaSettingsSecurity::addWhiteListItem(const std::string& url)
+void LLPanelMediaSettingsSecurity::updateWhitelistEnableStatus()
{
- // grab home URL from the general panel (via the parent floater)
+ // get the value for home URL and make it a valid URL
+ const std::string valid_url = makeValidUrl( mParent->getHomeUrl() );
+
+ // now check to see if the home url passes the whitelist in its entirity
+ if ( urlPassesWhiteList( valid_url ) )
+ {
+ mEnableWhiteList->setEnabled( true );
+ mHomeUrlFailsWhiteListText->setVisible( false );
+ }
+ else
+ {
+ mEnableWhiteList->set( false );
+ mEnableWhiteList->setEnabled( false );
+ mHomeUrlFailsWhiteListText->setVisible( true );
+ };
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Add an entry to the whitelist scrollbox and indicate if the current
+// home URL passes this entry or not using an icon
+void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry )
+{
+ // grab the home url
std::string home_url( "" );
if ( mParent )
home_url = mParent->getHomeUrl();
- // if the home URL is blank (user hasn't entered it yet) then
- // don't bother to check if it passes the white list
- if ( home_url.empty() )
- {
- mWhiteListList->addSimpleElement( url );
- return;
- };
+ // try to make a valid URL based on what the user entered - missing scheme for example
+ const std::string valid_url = makeValidUrl( home_url );
+
+ // check the home url against this single whitelist entry
+ std::vector< std::string > whitelist_entries;
+ whitelist_entries.push_back( entry );
+ bool home_url_passes_entry = LLMediaEntry::checkUrlAgainstWhitelist( valid_url, whitelist_entries );
- // if the URL passes the white list, add it
- if ( passesWhiteList( url, home_url ) )
+ // build an icon cell based on whether or not the home url pases it or not
+ LLSD row;
+ if ( home_url_passes_entry || home_url.empty() )
{
- mWhiteListList->addSimpleElement( url );
+ row[ "columns" ][ ICON_COLUMN ][ "type" ] = "icon";
+ row[ "columns" ][ ICON_COLUMN ][ "value" ] = "";
+ row[ "columns" ][ ICON_COLUMN ][ "width" ] = 20;
}
else
- // display a message indicating you can't do that
{
- LLNotificationsUtil::add("WhiteListInvalidatesHomeUrl");
+ row[ "columns" ][ ICON_COLUMN ][ "type" ] = "icon";
+ row[ "columns" ][ ICON_COLUMN ][ "value" ] = "parcel_color_EXP";
+ row[ "columns" ][ ICON_COLUMN ][ "width" ] = 20;
};
-}
+
+ // always add in the entry itself
+ row[ "columns" ][ ENTRY_COLUMN ][ "type" ] = "text";
+ row[ "columns" ][ ENTRY_COLUMN ][ "value" ] = entry;
+
+ // add to the white list scroll box
+ mWhiteListList->addElement( row );
+
+ // update whitelist enable checkbox based on whether the home url passes the whitelist
+ updateWhitelistEnableStatus();
+};
///////////////////////////////////////////////////////////////////////////////
// static
@@ -337,6 +349,9 @@ void LLPanelMediaSettingsSecurity::onBtnDel( void* userdata )
LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata;
self->mWhiteListList->deleteSelectedItems();
+
+ // contents of whitelist changed so recheck it against home url
+ self->updateWhitelistEnableStatus();
}
////////////////////////////////////////////////////////////////////////////////
@@ -345,4 +360,3 @@ void LLPanelMediaSettingsSecurity::setParent( LLFloaterMediaSettings* parent )
{
mParent = parent;
};
-
diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h
index 638664e59d..937bfb1bf9 100644
--- a/indra/newview/llpanelmediasettingssecurity.h
+++ b/indra/newview/llpanelmediasettingssecurity.h
@@ -37,6 +37,7 @@
class LLCheckBoxCtrl;
class LLScrollListCtrl;
+class LLTextBox;
class LLFloaterMediaSettings;
class LLPanelMediaSettingsSecurity : public LLPanel
@@ -58,18 +59,27 @@ public:
static void initValues( void* userdata, const LLSD& media_settings,bool editable );
static void clearValues( void* userdata, bool editable);
- void addWhiteListItem(const std::string& url);
+ void addWhiteListEntry( const std::string& url );
void setParent( LLFloaterMediaSettings* parent );
+ bool urlPassesWhiteList( const std::string& test_url );
const std::string makeValidUrl( const std::string& src_url );
- bool passesWhiteList( const std::string& added_url, const std::string& test_url );
protected:
LLFloaterMediaSettings* mParent;
private:
+ enum ColumnIndex
+ {
+ ICON_COLUMN = 0,
+ ENTRY_COLUMN = 1,
+ };
+
LLCheckBoxCtrl* mEnableWhiteList;
LLScrollListCtrl* mWhiteListList;
-
+ LLTextBox* mHomeUrlFailsWhiteListText;
+
+ void updateWhitelistEnableStatus();
+
static void onBtnAdd(void*);
static void onBtnDel(void*);
};
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 6771bb4170..1743df52fc 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1298,7 +1298,7 @@ void LLPanelPeople::notifyChildren(const LLSD& info)
if (container->getCurrentPanelIndex() > 0)
{
// if not on the default panel, switch to it
- container->onOpen(LLSD().insert(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName()));
+ container->onOpen(LLSD().with(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName()));
}
else
LLSideTray::getInstance()->collapseSideBar();
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 4d152a13f3..1830d00f68 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -68,7 +68,7 @@ public:
if (verb == "inspect")
{
- LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", avatar_id));
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", avatar_id));
return true;
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index db8bda008e..50c20bc98f 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -482,7 +482,7 @@ bool idle_startup()
{
std::string diagnostic = "Could not start address resolution system";
LL_WARNS("AppInit") << diagnostic << LL_ENDL;
- LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().insert("DIAGNOSTIC", diagnostic));
+ LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().with("DIAGNOSTIC", diagnostic));
}
//
@@ -553,7 +553,7 @@ bool idle_startup()
{
std::string diagnostic = llformat(" Error: %d", gMessageSystem->getErrorCode());
LL_WARNS("AppInit") << diagnostic << LL_ENDL;
- LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().insert("DIAGNOSTIC", diagnostic));
+ LLAppViewer::instance()->earlyExit("LoginFailedNoNetwork", LLSD().with("DIAGNOSTIC", diagnostic));
}
#if LL_WINDOWS
@@ -576,7 +576,7 @@ bool idle_startup()
}
else
{
- LLAppViewer::instance()->earlyExit("MessageTemplateNotFound", LLSD().insert("PATH", message_template_path));
+ LLAppViewer::instance()->earlyExit("MessageTemplateNotFound", LLSD().with("PATH", message_template_path));
}
if(gMessageSystem && gMessageSystem->isOK())
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 81dcfb6a4f..2d0a14dc70 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -363,28 +363,28 @@ LLToolDragAndDrop::dragOrDrop3dImpl LLToolDragAndDrop::LLDragAndDropDictionary::
{
return (entry->mFunctions[(U8)drop_target]);
}
- return &dad3dNULL;
+ return &LLToolDragAndDrop::dad3dNULL;
}
LLToolDragAndDrop::LLDragAndDropDictionary::LLDragAndDropDictionary()
{
// DT_NONE DT_SELF DT_AVATAR DT_OBJECT DT_LAND
// |--------------|---------------------------|---------------------------|-------------------------------|--------------|
- addEntry(DAD_NONE, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dNULL, &dad3dNULL, &dad3dNULL));
- addEntry(DAD_TEXTURE, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dGiveInventory, &dad3dTextureObject, &dad3dNULL));
- addEntry(DAD_SOUND, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_CALLINGCARD, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_LANDMARK, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_SCRIPT, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dGiveInventory, &dad3dRezScript, &dad3dNULL));
- addEntry(DAD_CLOTHING, new DragAndDropEntry(&dad3dNULL, &dad3dWearItem, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_OBJECT, new DragAndDropEntry(&dad3dNULL, &dad3dRezAttachmentFromInv, &dad3dGiveInventoryObject, &dad3dRezObjectOnObject, &dad3dRezObjectOnLand));
- addEntry(DAD_NOTECARD, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_CATEGORY, new DragAndDropEntry(&dad3dNULL, &dad3dWearCategory, &dad3dGiveInventoryCategory,&dad3dUpdateInventoryCategory, &dad3dNULL));
- addEntry(DAD_ROOT_CATEGORY, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dNULL, &dad3dNULL, &dad3dNULL));
- addEntry(DAD_BODYPART, new DragAndDropEntry(&dad3dNULL, &dad3dWearItem, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_ANIMATION, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_GESTURE, new DragAndDropEntry(&dad3dNULL, &dad3dActivateGesture, &dad3dGiveInventory, &dad3dUpdateInventory, &dad3dNULL));
- addEntry(DAD_LINK, new DragAndDropEntry(&dad3dNULL, &dad3dNULL, &dad3dNULL, &dad3dNULL, &dad3dNULL));
+ addEntry(DAD_NONE, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_TEXTURE, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dTextureObject, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_SOUND, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_CALLINGCARD, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_LANDMARK, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_SCRIPT, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dRezScript, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_CLOTHING, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dWearItem, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_OBJECT, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dRezAttachmentFromInv, &LLToolDragAndDrop::dad3dGiveInventoryObject, &LLToolDragAndDrop::dad3dRezObjectOnObject, &LLToolDragAndDrop::dad3dRezObjectOnLand));
+ addEntry(DAD_NOTECARD, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_CATEGORY, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dWearCategory, &LLToolDragAndDrop::dad3dGiveInventoryCategory,&LLToolDragAndDrop::dad3dUpdateInventoryCategory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_ROOT_CATEGORY, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_BODYPART, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dWearItem, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_ANIMATION, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_GESTURE, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dActivateGesture, &LLToolDragAndDrop::dad3dGiveInventory, &LLToolDragAndDrop::dad3dUpdateInventory, &LLToolDragAndDrop::dad3dNULL));
+ addEntry(DAD_LINK, new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL, &LLToolDragAndDrop::dad3dNULL));
// TODO: animation on self could play it? edit it?
// TODO: gesture on self could play it? edit it?
};
diff --git a/indra/newview/lluilistener.cpp b/indra/newview/lluilistener.cpp
index 8b4cfa7248..3ad9887bec 100644
--- a/indra/newview/lluilistener.cpp
+++ b/indra/newview/lluilistener.cpp
@@ -29,7 +29,7 @@ LLUIListener::LLUIListener():
"Invoke the operation named by [\"function\"], passing [\"parameter\"],\n"
"as if from a user gesture on a menu -- or a button click.",
&LLUIListener::call,
- LLSD().insert("function", LLSD()));
+ LLSD().with("function", LLSD()));
}
void LLUIListener::call(const LLSD& event) const
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index f2ddb0b1f1..608c5c2097 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -171,7 +171,16 @@ public:
else
if(status == 404)
{
- // Treat 404s like an html page.
+ // 404 is content not found - sites often have bespoke 404 pages so
+ // treat them like an html page.
+ completeAny(status, "text/html");
+ }
+ else
+ if(status == 406)
+ {
+ // 406 means the server sent something that we didn't indicate was acceptable
+ // Eventually we should send what we accept in the headers but for now,
+ // treat 406s like an html page.
completeAny(status, "text/html");
}
else
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 462384e1a3..e68594ed6f 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5247,7 +5247,7 @@ class LLWorldCreateLandmark : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark"));
return true;
}
@@ -6108,6 +6108,7 @@ BOOL object_selected_and_point_valid()
return (selection->getRootObjectCount() == 1) &&
(selection->getFirstRootObject()->getPCode() == LL_PCODE_VOLUME) &&
selection->getFirstRootObject()->permYouOwner() &&
+ selection->getFirstRootObject()->flagObjectMove() &&
!((LLViewerObject*)selection->getFirstRootObject()->getRoot())->isAvatar() &&
(selection->getFirstRootObject()->getNVPair("AssetContainer") == NULL);
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 01b213a87d..266c40d493 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -457,6 +457,7 @@ public:
inline BOOL flagAnimSource() const { return ((mFlags & FLAGS_ANIM_SOURCE) != 0); }
inline BOOL flagCameraSource() const { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); }
inline BOOL flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); }
+ inline BOOL flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); }
bool getIncludeInSearch() const;
void setIncludeInSearch(bool include_in_search);
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index 3cb0ec4bad..0405b9d28b 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -1094,6 +1094,16 @@ void LLWearable::setLabelUpdated() const
gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID());
}
+void LLWearable::refreshName()
+{
+ LLUUID item_id = getItemID();
+ LLInventoryItem* item = gInventory.getItem(item_id);
+ if( item )
+ {
+ mName = item->getName();
+ }
+}
+
struct LLWearableSaveData
{
EWearableType mType;
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 43ffa12420..82d388ab7e 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -133,6 +133,10 @@ public:
// Something happened that requires the wearable's label to be updated (e.g. worn/unworn).
void setLabelUpdated() const;
+ // the wearable was worn. make sure the name of the wearable object matches the LLViewerInventoryItem,
+ // not the wearable asset itself.
+ void refreshName();
+
private:
typedef std::map<S32, LLLocalTextureObject*> te_map_t;
typedef std::map<S32, LLVisualParam *> visual_param_index_map_t;
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 60b1e59645..e6857ea780 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1728,20 +1728,20 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
id.toString(uuid_str);
uuid_str = uuid_str.substr(28);
sscanf(uuid_str.c_str(), "%X", &event_id);
- LLFloaterReg::showInstance("search", LLSD().insert("category", "events").insert("id", event_id));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "events").with("id", event_id));
break;
}
case MAP_ITEM_LAND_FOR_SALE:
case MAP_ITEM_LAND_FOR_SALE_ADULT:
{
LLFloaterReg::hideInstance("world_map");
- LLFloaterReg::showInstance("search", LLSD().insert("category", "destinations").insert("id", id));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "destinations").with("id", id));
break;
}
case MAP_ITEM_CLASSIFIED:
{
LLFloaterReg::hideInstance("world_map");
- LLFloaterReg::showInstance("search", LLSD().insert("category", "classifieds").insert("id", id));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "classifieds").with("id", id));
break;
}
default:
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index cb0614797a..895df62926 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -586,20 +586,7 @@ To place the media on only one face, choose Select Texture and click on the desi
notext="Cancel"
yestext="OK"/>
</notification>
-
- <notification
- icon="alertmodal.tga"
- name="WhiteListInvalidatesHomeUrl"
- type="alertmodal">
-Adding this entry to the whitelist will invalidate the home URL you
-specified for this instance of media. You are not allowed to do this
-so the entry cannot be added to the whitelist.
- <usetemplate
- name="okbutton"
- yestext="Ok"/>
- </notification>
-
-
+
<notification
icon="alertmodal.tga"
name="MustBeInParcel"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index 89f1fe35ca..b82a435b41 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -10,17 +10,27 @@
name="Media Settings General"
help_topic = "media_settings_general"
width="365">
-
- <text
- bottom_delta="-17"
- follows="top|left"
- height="15"
- left="10"
+
+ <text
+ bottom_delta="-25"
+ follows="top|left"
+ height="15"
+ left="10"
name="home_label">
Home URL:
</text>
+ <text
+ visible="false"
+ bottom_delta="0"
+ follows="top|left"
+ height="15"
+ left_delta="64"
+ text_color="red"
+ name="home_fails_whitelist_label">
+ (This URL does not pass the specified whitelist)
+ </text>
<line_editor
- bottom_delta="-21"
+ bottom_delta="-24"
enabled="true"
follows="left|top"
font="SansSerif"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
index a26f74844e..7d9350b45f 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
@@ -30,8 +30,28 @@
name="whitelist"
width="315"
enabled="true" />
+ <icon
+ bottom_delta="-23"
+ right="-35"
+ width="16"
+ height="16"
+ image_name="parcel_color_EXP"
+ mouse_opaque="true"
+ follows="top|left"
+ name="parcel_color_EXP"
+ />
+ <text
+ visible="true"
+ follows="top|left"
+ height="15"
+ left="30"
+ bottom_delta="0"
+ text_color="0.4 0.4 0.4 1.0"
+ name="home_url_fails_some_items_in_whitelist">
+ Entries that the home URL fails against are marked:
+ </text>
<button
- bottom_delta="-30"
+ bottom_delta="-36"
follows="top|left"
height="20"
label="Add"
@@ -54,4 +74,17 @@
<button.commit_callback
function="Media.whitelistDelete"/>
</button>
+ <text
+ visible="true"
+ bottom_delta="-75"
+ follows="top|left"
+ height="40"
+ left="30"
+ text_color="0.6 0.0 0.0 1.0"
+ name="home_url_fails_whitelist">
+Warning: the home URL specified in the General tab
+fails to pass this whitelist. It has been disabled
+until a valid entry has been added.
+ </text>
+
</panel>