diff options
Diffstat (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp')
-rw-r--r-- | indra/newview/llpanelmediasettingsgeneral.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index a33d9604fe..16e1901bfd 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -32,6 +32,7 @@ #include "llviewerprecompiledheaders.h" +#include "llagent.h" #include "llpanelmediasettingsgeneral.h" #include "llcombobox.h" #include "llcheckboxctrl.h" @@ -47,6 +48,7 @@ #include "llmediaentry.h" #include "llmediactrl.h" #include "llpanelcontents.h" +#include "llpermissions.h" #include "llpluginclassmedia.h" #include "llfloatermediasettings.h" #include "llfloatertools.h" @@ -159,8 +161,7 @@ void LLPanelMediaSettingsGeneral::draw() // current URL can change over time. // updateCurrentURL(); - // enable/disable RESRET button depending on permissions - // since this is the same as a navigate action + LLPermissions perm; bool user_can_press_reset = gFloaterTools->selectedMediaEditable(); // several places modify this widget so we must collect states in one place @@ -350,6 +351,16 @@ void LLPanelMediaSettingsGeneral::onClose(bool app_quitting) 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 ) ) + { + LLNotifications::instance().add("WhiteListInvalidatesHomeUrl"); + return; + }; + self->updateMediaPreview(); } @@ -398,3 +409,10 @@ void LLPanelMediaSettingsGeneral::setParent( LLFloaterMediaSettings* parent ) { mParent = parent; }; + +//////////////////////////////////////////////////////////////////////////////// +// +const std::string LLPanelMediaSettingsGeneral::getHomeUrl() +{ + return mHomeURL->getValue().asString(); +} |