Pulled llnotifications.h dependency from LLFloater. llnotifications.h includes llevents.h, which can cause conflicts with llevent.h (Legacy events vs non-legacy)
This commit is contained in:
@@ -58,6 +58,7 @@
|
|||||||
#include "v2math.h"
|
#include "v2math.h"
|
||||||
#include "llfasttimer.h"
|
#include "llfasttimer.h"
|
||||||
#include "airecursive.h"
|
#include "airecursive.h"
|
||||||
|
#include "llnotifications.h"
|
||||||
|
|
||||||
const S32 MINIMIZED_WIDTH = 160;
|
const S32 MINIMIZED_WIDTH = 160;
|
||||||
const S32 CLOSE_BOX_FROM_TOP = 1;
|
const S32 CLOSE_BOX_FROM_TOP = 1;
|
||||||
@@ -1410,6 +1411,10 @@ void LLFloater::closeFocusedFloater()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLNotificationPtr LLFloater::addContextualNotification(const std::string& name, const LLSD& substitutions)
|
||||||
|
{
|
||||||
|
return LLNotifications::instance().add(LLNotification::Params(name).context(mNotificationContext).substitutions(substitutions));
|
||||||
|
}
|
||||||
|
|
||||||
void LLFloater::onClickClose()
|
void LLFloater::onClickClose()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,7 +40,8 @@
|
|||||||
#include "llpanel.h"
|
#include "llpanel.h"
|
||||||
#include "lluuid.h"
|
#include "lluuid.h"
|
||||||
#include "lltabcontainer.h"
|
#include "lltabcontainer.h"
|
||||||
#include "llnotifications.h"
|
#include "llnotificationcontext.h"
|
||||||
|
#include "llnotificationptr.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
class LLDragHandle;
|
class LLDragHandle;
|
||||||
@@ -232,10 +233,7 @@ public:
|
|||||||
// handle refocusing.
|
// handle refocusing.
|
||||||
static void closeFocusedFloater();
|
static void closeFocusedFloater();
|
||||||
|
|
||||||
LLNotification::Params contextualNotification(const std::string& name)
|
LLNotificationPtr addContextualNotification(const std::string& name, const LLSD& substitutions = LLSD());
|
||||||
{
|
|
||||||
return LLNotification::Params(name).context(mNotificationContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
void onClickClose();
|
void onClickClose();
|
||||||
void onClickMinimize();
|
void onClickMinimize();
|
||||||
|
|||||||
@@ -106,6 +106,7 @@
|
|||||||
#include "llui.h"
|
#include "llui.h"
|
||||||
#include "llxmlnode.h"
|
#include "llxmlnode.h"
|
||||||
#include "llnotificationptr.h"
|
#include "llnotificationptr.h"
|
||||||
|
#include "llnotificationcontext.h"
|
||||||
|
|
||||||
typedef enum e_notification_priority
|
typedef enum e_notification_priority
|
||||||
{
|
{
|
||||||
@@ -121,26 +122,6 @@ typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder
|
|||||||
typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
|
typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
|
||||||
typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
|
typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
|
||||||
|
|
||||||
// context data that can be looked up via a notification's payload by the display logic
|
|
||||||
// derive from this class to implement specific contexts
|
|
||||||
class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
LLNotificationContext() : LLInstanceTracker<LLNotificationContext, LLUUID>(LLUUID::generateNewID())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~LLNotificationContext() {}
|
|
||||||
|
|
||||||
LLSD asLLSD() const
|
|
||||||
{
|
|
||||||
return getKey();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// Contains notification form data, such as buttons and text fields along with
|
// Contains notification form data, such as buttons and text fields along with
|
||||||
// manipulator functions
|
// manipulator functions
|
||||||
class LLNotificationForm
|
class LLNotificationForm
|
||||||
|
|||||||
@@ -58,6 +58,8 @@
|
|||||||
#include "llnotificationsutil.h"
|
#include "llnotificationsutil.h"
|
||||||
#include "llfasttimer.h"
|
#include "llfasttimer.h"
|
||||||
|
|
||||||
|
#include "llnotifications.h"
|
||||||
|
|
||||||
// LLLayoutStack
|
// LLLayoutStack
|
||||||
#include "llresizebar.h"
|
#include "llresizebar.h"
|
||||||
#include "llcriticaldamp.h"
|
#include "llcriticaldamp.h"
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ void LLFloaterDayCycle::onClickHelp(void* data)
|
|||||||
LLFloaterDayCycle* self = LLFloaterDayCycle::instance();
|
LLFloaterDayCycle* self = LLFloaterDayCycle::instance();
|
||||||
|
|
||||||
std::string xml_alert = *(std::string *) data;
|
std::string xml_alert = *(std::string *) data;
|
||||||
LLNotifications::instance().add(self->contextualNotification(xml_alert));
|
self->addContextualNotification(xml_alert);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterDayCycle::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
void LLFloaterDayCycle::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
||||||
|
|||||||
@@ -71,6 +71,8 @@
|
|||||||
#include "llviewerregion.h"
|
#include "llviewerregion.h"
|
||||||
#include "llwindow.h"
|
#include "llwindow.h"
|
||||||
|
|
||||||
|
#include "llnotifications.h"
|
||||||
|
|
||||||
const char* market_panel = "market_panel";
|
const char* market_panel = "market_panel";
|
||||||
|
|
||||||
class LLPanelDirMarket : public LLPanelDirFind
|
class LLPanelDirMarket : public LLPanelDirFind
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ LLFloaterEnvSettings::~LLFloaterEnvSettings()
|
|||||||
void LLFloaterEnvSettings::onClickHelp(void* data)
|
void LLFloaterEnvSettings::onClickHelp(void* data)
|
||||||
{
|
{
|
||||||
LLFloaterEnvSettings* self = (LLFloaterEnvSettings*)data;
|
LLFloaterEnvSettings* self = (LLFloaterEnvSettings*)data;
|
||||||
LLNotifications::instance().add(self->contextualNotification("EnvSettingsHelpButton"));
|
self->addContextualNotification("EnvSettingsHelpButton");
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterEnvSettings::initCallbacks(void)
|
void LLFloaterEnvSettings::initCallbacks(void)
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ void LLFloaterWater::onClickHelp(void* data)
|
|||||||
LLFloaterWater* self = LLFloaterWater::instance();
|
LLFloaterWater* self = LLFloaterWater::instance();
|
||||||
|
|
||||||
const std::string* xml_alert = (std::string*)data;
|
const std::string* xml_alert = (std::string*)data;
|
||||||
LLNotifications::instance().add(self->contextualNotification(*xml_alert));
|
self->addContextualNotification(*xml_alert);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterWater::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
void LLFloaterWater::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ void LLFloaterWindLight::onClickHelp(void* data)
|
|||||||
LLFloaterWindLight* self = LLFloaterWindLight::instance();
|
LLFloaterWindLight* self = LLFloaterWindLight::instance();
|
||||||
|
|
||||||
const std::string xml_alert = *(std::string*)data;
|
const std::string xml_alert = *(std::string*)data;
|
||||||
LLNotifications::instance().add(self->contextualNotification(xml_alert));
|
self->addContextualNotification(xml_alert);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterWindLight::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
void LLFloaterWindLight::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
#include "llpreview.h" // For LLMultiPreview
|
#include "llpreview.h" // For LLMultiPreview
|
||||||
#include "lltrans.h"
|
#include "lltrans.h"
|
||||||
#include "llvoavatarself.h"
|
#include "llvoavatarself.h"
|
||||||
|
#include "llnotifications.h"
|
||||||
|
|
||||||
extern LLUUID gAgentID;
|
extern LLUUID gAgentID;
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include "llscrollingpanelparam.h"
|
#include "llscrollingpanelparam.h"
|
||||||
#include "llradiogroup.h"
|
#include "llradiogroup.h"
|
||||||
#include "llnotificationsutil.h"
|
#include "llnotificationsutil.h"
|
||||||
|
#include "llnotifications.h"
|
||||||
|
|
||||||
#include "llcolorswatch.h"
|
#include "llcolorswatch.h"
|
||||||
#include "lltexturectrl.h"
|
#include "lltexturectrl.h"
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
#include "llavatarnamecache.h"
|
#include "llavatarnamecache.h"
|
||||||
#include "llvoavatar.h"
|
#include "llvoavatar.h"
|
||||||
#include "llcallingcard.h"
|
#include "llcallingcard.h"
|
||||||
|
#include "llnotifications.h"
|
||||||
|
|
||||||
LLPanelGeneral::LLPanelGeneral()
|
LLPanelGeneral::LLPanelGeneral()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -119,9 +119,7 @@ void LLPanelGroupTab::handleClickHelp()
|
|||||||
LLSD args;
|
LLSD args;
|
||||||
args["MESSAGE"] = help_text;
|
args["MESSAGE"] = help_text;
|
||||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||||
LLNotification::Params params(parent_floater->contextualNotification("GenericAlert"));
|
parent_floater->addContextualNotification("GenericAlert",args);
|
||||||
params.substitutions(args);
|
|
||||||
LLNotifications::instance().add(params);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include "llviewerstats.h"
|
#include "llviewerstats.h"
|
||||||
#include "llvoavatar.h"
|
#include "llvoavatar.h"
|
||||||
#include "llworld.h"
|
#include "llworld.h"
|
||||||
|
#include "llnotifications.h"
|
||||||
|
|
||||||
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
|
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user