Added LLNotificationsUtil and switched LLNotifications::instance().add to LLNotificationsUtil::add in a bazillion places.

This commit is contained in:
Shyotl
2011-09-03 19:30:42 -05:00
parent 7b2aa741aa
commit 417f5084b4
124 changed files with 912 additions and 623 deletions

View File

@@ -41,6 +41,7 @@
#include "llcachename.h"
#include "llbutton.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "llagent.h" // for agent id
@@ -76,6 +77,28 @@ LLFloaterOpenObject::~LLFloaterOpenObject()
sInstance = NULL;
}
// static
void LLFloaterOpenObject::show()
{
LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection();
if (object_selection->getRootObjectCount() != 1)
{
LLNotificationsUtil::add("UnableToViewContentsMoreThanOne");
return;
}
// Create a new instance only if needed
if (!sInstance)
{
sInstance = new LLFloaterOpenObject();
sInstance->center();
}
sInstance->open(); /* Flawfinder: ignore */
sInstance->setFocus(TRUE);
sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
}
void LLFloaterOpenObject::refresh()
{
mPanelInventory->refresh();
@@ -104,35 +127,13 @@ void LLFloaterOpenObject::dirty()
if (sInstance) sInstance->mDirty = TRUE;
}
// static
void LLFloaterOpenObject::show()
{
LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection();
if (object_selection->getRootObjectCount() != 1)
{
LLNotifications::instance().add("UnableToViewContentsMoreThanOne");
return;
}
// Create a new instance only if needed
if (!sInstance)
{
sInstance = new LLFloaterOpenObject();
sInstance->center();
}
sInstance->open(); /* Flawfinder: ignore */
sInstance->setFocus(TRUE);
sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
}
void LLFloaterOpenObject::moveToInventory(bool wear)
{
if (mObjectSelection->getRootObjectCount() != 1)
{
LLNotifications::instance().add("OnlyCopyContentsOfSingleItem");
LLNotificationsUtil::add("OnlyCopyContentsOfSingleItem");
return;
}
@@ -173,7 +174,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
delete data;
data = NULL;
LLNotifications::instance().add("OpenObjectCannotCopy");
LLNotificationsUtil::add("OpenObjectCannotCopy");
}
}