Skip to content
Snippets Groups Projects
Commit 71259fcc authored by Richard Nelson's avatar Richard Nelson
Browse files

EXP-77 FIX Pop-up warning flashes on and off even whan all popups are enabled in settings

parent a7484663
No related branches found
No related tags found
No related merge requests found
...@@ -30,12 +30,19 @@ ...@@ -30,12 +30,19 @@
#include "llnotificationhandler.h" #include "llnotificationhandler.h"
#include "llnotifications.h" #include "llnotifications.h"
#include "llfloaterreg.h" #include "llfloaterreg.h"
#include "llmediactrl.h"
using namespace LLNotificationsUI; using namespace LLNotificationsUI;
bool LLBrowserNotification::processNotification(const LLSD& notify) bool LLBrowserNotification::processNotification(const LLSD& notify)
{ {
LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
if (!notification) return false;
// browser notifications are currently handled directly by the LLMediaCtrl instance that spawned them LLMediaCtrl* media_instance = LLMediaCtrl::getInstance(notification->getPayload()["media_id"].asUUID());
if (media_instance)
{
media_instance->showNotification(notification);
}
return false; return false;
} }
...@@ -77,6 +77,7 @@ LLMediaCtrl::Params::Params() ...@@ -77,6 +77,7 @@ LLMediaCtrl::Params::Params()
LLMediaCtrl::LLMediaCtrl( const Params& p) : LLMediaCtrl::LLMediaCtrl( const Params& p) :
LLPanel( p ), LLPanel( p ),
LLInstanceTracker(LLUUID::generateNewID()),
mTextureDepthBytes( 4 ), mTextureDepthBytes( 4 ),
mBorder(NULL), mBorder(NULL),
mFrequentUpdates( true ), mFrequentUpdates( true ),
...@@ -1032,7 +1033,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) ...@@ -1032,7 +1033,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
LLNotification::Params notify_params; LLNotification::Params notify_params;
notify_params.name = "PopupAttempt"; notify_params.name = "PopupAttempt";
notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid); notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", getKey());
notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2); notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2);
if (mTrusted) if (mTrusted)
...@@ -1041,7 +1042,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) ...@@ -1041,7 +1042,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
} }
else else
{ {
showNotification(LLNotifications::instance().add(notify_params)); LLNotifications::instance().add(notify_params);
} }
break; break;
}; };
......
...@@ -40,7 +40,8 @@ class LLUICtrlFactory; ...@@ -40,7 +40,8 @@ class LLUICtrlFactory;
class LLMediaCtrl : class LLMediaCtrl :
public LLPanel, public LLPanel,
public LLViewerMediaObserver, public LLViewerMediaObserver,
public LLViewerMediaEventEmitter public LLViewerMediaEventEmitter,
public LLInstanceTracker<LLMediaCtrl, LLUUID>
{ {
LOG_CLASS(LLMediaCtrl); LOG_CLASS(LLMediaCtrl);
public: public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment