Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git
This commit is contained in:
@@ -103,11 +103,7 @@ void LLFloaterPostcard::init()
|
|||||||
if(!gAgent.getID().isNull())
|
if(!gAgent.getID().isNull())
|
||||||
{
|
{
|
||||||
// we're logged in, so we can get this info.
|
// we're logged in, so we can get this info.
|
||||||
gMessageSystem->newMessageFast(_PREHASH_UserInfoRequest);
|
gAgent.sendAgentUserInfoRequest();
|
||||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
|
||||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
|
||||||
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
|
||||||
gAgent.sendReliableMessage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sInstances.insert(this);
|
sInstances.insert(this);
|
||||||
@@ -233,7 +229,7 @@ void LLFloaterPostcard::onClose(bool app_quitting)
|
|||||||
destroy();
|
destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
class LLSendPostcardResponder : public LLAssetUploadResponder
|
class LLSendPostcardResponder final : public LLAssetUploadResponder
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int mSnapshotIndex;
|
int mSnapshotIndex;
|
||||||
@@ -248,22 +244,22 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
// *TODO define custom uploadFailed here so it's not such a generic message
|
// *TODO define custom uploadFailed here so it's not such a generic message
|
||||||
/*virtual*/ void uploadComplete(const LLSD& content)
|
void uploadComplete(const LLSD& content) override final
|
||||||
{
|
{
|
||||||
// we don't care about what the server returns from this post, just clean up the UI
|
// we don't care about what the server returns from this post, just clean up the UI
|
||||||
LLFloaterSnapshot::savePostcardDone(true, mSnapshotIndex);
|
LLFloaterSnapshot::savePostcardDone(true, mSnapshotIndex);
|
||||||
}
|
}
|
||||||
/*virtual*/ void uploadFailure(const LLSD& content)
|
void uploadFailure(const LLSD& content) override final
|
||||||
{
|
{
|
||||||
LLAssetUploadResponder::uploadFailure(content);
|
LLAssetUploadResponder::uploadFailure(content);
|
||||||
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
|
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
|
||||||
}
|
}
|
||||||
/*virtual*/ void httpFailure(void)
|
void httpFailure(void) override final
|
||||||
{
|
{
|
||||||
LLAssetUploadResponder::httpFailure();
|
LLAssetUploadResponder::httpFailure();
|
||||||
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
|
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
|
||||||
}
|
}
|
||||||
/*virtual*/ char const* getName(void) const { return "LLSendPostcardResponder"; }
|
char const* getName(void) const override final { return "LLSendPostcardResponder"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@@ -273,7 +269,6 @@ void LLFloaterPostcard::onClickSend(void* data)
|
|||||||
{
|
{
|
||||||
LLFloaterPostcard *self = (LLFloaterPostcard *)data;
|
LLFloaterPostcard *self = (LLFloaterPostcard *)data;
|
||||||
|
|
||||||
std::string from(self->childGetValue("from_form").asString());
|
|
||||||
std::string to(self->childGetValue("to_form").asString());
|
std::string to(self->childGetValue("to_form").asString());
|
||||||
|
|
||||||
boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
|
boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
|
||||||
@@ -284,12 +279,6 @@ void LLFloaterPostcard::onClickSend(void* data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (from.empty() || !boost::regex_match(from, emailFormat))
|
|
||||||
{
|
|
||||||
LLNotificationsUtil::add("PromptSelfEmail");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string subject(self->childGetValue("subject_form").asString());
|
std::string subject(self->childGetValue("subject_form").asString());
|
||||||
if(subject.empty() || !self->mHasFirstMsgFocus)
|
if(subject.empty() || !self->mHasFirstMsgFocus)
|
||||||
{
|
{
|
||||||
@@ -349,10 +338,8 @@ void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data,
|
|||||||
// static
|
// static
|
||||||
void LLFloaterPostcard::updateUserInfo(const std::string& email)
|
void LLFloaterPostcard::updateUserInfo(const std::string& email)
|
||||||
{
|
{
|
||||||
for (instance_list_t::iterator iter = sInstances.begin();
|
for (auto& instance : sInstances)
|
||||||
iter != sInstances.end(); ++iter)
|
|
||||||
{
|
{
|
||||||
LLFloaterPostcard *instance = *iter;
|
|
||||||
const std::string& text = instance->childGetValue("from_form").asString();
|
const std::string& text = instance->childGetValue("from_form").asString();
|
||||||
if (text.empty())
|
if (text.empty())
|
||||||
{
|
{
|
||||||
@@ -416,7 +403,6 @@ void LLFloaterPostcard::sendPostcard()
|
|||||||
// the capability already encodes: agent ID, region ID
|
// the capability already encodes: agent ID, region ID
|
||||||
body["pos-global"] = mPosTakenGlobal.getValue();
|
body["pos-global"] = mPosTakenGlobal.getValue();
|
||||||
body["to"] = childGetValue("to_form").asString();
|
body["to"] = childGetValue("to_form").asString();
|
||||||
body["from"] = childGetValue("from_form").asString();
|
|
||||||
body["name"] = childGetValue("name_form").asString();
|
body["name"] = childGetValue("name_form").asString();
|
||||||
body["subject"] = childGetValue("subject_form").asString();
|
body["subject"] = childGetValue("subject_form").asString();
|
||||||
body["msg"] = childGetValue("msg_form").asString();
|
body["msg"] = childGetValue("msg_form").asString();
|
||||||
|
|||||||
@@ -46,17 +46,17 @@ class LLLineEditor;
|
|||||||
class LLButton;
|
class LLButton;
|
||||||
class LLImageJPEG;
|
class LLImageJPEG;
|
||||||
|
|
||||||
class LLFloaterPostcard
|
class LLFloaterPostcard final
|
||||||
: public LLFloater
|
: public LLFloater
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLFloaterPostcard(LLImageJPEG* jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global, int index);
|
LLFloaterPostcard(LLImageJPEG* jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global, int index);
|
||||||
/*virtual*/ ~LLFloaterPostcard();
|
/*virtual*/ ~LLFloaterPostcard() override;
|
||||||
|
|
||||||
/*virtual*/ void init();
|
void init();
|
||||||
/*virtual*/ BOOL postBuild();
|
/*virtual*/ BOOL postBuild() override;
|
||||||
/*virtual*/ void draw();
|
/*virtual*/ void draw() override;
|
||||||
/*virtual*/ void onClose(bool app_quitting);
|
/*virtual*/ void onClose(bool app_quitting) override;
|
||||||
|
|
||||||
static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global, int index);
|
static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global, int index);
|
||||||
|
|
||||||
|
|||||||
@@ -3889,6 +3889,9 @@ void build_context_menu_folder_options(LLInventoryModel* model, const LLUUID& mU
|
|||||||
const LLInventoryCategory* category = model->getCategory(mUUID);
|
const LLInventoryCategory* category = model->getCategory(mUUID);
|
||||||
if(!category) return;
|
if(!category) return;
|
||||||
|
|
||||||
|
items.push_back(std::string("Open Folder In New Window"));
|
||||||
|
items.push_back(std::string("Copy Folder UUID"));
|
||||||
|
|
||||||
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
|
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
|
||||||
if (trash_id == mUUID) return;
|
if (trash_id == mUUID) return;
|
||||||
if (model->isObjectDescendentOf(mUUID, trash_id)) return;
|
if (model->isObjectDescendentOf(mUUID, trash_id)) return;
|
||||||
@@ -3902,9 +3905,6 @@ void build_context_menu_folder_options(LLInventoryModel* model, const LLUUID& mU
|
|||||||
const LLUUID listings_folder = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
const LLUUID listings_folder = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
|
||||||
if (listings_folder.notNull() && gInventory.isObjectDescendentOf(mUUID, listings_folder)) return;
|
if (listings_folder.notNull() && gInventory.isObjectDescendentOf(mUUID, listings_folder)) return;
|
||||||
|
|
||||||
items.push_back(std::string("Open Folder In New Window"));
|
|
||||||
items.push_back(std::string("Copy Folder UUID"));
|
|
||||||
|
|
||||||
LLFolderType::EType type = category->getPreferredType();
|
LLFolderType::EType type = category->getPreferredType();
|
||||||
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
|
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
|
||||||
// calling card related functionality for folders.
|
// calling card related functionality for folders.
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ void LLViewerOctreeEntryData::shift(const LLVector4a &shift_vector)
|
|||||||
|
|
||||||
LLViewerOctreeGroup* LLViewerOctreeEntryData::getGroup()const
|
LLViewerOctreeGroup* LLViewerOctreeEntryData::getGroup()const
|
||||||
{
|
{
|
||||||
return mEntry.notNull() ? mEntry->mGroup : NULL;
|
return mEntry.notNull() ? mEntry->mGroup : LLPointer<LLViewerOctreeGroup>();
|
||||||
}
|
}
|
||||||
|
|
||||||
const LLVector4a& LLViewerOctreeEntryData::getPositionGroup() const
|
const LLVector4a& LLViewerOctreeEntryData::getPositionGroup() const
|
||||||
|
|||||||
Reference in New Issue
Block a user