diff --git a/BuildParams b/BuildParams index deda7ae6af..9ee9369fe5 100755 --- a/BuildParams +++ b/BuildParams @@ -85,4 +85,3 @@ EDU_viewer_channel_suffix = "edu" # environment variable 'email' to a space-separated list of email addresses - diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0d90f0138a..57d684532b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2477,19 +2477,10 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent) void LLFloaterView::restoreAll() { // make sure all subwindows aren't minimized - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) + child_list_t child_list = *(getChildList()); + for (child_list_const_iter_t child_it = child_list.begin(); child_it != child_list.end(); ++child_it) { - LLFloater* floaterp = NULL; - try - { - floaterp = dynamic_cast(*child_it); - } - catch (std::exception e) // See MAINT-6511 - { - LL_WARNS() << "Caught exception: " << e.what() << LL_ENDL; - continue; - } - + LLFloater* floaterp = dynamic_cast(*child_it); if (floaterp) { floaterp->setMinimized(FALSE); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6263ff23f4..92e01940cb 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1571,6 +1571,17 @@ Value 1 + AdvanceOutfitSnapshot + + Comment + Display advanced parameter settings in outfit snaphot interface + Persist + 1 + Type + Boolean + Value + 1 + AgentPause Comment diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 77c6dfc09d..f1dfb5e540 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3359,6 +3359,16 @@ void LLAppearanceMgr::updateIsDirty() gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items, LLInventoryModel::EXCLUDE_TRASH, collector); + for (U32 i = 0; i < outfit_items.size(); ++i) + { + LLViewerInventoryItem* linked_item = outfit_items.at(i)->getLinkedItem(); + if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE) + { + outfit_items.erase(outfit_items.begin() + i); + break; + } + } + // FIRE-3018: Ignore the bridge when checking for dirty. for (LLInventoryModel::item_array_t::iterator i = cof_items.begin(); i != cof_items.end(); ++i) { @@ -3519,6 +3529,14 @@ void appearance_mgr_update_dirty_state() { if (LLAppearanceMgr::instanceExists()) { + LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance(); + LLUUID image_id = app_mgr.getOutfitImage(); + if(image_id.notNull()) + { + LLPointer cb = NULL; + link_inventory_object(app_mgr.getBaseOutfitUUID(), image_id, cb); + } + LLAppearanceMgr::getInstance()->updateIsDirty(); LLAppearanceMgr::getInstance()->setOutfitLocked(false); gAgentWearables.notifyLoadingFinished(); @@ -3528,7 +3546,21 @@ void appearance_mgr_update_dirty_state() void update_base_outfit_after_ordering() { LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance(); - + LLInventoryModel::cat_array_t sub_cat_array; + LLInventoryModel::item_array_t outfit_item_array; + gInventory.collectDescendents(app_mgr.getBaseOutfitUUID(), + sub_cat_array, + outfit_item_array, + LLInventoryModel::EXCLUDE_TRASH); + BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array) + { + LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem(); + if (linked_item != NULL && linked_item->getActualType() == LLAssetType::AT_TEXTURE) + { + app_mgr.setOutfitImage(linked_item->getLinkedUUID()); + } + } + LLPointer dirty_state_updater = new LLBoostFuncInventoryCallback(no_op_inventory_func, appearance_mgr_update_dirty_state); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 2b455aa9a6..43f6862ce9 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -196,6 +196,9 @@ public: void wearBaseOutfit(); + void setOutfitImage(const LLUUID& image_id) {mCOFImageID = image_id;} + LLUUID getOutfitImage() {return mCOFImageID;} + // Overrides the base outfit with the content from COF // @return false if there is no base outfit bool updateBaseOutfit(); @@ -294,6 +297,8 @@ private: LLTimer mInFlightTimer; static bool mActive; + LLUUID mCOFImageID; + std::auto_ptr mUnlockOutfitTimer; // Set of temp attachment UUIDs that should be removed diff --git a/indra/newview/llfloateroutfitsnapshot.cpp b/indra/newview/llfloateroutfitsnapshot.cpp index 0cccb95bbd..a6f0fd09dd 100644 --- a/indra/newview/llfloateroutfitsnapshot.cpp +++ b/indra/newview/llfloateroutfitsnapshot.cpp @@ -249,6 +249,8 @@ BOOL LLFloaterOutfitSnapshot::postBuild() getChild("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); + getChild("retract_btn")->setCommitCallback(boost::bind(&LLFloaterOutfitSnapshot::onExtendFloater, this)); + getChild("extend_btn")->setCommitCallback(boost::bind(&LLFloaterOutfitSnapshot::onExtendFloater, this)); // Filters LLComboBox* filterbox = getChild("filters_combobox"); @@ -280,6 +282,7 @@ BOOL LLFloaterOutfitSnapshot::postBuild() impl->mPreviewHandle = previewp->getHandle(); previewp->setContainer(this); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceOutfitSnapshot")); impl->updateLayout(this); previewp->mKeepAspectRatio = FALSE; @@ -303,6 +306,7 @@ void LLFloaterOutfitSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->adjustToFitScreen(this, FALSE); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceOutfitSnapshot")); impl->updateLayout(this); LLPanel* snapshot_panel = getChild("panel_outfit_snapshot_inventory"); @@ -311,6 +315,11 @@ void LLFloaterOutfitSnapshot::onOpen(const LLSD& key) } +void LLFloaterOutfitSnapshot::onExtendFloater() +{ + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceOutfitSnapshot")); +} + // static void LLFloaterOutfitSnapshot::update() { diff --git a/indra/newview/llfloateroutfitsnapshot.h b/indra/newview/llfloateroutfitsnapshot.h index 04623acf0f..bee386ec63 100644 --- a/indra/newview/llfloateroutfitsnapshot.h +++ b/indra/newview/llfloateroutfitsnapshot.h @@ -50,6 +50,8 @@ public: static void update(); + void onExtendFloater(); + static LLFloaterOutfitSnapshot* getInstance(); static LLFloaterOutfitSnapshot* findInstance(); /*virtual*/ void saveTexture(); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 282f44a47b..17894e7473 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -168,8 +168,6 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate { LLSnapshotLivePreview* previewp = getPreviewView(); - BOOL advanced = gSavedSettings.getBOOL("AdvanceSnapshot"); - //BD - Automatically calculate the size of our snapshot window to enlarge // the snapshot preview to its maximum size, this is especially helpfull // for pretty much every aspect ratio other than 1:1. @@ -185,14 +183,14 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate } S32 floater_width = 224; - if(advanced) + if(mAdvanced) { floater_width = floater_width + panel_width; } // Show miniature thumbnail on collapsed snapshot panel //LLUICtrl* thumbnail_placeholder = floaterp->getChild("thumbnail_placeholder"); - //thumbnail_placeholder->setVisible(advanced); + //thumbnail_placeholder->setVisible(mAdvanced); //thumbnail_placeholder->reshape(panel_width, thumbnail_placeholder->getRect().getHeight()); //floaterp->getChild("image_res_text")->setVisible(advanced); //floaterp->getChild("file_size_label")->setVisible(advanced); @@ -203,12 +201,12 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate previewp->setFixedThumbnailSize(panel_width, 400); LLUICtrl* thumbnail_placeholder = floaterp->getChild("thumbnail_placeholder"); - floaterp->getChild("image_res_text")->setVisible(advanced); - floaterp->getChild("file_size_label")->setVisible(advanced); + floaterp->getChild("image_res_text")->setVisible(mAdvanced); + floaterp->getChild("file_size_label")->setVisible(mAdvanced); if(!floaterp->isMinimized()) { LLView* controls_container = floaterp->getChild("controls_container"); - if (advanced) + if (mAdvanced) { LLRect cc_rect = controls_container->getRect(); @@ -1123,7 +1121,9 @@ BOOL LLFloaterSnapshot::postBuild() getChild("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); - + + getChild("retract_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); + getChild("extend_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); // Filters LLComboBox* filterbox = getChild("filters_combobox"); @@ -1167,6 +1167,7 @@ BOOL LLFloaterSnapshot::postBuild() impl->mPreviewHandle = previewp->getHandle(); previewp->setContainer(this); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); impl->updateLayout(this); @@ -1239,6 +1240,7 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->adjustToFitScreen(this, FALSE); impl->updateControls(this); + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); impl->updateLayout(this); // FIRE-16145: CTRL-SHIFT-S doesn't update the snapshot anymore @@ -1288,6 +1290,11 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) // } +void LLFloaterSnapshot::onExtendFloater() +{ + impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); +} + // FIRE-16043: Remember last used snapshot option //virtual void LLFloaterSnapshot::onClose(bool app_quitting) @@ -1414,14 +1421,14 @@ S32 LLFloaterSnapshot::notify(const LLSD& info) return 0; } -void LLFloaterSnapshotBase::ImplBase::updateLivePreview() +BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized) { LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance("facebook"); LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance("flickr"); LLFloaterTwitter* floater_twitter = LLFloaterReg::findTypedInstance("twitter"); - if (!mFloater && !floater_facebook && !floater_flickr && !floater_twitter) - return; + if (!initialized && !floater_facebook && !floater_flickr && !floater_twitter) + return FALSE; BOOL changed = FALSE; LL_DEBUGS() << "npreviews: " << LLSnapshotLivePreview::sList.size() << LL_ENDL; @@ -1430,8 +1437,13 @@ void LLFloaterSnapshotBase::ImplBase::updateLivePreview() { changed |= LLSnapshotLivePreview::onIdle(*iter); } + return changed; +} - if (mFloater && changed) + +void LLFloaterSnapshotBase::ImplBase::updateLivePreview() +{ + if (ImplBase::updatePreviewList(true) && mFloater) { LL_DEBUGS() << "changed" << LL_ENDL; updateControls(mFloater); @@ -1446,6 +1458,10 @@ void LLFloaterSnapshot::update() { inst->impl->updateLivePreview(); } + else + { + ImplBase::updatePreviewList(false); + } } // static diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index f76dca0147..ff4837f5d9 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -118,6 +118,10 @@ public: virtual EStatus getStatus() const { return mStatus; } virtual void setNeedRefresh(bool need); + static BOOL updatePreviewList(bool initialized); + + void setAdvanced(bool advanced) { mAdvanced = advanced; } + virtual LLSnapshotModel::ESnapshotLayerType getLayerType(LLFloaterSnapshotBase* floater) = 0; virtual void checkAutoSnapshot(LLSnapshotLivePreview* floater, BOOL update_thumbnail = FALSE); void setWorking(bool working); @@ -131,6 +135,7 @@ public: LLHandle mPreviewHandle; bool mAspectRatioCheckOff; bool mNeedRefresh; + bool mAdvanced; EStatus mStatus; }; @@ -149,6 +154,8 @@ public: static void update(); + void onExtendFloater(); + static LLFloaterSnapshot* getInstance(); static LLFloaterSnapshot* findInstance(); /*virtual*/ void saveTexture(); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index f014202b43..56b8272870 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -118,7 +118,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mSavedFolderState(NULL), mFilterText(""), mMenuGearDefault(NULL), - mMenuAdd(NULL), + mMenuAddHandle(), mNeedUploadCost(true) { // Menu Callbacks (non contex menus) @@ -323,10 +323,15 @@ BOOL LLPanelMainInventory::postBuild() } // - mMenuAdd->getChild("Upload Image")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild("Upload Sound")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); + + LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); + if (menu) + { + menu->getChild("Upload Image")->setLabelArg("[COST]", upload_cost); + menu->getChild("Upload Sound")->setLabelArg("[COST]", upload_cost); + menu->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); + menu->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); + } // Trigger callback for focus received so we can deselect items in inbox/outbox LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this)); @@ -1344,7 +1349,8 @@ void LLPanelMainInventory::initListCommandsHandlers() mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mGearMenuButton->setMenu(mMenuGearDefault); - mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mMenuAddHandle = menu->getHandle(); // Update the trash button when selected item(s) get worn or taken off. LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLPanelMainInventory::updateListCommands, this)); @@ -1362,11 +1368,15 @@ void LLPanelMainInventory::onAddButtonClick() // Gray out the "New Folder" option when the Recent tab is active as new folders will not be displayed // unless "Always show folders" is checked in the filter options. bool recent_active = ("Recent Items" == mActivePanel->getName()); - mMenuAdd->getChild("New Folder")->setEnabled(!recent_active); + LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); + if (menu) + { + menu->getChild("New Folder")->setEnabled(!recent_active); - setUploadCostIfNeeded(); + setUploadCostIfNeeded(); - showActionMenu(mMenuAdd,"add_btn"); + showActionMenu(menu,"add_btn"); + } } void LLPanelMainInventory::showActionMenu(LLMenuGL* menu, std::string spawning_view_name) @@ -1547,7 +1557,11 @@ void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) { if(!new_visibility) { - mMenuAdd->setVisible(FALSE); + LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); + if (menu) + { + menu->setVisible(FALSE); + } getActivePanel()->getRootFolder()->finishRenamingItem(); } } @@ -1776,9 +1790,10 @@ void LLPanelMainInventory::setUploadCostIfNeeded() // have two instances of Inventory panel at the moment(and two instances of context menu), // call to gMenuHolder->childSetLabelArg() sets upload cost only for one of the instances. - if(mNeedUploadCost && mMenuAdd) + LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); + if(mNeedUploadCost && menu) { - LLMenuItemBranchGL* upload_menu = mMenuAdd->findChild("upload"); + LLMenuItemBranchGL* upload_menu = menu->findChild("upload"); if(upload_menu) { // diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index a4d2e4f66a..3e57341263 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -192,8 +192,8 @@ protected: private: LLDragAndDropButton* mTrashButton; LLToggleableMenu* mMenuGearDefault; - LLMenuGL* mMenuAdd; LLMenuButton* mGearMenuButton; + LLHandle mMenuAddHandle; // Inventory Collapse and Expand Buttons LLButton* mCollapseBtn; diff --git a/indra/newview/skins/default/textures/windows/first_login_image_left.png b/indra/newview/skins/default/textures/windows/first_login_image_left.png index b405a88245..1fa10fde53 100644 Binary files a/indra/newview/skins/default/textures/windows/first_login_image_left.png and b/indra/newview/skins/default/textures/windows/first_login_image_left.png differ diff --git a/indra/newview/skins/default/textures/windows/first_login_image_right.png b/indra/newview/skins/default/textures/windows/first_login_image_right.png index 22a6dd8a53..d764d846b7 100644 Binary files a/indra/newview/skins/default/textures/windows/first_login_image_right.png and b/indra/newview/skins/default/textures/windows/first_login_image_right.png differ diff --git a/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml b/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml index bb3c646ead..ad62234a65 100644 --- a/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_outfit_snapshot.xml @@ -59,8 +59,8 @@ width="167" />