diff options
Diffstat (limited to 'indra/newview')
40 files changed, 1386 insertions, 372 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7d4ec7ac38..55c7290c98 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -209,6 +209,7 @@ set(viewer_SOURCE_FILES llflexibleobject.cpp llfloaterabout.cpp llfloaterbvhpreview.cpp + llfloateraddpaymentmethod.cpp llfloaterauction.cpp llfloaterautoreplacesettings.cpp llfloateravatar.cpp @@ -839,6 +840,7 @@ set(viewer_HEADER_FILES llflexibleobject.h llfloaterabout.h llfloaterbvhpreview.h + llfloateraddpaymentmethod.h llfloaterauction.h llfloaterautoreplacesettings.h llfloateravatar.h diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 537744b44c..3d77ac43e5 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -403,6 +403,17 @@ <key>Value</key> <string></string> </map> + <key>FavoritesFolder</key> + <map> + <key>Comment</key> + <string>User's chosen folder which will be shown in the Favorites tab (UUID)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> <key>SnapshotBaseDir</key> <map> <key>Comment</key> diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 856eb3414e..f41eb3daf4 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -253,6 +253,19 @@ std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_ return LLTrans::getString(payment_text); } +//static +bool LLAvatarPropertiesProcessor::hasPaymentInfoOnFile(const LLAvatarData* avatar_data) +{ + // Special accounts like M Linden don't have payment info revealed. + if (!avatar_data->caption_text.empty()) return true; + + // Linden employees don't have payment info revealed + const S32 LINDEN_EMPLOYEE_INDEX = 3; + if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX) return true; + + return ((avatar_data->flags & AVATAR_TRANSACTED) || (avatar_data->flags & AVATAR_IDENTIFIED)); +} + void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**) { LLAvatarData avatar_data; diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index d5c5c75c69..b063048c26 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -232,6 +232,8 @@ public: // Used for profiles, inspectors. static std::string paymentInfo(const LLAvatarData* avatar_data); + static bool hasPaymentInfoOnFile(const LLAvatarData* avatar_data); + static void processAvatarPropertiesReply(LLMessageSystem* msg, void**); static void processAvatarInterestsReply(LLMessageSystem* msg, void**); diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index df94e337da..cd7332c4d4 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -454,7 +454,7 @@ void LLCurrencyUIManager::Impl::updateUI() if (!mUserEnteredCurrencyBuy) { - if (!mZeroMessage.empty() && mUserCurrencyBuy == 0) + if (mUserCurrencyBuy == 0) { lindenAmount->setText(LLStringUtil::null); } @@ -467,8 +467,9 @@ void LLCurrencyUIManager::Impl::updateUI() } } - mPanel.getChild<LLUICtrl>("currency_est")->setTextArg("[LOCALAMOUNT]", getLocalEstimate()); - mPanel.getChildView("currency_est")->setVisible( hasEstimate() && mUserCurrencyBuy > 0); + std::string estimated = (mUserCurrencyBuy == 0) ? mPanel.getString("estimated_zero") : getLocalEstimate(); + mPanel.getChild<LLUICtrl>("currency_est")->setTextArg("[LOCALAMOUNT]", estimated); + mPanel.getChildView("currency_est")->setVisible( hasEstimate() || mUserCurrencyBuy == 0); mPanel.getChildView("currency_links")->setVisible( mSupportsInternationalBilling); mPanel.getChildView("exchange_rate_note")->setVisible( mSupportsInternationalBilling); diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp new file mode 100644 index 0000000000..3952b48229 --- /dev/null +++ b/indra/newview/llfloateraddpaymentmethod.cpp @@ -0,0 +1,81 @@ +/** + * @file llfloateraddpaymentmethod.cpp + * @brief LLFloaterAddPaymentMethod class implementation + * + * $LicenseInfo:firstyear=2020&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2020, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloateraddpaymentmethod.h" +#include "llnotificationsutil.h" +#include "lluictrlfactory.h" +#include "llweb.h" + + +LLFloaterAddPaymentMethod::LLFloaterAddPaymentMethod(const LLSD& key) + : LLFloater(key) +{ +} + +LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod() +{ +} + +BOOL LLFloaterAddPaymentMethod::postBuild() +{ + setCanDrag(FALSE); + getChild<LLButton>("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this)); + getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onCloseBtn, this)); + return TRUE; +} + +void LLFloaterAddPaymentMethod::onOpen(const LLSD& key) +{ + centerOnScreen(); +} + +void LLFloaterAddPaymentMethod::onContinueBtn() +{ + closeFloater(); + LLNotificationsUtil::add("AddPaymentMethod", LLSD(), LLSD(), + [this](const LLSD¬if, const LLSD&resp) + { + S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); + if (opt == 0) + { + LLWeb::loadURL(this->getString("continue_url")); + } + }); +} + +void LLFloaterAddPaymentMethod::onCloseBtn() +{ + closeFloater(); +} + +void LLFloaterAddPaymentMethod::centerOnScreen() +{ + LLVector2 window_size = LLUI::getInstance()->getWindowSize(); + centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY]))); +} + diff --git a/indra/newview/llfloateraddpaymentmethod.h b/indra/newview/llfloateraddpaymentmethod.h new file mode 100644 index 0000000000..b3bb624484 --- /dev/null +++ b/indra/newview/llfloateraddpaymentmethod.h @@ -0,0 +1,52 @@ +/** + * @file llfloateraddpaymentmethod.h + * @brief LLFloaterAddPaymentMethod class definition + * + * $LicenseInfo:firstyear=2020&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2020, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_FLOATER_ADDPAYMENTMETHOD_H +#define LL_FLOATER_ADDPAYMENTMETHOD_H + +#include "llfloater.h" + +class LLFloaterAddPaymentMethod: + public LLFloater +{ + friend class LLFloaterReg; +public: + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + +private: + LLFloaterAddPaymentMethod(const LLSD& key); + + void centerOnScreen(); + + void onCloseBtn(); + void onContinueBtn(); + + /*virtual*/ ~LLFloaterAddPaymentMethod(); + +}; + +#endif diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 25348474a1..a3e9161ee8 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -32,6 +32,8 @@ #include "llcurrencyuimanager.h" #include "llfloater.h" #include "llfloaterreg.h" +#include "lllayoutstack.h" +#include "lliconctrl.h" #include "llnotificationsutil.h" #include "llstatusbar.h" #include "lltextbox.h" @@ -42,7 +44,6 @@ #include "llwindow.h" #include "llappviewer.h" -static const S32 STANDARD_BUY_AMOUNT = 2000; static const S32 MINIMUM_BALANCE_AMOUNT = 0; class LLFloaterBuyCurrencyUI @@ -58,8 +59,8 @@ public: LLCurrencyUIManager mManager; bool mHasTarget; - std::string mTargetName; S32 mTargetPrice; + S32 mRequiredAmount; public: void noTarget(); @@ -68,6 +69,7 @@ public: virtual BOOL postBuild(); void updateUI(); + void collapsePanels(bool collapse); virtual void draw(); virtual BOOL canClose(); @@ -92,7 +94,9 @@ LLFloater* LLFloaterBuyCurrency::buildFloater(const LLSD& key) LLFloaterBuyCurrencyUI::LLFloaterBuyCurrencyUI(const LLSD& key) : LLFloater(key), mChildren(*this), - mManager(*this) + mManager(*this), + mHasTarget(false), + mTargetPrice(0) { } @@ -104,15 +108,20 @@ LLFloaterBuyCurrencyUI::~LLFloaterBuyCurrencyUI() void LLFloaterBuyCurrencyUI::noTarget() { mHasTarget = false; - mManager.setAmount(STANDARD_BUY_AMOUNT); + mTargetPrice = 0; + mManager.setAmount(0); } void LLFloaterBuyCurrencyUI::target(const std::string& name, S32 price) { mHasTarget = true; - mTargetName = name; mTargetPrice = price; + if (!name.empty()) + { + getChild<LLUICtrl>("target_price_label")->setValue(name); + } + S32 balance = gStatusBar->getBalance(); S32 need = price - balance; if (need < 0) @@ -120,7 +129,8 @@ void LLFloaterBuyCurrencyUI::target(const std::string& name, S32 price) need = 0; } - mManager.setAmount(need + MINIMUM_BALANCE_AMOUNT); + mRequiredAmount = need + MINIMUM_BALANCE_AMOUNT; + mManager.setAmount(0); } @@ -175,7 +185,6 @@ void LLFloaterBuyCurrencyUI::updateUI() getChildView("purchase_warning_repurchase")->setVisible(FALSE); getChildView("purchase_warning_notenough")->setVisible(FALSE); getChildView("contacting")->setVisible(FALSE); - getChildView("buy_action")->setVisible(FALSE); if (hasError) { @@ -208,8 +217,8 @@ void LLFloaterBuyCurrencyUI::updateUI() { if (mHasTarget) { - getChildView("buy_action")->setVisible( true); - getChild<LLUICtrl>("buy_action")->setTextArg("[ACTION]", mTargetName); + getChild<LLUICtrl>("target_price")->setTextArg("[AMT]", llformat("%d", mTargetPrice)); + getChild<LLUICtrl>("required_amount")->setTextArg("[AMT]", llformat("%d", mRequiredAmount)); } } @@ -230,18 +239,40 @@ void LLFloaterBuyCurrencyUI::updateUI() if (mHasTarget) { - if (total >= mTargetPrice) - { - getChildView("purchase_warning_repurchase")->setVisible( true); - } - else - { - getChildView("purchase_warning_notenough")->setVisible( true); - } + getChildView("purchase_warning_repurchase")->setVisible( !getChildView("currency_links")->getVisible()); } } - getChildView("getting_data")->setVisible( !mManager.canBuy() && !hasError); + getChildView("getting_data")->setVisible( !mManager.canBuy() && !hasError && !getChildView("currency_est")->getVisible()); +} + +void LLFloaterBuyCurrencyUI::collapsePanels(bool collapse) +{ + LLLayoutPanel* price_panel = getChild<LLLayoutPanel>("layout_panel_price"); + + if (price_panel->isCollapsed() == collapse) + return; + + LLLayoutStack* outer_stack = getChild<LLLayoutStack>("outer_stack"); + LLLayoutPanel* required_panel = getChild<LLLayoutPanel>("layout_panel_required"); + LLLayoutPanel* msg_panel = getChild<LLLayoutPanel>("layout_panel_msg"); + + S32 delta_height = price_panel->getRect().getHeight() + required_panel->getRect().getHeight() + msg_panel->getRect().getHeight(); + delta_height *= (collapse ? -1 : 1); + + LLIconCtrl* icon = getChild<LLIconCtrl>("normal_background"); + LLRect rect = icon->getRect(); + icon->setRect(rect.setOriginAndSize(rect.mLeft, rect.mBottom - delta_height, rect.getWidth(), rect.getHeight() + delta_height)); + + outer_stack->collapsePanel(price_panel, collapse); + outer_stack->collapsePanel(required_panel, collapse); + outer_stack->collapsePanel(msg_panel, collapse); + + outer_stack->updateLayout(); + + LLRect floater_rect = getRect(); + floater_rect.mBottom -= delta_height; + setShape(floater_rect, false); } void LLFloaterBuyCurrencyUI::onClickBuy() @@ -259,20 +290,72 @@ void LLFloaterBuyCurrencyUI::onClickCancel() LLStatusBar::sendMoneyBalanceRequest(); } +LLFetchAvatarPaymentInfo* LLFloaterBuyCurrency::sPropertiesRequest = NULL; + // static void LLFloaterBuyCurrency::buyCurrency() { - LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency"); - ui->noTarget(); - ui->updateUI(); + delete sPropertiesRequest; + sPropertiesRequest = new LLFetchAvatarPaymentInfo(false); } // static void LLFloaterBuyCurrency::buyCurrency(const std::string& name, S32 price) { - LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency"); - ui->target(name, price); - ui->updateUI(); + delete sPropertiesRequest; + sPropertiesRequest = new LLFetchAvatarPaymentInfo(true, name, price); +} + +// static +void LLFloaterBuyCurrency::handleBuyCurrency(bool has_piof, bool has_target, const std::string& name, S32 price) +{ + delete sPropertiesRequest; + sPropertiesRequest = NULL; + + if (has_piof) + { + LLFloaterBuyCurrencyUI* ui = LLFloaterReg::showTypedInstance<LLFloaterBuyCurrencyUI>("buy_currency"); + if (has_target) + { + ui->target(name, price); + } + else + { + ui->noTarget(); + } + ui->updateUI(); + ui->collapsePanels(!has_target); + } + else + { + LLFloaterReg::showInstance("add_payment_method"); + } } +LLFetchAvatarPaymentInfo::LLFetchAvatarPaymentInfo(bool has_target, const std::string& name, S32 price) +: mAvatarID(gAgent.getID()), + mHasTarget(has_target), + mPrice(price), + mName(name) +{ + LLAvatarPropertiesProcessor* processor = LLAvatarPropertiesProcessor::getInstance(); + // register ourselves as an observer + processor->addObserver(mAvatarID, this); + // send a request (duplicates will be suppressed inside the avatar + // properties processor) + processor->sendAvatarPropertiesRequest(mAvatarID); +} + +LLFetchAvatarPaymentInfo::~LLFetchAvatarPaymentInfo() +{ + LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarID, this); +} +void LLFetchAvatarPaymentInfo::processProperties(void* data, EAvatarProcessorType type) +{ + if (data && type == APT_PROPERTIES) + { + LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); + LLFloaterBuyCurrency::handleBuyCurrency(LLAvatarPropertiesProcessor::hasPaymentInfoOnFile(avatar_data), mHasTarget, mName, mPrice); + } +} diff --git a/indra/newview/llfloaterbuycurrency.h b/indra/newview/llfloaterbuycurrency.h index 7ff6c42384..1722f56dc1 100644 --- a/indra/newview/llfloaterbuycurrency.h +++ b/indra/newview/llfloaterbuycurrency.h @@ -27,15 +27,34 @@ #ifndef LL_LLFLOATERBUYCURRENCY_H #define LL_LLFLOATERBUYCURRENCY_H +#include "llavatarpropertiesprocessor.h" #include "stdtypes.h" - +#include "llagent.h" class LLFloater; +class LLFetchAvatarPaymentInfo : public LLAvatarPropertiesObserver +{ +public: + LLFetchAvatarPaymentInfo(bool has_target, const std::string& name = std::string(), S32 price = 0); + ~LLFetchAvatarPaymentInfo(); + + void processProperties(void* data, EAvatarProcessorType type); + +private: + LLUUID mAvatarID; + bool mHasTarget; + std::string mName; + S32 mPrice; +}; + + class LLFloaterBuyCurrency { public: static void buyCurrency(); static void buyCurrency(const std::string& name, S32 price); + + static void handleBuyCurrency(bool has_piof, bool has_target, const std::string& name, S32 price); /* name should be a noun phrase of the object or service being bought: "That object costs" "Trying to give" @@ -44,7 +63,8 @@ public: */ static LLFloater* buildFloater(const LLSD& key); -}; + static LLFetchAvatarPaymentInfo* sPropertiesRequest; +}; #endif diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 06a908cccc..51b98339c4 100644 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -45,6 +45,7 @@ public: virtual LLFolderType::EType getPreferredType() const = 0; virtual void showProperties(void) = 0; virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual. + virtual BOOL isAgentInventory() const { return FALSE; } virtual BOOL isUpToDate() const = 0; virtual bool hasChildren() const = 0; virtual LLInventoryType::EType getInventoryType() const = 0; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 539d80532c..03123689c5 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -138,6 +138,35 @@ bool isMarketplaceSendAction(const std::string& action) return ("send_to_marketplace" == action); } +bool isPanelActive(const std::string& panel_name) +{ + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + return (active_panel && (active_panel->getName() == panel_name)); +} + +bool isParentSystemFolder(const LLInventoryModel* model, const LLUUID& folder_id) +{ + if (!model || folder_id.isNull()) return false; + + LLViewerInventoryCategory* cat = model->getCategory(folder_id); + if (cat) + { + if (cat->getPreferredType() == LLFolderType::FT_ROOT_INVENTORY) + { + return false; + } + if (LLFolderType::lookupIsProtectedType(cat->getPreferredType())) + { + return true; + } + else + { + return isParentSystemFolder(model, cat->getParentUUID()); + } + } + return false; +} + // Used by LLFolderBridge as callback for directory fetching recursion class LLRightClickInventoryFetchDescendentsObserver : public LLInventoryFetchDescendentsObserver { @@ -888,8 +917,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Properties")); } - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - if (active_panel && (active_panel->getName() != "All Items")) + if (!isPanelActive("All Items")) { items.push_back(std::string("Show in Main Panel")); } @@ -980,7 +1008,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, items.push_back(std::string("Delete")); - if (!isItemRemovable()) + if (!isItemRemovable() || isPanelActive("Favorite Items")) { disabled_items.push_back(std::string("Delete")); } @@ -4010,6 +4038,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("Set Favorites folder")); } if (favorites == mUUID) { @@ -4037,6 +4066,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("Set Favorites folder")); } if (marketplace_listings_id == mUUID) { @@ -4045,14 +4075,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("Cut")); disabled_items.push_back(std::string("Delete")); } + + if (isPanelActive("Favorite Items")) + { + disabled_items.push_back(std::string("Delete")); + } if(trash_id == mUUID) { - bool is_recent_panel = false; - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - if (active_panel && (active_panel->getName() == "Recent Items")) - { - is_recent_panel = true; - } + bool is_recent_panel = isPanelActive("Recent Items"); // This is the trash. items.push_back(std::string("Empty Trash")); @@ -4101,6 +4131,16 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Body Parts")); items.push_back(std::string("New Settings")); items.push_back(std::string("upload_def")); + + if (!LLFolderType::lookupIsProtectedType(getPreferredType()) && !isParentSystemFolder(model, mUUID)) + { + items.push_back(std::string("Set Favorites folder")); + } + if (!LLEnvironment::instance().isInventoryEnabled()) + { + disabled_items.push_back("New Settings"); + } + } } getClipboardEntries(false, items, disabled_items, flags); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 72013f7396..72631174e7 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -63,7 +63,8 @@ LLInventoryFilter::FilterOps::FilterOps(const Params& p) mPermissions(p.permissions), mFilterTypes(p.types), mFilterUUID(p.uuid), - mFilterLinks(p.links) + mFilterLinks(p.links), + mSearchVisibility(p.search_visibility) { } @@ -154,6 +155,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item) passed = passed && checkAgainstPermissions(listener); passed = passed && checkAgainstFilterLinks(listener); passed = passed && checkAgainstCreator(listener); + passed = passed && checkAgainstSearchVisibility(listener); return passed; } @@ -582,6 +584,27 @@ bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory } } +bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const +{ + if (!listener || !hasFilterString()) return TRUE; + + const LLUUID object_id = listener->getUUID(); + const LLInventoryObject *object = gInventory.getObject(object_id); + if (!object) return TRUE; + + const BOOL is_link = object->getIsLinkType(); + if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0)) + return FALSE; + + if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0)) + return FALSE; + + if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0)) + return FALSE; + + return TRUE; +} + const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const { return mFilterSubString; @@ -750,6 +773,61 @@ void LLInventoryFilter::setFilterMarketplaceListingFolders(bool select_only_list } } + +void LLInventoryFilter::toggleSearchVisibilityLinks() +{ + bool hide_links = mFilterOps.mSearchVisibility & VISIBILITY_LINKS; + if (hide_links) + { + mFilterOps.mSearchVisibility &= ~VISIBILITY_LINKS; + } + else + { + mFilterOps.mSearchVisibility |= VISIBILITY_LINKS; + } + + if (hasFilterString()) + { + setModified(hide_links ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); + } +} + +void LLInventoryFilter::toggleSearchVisibilityTrash() +{ + bool hide_trash = mFilterOps.mSearchVisibility & VISIBILITY_TRASH; + if (hide_trash) + { + mFilterOps.mSearchVisibility &= ~VISIBILITY_TRASH; + } + else + { + mFilterOps.mSearchVisibility |= VISIBILITY_TRASH; + } + + if (hasFilterString()) + { + setModified(hide_trash ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); + } +} + +void LLInventoryFilter::toggleSearchVisibilityLibrary() +{ + bool hide_library = mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY; + if (hide_library) + { + mFilterOps.mSearchVisibility &= ~VISIBILITY_LIBRARY; + } + else + { + mFilterOps.mSearchVisibility |= VISIBILITY_LIBRARY; + } + + if (hasFilterString()) + { + setModified(hide_library ? FILTER_MORE_RESTRICTIVE : FILTER_LESS_RESTRICTIVE); + } +} + void LLInventoryFilter::setFilterNoMarketplaceFolder() { mFilterOps.mFilterTypes |= FILTERTYPE_NO_MARKETPLACE_ITEMS; @@ -861,6 +939,44 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) } } +void LLInventoryFilter::setSearchVisibilityTypes(U32 types) +{ + if (mFilterOps.mSearchVisibility != types) + { + // keep current items only if no perm bits getting turned off + BOOL fewer_bits_set = (mFilterOps.mSearchVisibility & ~types); + BOOL more_bits_set = (~mFilterOps.mSearchVisibility & types); + mFilterOps.mSearchVisibility = types; + + if (more_bits_set && fewer_bits_set) + { + setModified(FILTER_RESTART); + } + else if (more_bits_set) + { + // target must have all requested permission bits, so more bits == more restrictive + setModified(FILTER_MORE_RESTRICTIVE); + } + else if (fewer_bits_set) + { + setModified(FILTER_LESS_RESTRICTIVE); + } + } +} + +void LLInventoryFilter::setSearchVisibilityTypes(const Params& params) +{ + if (!params.validateBlock()) + { + return; + } + + if (params.filter_ops.search_visibility.isProvided()) + { + setSearchVisibilityTypes(params.filter_ops.search_visibility); + } +} + void LLInventoryFilter::setFilterPermissions(PermissionMask perms) { if (mFilterOps.mPermissions != perms) @@ -1262,6 +1378,18 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } + if (isFilterObjectTypesWith(LLInventoryType::IT_SETTINGS)) + { + filtered_types += LLTrans::getString("Settings"); + filtered_by_type = TRUE; + num_filter_types++; + } + else + { + not_filtered_types += LLTrans::getString("Settings"); + filtered_by_all_types = FALSE; + } + if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() && filtered_by_type && !filtered_by_all_types) @@ -1317,6 +1445,7 @@ void LLInventoryFilter::toParams(Params& params) const params.filter_ops.show_folder_state = getShowFolderState(); params.filter_ops.creator_type = getFilterCreatorType(); params.filter_ops.permissions = getFilterPermissions(); + params.filter_ops.search_visibility = getSearchVisibilityTypes(); params.substring = getFilterSubString(); params.since_logoff = isSinceLogoff(); } @@ -1340,6 +1469,7 @@ void LLInventoryFilter::fromParams(const Params& params) setShowFolderState(params.filter_ops.show_folder_state); setFilterCreator(params.filter_ops.creator_type); setFilterPermissions(params.filter_ops.permissions); + setSearchVisibilityTypes(params.filter_ops.search_visibility); setFilterSubString(params.substring); setDateRangeLastLogoff(params.since_logoff); } @@ -1369,6 +1499,11 @@ U64 LLInventoryFilter::getFilterSettingsTypes() const return mFilterOps.mFilterSettingsTypes; } +U64 LLInventoryFilter::getSearchVisibilityTypes() const +{ + return mFilterOps.mSearchVisibility; +} + bool LLInventoryFilter::hasFilterString() const { return mFilterSubString.size() > 0; diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index be02ee3623..0580261c43 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -99,6 +99,14 @@ public: FILTERCREATOR_OTHERS }; + enum ESearchVisibility + { + VISIBILITY_NONE = 0, + VISIBILITY_TRASH = 0x1 << 0, + VISIBILITY_LIBRARY = 0x1 << 1, + VISIBILITY_LINKS = 0x1 << 2 + }; + struct FilterOps { struct DateRange : public LLInitParam::Block<DateRange> @@ -116,11 +124,13 @@ public: struct Params : public LLInitParam::Block<Params> { - Optional<U32> types; + Optional<U32> types, + search_visibility; Optional<U64> object_types, wearable_types, settings_types, category_types; + Optional<EFilterLink> links; Optional<LLUUID> uuid; Optional<DateRange> date_range; @@ -137,6 +147,7 @@ public: settings_types("settings_types", 0xffffFFFFffffFFFFULL), category_types("category_types", 0xffffFFFFffffFFFFULL), links("links", FILTERLINK_INCLUDE_LINKS), + search_visibility("search_visibility", 0xFFFFFFFF), uuid("uuid"), date_range("date_range"), hours_ago("hours_ago", 0), @@ -149,7 +160,8 @@ public: FilterOps(const Params& = Params()); - U32 mFilterTypes; + U32 mFilterTypes, + mSearchVisibility; U64 mFilterObjectTypes, // For _OBJECT mFilterWearableTypes, mFilterSettingsTypes, // for _SETTINGS @@ -193,7 +205,8 @@ public: U64 getFilterObjectTypes() const; U64 getFilterCategoryTypes() const; U64 getFilterWearableTypes() const; - U64 getFilterSettingsTypes() const; + U64 getFilterSettingsTypes() const; + U64 getSearchVisibilityTypes() const; bool isFilterObjectTypesWith(LLInventoryType::EType t) const; void setFilterObjectTypes(U64 types); @@ -213,6 +226,12 @@ public: ESearchType getSearchType() { return mSearchType; } void setFilterCreator(EFilterCreatorType type); + void toggleSearchVisibilityLinks(); + void toggleSearchVisibilityTrash(); + void toggleSearchVisibilityLibrary(); + void setSearchVisibilityTypes(U32 types); + void setSearchVisibilityTypes(const Params& params); + void setFilterSubString(const std::string& string); const std::string& getFilterSubString(BOOL trim = FALSE) const; const std::string& getFilterSubStringOrig() const { return mFilterSubStringOrig; } @@ -309,6 +328,7 @@ private: bool checkAgainstPermissions(const LLInventoryItem* item) const; bool checkAgainstFilterLinks(const class LLFolderViewModelItemInventory* listener) const; bool checkAgainstCreator(const class LLFolderViewModelItemInventory* listener) const; + bool checkAgainstSearchVisibility(const class LLFolderViewModelItemInventory* listener) const; bool checkAgainstClipboard(const LLUUID& object_id) const; FilterOps mFilterOps; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 17e80dca89..a44a54632c 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -542,6 +542,11 @@ const LLUUID LLInventoryModel::findUserDefinedCategoryUUIDForType(LLFolderType:: cat_id = LLUUID(gSavedPerAccountSettings.getString("AnimationUploadFolder")); break; } + case LLFolderType::FT_FAVORITE: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("FavoritesFolder")); + break; + } default: break; } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 7ff1006773..c65998cf90 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -179,6 +179,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); + mCommitCallbackRegistrar.add("Inventory.SetFavoritesFolder", boost::bind(&LLInventoryPanel::setFavoritesFolder, this, _2)); } LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) @@ -1374,6 +1375,11 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata) } } +void LLInventoryPanel::setFavoritesFolder(const LLSD& userdata) +{ + gSavedPerAccountSettings.setString("FavoritesFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); +} + void LLInventoryPanel::purgeSelectedItems() { if (!mFolderRoot.get()) return; @@ -1753,6 +1759,96 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params) mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER; } +static LLDefaultChildRegistry::Register<LLInventoryFavoriteItemsPanel> t_favorites_inventory_panel("favorites_inventory_panel"); + +LLInventoryFavoriteItemsPanel::LLInventoryFavoriteItemsPanel(const Params& params) + : LLInventoryPanel(params) +{ + std::string ctrl_name = "FavoritesFolder"; + if (gSavedPerAccountSettings.controlExists(ctrl_name)) + { + LLPointer<LLControlVariable> cntrl_ptr = gSavedPerAccountSettings.getControl(ctrl_name); + if (cntrl_ptr.notNull()) + { + mFolderChangedSignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&LLInventoryFavoriteItemsPanel::updateFavoritesRootFolder, this)); + } + } +} + +void LLInventoryFavoriteItemsPanel::setSelectCallback(const boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb) +{ + if (mFolderRoot.get()) + { + mFolderRoot.get()->setSelectCallback(cb); + mSelectionCallback = cb; + } +} + +void LLInventoryFavoriteItemsPanel::initFromParams(const Params& p) +{ + Params fav_params(p); + fav_params.start_folder.id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE); + LLInventoryPanel::initFromParams(fav_params); + updateFavoritesRootFolder(); +} + +void LLInventoryFavoriteItemsPanel::updateFavoritesRootFolder() +{ + const LLUUID& folder_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_FAVORITE); + + bool is_favorites_set = (folder_id != gInventory.findCategoryUUIDForTypeInRoot(LLFolderType::FT_FAVORITE, true, gInventory.getRootFolderID())); + + if (!is_favorites_set || folder_id != getRootFolderID()) + { + LLUUID root_id = folder_id; + if (mFolderRoot.get()) + { + removeItemID(getRootFolderID()); + mFolderRoot.get()->destroyView(); + } + + mCommitCallbackRegistrar.pushScope(); + { + LLFolderView* folder_view = createFolderRoot(root_id); + mFolderRoot = folder_view->getHandle(); + + addItemID(root_id, mFolderRoot.get()); + + + LLRect scroller_view_rect = getRect(); + scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); + LLScrollContainer::Params scroller_params(mParams.scroll()); + scroller_params.rect(scroller_view_rect); + + if (mScroller) + { + removeChild(mScroller); + delete mScroller; + mScroller = NULL; + } + mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params); + addChild(mScroller); + mScroller->addChild(mFolderRoot.get()); + mFolderRoot.get()->setScrollContainer(mScroller); + mFolderRoot.get()->setFollowsAll(); + mFolderRoot.get()->addChild(mFolderRoot.get()->mStatusTextBox); + + if (!mSelectionCallback.empty()) + { + mFolderRoot.get()->setSelectCallback(mSelectionCallback); + } + } + mCommitCallbackRegistrar.popScope(); + mFolderRoot.get()->setCallbackRegistrar(&mCommitCallbackRegistrar); + + if (is_favorites_set) + { + buildNewViews(folder_id); + } + mFolderRoot.get()->setShowEmptyMessage(!is_favorites_set); + } +} + /************************************************************************/ /* Asset Pre-Filtered Inventory Panel related class */ /************************************************************************/ diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index b51dc17cdd..7cb52dc1f3 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -214,6 +214,7 @@ public: void doCreate(const LLSD& userdata); bool beginIMSession(); void fileUploadLocation(const LLSD& userdata); + void setFavoritesFolder(const LLSD& userdata); void purgeSelectedItems(); bool attachObject(const LLSD& userdata); static void idle(void* user_data); @@ -376,4 +377,24 @@ private: LLAssetType::EType mAssetType; }; + +class LLInventoryFavoriteItemsPanel : public LLInventoryPanel +{ +public: + struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params> + {}; + + void initFromParams(const Params& p); + bool isSelectionRemovable() { return false; } + void setSelectCallback(const boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb); + +protected: + LLInventoryFavoriteItemsPanel(const Params& params); + ~LLInventoryFavoriteItemsPanel() { mFolderChangedSignal.disconnect(); } + void updateFavoritesRootFolder(); + + boost::signals2::connection mFolderChangedSignal; + boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)> mSelectionCallback; + friend class LLUICtrlFactory; +}; #endif // LL_LLINVENTORYPANEL_H diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 02cd22c307..4691ee3849 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -115,6 +115,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mSavedFolderState(NULL), mFilterText(""), mMenuGearDefault(NULL), + mMenuVisibility(NULL), mMenuAddHandle(), mNeedUploadCost(true) { @@ -188,6 +189,16 @@ BOOL LLPanelMainInventory::postBuild() worn_filter.markDefault(); mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2)); } + + mFavoriteItemsPanel = getChild<LLInventoryFavoriteItemsPanel>("Favorite Items"); + if (mFavoriteItemsPanel) + { + LLInventoryFilter& recent_filter = mFavoriteItemsPanel->getFilter(); + recent_filter.setEmptyLookupMessage("InventoryFavoritItemsNotSelected"); + recent_filter.markDefault(); + mFavoriteItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mFavoriteItemsPanel, _1, _2)); + } + mSearchTypeCombo = getChild<LLComboBox>("search_type"); if(mSearchTypeCombo) { @@ -218,6 +229,17 @@ BOOL LLPanelMainInventory::postBuild() recent_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER)); } } + if(mActivePanel) + { + if(savedFilterState.has(mActivePanel->getFilter().getName())) + { + LLSD items = savedFilterState.get(mActivePanel->getFilter().getName()); + LLInventoryFilter::Params p; + LLParamSDParser parser; + parser.readSD(items, p); + mActivePanel->getFilter().setSearchVisibilityTypes(p); + } + } } @@ -228,6 +250,7 @@ BOOL LLPanelMainInventory::postBuild() } mGearMenuButton = getChild<LLMenuButton>("options_gear_btn"); + mVisibilityMenuButton = getChild<LLMenuButton>("options_visibility_btn"); initListCommandsHandlers(); @@ -253,6 +276,9 @@ BOOL LLPanelMainInventory::postBuild() LLPanelMainInventory::~LLPanelMainInventory( void ) { // Save the filters state. + // Some params types cannot be saved this way + // for example, LLParamSDParser doesn't know about U64, + // so some FilterOps params should be revised. LLSD filterRoot; LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>("All Items"); if (all_items_panel) @@ -1164,6 +1190,10 @@ void LLPanelMainInventory::initListCommandsHandlers() LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAddHandle = menu->getHandle(); + mMenuVisibility = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_inventory_search_visibility.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mVisibilityMenuButton->setMenu(mMenuVisibility); + mVisibilityMenuButton->setMenuPosition(LLMenuButton::MP_BOTTOM_LEFT); + // Update the trash button when selected item(s) get worn or taken off. LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this)); } @@ -1353,6 +1383,21 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } LLFloaterReg::showInstance("linkreplace", params); } + + if (command_name == "toggle_search_trash") + { + mActivePanel->getFilter().toggleSearchVisibilityTrash(); + } + + if (command_name == "toggle_search_library") + { + mActivePanel->getFilter().toggleSearchVisibilityLibrary(); + } + + if (command_name == "include_links") + { + mActivePanel->getFilter().toggleSearchVisibilityLinks(); + } } void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) @@ -1403,7 +1448,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "delete") { - return getActivePanel()->isSelectionRemovable(); + return getActivePanel()->isSelectionRemovable() && (getActivePanel() != mFavoriteItemsPanel); } if (command_name == "save_texture") { @@ -1498,6 +1543,21 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata) return sort_order_mask & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; } + if (command_name == "toggle_search_trash") + { + return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_TRASH) != 0; + } + + if (command_name == "toggle_search_library") + { + return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LIBRARY) != 0; + } + + if (command_name == "include_links") + { + return (mActivePanel->getFilter().getSearchVisibilityTypes() & LLInventoryFilter::VISIBILITY_LINKS) != 0; + } + return FALSE; } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index a6bdee233d..903b33bdbf 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -37,6 +37,7 @@ class LLComboBox; class LLFolderViewItem; class LLInventoryPanel; +class LLInventoryFavoriteItemsPanel; class LLSaveFolderState; class LLFilterEditor; class LLTabContainer; @@ -136,6 +137,7 @@ private: LLHandle<LLFloater> mFinderHandle; LLInventoryPanel* mActivePanel; LLInventoryPanel* mWornItemsPanel; + LLInventoryFavoriteItemsPanel* mFavoriteItemsPanel; bool mResortActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; @@ -169,7 +171,9 @@ protected: private: LLDragAndDropButton* mTrashButton; LLToggleableMenu* mMenuGearDefault; + LLToggleableMenu* mMenuVisibility; LLMenuButton* mGearMenuButton; + LLMenuButton* mVisibilityMenuButton; LLHandle<LLView> mMenuAddHandle; bool mNeedUploadCost; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 6a29be4aa1..4f46d1c0a2 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -121,6 +121,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal data.mURLExternal = mNotification->getURLOpenExternally(); } + if((*it).has("width")) + { + data.mWidth = (*it)["width"].asInteger(); + } + mButtonData.push_back(data); option_index++; } @@ -159,15 +164,29 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal // Calc total width of buttons S32 button_width = 0; S32 sp = font->getWidth(std::string("OO")); + S32 btn_total_width = 0; + S32 default_size_btns = 0; for( S32 i = 0; i < num_options; i++ ) - { + { S32 w = S32(font->getWidth( options[i].second ) + 0.99f) + sp + 2 * LLBUTTON_H_PAD; - button_width = llmax( w, button_width ); + if (mButtonData[i].mWidth > w) + { + btn_total_width += mButtonData[i].mWidth; + } + else + { + button_width = llmax(w, button_width); + default_size_btns++; + } } - S32 btn_total_width = button_width; + if( num_options > 1 ) { - btn_total_width = (num_options * button_width) + ((num_options - 1) * BTN_HPAD); + btn_total_width = btn_total_width + (button_width * default_size_btns) + ((num_options - 1) * BTN_HPAD); + } + else + { + btn_total_width = llmax(btn_total_width, button_width); } // Message: create text box using raw string, as text has been structure deliberately @@ -333,7 +352,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal if(btn) { btn->setName(options[i].first); - btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT )); + btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, (mButtonData[i].mWidth == 0) ? button_width : mButtonData[i].mWidth, BTN_HEIGHT )); btn->setLabel(options[i].second); btn->setFont(font); @@ -348,7 +367,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal btn->setFocus(TRUE); } } - button_left += button_width + BTN_HPAD; + button_left += ((mButtonData[i].mWidth == 0) ? button_width : mButtonData[i].mWidth) + BTN_HPAD; } setCheckBoxes(HPAD, VPAD); diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index 9b4e054bf1..bd34e40642 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -82,9 +82,14 @@ private: struct ButtonData { + ButtonData() + : mWidth(0) + {} + LLButton* mButton; std::string mURL; U32 mURLExternal; + S32 mWidth; }; std::vector<ButtonData> mButtonData; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 414ae1fad6..06587d6025 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -34,6 +34,7 @@ #include "llcompilequeue.h" #include "llfasttimerview.h" #include "llfloaterabout.h" +#include "llfloateraddpaymentmethod.h" #include "llfloaterauction.h" #include "llfloaterautoreplacesettings.h" #include "llfloateravatar.h" @@ -194,6 +195,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterAboutUtil::registerFloater(); LLFloaterReg::add("block_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFastTimerView>); LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>); + LLFloaterReg::add("add_payment_method", "floater_add_payment_method.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAddPaymentMethod>); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("associate_listing", "floater_associate_listing.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAssociateListing>); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e6bd20b58f..2d8757b673 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4895,7 +4895,7 @@ void handle_buy_or_take() { LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", total_price); - LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString( "BuyingCosts", args ), total_price ); + LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString( "this_object_costs", args ), total_price ); } } else diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index cd48b1e8e7..7d52607cba 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -825,10 +825,7 @@ void upload_done_callback( if(!(can_afford_transaction(expected_upload_cost))) { - LLStringUtil::format_map_t args; - args["NAME"] = data->mAssetInfo.getName(); - args["AMOUNT"] = llformat("%d", expected_upload_cost); - LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("UploadingCosts", args), expected_upload_cost ); + LLBuyCurrencyHTML::openCurrencyFloater( "", expected_upload_cost ); is_balance_sufficient = FALSE; } else if(region) @@ -962,10 +959,7 @@ void upload_new_resource( if (balance < uploadInfo->getExpectedUploadCost()) { // insufficient funds, bail on this upload - LLStringUtil::format_map_t args; - args["NAME"] = uploadInfo->getName(); - args["AMOUNT"] = llformat("%d", uploadInfo->getExpectedUploadCost()); - LLBuyCurrencyHTML::openCurrencyFloater(LLTrans::getString("UploadingCosts", args), uploadInfo->getExpectedUploadCost()); + LLBuyCurrencyHTML::openCurrencyFloater("", uploadInfo->getExpectedUploadCost()); return; } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ea9dba3c4e..7d8c6e68ea 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -777,7 +777,6 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif LL_DEBUGS("GroupInvite") << "Successfully sent response to group " << group_id << " invitation" << LL_ENDL; if (notify_and_update) { - LLNotificationsUtil::add("JoinGroupSuccess"); gAgent.sendAgentDataUpdateRequest(); LLGroupMgr::getInstance()->clearGroupData(group_id); @@ -5041,6 +5040,15 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // notification was specified using the new mechanism, so we can just handle it here std::string notificationID; msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID); + + //SL-13824 skip notification when both joining a group and leaving a group + //remove this after server stops sending these messages + if (notificationID == "JoinGroupSuccess" || + notificationID == "GroupDepart") + { + return true; + } + if (!LLNotifications::getInstance()->templateExists(notificationID)) { return false; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index e0da7f5d9e..57325739e4 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -957,4 +957,7 @@ <color name="OutfitGalleryItemUnselected" value="0.4 0.4 0.4 1" /> + <color + name="AddPaymentPanel" + value="0.27 0.27 0.27 1" /> </colors> diff --git a/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png Binary files differnew file mode 100644 index 0000000000..048da25c92 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Inv_Toolbar_SearchVisibility.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 7325d836d2..f906843ef1 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -45,6 +45,10 @@ with the same filename but different name <texture name="AddItem_Off" file_name="icons/AddItem_Off.png" preload="false" /> <texture name="AddItem_Press" file_name="icons/AddItem_Press.png" preload="false" /> + <texture name="add_payment_image_center" file_name="windows/add_payment_image_center.png" preload="true" /> + <texture name="add_payment_image_left" file_name="windows/add_payment_image_left.png" preload="true" /> + <texture name="add_payment_image_right" file_name="windows/add_payment_image_right.png" preload="true" /> + <texture name="Arrow_Left_Off" file_name="navbar/Arrow_Left_Off.png" preload="true" /> <texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true" /> @@ -333,6 +337,8 @@ with the same filename but different name <texture name="Inv_Unknown" file_name="icons/Inv_UnknownObject.png" preload="false" /> <texture name="Inv_VersionFolderClosed" file_name="icons/Inv_VersionFolderClosed.png" preload="false" /> <texture name="Inv_VersionFolderOpen" file_name="icons/Inv_VersionFolderOpen.png" preload="false" /> + + <texture name="Inv_Toolbar_SearchVisibility" file_name="icons/Inv_Toolbar_SearchVisibility.png" preload="false" /> <texture name="Linden_Dollar_Alert" file_name="widgets/Linden_Dollar_Alert.png"/> <texture name="Linden_Dollar_Background" file_name="widgets/Linden_Dollar_Background.png"/> @@ -648,6 +654,7 @@ with the same filename but different name <texture name="TextField_Search_Off" file_name="widgets/TextField_Search_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> + <texture name="TextField_Search_Highlight" file_name="widgets/TextField_Search_Highlight.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" /> diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png Binary files differnew file mode 100644 index 0000000000..e3944289c6 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Highlight.png diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_center.png b/indra/newview/skins/default/textures/windows/add_payment_image_center.png Binary files differnew file mode 100644 index 0000000000..b5459136cb --- /dev/null +++ b/indra/newview/skins/default/textures/windows/add_payment_image_center.png diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_left.png b/indra/newview/skins/default/textures/windows/add_payment_image_left.png Binary files differnew file mode 100644 index 0000000000..7fb65e724a --- /dev/null +++ b/indra/newview/skins/default/textures/windows/add_payment_image_left.png diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_right.png b/indra/newview/skins/default/textures/windows/add_payment_image_right.png Binary files differnew file mode 100644 index 0000000000..f1937b6318 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/add_payment_image_right.png diff --git a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml new file mode 100644 index 0000000000..1f980564d4 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + height="405" + width="900" + layout="topleft" + name="floater_add_payment_method" + single_instance="true" + show_title="false" + legacy_header_height="0" + header_height="0" + background_visible="false" + can_resize="false" + can_drag_on_left="false" + can_minimize="false" + can_close="false"> + <floater.string + name="continue_url"> + https://secondlife.com/my/lindex/buy.php?associate_for_viewer=1 + </floater.string> + <panel + background_opaque="false" + bg_alpha_color="AddPaymentPanel" + border_visible="false" + background_visible="true" + label="wrapper_panel" + layout="topleft" + left="0" + name="wrapper_panel" + top="0" + height="405" + width="900" + follows="all" + translate="false"> + <text + type="string" + length="1" + follows="top|left|right" + font="SansSerifLargeBold" + text_color="White" + layout="topleft" + left="0" + height="14" + top_pad="30" + width="900" + halign="center" + name="title_txt"> + Add a payment method to buy Linden dollars and enjoy more of Second Life. + </text> + <button + follows="top|left|right" + height="24" + label="Get started" + font="SansSerifMedium" + layout="topleft" + left="320" + name="continue_btn" + image_unselected="PushButton_Login" + image_pressed="PushButton_Login_Pressed" + image_hover_unselected="PushButton_Login_Over" + label_color="White" + top_pad ="15" + width="140"/> + <button + follows="top|left|right" + height="24" + label="Later" + layout="topleft" + left_pad="9" + name="close_btn" + width="90"/> + <icon + height="195" + width="260" + image_name="add_payment_image_left" + layout="topleft" + left="30" + name="image_left" + top_pad="30" + use_draw_context_alpha="false"/> + <icon + height="195" + width="260" + image_name="add_payment_image_center" + layout="topleft" + left_pad="30" + name="image_center" + use_draw_context_alpha="false"/> + <icon + height="195" + width="260" + image_name="add_payment_image_right" + layout="topleft" + left_pad="30" + name="image_right" + use_draw_context_alpha="false"/> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifMedium" + text_color="White" + height="75" + width="260" + top_pad="15" + layout="topleft" + word_wrap="true" + left="30" + name="image_left_desc"> + Create an avatar you love. Choose from millions of items in stores and the Second Life Marketplace. Your style is here. + </text> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifMedium" + text_color="White" + height="75" + width="260" + layout="topleft" + word_wrap="true" + left_pad="30" + name="image_center_desc"> + Donate to your favorite performers and hosts. Your support helps them create great experiences. + </text> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifMedium" + text_color="White" + height="75" + width="260" + layout="topleft" + word_wrap="true" + left_pad="30" + name="image_right_desc"> + Make the home of your dreams. With millions of items available to purchase, you can make your retreat unique. + </text> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 061af1b67c..e8e83301be 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <floater - legacy_header_height="18" + can_minimize="false" - height="275" + height="285" layout="topleft" title="BUY L$" name="buy currency" @@ -17,277 +17,385 @@ name="info_cannot_buy"> Unable to Buy </floater.string> + <floater.string + name="estimated_zero"> + US$ 0.00 + </floater.string> <icon - height="215" + height="245" image_name="Linden_Dollar_Background" layout="topleft" left="0" name="normal_background" - top="17" + top="0" use_draw_context_alpha="false" width="350" /> - <text - type="string" - length="1" - follows="top|left|right" - font="SansSerifHuge" - layout="topleft" - left="20" - height="30" - top="25" - width="340" - name="info_need_more"> - You need more L$ - </text> - <text - type="string" - length="1" - follows="top|left" - height="16" + <layout_stack + animate="false" + name="outer_stack" + layout="topleft" + follows="all" + orientation="vertical" + left="0" + top="0" + width="350" + height="285"> + <layout_panel + auto_resize="false" + name="layout_panel_title" layout="topleft" - top="246" - left="15" - width="300" - name="contacting"> - Contacting LindeX... - </text> - <text - type="string" - length="1" - follows="top|left" - font="SansSerifHuge" + follows="all" + width="350" + height="35"> + <text + type="string" + length="1" + follows="top|left|right" + font="SansSerifLarge" + layout="topleft" + left="20" + height="30" + top="8" + width="340" + name="info_need_more"> + You need more L$ + </text> + <text + type="string" + length="1" + follows="top|left|right" + font="SansSerifLarge" + layout="topleft" + left="20" + height="30" + top="8" + width="300" + name="info_buying"> + Buy L$ + </text> + <view_border + bevel_style="none" + height="0" + layout="topleft" + left="20" + name="text_border" + top_delta="25" + width="300"/> + </layout_panel> + <layout_panel + auto_resize="false" + name="layout_panel_price" layout="topleft" - left="20" - height="30" - top="25" - width="300" - name="info_buying"> - Buy L$ - </text> - <text - type="string" - length="1" - follows="top|left" - font="SansSerifMedium" - height="16" + follows="all" + width="350" + height="18"> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifMedium" + height="16" + layout="topleft" + left="20" + name="target_price_label" + top_pad="3" + width="210"> + You need + </text> + <text + type="string" + length="1" + font="SansSerifMedium" + follows="top|left" + halign="right" + height="16" + layout="topleft" + left="200" + name="target_price" + top_delta="0" + width="120"> + L$ [AMT] + </text> + </layout_panel> + <layout_panel + auto_resize="false" + name="layout_panel_balance" layout="topleft" - left="20" - name="balance_label" - top="65" - width="210"> - I have - </text> - <text - type="string" - length="1" - font="SansSerifMedium" - follows="top|left" - halign="right" - height="16" - layout="topleft" - left="200" - name="balance_amount" - top_delta="0" - width="120"> + follows="all" + width="350" + height="19"> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifMedium" + height="16" + layout="topleft" + left="20" + name="balance_label" + top_pad="5" + width="210"> + You now have + </text> + <text + type="string" + length="1" + font="SansSerifMedium" + follows="top|left" + halign="right" + height="16" + layout="topleft" + left="200" + name="balance_amount" + top_delta="0" + width="120"> L$ [AMT] - </text> - <text - type="string" - length="1" - follows="top|left" - font="SansSerifMedium" - height="16" - top="95" - layout="topleft" - left="20" - name="currency_action" - width="210"> - I want to buy - </text> - <text - font="SansSerifMedium" - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - top_delta="0" - left="217" - name="currency_label" - width="15"> - L$ - </text> - <line_editor - type="string" - max_length_bytes="10" - halign="right" - font="SansSerifMedium" - select_on_focus="true" - follows="top|left" - top_delta="-7" - height="22" - label="L$" - left_pad="3" - name="currency_amt" - width="85"> - 1234 - </line_editor> - <text - type="string" - font="SansSerifMedium" - length="1" - follows="top|left" - height="16" - layout="topleft" - left="20" - top="125" - name="buying_label" - width="210"> - For the price - </text> - <text - type="string" - length="1" - font="SansSerifMedium" - text_color="EmphasisColor" - follows="top|left" - halign="right" - height="16" - top_delta="0" + </text> + </layout_panel> + <layout_panel + auto_resize="false" + name="layout_panel_required" layout="topleft" - left="150" - name="currency_est" - width="170"> - approx. [LOCALAMOUNT] - </text> - <text - type="string" - font="SansSerifSmall" - text_color="EmphasisColor" - length="1" - follows="top|left" - height="16" - layout="topleft" - top="125" - left="170" - width="150" - halign="right" - name="getting_data"> - Estimating... - </text> - <text - type="string" - font="SansSerifSmall" - top="145" - length="1" - follows="top|left" - height="16" - halign="right" - left="20" - width="300" - layout="topleft" - name="buy_action"> - [ACTION] - </text> - <text - type="string" - font="SansSerifMedium" - length="1" - follows="top|left" - height="16" - layout="topleft" - left="20" - name="total_label" - top="165" - width="210"> - My new balance will be - </text> - <text - type="string" - length="1" - font="SansSerifMedium" - follows="top|left" - top_delta="0" - height="16" - layout="topleft" - left="200" - halign="right" - name="total_amount" - width="120"> + follows="all" + width="350" + height="22"> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifMedium" + font.style="BOLD" + height="16" + layout="topleft" + left="20" + name="required_label" + top_pad="6" + width="210"> + You should buy at least + </text> + <text + type="string" + length="1" + font="SansSerifMedium" + follows="top|left" + halign="right" + height="16" + layout="topleft" + left="200" + name="required_amount" + top_delta="0" + width="120"> L$ [AMT] - </text> - <text - type="string" - length="1" - text_color="LtGray_50" - follows="top|left" + </text> + </layout_panel> + <layout_panel + auto_resize="false" + name="layout_panel_action" layout="topleft" - halign="right" - top="189" - left="20" - width="300" - height="30" - name="currency_links"> - [http://www.secondlife.com/my/account/payment_method_management.php payment method] | [http://www.secondlife.com/my/account/currency.php currency] - </text> - <text - type="string" - length="1" - text_color="LtGray_50" - follows="top|left" + follows="all" + width="350" + height="90"> + <view_border + bevel_style="none" + height="0" + layout="topleft" + left="20" + name="text_border_2" + top_pad="5" + width="300"/> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifMedium" + height="16" + top_pad="15" + layout="topleft" + left="20" + name="currency_action" + width="210"> + Choose amount to buy + </text> + <text + font="SansSerifMedium" + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + top_delta="0" + left="247" + name="currency_label" + width="15"> + L$ + </text> + <line_editor + type="string" + max_length_bytes="10" + halign="right" + font="SansSerifMedium" + select_on_focus="true" + follows="top|left" + top_delta="-4" + height="22" + label="L$" + left_pad="3" + name="currency_amt" + width="55"> + 1234 + </line_editor> + <text + type="string" + length="1" + font="SansSerifMedium" + text_color="EmphasisColor" + follows="top|left" + halign="right" + height="16" + top_pad="4" + layout="topleft" + left="150" + name="currency_est" + width="170"> + Approx. [LOCALAMOUNT] + </text> + <text + type="string" + font="SansSerifSmall" + text_color="EmphasisColor" + length="1" + follows="top|left" + height="16" + layout="topleft" + left="170" + top_delta="0" + width="150" + halign="right" + name="getting_data"> + Estimating... + </text> + <text + type="string" + font="SansSerifMedium" + length="1" + follows="top|left" + height="16" + layout="topleft" + left="20" + name="total_label" + top_pad="10" + width="210"> + Your new balance will be + </text> + <text + type="string" + length="1" + font="SansSerifMedium" + follows="top|left" + top_delta="0" + height="16" + layout="topleft" + left="200" + halign="right" + name="total_amount" + width="120"> + L$ [AMT] + </text> + </layout_panel> + <layout_panel + auto_resize="false" + name="layout_panel_msg" layout="topleft" - halign="right" - top="202" - left="20" - width="300" - height="30" - name="exchange_rate_note"> + follows="all" + width="350" + height="50"> + <view_border + bevel_style="none" + height="0" + layout="topleft" + left="20" + name="text_border_3" + top_pad="0" + width="300"/> + <text + type="string" + length="1" + text_color="LtGray_50" + follows="top|left" + layout="topleft" + halign="right" + top_pad="3" + left="20" + width="300" + height="30" + name="currency_links"> + [http://www.secondlife.com/my/account/payment_method_management.php payment method] | [http://www.secondlife.com/my/account/currency.php currency] + </text> + <text + type="string" + length="1" + text_color="LtGray_50" + follows="top|left" + layout="topleft" + halign="right" + top="19" + left="20" + width="300" + height="30" + name="exchange_rate_note"> Re-enter amount to see the latest exchange rate. - </text> - <text - type="string" - length="1" - text_color="LtGray_50" - follows="top|left" - layout="topleft" - halign="right" - top="208" - left="10" - width="310" - height="35" - name="purchase_warning_repurchase"> - Confirming this purchase only buys L$, not the object. - </text> - <text - type="string" - length="1" - text_color="LtGray_50" - follows="top|left" - layout="topleft" - halign="right" - top="213" - left="20" - width="300" - height="30" - name="purchase_warning_notenough"> - You aren't buying enough L$. Please increase the amount. - </text> - - <button - follows="bottom|left" - height="20" - label="Buy Now" - layout="topleft" - left="151" - name="buy_btn" - top="242" - width="90"/> - <button - follows="bottom|right" - height="20" - label="Cancel" + </text> + <text + type="string" + length="1" + follows="top|left" + layout="topleft" + font="SansSerifMedium" + top="10" + left="20" + width="310" + height="35" + name="purchase_warning_repurchase"> +After you receive your L$, you should try your +purchase again. + </text> + </layout_panel> + <layout_panel + auto_resize="false" + name="layout_panel_buttons" layout="topleft" - left_pad="10" - name="cancel_btn" - width="90"/> + follows="all" + width="350" + height="40"> + <text + type="string" + length="1" + follows="top|left" + height="16" + layout="topleft" + top_pad="0" + left="15" + width="300" + name="contacting"> + Contacting LindeX... + </text> + <button + follows="top|left|right" + height="20" + label="Buy L$ now" + layout="topleft" + left="151" + name="buy_btn" + bottom_delta ="8" + width="90"/> + <button + follows="top|left|right" + height="20" + label="Cancel" + layout="topleft" + left_pad="10" + name="cancel_btn" + width="90"/> + </layout_panel> + </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 9aa84c1bac..adefa261aa 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -393,6 +393,13 @@ parameter="model" /> </menu_item_call> </menu> + <menu_item_call + label="Use as Favorites folder" + layout="topleft" + name="Set Favorites folder"> + <menu_item_call.on_click + function="Inventory.SetFavoritesFolder"/> + </menu_item_call> <menu label="Change Type" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml new file mode 100644 index 0000000000..46193f4a7a --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_inventory_search_visibility.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + bottom="806" + layout="topleft" + left="0" + mouse_opaque="false" + name="menu_search_visibility" + visible="false"> + <menu_item_check + label="Search Trash" + layout="topleft" + name="search_trash"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="toggle_search_trash" /> + <on_check + function="Inventory.GearDefault.Check" + parameter="toggle_search_trash" /> + </menu_item_check> + <menu_item_check + label="Search Library" + layout="topleft" + name="search_library"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="toggle_search_library" /> + <on_check + function="Inventory.GearDefault.Check" + parameter="toggle_search_library" /> + </menu_item_check> + <menu_item_separator + layout="topleft" /> + <menu_item_check + label="Include links" + layout="topleft" + name="include_links"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="include_links" /> + <on_check + function="Inventory.GearDefault.Check" + parameter="include_links" /> + </menu_item_check> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a0d56a0d08..b19c9a6e7c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1024,18 +1024,6 @@ The group no longer has open enrollment. <notification icon="alertmodal.tga" - name="JoinGroupSuccess" - type="alertmodal"> -You have been added to the group - <tag>group_id</tag> - <tag>success</tag> - <usetemplate - name="okbutton" - yestext="OK"/> - </notification> - - <notification - icon="alertmodal.tga" name="JoinGroupInsufficientFunds" type="alertmodal"> Unable to transfer the required L$ [membership_fee] membership fee. @@ -4249,13 +4237,6 @@ Leave Group? yestext="OK"/> </notification> - <notification - icon="notify.tga" - name="GroupDepart" - type="notify"> -You have left the group '<nolink>[group_name]</nolink>'. - <tag>group</tag> - </notification> <notification icon="alertmodal.tga" @@ -11476,7 +11457,28 @@ Cannot create large prims that intersect other residents. Please re-try when ot name="okbutton" yestext="OK"/> </notification> - + + <notification + icon="alertmodal.tga" + name="AddPaymentMethod" + type="alertmodal"> +On the following page, choose a L$ amount +and click a place Order button. You will be +able to add a payment method at checkout. + <tag>confirm</tag> + <form name="form"> + <button + default="true" + index="0" + width="120" + name="Continue" + text="Continue"/> + <button + index="1" + name="Cancel" + text="Cancel"/> + </form> + </notification> <notification icon="alert.tga" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index d77fbdec0a..7bd5c9b548 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -32,30 +32,20 @@ left="12" name="ItemcountText" font="SansSerifMedium" - text_color="EmphasisColor" + text_color="InventoryItemLinkColor" use_ellipses="true" top_pad="0" width="300"> Items: </text> - <filter_editor - text_pad_left="10" - follows="left|top|right" + <combo_box height="23" - label="Enter search text" layout="topleft" left="10" - max_length_chars="300" - name="inventory search editor" top="18" - width="208" /> - <combo_box - height="23" - layout="topleft" - left_pad="4" name="search_type" - follows="top|right" - width="90"> + follows="top|left" + width="88"> <item label="Name" name="Name" @@ -72,7 +62,27 @@ label="UUID" name="UUID" value="search_by_UUID"/> - </combo_box> + </combo_box> + <menu_button + follows="top|left" + tool_tip="Show search visibility options" + height="23" + image_overlay="Inv_Toolbar_SearchVisibility" + layout="topleft" + left_pad="3" + name="options_visibility_btn" + width="31" /> + <filter_editor + text_pad_left="10" + follows="left|top|right" + height="23" + label="Enter search text" + layout="topleft" + left_pad="3" + max_length_chars="300" + highlight_text_field="true" + name="inventory search editor" + width="177" /> <tab_container follows="all" halign="center" @@ -117,20 +127,32 @@ name="Recent Items" show_item_link_overlays="true" width="290" /> - <inventory_panel - name="Worn Items" - label="WORN" - show_empty_message="false" - follows="all" - layout="topleft" - width="290" - bg_opaque_color="DkGray2" - bg_alpha_color="DkGray2" - background_visible="true" - border="false" - bevel_style="none" - scroll.reserve_scroll_corner="false"> - </inventory_panel> + <inventory_panel + name="Worn Items" + label="WORN" + show_empty_message="false" + follows="all" + layout="topleft" + width="290" + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + border="false" + bevel_style="none" + scroll.reserve_scroll_corner="false"/> + <favorites_inventory_panel + name="Favorite Items" + label="FAVORITES" + show_empty_message="false" + follows="all" + layout="topleft" + width="290" + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + border="false" + bevel_style="none" + scroll.reserve_scroll_corner="false"/> </tab_container> <layout_stack animate="false" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f9f12e7f5c..7398e457f0 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2297,6 +2297,7 @@ For AI Character: Get the closest navigable point to the point provided. <!-- inventory --> <string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string> <string name="InventoryNoMatchingRecentItems">Didn't find what you're looking for? Try [secondlife:///app/inventory/filters Show filters].</string> + <string name="InventoryFavoritItemsNotSelected">Click "Use as Favorites folder" on a folder of your choice. You can choose a different folder at any time. System folders cannot be used for Favorites.</string> <string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string> <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="MarketplaceNoMatchingItems">No items found. Check the spelling of your search string and try again.</string> @@ -2417,6 +2418,7 @@ If you continue to receive this message, please contact Second Life support for <string name="Scripts" value=" Scripts," /> <string name="Sounds" value=" Sounds," /> <string name="Textures" value=" Textures," /> + <string name="Settings" value=" Settings," /> <string name="Snapshots" value=" Snapshots," /> <string name="No Filters" value="No " /> <string name="Since Logoff" value=" - Since Logoff" /> @@ -2834,7 +2836,6 @@ If you continue to receive this message, please contact Second Life support for <string name="AcquiredItems">Acquired Items</string> <string name="Cancel">Cancel</string> <string name="UploadingCosts">Uploading [NAME] costs L$ [AMOUNT]</string> - <string name="BuyingCosts">Buying this costs L$ [AMOUNT]</string> <string name="UnknownFileExtension"> Unknown file extension .%s Expected .wav, .tga, .bmp, .jpg, .jpeg, or .anim @@ -3790,11 +3791,12 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="to upload">to upload</string> <string name="to publish a classified ad">to publish a classified ad</string> - <string name="giving">Giving L$ [AMOUNT]</string> <string name="uploading_costs">Uploading costs L$ [AMOUNT]</string> <string name="this_costs">This costs L$ [AMOUNT]</string> - <string name="buying_selected_land">Buying selected land for L$ [AMOUNT]</string> - <string name="this_object_costs">This object costs L$ [AMOUNT]</string> + + <string name="buying_selected_land">This land costs</string> + <string name="this_object_costs">This item costs</string> + <string name="giving">You want to give</string> <string name="group_role_everyone">Everyone</string> <string name="group_role_officers">Officers</string> diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml index 2cc4abdd30..1c4822b8d5 100644 --- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml @@ -6,9 +6,11 @@ text_pad_left="7" select_on_focus="true" text_tentative_color="TextFgTentativeColor" + highlight_text_field="false" background_image="TextField_Search_Off" background_image_disabled="TextField_Search_Disabled" - background_image_focused="TextField_Search_Active"> + background_image_focused="TextField_Search_Active" + background_image_highlight="TextField_Search_Highlight"> <search_button label="" top_pad="4" left_pad="4" diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml index faa0404b35..dc5a07bf4f 100644 --- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml @@ -7,9 +7,11 @@ text_pad_right="6" select_on_focus="true" text_tentative_color="TextFgTentativeColor" + highlight_text_field="false" background_image="TextField_Search_Off" background_image_disabled="TextField_Search_Disabled" - background_image_focused="TextField_Search_Active" > + background_image_focused="TextField_Search_Active" + background_image_highlight="TextField_Search_Highlight"> <search_button top_pad="4" left_pad="4" |