diff options
Diffstat (limited to 'indra')
9 files changed, 27 insertions, 8 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 621f241227..0fd18303bb 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -69,7 +69,8 @@ LLMediaCtrl::Params::Params() texture_height("texture_height", 1024), caret_color("caret_color"), initial_mime_type("initial_mime_type"), - media_id("media_id") + media_id("media_id"), + always_allow_popups("always_allow_popups", false) { tab_stop(false); } @@ -95,7 +96,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mTextureWidth ( 1024 ), mTextureHeight ( 1024 ), mClearCache(false), - mHomePageMimeType(p.initial_mime_type) + mHomePageMimeType(p.initial_mime_type), + mAlwaysAllowPopups(p.always_allow_popups) { { LLColor4 color = p.caret_color().get(); @@ -1042,11 +1044,19 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) std::string target = self->getClickTarget(); std::string uuid = self->getClickUUID(); - LLNotificationPtr popup_notify = LLNotifications::instance().add("PopupAttempt", - LLSD(), - LLSD().with("target", target).with("url", url).with("uuid", uuid), - boost::bind(&LLMediaCtrl::onPopup, this, _1, _2)); - showNotification(popup_notify); + LLNotification::Params notify_params; + notify_params.name = "PopupAttempt"; + notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid); + notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2); + + if (mAlwaysAllowPopups) + { + LLNotifications::instance().forceResponse(notify_params, 0); + } + else + { + showNotification(LLNotifications::instance().add(notify_params)); + } break; }; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index b8e10d5591..dc18a1130e 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -51,7 +51,8 @@ public: Optional<bool> border_visible, ignore_ui_scale, hide_loading, - decouple_texture_size; + decouple_texture_size, + always_allow_popups; Optional<S32> texture_width, texture_height; @@ -193,6 +194,7 @@ public: S32 mTextureWidth; S32 mTextureHeight; bool mClearCache; + bool mAlwaysAllowPopups; boost::shared_ptr<class LLNotification> mCurNotification; }; diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml index 4b990fa566..0226b75d0a 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency_html.xml @@ -16,6 +16,7 @@ https://quick-buy.secondlife.com/[LANGUAGE]/display/?sa=[SPECIFIC_AMOUNT]&sum=[SUM]&msg=[MSG]&bal=[BAL] </floater.string> <web_browser + always_allow_popups="true" follows="all" layout="topleft" left="1" diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml index 13017cc803..d8175e20dc 100644 --- a/indra/newview/skins/default/xui/en/floater_help_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml @@ -36,6 +36,7 @@ user_resize="false" width="620"> <web_browser + always_allow_popups="true" bottom="-11" follows="left|right|top|bottom" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml index c9d87f158f..70c278d172 100644 --- a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml @@ -54,6 +54,7 @@ top_delta="0" width="70" /> <web_browser + always_allow_popups="true" bottom="390" follows="left|right|top|bottom" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 354f1de85e..0b97c363f6 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -38,6 +38,7 @@ user_resize="false" width="630"> <web_browser + always_allow_popups="true" follows="left|right|top|bottom" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml index cbfaac958b..70653801e0 100644 --- a/indra/newview/skins/default/xui/en/floater_tos.xml +++ b/indra/newview/skins/default/xui/en/floater_tos.xml @@ -58,6 +58,7 @@ Please read the following Terms of Service and Privacy Policy carefully. To continue logging in to [SECOND_LIFE], you must accept the agreement. </text> <web_browser + always_allow_popups="true" follows="left|top" height="340" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 6b136495d2..6f3e49b2b7 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -24,6 +24,7 @@ top="600" </panel.string> <!-- *NOTE: Custom resize logic for login_html in llpanellogin.cpp --> <web_browser +always_allow_popups="true" bg_opaque_color="Black" border_visible="false" bottom="600" diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml index 2be95fc081..d496f1f5ee 100644 --- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml +++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml @@ -28,6 +28,7 @@ top_delta="0" width="313"> <web_browser + always_allow_popups="true" border_visible="false" follows="all" height="550" |