From d90aea0ede0fc6958d6f323a0eae4079f14c46f2 Mon Sep 17 00:00:00 2001
From: callum <none@none>
Date: Mon, 30 Nov 2009 17:13:41 -0800
Subject: Fix for DEV-41951 - reworking of whitelist so it's more usable.

---
 indra/newview/llfloatermediasettings.cpp           |  17 ---
 indra/newview/llfloatermediasettings.h             |   3 +-
 indra/newview/llfloaterwhitelistentry.cpp          |   2 +-
 indra/newview/llpanelmediasettingsgeneral.cpp      |  51 +++++---
 indra/newview/llpanelmediasettingsgeneral.h        |   4 +
 indra/newview/llpanelmediasettingssecurity.cpp     | 138 ++++++++++++---------
 indra/newview/llpanelmediasettingssecurity.h       |  16 ++-
 .../newview/skins/default/xui/en/notifications.xml |  15 +--
 .../xui/en/panel_media_settings_general.xml        |  24 ++--
 .../xui/en/panel_media_settings_security.xml       |  35 +++++-
 10 files changed, 182 insertions(+), 123 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index 44e68d7745..7cb841d8af 100644
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -57,7 +57,6 @@ LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key)
 	mMultipleMedia(false),
 	mMultipleValidMedia(false)
 {
-//	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_media_settings.xml");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -210,7 +209,6 @@ void LLFloaterMediaSettings::clearValues( bool editable)
 	sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions,  editable);	
 }
 
-
 ////////////////////////////////////////////////////////////////////////////////
 // static
 void LLFloaterMediaSettings::onBtnOK( void* userdata )
@@ -264,18 +262,3 @@ const std::string LLFloaterMediaSettings::getHomeUrl()
 	else
 		return std::string( "" );
 }
-
-
-////////////////////////////////////////////////////////////////////////////////
-//
-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;
-}
diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h
index 17a47cb0f5..aed6b00517 100644
--- a/indra/newview/llfloatermediasettings.h
+++ b/indra/newview/llfloatermediasettings.h
@@ -57,7 +57,7 @@ public:
 	void enableOkApplyBtns( bool enable );
 	LLPanelMediaSettingsSecurity* getPanelSecurity(){return mPanelMediaSettingsSecurity;};
 	const std::string getHomeUrl();
-	bool passesWhiteList( const std::string& test_url );
+	//bool passesWhiteList( const std::string& test_url );
 
 	bool mIdenticalHasMediaInfo;
 	bool mMultipleMedia;
@@ -73,7 +73,6 @@ protected:
 	LLPanelMediaSettingsSecurity* mPanelMediaSettingsSecurity;
 	LLPanelMediaSettingsPermissions* mPanelMediaSettingsPermissions;
 
-
 	static void onBtnOK(void*);
 	static void onBtnCancel(void*);
 	static void onBtnApply(void*);
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/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index 5bb266a01d..9488f2bc18 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();
 }
@@ -354,21 +359,36 @@ 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 94e137b0f4..ce49b67899 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] = 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/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 49276172d5..aa1a963b39 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 e00f654750..3ac0f52b7d 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>
-- 
cgit v1.2.3


From 6dd3f54924b57224298f6d76c766b403d165783f Mon Sep 17 00:00:00 2001
From: callum <none@none>
Date: Mon, 30 Nov 2009 17:55:19 -0800
Subject: Simple fix for Hg merge tool shittiness..

---
 indra/newview/llfloatermediasettings.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index 1446b828c9..16a76723eb 100644
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -268,8 +268,6 @@ const std::string LLFloaterMediaSettings::getHomeUrl()
 		return std::string( "" );
 }
 
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 // virtual 
 void LLFloaterMediaSettings::draw()
@@ -300,4 +298,6 @@ void LLFloaterMediaSettings::draw()
 	
 	enableOkApplyBtns(values_changed);
 	
-	LLFloater::draw();
\ No newline at end of file
+	LLFloater::draw();
+}
+
-- 
cgit v1.2.3


From 3b340326cb72a2724709d9c073f068b3644e7732 Mon Sep 17 00:00:00 2001
From: Lynx Linden <lynx@lindenlab.com>
Date: Tue, 1 Dec 2009 18:06:36 +0000
Subject: EXT-332: Hide international billing features until enabled.

The international billing links and labels in the Buy L$ floater are
now hidden by default. They will only be displayed once we get an
estimate from the server that includes an "estimatedLocalCost" token,
i.e., we are connected to a server that has the international billing
functionality enabled.

This is done so that the new functionality in Viewer 2.0 is not
exposed to the user until the international billing features are live
(which is scheduled to happen after the Viewer 2.0 release date).
---
 indra/newview/llcurrencyuimanager.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'indra/newview')

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"))
-- 
cgit v1.2.3


From 55f4ad3dc8a218d00dc6f34241b27be2fac5a23b Mon Sep 17 00:00:00 2001
From: callum <none@none>
Date: Tue, 1 Dec 2009 11:47:38 -0800
Subject: Fix for "DEV-43581 - EXT-2901: [BSI] Can't access twitter pages
 directly via MoaP"

---
 indra/newview/llviewermedia.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

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
-- 
cgit v1.2.3


From de6222a56d1723729610be5d9601640ce425e778 Mon Sep 17 00:00:00 2001
From: "Eric M. Tulla (BigPapi)" <tulla@lindenlab.com>
Date: Tue, 1 Dec 2009 15:53:26 -0500
Subject: EXT-2719 - put on menu now gets disabled if the object is locked

---
 indra/newview/llviewermenu.cpp | 1 +
 indra/newview/llviewerobject.h | 1 +
 2 files changed, 2 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 8bcf2c6281..5863bda035 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6216,6 +6216,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);
-- 
cgit v1.2.3


From bbddb247393bc904e38ab0d8ec92d0523fcd28d7 Mon Sep 17 00:00:00 2001
From: James Cook <james@lindenlab.com>
Date: Tue, 1 Dec 2009 13:03:35 -0800
Subject: Fix Linux/Mac builds due to LLToolDragAndDrop member function
 pointers

---
 indra/newview/lltooldraganddrop.cpp | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

(limited to 'indra/newview')

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?
 };
-- 
cgit v1.2.3


From 2f0b1d164a939d73aae099c9a3a7eaf76f504eaa Mon Sep 17 00:00:00 2001
From: Ramzi Linden <ramzi@lindenlab.com>
Date: Tue, 1 Dec 2009 16:38:01 -0800
Subject: DEV-43612 (part1) fix a typo in UI text from llmaniptranslate

---
 indra/newview/llmaniptranslate.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

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);
-- 
cgit v1.2.3


From f496c2b164a100836d74909c3e27adcdf98018f0 Mon Sep 17 00:00:00 2001
From: Kent Quirk <q@lindenlab.com>
Date: Tue, 1 Dec 2009 20:59:08 -0500
Subject: DEV-43622 : API change (no functionality change) to fix a design
 error in LLSD

I made it about a year and a half ago; Zero found it while reading code. I had added a return value to LLSD::insert(), but a) did it wrong, and b) broke the STL-like semantics of insert(). So I've put insert() back to returning void and created LLSD::with(), which does what my earlier insert() did. The compiler then caught all the cases where insert()'s return value were being used, and I changed those to use with() instead.
---
 indra/newview/llavatarlistitem.cpp        | 2 +-
 indra/newview/llchathistory.cpp           | 6 +++---
 indra/newview/lleventnotifier.cpp         | 2 +-
 indra/newview/llfloaterabout.cpp          | 2 +-
 indra/newview/llfloatertestinspectors.cpp | 4 ++--
 indra/newview/llgroupactions.cpp          | 2 +-
 indra/newview/llgrouplist.cpp             | 2 +-
 indra/newview/lllocationinputctrl.cpp     | 8 ++++----
 indra/newview/llnavigationbar.cpp         | 2 +-
 indra/newview/llpanelblockedlist.cpp      | 2 +-
 indra/newview/llpanellandmarks.cpp        | 4 ++--
 indra/newview/llpanelpeople.cpp           | 2 +-
 indra/newview/llpanelprofile.cpp          | 2 +-
 indra/newview/llstartup.cpp               | 6 +++---
 indra/newview/lluilistener.cpp            | 2 +-
 indra/newview/llviewermenu.cpp            | 2 +-
 indra/newview/llworldmapview.cpp          | 6 +++---
 17 files changed, 28 insertions(+), 28 deletions(-)

(limited to 'indra/newview')

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/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/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/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/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/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/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/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 34d07f3284..0b40492391 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5360,7 +5360,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;
 	}
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:
-- 
cgit v1.2.3