summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llcurrencyuimanager.cpp6
-rw-r--r--indra/newview/llfloatermediasettings.cpp17
-rw-r--r--indra/newview/llfloatermediasettings.h3
-rw-r--r--indra/newview/llfloaterwhitelistentry.cpp2
-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/lltooldraganddrop.cpp32
-rw-r--r--indra/newview/llviewermedia.cpp11
-rw-r--r--indra/newview/llviewermenu.cpp1
-rw-r--r--indra/newview/llviewerobject.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_aaa.xml81
-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
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml19
17 files changed, 279 insertions, 177 deletions
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/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/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 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/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/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 4307002980..34d07f3284 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6221,6 +6221,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/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml
index 3f86080160..6598c95c0e 100644
--- a/indra/newview/skins/default/xui/en/floater_aaa.xml
+++ b/indra/newview/skins/default/xui/en/floater_aaa.xml
@@ -1,36 +1,53 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- height="400"
+ legacy_header_height="18"
+ can_minimize="false"
+ can_tear_off="false"
+ can_resize="true"
+ can_drag_on_left="false"
+ can_close="true"
+ can_dock="true"
+ bevel_style="in"
+ height="300"
layout="topleft"
- name="floater_aaa"
- can_resize="true"
- width="500">
- <string name="bump_parabuild">1</string>
- <text
- bottom="390"
- left="10"
- name="right_aligned_text"
- width="300"
- halign="right"
- top_pad="10">
- Right aligned text
- </text>
- <text
- bottom="390"
- left="10"
- name="centered_text"
- width="300"
- halign="center"
- top_pad="10">
- Centered text
- </text>
- <text
- left="10"
- name="left_aligned_text"
- width="300"
- halign="left"
- top_pad="10">
- Left aligned text
- </text>
-
+ name="Test Floater"
+ save_rect="true"
+ title="TEST FLOATER"
+ save_dock_state="true"
+ save_visibility="true"
+ single_instance="true"
+ width="320">
+ <chat_history
+ allow_html="true"
+ bg_readonly_color="ChatHistoryBgColor"
+ bg_writeable_color="ChatHistoryBgColor"
+ border_visible="true"
+ follows="all"
+ font="SansSerif"
+ left="1"
+ top="20"
+ layout="topleft"
+ height="260"
+ name="chat_history"
+ parse_highlights="true"
+ text_color="ChatHistoryTextColor"
+ text_readonly_color="ChatHistoryTextColor"
+ width="320">
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+Really long line that is long enough to wrap once with jyg descenders.
+ </chat_history>
</floater>
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>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index ea78f6d0dd..d32952b04f 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -53,35 +53,40 @@
name="voice_icon"
width="22"
height="18"
- top="21"
+ top="21"
+ follows="right|top"
image_name="parcel_lght_VoiceNo"
/>
<fly_icon
name="fly_icon"
width="22"
height="18"
- top="21"
+ top="21"
+ follows="right|top"
image_name="parcel_lght_FlyNo"
/>
<push_icon
name="push_icon"
width="22"
height="18"
- top="21"
+ top="21"
+ follows="right|top"
image_name="parcel_lght_PushNo"
/>
<build_icon
name="build_icon"
width="22"
height="18"
- top="21"
+ top="21"
+ follows="right|top"
image_name="parcel_lght_BuildNo"
/>
<scripts_icon
name="scripts_icon"
width="22"
height="18"
- top="21"
+ top="21"
+ follows="right|top"
image_name="parcel_lght_ScriptsNo"
/>
<!-- NOTE: Placeholder icon, there is no dark grayscale version -->
@@ -89,7 +94,8 @@
name="damage_icon"
width="22"
height="18"
- top="21"
+ top="21"
+ follows="right|top"
image_name="parcel_lght_Damage"
/>
<!-- Default text color is invisible on top of nav bar background -->
@@ -98,6 +104,7 @@
width="35"
height="18"
top="16"
+ follows="right|top"
halign="right"
font="SansSerifSmall"
text_color="TextFgColor"