diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index c0ca5b8cf8..4103de30ac 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -190,6 +190,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLPointer image, st httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); + httpOpts->setRetries(0); // FIRE-20026: Pictures might get uploaded multiple times after a timeout occurs std::string imageFormat; if (dynamic_cast(image.get())) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 56b8272870..f0664c78b9 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -307,19 +307,17 @@ BOOL LLPanelMainInventory::postBuild() // // // *TODO:Get the cost info from the server // const std::string upload_cost("10"); - // \0/ Copypasta! See llviewermessage, llviewermenu and llpanelmaininventory S32 cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); std::string upload_cost; -#ifdef OPENSIM // - bool in_opensim = LLGridManager::getInstance()->isInOpenSim(); - if(in_opensim) +#ifdef OPENSIM + if (LLGridManager::getInstance()->isInOpenSim()) { upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : LLTrans::getString("free"); } else -#endif // OPENSIM // +#endif { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); + upload_cost = "L$" + (cost > 0 ? llformat("%d", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost"))); } // @@ -1796,11 +1794,11 @@ void LLPanelMainInventory::setUploadCostIfNeeded() LLMenuItemBranchGL* upload_menu = menu->findChild("upload"); if(upload_menu) { + S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + std::string cost_str; + + // getPriceUpload() returns -1 if no data available yet. // -// S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); -// std::string cost_str; -// -// // getPriceUpload() returns -1 if no data available yet. // if(upload_cost >= 0) // { // mNeedUploadCost = false; @@ -1810,31 +1808,21 @@ void LLPanelMainInventory::setUploadCostIfNeeded() // { // cost_str = llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); // } -// upload_menu->getChild("Upload Image")->setLabelArg("[COST]", cost_str); -// upload_menu->getChild("Upload Sound")->setLabelArg("[COST]", cost_str); -// upload_menu->getChild("Upload Animation")->setLabelArg("[COST]", cost_str); -// upload_menu->getChild("Bulk Upload")->setLabelArg("[COST]", cost_str); - - // \0/ Copypasta! See llviewermessage, llviewermenu and llpanelmaininventory - S32 cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - std::string upload_cost; -#ifdef OPENSIM // - bool in_opensim = LLGridManager::getInstance()->isInOpenSim(); - if(in_opensim) +#ifdef OPENSIM + if (LLGridManager::getInstance()->isInOpenSim()) { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : LLTrans::getString("free"); + cost_str = upload_cost > 0 ? llformat("%s%d", "L$", upload_cost) : LLTrans::getString("free"); } else -#endif // OPENSIM // +#endif { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); + cost_str = "L$" + (upload_cost > 0 ? llformat("%d", upload_cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost"))); } - - upload_menu->getChild("Upload Image")->setLabelArg("[COST]", upload_cost); - upload_menu->getChild("Upload Sound")->setLabelArg("[COST]", upload_cost); - upload_menu->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); - upload_menu->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); // + upload_menu->getChild("Upload Image")->setLabelArg("[COST]", cost_str); + upload_menu->getChild("Upload Sound")->setLabelArg("[COST]", cost_str); + upload_menu->getChild("Upload Animation")->setLabelArg("[COST]", cost_str); + upload_menu->getChild("Bulk Upload")->setLabelArg("[COST]", cost_str); } } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 88c99c713b..ac6e412e3a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -633,16 +633,15 @@ void init_menus() // \0/ Copypasta! See llviewermessage, llviewermenu and llpanelmaininventory S32 cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); std::string upload_cost; -#ifdef OPENSIM // - bool in_opensim = LLGridManager::getInstance()->isInOpenSim(); - if(in_opensim) +#ifdef OPENSIM + if (LLGridManager::getInstance()->isInOpenSim()) { upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : LLTrans::getString("free"); } else -#endif // OPENSIM // +#endif { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); + upload_cost = "L$" + (cost > 0 ? llformat("%d", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost"))); } // gMenuHolder->childSetLabelArg("Upload Image", "[COST]", upload_cost); @@ -7552,7 +7551,12 @@ void handle_viewer_disable_message_log(void*) void handle_customize_avatar() { // FIRE-19614: Make CTRL-O toggle the appearance floater - if (LLFloaterReg::instanceVisible("appearance")) + LLFloater* floater = LLFloaterReg::findInstance("appearance"); + if (floater && floater->isMinimized()) + { + floater->setMinimized(FALSE); + } + else if (LLFloater::isShown(floater)) { LLFloaterReg::hideInstance("appearance"); } @@ -10579,10 +10583,10 @@ class LLToggleUIHints : public view_listener_t void LLUploadCostCalculator::calculateCost() { + S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + + // getPriceUpload() returns -1 if no data available yet. // -// S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); -// -// // getPriceUpload() returns -1 if no data available yet. // if(upload_cost >= 0) // { // mCostStr = llformat("%d", upload_cost); @@ -10591,23 +10595,16 @@ void LLUploadCostCalculator::calculateCost() // { // mCostStr = llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); // } - - // \0/ Copypasta! See llviewermessage, llviewermenu and llpanelmaininventory - S32 cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - std::string upload_cost; #ifdef OPENSIM // - bool in_opensim = LLGridManager::getInstance()->isInOpenSim(); - if(in_opensim) + if (LLGridManager::getInstance()->isInOpenSim()) { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : LLTrans::getString("free"); + mCostStr = upload_cost > 0 ? llformat("%s%d", "L$", upload_cost) : LLTrans::getString("free"); } else #endif // OPENSIM // { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); + mCostStr = "L$" + (upload_cost > 0 ? llformat("%d", upload_cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost"))); } - - mCostStr = upload_cost; // } @@ -10682,7 +10679,12 @@ void toggleTeleportHistory() } else { - if (LLFloaterReg::instanceVisible("places")) + LLFloater* floater = LLFloaterReg::findInstance("places"); + if (floater && floater->isMinimized()) + { + floater->setMinimized(FALSE); + } + else if (LLFloater::isShown(floater)) { LLFloaterReg::hideInstance("places"); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6e4ce8b0b3..3231474880 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -8112,41 +8112,36 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data) void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) { LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::Singleton::getInstance()); + S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // // AW: from this point anything is bogus because it's all replaced by the LLUploadCostCalculator in llviewermenu -// S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL; // gMenuHolder->getChild("Upload Image")->setLabelArg("[COST]", llformat("%d", upload_cost)); // gMenuHolder->getChild("Upload Sound")->setLabelArg("[COST]", llformat("%d", upload_cost)); // gMenuHolder->getChild("Upload Animation")->setLabelArg("[COST]", llformat("%d", upload_cost)); // gMenuHolder->getChild("Bulk Upload")->setLabelArg("[COST]", llformat("%d", upload_cost)); + std::string cost_str; +#ifdef OPENSIM + if (LLGridManager::getInstance()->isInOpenSim()) + { + cost_str = upload_cost > 0 ? llformat("%s%d", "L$", upload_cost) : LLTrans::getString("free"); + } + else +#endif + { + cost_str = "L$" + (upload_cost > 0 ? llformat("%d", upload_cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost"))); + } + + LL_INFOS_ONCE("Messaging") << Tea::wrapCurrency("EconomyData message arrived; upload cost is L$") << cost_str << LL_ENDL; + + gMenuHolder->getChild("Upload Image")->setLabelArg("[COST]", cost_str); + gMenuHolder->getChild("Upload Sound")->setLabelArg("[COST]", cost_str); + gMenuHolder->getChild("Upload Animation")->setLabelArg("[COST]", cost_str); + gMenuHolder->getChild("Bulk Upload")->setLabelArg("[COST]", cost_str); +// // update L$ substitution for "Buy and Sell L$", it was set before we knew the currency gMenuHolder->getChild("Buy and Sell L$")->setLabelArg("L$", LLStringExplicit("L$")); - - // \0/ Copypasta! See llviewermessage, llviewermenu and llpanelmaininventory - S32 cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - std::string upload_cost; -#ifdef OPENSIM // - bool in_opensim = LLGridManager::getInstance()->isInOpenSim(); - if(in_opensim) - { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : LLTrans::getString("free"); - } - else -#endif // OPENSIM // - { - upload_cost = cost > 0 ? llformat("%s%d", "L$", cost) : llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); - } - - LL_INFOS_ONCE("Messaging") << Tea::wrapCurrency("EconomyData message arrived; upload cost is L$") << upload_cost << LL_ENDL; - - gMenuHolder->getChild("Upload Image")->setLabelArg("[COST]", upload_cost); - gMenuHolder->getChild("Upload Sound")->setLabelArg("[COST]", upload_cost); - gMenuHolder->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); - gMenuHolder->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); -// - } void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted) diff --git a/indra/newview/skins/default/xui/en/floater_region_tracker.xml b/indra/newview/skins/default/xui/en/floater_region_tracker.xml index 9b5922c29a..99b4d33e51 100644 --- a/indra/newview/skins/default/xui/en/floater_region_tracker.xml +++ b/indra/newview/skins/default/xui/en/floater_region_tracker.xml @@ -84,6 +84,9 @@ left="5" multi_select="true" draw_heading="true" + persist_sort_order="true" + primary_sort_only="true" + sort_column="0" column_padding="0" search_column="0">