From d64c9a343c844ad21ed88d236407251b815aea7a Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 22 Jul 2013 20:02:45 -0400 Subject: [PATCH 1/5] Fix issue of columns not sorting in ascending order by default --- indra/llui/llscrolllistctrl.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 6eca09c04..219fe0473 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2616,9 +2616,17 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac if (child->getAttributeString("sort", sortname)) columns[index]["sort"] = sortname; - BOOL sort_ascending = true; - if (child->getAttributeBOOL("sort_ascending", sort_ascending)) + std::string sort_direction("ascending"); + if (child->getAttributeString("sort_direction", sort_direction)) + { + columns[index]["sort_direction"] = sort_direction; + } + else // Singu Note: if a scroll list does not provide sort_direction, provide sort_ascending to sort as expected + { + bool sort_ascending = true; + child->getAttribute_bool("sort_ascending", sort_ascending); columns[index]["sort_ascending"] = sort_ascending; + } S32 columnwidth = -1; if (child->getAttributeS32("width", columnwidth)) From 989e4332b7399ba9edbc771392574ed049857249 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 22 Jul 2013 23:02:02 -0400 Subject: [PATCH 2/5] Feature Request: Setting to disable lighting change of appearance mode --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llfloatercustomize.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c042fc3fd..2a8634b00 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2116,6 +2116,17 @@ This should be as low as possible, but too low may break functionality Value 1 + AppearanceSpecialLighting + + Comment + When in appearance editing mode, avatar is shown with special lighting + Persist + 1 + Type + Boolean + Value + 1 + ApplyColorImmediately Comment diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 2f6214e5b..ab1e27876 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -629,7 +629,7 @@ void LLFloaterCustomize::updateVisiblity(bool force_disable_camera_switch/*=fals { if(force_disable_camera_switch || !gAgentCamera.cameraCustomizeAvatar() || !gAgentCamera.getCameraAnimating() || (gMorphView && gMorphView->getVisible())) { - if(gAgentAvatarp)gAgentAvatarp->mSpecialRenderMode = 3; + if (gAgentAvatarp && gSavedSettings.getBOOL("AppearanceSpecialLighting")) gAgentAvatarp->mSpecialRenderMode = 3; setVisibleAndFrontmost(TRUE); } } From 4e63a64a1db4c9381ec53f0281e64d066daac08f Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 22 Jul 2013 23:49:19 -0400 Subject: [PATCH 3/5] Feature Request: Add tooltip to Save Outfit button showing where it will save to Adds refreshCurrentOutfitName() from upstream --- indra/newview/llappearancemgr.cpp | 6 +-- indra/newview/llfloatercustomize.cpp | 45 +++++++++++++++++++ indra/newview/llfloatercustomize.h | 2 + .../default/xui/de/floater_customize.xml | 2 + .../default/xui/en-us/floater_customize.xml | 3 ++ .../default/xui/es/floater_customize.xml | 2 + .../default/xui/fr/floater_customize.xml | 2 + .../default/xui/pt/floater_customize.xml | 2 + 8 files changed, 60 insertions(+), 4 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 2d43a6e18..2877c50e2 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2080,13 +2080,11 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new, void LLAppearanceMgr::updatePanelOutfitName(const std::string& name) { - // MULTI-WEARABLE TODO - /*LLSidepanelAppearance* panel_appearance = - dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance")); + LLFloaterCustomize* panel_appearance = LLFloaterCustomize::instanceExists() ? LLFloaterCustomize::getInstance() : NULL; if (panel_appearance) { panel_appearance->refreshCurrentOutfitName(name); - }*/ + } } void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer link_waiter) diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index ab1e27876..69010602a 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -47,6 +47,7 @@ #include "llradiogroup.h" #include "lltoolmgr.h" #include "llviewermenu.h" +#include "lloutfitobserver.h" #include "llscrollcontainer.h" #include "llscrollingpanelparam.h" #include "llsliderctrl.h" @@ -157,6 +158,11 @@ LLFloaterCustomize::LLFloaterCustomize() mInventoryObserver = new LLFloaterCustomizeObserver(this); gInventory.addObserver(mInventoryObserver); + LLOutfitObserver& outfit_observer = LLOutfitObserver::instance(); + outfit_observer.addBOFReplacedCallback(boost::bind(&LLFloaterCustomize::refreshCurrentOutfitName, this, "")); + outfit_observer.addBOFChangedCallback(boost::bind(&LLFloaterCustomize::refreshCurrentOutfitName, this, "")); + outfit_observer.addCOFChangedCallback(boost::bind(&LLFloaterCustomize::refreshCurrentOutfitName, this, "")); + LLCallbackMap::map_t factory_map; const std::string &invalid_name = LLWearableType::getTypeName(LLWearableType::WT_INVALID); for(U32 type=LLWearableType::WT_SHAPE;type("Make Outfit")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnMakeOutfit, this)); getChild("Save Outfit")->setCommitCallback(boost::bind(&LLAppearanceMgr::updateBaseOutfit, LLAppearanceMgr::getInstance())); + refreshCurrentOutfitName(); // Initialize tooltip for save outfit button getChild("Ok")->setCommitCallback(boost::bind(&LLFloaterCustomize::onBtnOk, this)); getChild("Cancel")->setCommitCallback(boost::bind(&LLFloater::onClickClose, this)); @@ -224,6 +231,44 @@ BOOL LLFloaterCustomize::postBuild() return TRUE; } +void LLFloaterCustomize::refreshCurrentOutfitName(const std::string& name) +{ + LLUICtrl* save_outfit_btn = getChild("Save Outfit"); + // Set current outfit status (wearing/unsaved). + bool dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); + //std::string cof_status_str = getString(dirty ? "Unsaved Changes" : "Now Wearing"); + //mOutfitStatus->setText(cof_status_str); + save_outfit_btn->setEnabled(dirty); // No use saving unless dirty + + if (name == "") + { + std::string outfit_name; + if (LLAppearanceMgr::getInstance()->getBaseOutfitName(outfit_name)) + { + //mCurrentLookName->setText(outfit_name); + LLStringUtil::format_map_t args; + args["[OUTFIT]"] = outfit_name; + save_outfit_btn->setToolTip(getString("Save changes to", args)); + return; + } + + std::string string_name = gAgentWearables.isCOFChangeInProgress() ? "Changing outfits" : "No Outfit"; + //mCurrentLookName->setText(getString(string_name)); + save_outfit_btn->setToolTip(getString(string_name)); + //mOpenOutfitBtn->setEnabled(FALSE); + save_outfit_btn->setEnabled(false); // Can't save right now + } + else + { + //mCurrentLookName->setText(name); + LLStringUtil::format_map_t args; + args["[OUTFIT]"] = name; + save_outfit_btn->setToolTip(getString("Save changes to", args)); + // Can't just call update verbs since the folder link may not have been created yet. + //mOpenOutfitBtn->setEnabled(TRUE); + } +} + //static void LLFloaterCustomize::editWearable(LLViewerWearable* wearable, bool disable_camera_switch) { diff --git a/indra/newview/llfloatercustomize.h b/indra/newview/llfloatercustomize.h index 115ad61ac..2a31c371d 100644 --- a/indra/newview/llfloatercustomize.h +++ b/indra/newview/llfloatercustomize.h @@ -83,6 +83,8 @@ public: /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); + void refreshCurrentOutfitName(const std::string& name = ""); + // Creation procedures static void editWearable(LLViewerWearable* wearable, bool disable_camera_switch); static void show(); diff --git a/indra/newview/skins/default/xui/de/floater_customize.xml b/indra/newview/skins/default/xui/de/floater_customize.xml index 465c0667b..f69e4311d 100644 --- a/indra/newview/skins/default/xui/de/floater_customize.xml +++ b/indra/newview/skins/default/xui/de/floater_customize.xml @@ -400,4 +400,6 @@ und dieses anziehen.