From df48e66f7cc6711f1738e3a2817cf3b9a810c088 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 7 Oct 2009 12:26:42 -0700 Subject: DEV-39168 - bounce back to the current URL (or, the home URL if current URL is "") if the server denies navigation This refactors some of the bounceBack code into LLVOVolume. It also changes an important rule: the edit panel now *will* send the current URL to the server when you hit "OK". This change was done so that if autoplay is on, we make sure the server gets the right data. --- indra/newview/llpanelmediasettingsgeneral.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index be40d6fb5f..725aa6327f 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -393,8 +393,7 @@ void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in ) fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue(); fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = mAutoZoom->getValue(); fill_me_in[LLMediaEntry::CONTROLS_KEY] = mControls->getCurrentIndex(); - // XXX Don't send current URL! - //fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); + fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = mHeightPixels->getValue(); fill_me_in[LLMediaEntry::HOME_URL_KEY] = mHomeURL->getValue(); fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = mFirstClick->getValue(); -- cgit v1.2.3 From 1d63b145481021c5d0ed16bd0c10c320170d0cf5 Mon Sep 17 00:00:00 2001 From: skolb Date: Mon, 12 Oct 2009 11:24:14 -0700 Subject: Merge changes to llpanelmediasettingsgeneral to handle reset button --- indra/newview/llpanelmediasettingsgeneral.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index a33d9604fe..1ac6330b0f 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,8 @@ 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 valid = LLSelectMgr::getInstance()->selectGetPermissions(perm); bool user_can_press_reset = gFloaterTools->selectedMediaEditable(); // several places modify this widget so we must collect states in one place -- cgit v1.2.3 From 3831ca912eb8b78ccdcfac7d37c015ca45351c83 Mon Sep 17 00:00:00 2001 From: callum Date: Thu, 15 Oct 2009 11:29:14 -0700 Subject: https://jira.lindenlab.com/jira/browse/DEV-40649 Media auto refreshes after Whitelist set This checkin fixes a related issue to this task and prohibits user from (A) adding an item to the whitelist that would invalidate the home URL and (b) adding a home URL that would not pass the whitelist. --- indra/newview/llpanelmediasettingsgeneral.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index a33d9604fe..4b25b47fa3 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -350,6 +350,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 +408,10 @@ void LLPanelMediaSettingsGeneral::setParent( LLFloaterMediaSettings* parent ) { mParent = parent; }; + +//////////////////////////////////////////////////////////////////////////////// +// +const std::string LLPanelMediaSettingsGeneral::getHomeUrl() +{ + return mHomeURL->getValue().asString(); +} -- cgit v1.2.3 From f7e4f1d1a505c0394d45e0dfd762620a62ffdafa Mon Sep 17 00:00:00 2001 From: callum Date: Thu, 22 Oct 2009 15:32:22 -0700 Subject: DEV-41721 - "Alt-image enabled" is not yet functional: remove from UI --- indra/newview/llpanelmediasettingsgeneral.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index ab5d8601d0..f9dde03451 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -68,15 +68,11 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() : mHeightPixels( NULL ), mHomeURL( NULL ), mCurrentURL( NULL ), - mAltImageEnable( NULL ), mParent( NULL ), mMediaEditable(false) { // build dialog from XML LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_general.xml"); -// mCommitCallbackRegistrar.add("Media.ResetCurrentUrl", boost::bind(&LLPanelMediaSettingsGeneral::onBtnResetCurrentUrl, this)); -// mCommitCallbackRegistrar.add("Media.CommitHomeURL", boost::bind(&LLPanelMediaSettingsGeneral::onCommitHomeURL, this)); - } //////////////////////////////////////////////////////////////////////////////// @@ -84,7 +80,6 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() : BOOL LLPanelMediaSettingsGeneral::postBuild() { // connect member vars with UI widgets - mAltImageEnable = getChild< LLCheckBoxCtrl >( LLMediaEntry::ALT_IMAGE_ENABLE_KEY ); mAutoLoop = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_LOOP_KEY ); mAutoPlay = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_PLAY_KEY ); mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY ); @@ -192,7 +187,6 @@ void LLPanelMediaSettingsGeneral::draw() void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) { LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; - self->mAltImageEnable ->clear(); self->mAutoLoop->clear(); self->mAutoPlay->clear(); self->mAutoScale->clear(); @@ -203,7 +197,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) self->mHeightPixels->clear(); self->mHomeURL->clear(); self->mWidthPixels->clear(); - self->mAltImageEnable ->setEnabled(editable); self->mAutoLoop ->setEnabled(editable); self->mAutoPlay ->setEnabled(editable); self->mAutoScale ->setEnabled(editable); @@ -272,7 +265,6 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ { LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" }, { LLMediaEntry::FIRST_CLICK_INTERACT_KEY, self->mFirstClick, "LLCheckBoxCtrl" }, { LLMediaEntry::WIDTH_PIXELS_KEY, self->mWidthPixels, "LLSpinCtrl" }, - { LLMediaEntry::ALT_IMAGE_ENABLE_KEY, self->mAltImageEnable, "LLCheckBoxCtrl" }, { "", NULL , "" } }; @@ -393,7 +385,6 @@ void LLPanelMediaSettingsGeneral::apply( void* userdata ) // void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in ) { - fill_me_in[LLMediaEntry::ALT_IMAGE_ENABLE_KEY] = mAltImageEnable->getValue(); fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = mAutoLoop->getValue(); fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = mAutoPlay->getValue(); fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue(); -- cgit v1.2.3