diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 9435f65bb..d9e1c7e94 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -558,7 +558,9 @@ void LLPanel::initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory) child->getAttributeString("name", string_name); if (!string_name.empty()) { - mUIStrings[string_name] = child->getTextContents(); + std::string contents = child->getTextContents(); + child->getAttributeString("value", contents); + mUIStrings[string_name] = contents; } } else 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)) 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/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 a1c56811f..3a9e9f397 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -32,53 +32,25 @@ #include "llviewerprecompiledheaders.h" -#include "llimagejpeg.h" #include "llfloatercustomize.h" -#include "llfontgl.h" -#include "llbutton.h" -#include "lliconctrl.h" -#include "llresmgr.h" -#include "llmorphview.h" -#include "llfloatertools.h" + #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" -#include "lltoolmorph.h" -#include "llvoavatarself.h" -#include "llradiogroup.h" -#include "lltoolmgr.h" -#include "llviewermenu.h" +#include "llappearancemgr.h" +#include "llmakeoutfitdialog.h" +#include "llmorphview.h" +#include "llnotificationsutil.h" +#include "lloutfitobserver.h" +#include "llpaneleditwearable.h" #include "llscrollcontainer.h" #include "llscrollingpanelparam.h" -#include "llsliderctrl.h" -#include "llviewerwindow.h" -#include "llinventoryfunctions.h" -#include "llinventoryobserver.h" -#include "llinventoryicon.h" #include "lltextbox.h" -#include "lllineeditor.h" -#include "llviewertexturelist.h" -#include "llfocusmgr.h" -#include "llviewerwindow.h" -#include "llviewercamera.h" -#include "llappearance.h" -#include "imageids.h" -#include "llassetstorage.h" -#include "lltexturectrl.h" -#include "lltextureentry.h" -#include "llwearablelist.h" -#include "llviewerinventory.h" -#include "lldbstrings.h" -#include "llcolorswatch.h" -#include "llglheaders.h" -#include "llui.h" -#include "llviewermessage.h" -#include "llviewercontrol.h" +#include "lltoolmorph.h" #include "lluictrlfactory.h" -#include "llnotificationsutil.h" -#include "llpaneleditwearable.h" -#include "llmakeoutfitdialog.h" -#include "llagentcamera.h" -#include "llappearancemgr.h" +#include "llviewerinventory.h" +#include "llviewerwearable.h" +#include "llvoavatarself.h" #include "statemachine/aifilepicker.h" #include "llxmltree.h" @@ -158,6 +130,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)); @@ -225,6 +203,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) { @@ -779,7 +795,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); } } @@ -862,7 +878,7 @@ void LLFloaterCustomize::saveCurrentWearables() bool LLFloaterCustomize::onSaveDialog(const LLSD& notification, const LLSD& response ) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(option == 0) { saveCurrentWearables(); diff --git a/indra/newview/llfloatercustomize.h b/indra/newview/llfloatercustomize.h index 115ad61ac..3a7d09909 100644 --- a/indra/newview/llfloatercustomize.h +++ b/indra/newview/llfloatercustomize.h @@ -33,38 +33,16 @@ #ifndef LL_LLFLOATERCUSTOMIZE_H #define LL_LLFLOATERCUSTOMIZE_H -#include - #include "llfloater.h" -#include "llstring.h" -#include "v3dmath.h" -#include "lltimer.h" -#include "llundo.h" -#include "llviewermenu.h" #include "llwearable.h" -#include "lliconctrl.h" #include "llsingleton.h" -class LLButton; -class LLIconCtrl; -class LLColorSwatchCtrl; -class LLGenePool; class LLInventoryObserver; -class LLJoint; -class LLLineEditor; -class LLMakeOutfitDialog; -class LLRadioGroup; class LLScrollContainer; class LLScrollingPanelList; class LLTabContainer; -class LLTextBox; -class LLTextureCtrl; -class LLViewerJointMesh; -class LLViewerVisualParam; -class LLVisualParam; -class LLVisualParamReset; class LLViewerWearable; -class LLWearableSaveAsDialog; +class LLVisualParamReset; class LLPanelEditWearable; class AIFilePicker; @@ -78,22 +56,24 @@ public: LLFloaterCustomize(); virtual ~LLFloaterCustomize(); - // Inherted methods + // Inherited methods /*virtual*/ BOOL postBuild(); /*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(); private: - // Initilization + // Initialization void initWearablePanels(); void initScrollingPanelList(); - // Deinitilization + // Destruction void delayedClose(bool proceed, bool app_quitting); // Setters/Getters diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d7319756b..2a07cb82f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -42,7 +42,6 @@ #include "llavataractions.h" #include "llcallingcard.h" #include "llfirstuse.h" -#include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloateropenobject.h" #include "llfloaterproperties.h" @@ -73,6 +72,7 @@ #include "lltrans.h" #include "llviewerassettype.h" #include "llviewerfoldertype.h" +#include "llviewermenu.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" 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.