EXP-74 FIX Pop-up warning given for links in Home Side Panel in Viewer
Reviewed by Callummaster
parent
83bb4b9518
commit
e66585aa4f
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
user_resize="false"
|
||||
width="620">
|
||||
<web_browser
|
||||
always_allow_popups="true"
|
||||
bottom="-11"
|
||||
follows="left|right|top|bottom"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
top_delta="0"
|
||||
width="70" />
|
||||
<web_browser
|
||||
always_allow_popups="true"
|
||||
bottom="390"
|
||||
follows="left|right|top|bottom"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
user_resize="false"
|
||||
width="630">
|
||||
<web_browser
|
||||
always_allow_popups="true"
|
||||
follows="left|right|top|bottom"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
top_delta="0"
|
||||
width="313">
|
||||
<web_browser
|
||||
always_allow_popups="true"
|
||||
border_visible="false"
|
||||
follows="all"
|
||||
height="550"
|
||||
|
|
|
|||
Loading…
Reference in New Issue