From 4125bebce7116e074aef664026b9ed33ffa9ca19 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Fri, 29 Apr 2016 20:28:11 +0300 Subject: MAINT-6226 Incorporate a customized Snapshot feature to Outfit Browser flow Initial version, further refactoring pending --- indra/newview/llpanelsnapshotpostcard.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelsnapshotpostcard.cpp') diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 8e37b1418c..2884313f60 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -38,6 +38,7 @@ #include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model #include "llpanelsnapshot.h" #include "llpostcard.h" +#include "llsnapshotlivepreview.h" #include "llviewercontrol.h" // gSavedSettings #include "llviewerwindow.h" @@ -63,8 +64,9 @@ private: /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; } /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; } /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; } - /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; } - /*virtual*/ void updateControls(const LLSD& info); + /*virtual*/ LLFloaterSnapshotBase::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshotBase::SNAPSHOT_FORMAT_JPEG; } + /*virtual*/ LLPanelSnapshot::ESnapshotType getSnapshotType(); + /*virtual*/ void updateControls(const LLSD& info); bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response); void sendPostcard(); @@ -242,3 +244,8 @@ void LLPanelSnapshotPostcard::onSend() // Send postcard. sendPostcard(); } + +LLPanelSnapshot::ESnapshotType LLPanelSnapshotPostcard::getSnapshotType() +{ + return LLPanelSnapshot::SNAPSHOT_POSTCARD; +} -- cgit v1.2.3 From 9f789ddfbad656b0a6e1f59b592795ad22bdd061 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Thu, 2 Jun 2016 20:23:46 +0300 Subject: MAINT-5194 Visual Outfit browser Made refactoring of LLFloaterOutfitSnapshot and LLFloaterSnapshot --- indra/newview/llpanelsnapshotpostcard.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llpanelsnapshotpostcard.cpp') diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index dcd12a7a47..12adcdec8d 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -65,13 +65,13 @@ private: /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; } /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; } /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; } - /*virtual*/ LLFloaterSnapshotBase::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshotBase::SNAPSHOT_FORMAT_JPEG; } - /*virtual*/ LLPanelSnapshot::ESnapshotType getSnapshotType(); - /*virtual*/ void updateControls(const LLSD& info); + /*virtual*/ LLSnapshotModel::ESnapshotFormat getImageFormat() const { return LLSnapshotModel::SNAPSHOT_FORMAT_JPEG; } + /*virtual*/ LLSnapshotModel::ESnapshotType getSnapshotType(); + /*virtual*/ void updateControls(const LLSD& info); bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response); - static void sendPostcardFinished(LLSD result); - void sendPostcard(); + static void sendPostcardFinished(LLSD result); + void sendPostcard(); void onMsgFormFocusRecieved(); void onFormatComboCommit(LLUICtrl* ctrl); @@ -192,8 +192,8 @@ void LLPanelSnapshotPostcard::sendPostcard() getChild("to_form")->getValue().asString(), getChild("subject_form")->getValue().asString(), getChild("msg_form")->getValue().asString(), - LLFloaterSnapshot::getPosTakenGlobal(), - LLFloaterSnapshot::getImageData(), + mSnapshotFloater->getPosTakenGlobal(), + mSnapshotFloater->getImageData(), boost::bind(&LLPanelSnapshotPostcard::sendPostcardFinished, _4))); LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); @@ -207,7 +207,7 @@ void LLPanelSnapshotPostcard::sendPostcard() // Give user feedback of the event. gViewerWindow->playSnapshotAnimAndSound(); - LLFloaterSnapshot::postSave(); + mSnapshotFloater->postSave(); } void LLPanelSnapshotPostcard::onMsgFormFocusRecieved() @@ -267,7 +267,7 @@ void LLPanelSnapshotPostcard::onSend() sendPostcard(); } -LLPanelSnapshot::ESnapshotType LLPanelSnapshotPostcard::getSnapshotType() +LLSnapshotModel::ESnapshotType LLPanelSnapshotPostcard::getSnapshotType() { - return LLPanelSnapshot::SNAPSHOT_POSTCARD; + return LLSnapshotModel::SNAPSHOT_POSTCARD; } -- cgit v1.2.3 From 25095cbabe7f05ac9e19d661d974032c0ec90602 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 19 Jul 2016 16:22:02 +0300 Subject: MAINT-6582 [VOB] Snapshot is not sent --- indra/newview/llpanelsnapshotpostcard.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'indra/newview/llpanelsnapshotpostcard.cpp') diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 12adcdec8d..be8bde09f8 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -95,13 +95,6 @@ LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() // virtual BOOL LLPanelSnapshotPostcard::postBuild() { - // pick up the user's up-to-date email address - gAgent.sendAgentUserInfoRequest(); - - std::string name_string; - LLAgentUI::buildFullname(name_string); - getChild("name_form")->setValue(LLSD(name_string)); - // For the first time a user focuses to .the msg box, all text will be selected. getChild("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this)); @@ -115,6 +108,16 @@ BOOL LLPanelSnapshotPostcard::postBuild() // virtual void LLPanelSnapshotPostcard::onOpen(const LLSD& key) { + // pick up the user's up-to-date email address + if (mAgentEmail.empty()) + { + gAgent.sendAgentUserInfoRequest(); + + std::string name_string; + LLAgentUI::buildFullname(name_string); + getChild("name_form")->setValue(LLSD(name_string)); + } + LLPanelSnapshot::onOpen(key); } -- cgit v1.2.3