summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llstring.cpp9
-rw-r--r--indra/llui/llbutton.cpp7
-rw-r--r--indra/llui/llbutton.h1
-rw-r--r--indra/llui/llspinctrl.cpp5
-rw-r--r--indra/llui/llspinctrl.h1
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm5
-rw-r--r--indra/media_plugins/webkit/CMakeLists.txt10
-rw-r--r--indra/media_plugins/webkit/linux_volume_catcher.cpp5
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp24
-rw-r--r--indra/newview/Info-SecondLife.plist48
-rw-r--r--indra/newview/llagentwearablesfetch.cpp28
-rw-r--r--indra/newview/llappearancemgr.cpp3
-rw-r--r--indra/newview/llappearancemgr.h7
-rw-r--r--indra/newview/lloutfitslist.cpp5
-rw-r--r--indra/newview/llpaneleditwearable.cpp1
-rw-r--r--indra/newview/llpaneloutfitedit.cpp70
-rw-r--r--indra/newview/llpaneloutfitedit.h5
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp16
-rw-r--r--indra/newview/llpaneloutfitsinventory.h4
-rw-r--r--indra/newview/llpreviewgesture.cpp1
-rw-r--r--indra/newview/llsidepanelappearance.cpp10
-rw-r--r--indra/newview/llstartup.h2
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_tab.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_scrolling_param.xml4
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml3
27 files changed, 204 insertions, 78 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index f14d947734..1561bda201 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -994,7 +994,14 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals)
convertToS32 (decimals, intDecimals);
if (!sLocale.empty())
{
- strStream.imbue (std::locale(sLocale.c_str()));
+ // std::locale() throws if the locale is unknown! (EXT-7926)
+ try
+ {
+ strStream.imbue(std::locale(sLocale.c_str()));
+ } catch (const std::exception &)
+ {
+ LL_WARNS_ONCE("Locale") << "Cannot set locale to " << sLocale << LL_ENDL;
+ }
}
if (!intDecimals)
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 34f3049f2e..39e46a7ccb 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -1162,3 +1162,10 @@ void LLButton::resetMouseDownTimer()
mMouseDownTimer.stop();
mMouseDownTimer.reset();
}
+
+
+BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ // just treat a double click as a second click
+ return handleMouseDown(x, y, mask);
+}
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 9bd566d3c9..d7ab030a47 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -152,6 +152,7 @@ public:
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
+ virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
virtual void draw();
/*virtual*/ BOOL postBuild();
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index c0d02fa8e9..ac0c9c3e45 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -466,8 +466,3 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
-BOOL LLSpinCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
-{
- // just treat a double click as a second click
- return handleMouseDown(x, y, mask);
-}
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index 06201255d2..00d6f86f83 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -94,7 +94,6 @@ public:
virtual BOOL handleScrollWheel(S32 x,S32 y,S32 clicks);
virtual BOOL handleKeyHere(KEY key, MASK mask);
- virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
void onEditorCommit(const LLSD& data);
static void onEditorGainFocus(LLFocusableElement* caller, void *userdata);
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 59b25e1726..3a822a93a6 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -49,6 +49,11 @@ void setupCocoa()
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ // The following prevents the Cocoa command line parser from trying to open 'unknown' arguements as documents.
+ // ie. running './secondlife -set Language fr' would cause a pop-up saying can't open document 'fr'
+ // when init'ing the Cocoa App window.
+ [[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
+
// This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor":
// http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html
diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index 1a559ed39c..d576638dd7 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -50,8 +50,10 @@ set(media_plugin_webkit_LINK_LIBRARIES
)
# Select which VolumeCatcher implementation to use
-if (LINUX AND PULSEAUDIO)
- list(APPEND media_plugin_webkit_SOURCE_FILES linux_volume_catcher.cpp)
+if (LINUX)
+ if (PULSEAUDIO)
+ list(APPEND media_plugin_webkit_SOURCE_FILES linux_volume_catcher.cpp)
+ endif (PULSEAUDIO)
list(APPEND media_plugin_webkit_LINK_LIBRARIES
${UI_LIBRARIES} # for glib/GTK
)
@@ -65,10 +67,10 @@ elseif (DARWIN)
)
elseif (WINDOWS)
list(APPEND media_plugin_webkit_SOURCE_FILES windows_volume_catcher.cpp)
-else (LINUX AND PULSEAUDIO)
+else (LINUX)
# All other platforms use the dummy volume catcher for now.
list(APPEND media_plugin_webkit_SOURCE_FILES dummy_volume_catcher.cpp)
-endif (LINUX AND PULSEAUDIO)
+endif (LINUX)
set_source_files_properties(${media_plugin_webkit_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp
index 2e7fda865e..5eaef0e1c3 100644
--- a/indra/media_plugins/webkit/linux_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp
@@ -47,6 +47,7 @@
extern "C" {
#include <glib.h>
+#include <glib-object.h>
#include <pulse/introspect.h>
#include <pulse/context.h>
@@ -220,6 +221,10 @@ void VolumeCatcherImpl::init()
mGotSyms = loadsyms("libpulse-mainloop-glib.so.0");
if (!mGotSyms) return;
+ // better make double-sure glib itself is initialized properly.
+ if (!g_thread_supported ()) g_thread_init (NULL);
+ g_type_init();
+
mMainloop = llpa_glib_mainloop_new(g_main_context_default());
if (mMainloop)
{
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 6990354486..3b00edec4e 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -46,6 +46,10 @@
// set to 1 if you're using the version of llqtwebkit that's QPixmap-ified
#if LL_LINUX
# define LL_QTWEBKIT_USES_PIXMAPS 0
+extern "C" {
+# include <glib.h>
+# include <glib-object.h>
+}
#else
# define LL_QTWEBKIT_USES_PIXMAPS 0
#endif // LL_LINUX
@@ -60,7 +64,7 @@
#endif
#if LL_WINDOWS
- // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below
+ // *NOTE:Mani - This captures the module handle for the dll. This is used below
// to get the path to this dll for webkit initialization.
// I don't know how/if this can be done with apr...
namespace { HMODULE gModuleHandle;};
@@ -129,6 +133,16 @@ private:
//
void update(int milliseconds)
{
+#if LL_QTLINUX_DOESNT_HAVE_GLIB
+ // pump glib generously, as Linux browser plugins are on the
+ // glib main loop, even if the browser itself isn't - ugh
+ // This is NOT NEEDED if Qt itself was built with glib
+ // mainloop integration.
+ GMainContext *mainc = g_main_context_default();
+ while(g_main_context_iteration(mainc, FALSE));
+#endif // LL_QTLINUX_DOESNT_HAVE_GLIB
+
+ // pump qt
LLQtWebKit::getInstance()->pump( milliseconds );
mVolumeCatcher.pump();
@@ -200,6 +214,14 @@ private:
}
std::string application_dir = std::string( cwd );
+#if LL_LINUX
+ // take care to initialize glib properly, because some
+ // versions of Qt don't, and we indirectly need it for (some
+ // versions of) Flash to not crash the browser.
+ if (!g_thread_supported ()) g_thread_init (NULL);
+ g_type_init();
+#endif
+
#if LL_DARWIN
// When running under the Xcode debugger, there's a setting called "Break on Debugger()/DebugStr()" which defaults to being turned on.
// This causes the environment variable USERBREAK to be set to 1, which causes these legacy calls to break into the debugger.
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index 97e24a0bd5..9bc95f9b95 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -18,33 +18,33 @@
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>slurl</string>
- </array>
- <key>CFBundleTypeIconFile</key>
- <string>seconlife</string>
- <key>CFBundleTypeMIMETypes</key>
- <array>
- <string>application/x-grid-location-info</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>Secondlife SLURL</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>slurl</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>seconlife</string>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>application/x-grid-location-info</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>Secondlife SLURL</string>
<key>CFBundleTypeOSTypes</key>
<array>
- <string>SLRL</string>
+ <string>SLRL</string>
</array>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- <key>LSTypeIsPackage</key>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ <key>LSTypeIsPackage</key>
<true/>
- <key>NSDocumentClass</key>
- <string>SecondLifeSLURL</string>
- </dict>
- </array>
+ <key>NSDocumentClass</key>
+ <string>SecondLifeSLURL</string>
+ </dict>
+ </array>
<key>CFBundleURLTypes</key>
<array>
<dict>
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 931aba1d41..0a2f0e9399 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -48,6 +48,12 @@ public:
virtual ~LLOrderMyOutfitsOnDestroy()
{
+ if (LLApp::isExiting())
+ {
+ llwarns << "called during shutdown, skipping" << llendl;
+ return;
+ }
+
const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
if (my_outfits_id.isNull()) return;
@@ -241,6 +247,8 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) :
mCurrFetchStep(LOFS_FOLDER),
mOutfitsPopulated(false)
{
+ llinfos << "created" << llendl;
+
mMyOutfitsID = LLUUID::null;
mClothingID = LLUUID::null;
mLibraryClothingID = LLUUID::null;
@@ -250,10 +258,13 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) :
LLLibraryOutfitsFetch::~LLLibraryOutfitsFetch()
{
+ llinfos << "destroyed" << llendl;
}
void LLLibraryOutfitsFetch::done()
{
+ llinfos << "start" << llendl;
+
// Delay this until idle() routine, since it's a heavy operation and
// we also can't have it run within notifyObservers.
doOnIdleOneTime(boost::bind(&LLLibraryOutfitsFetch::doneIdle,this));
@@ -262,6 +273,8 @@ void LLLibraryOutfitsFetch::done()
void LLLibraryOutfitsFetch::doneIdle()
{
+ llinfos << "start" << llendl;
+
gInventory.addObserver(this); // Add this back in since it was taken out during ::done()
switch (mCurrFetchStep)
@@ -302,6 +315,8 @@ void LLLibraryOutfitsFetch::doneIdle()
void LLLibraryOutfitsFetch::folderDone()
{
+ llinfos << "start" << llendl;
+
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array,
@@ -309,8 +324,7 @@ void LLLibraryOutfitsFetch::folderDone()
// Early out if we already have items in My Outfits
// except the case when My Outfits contains just initial outfit
- if (cat_array.count() > 1 ||
- cat_array.count() == 1 && cat_array[0]->getUUID() != LLAppearanceMgr::getInstance()->getBaseOutfitUUID())
+ if (cat_array.count() > 1)
{
mOutfitsPopulated = true;
return;
@@ -348,6 +362,8 @@ void LLLibraryOutfitsFetch::folderDone()
void LLLibraryOutfitsFetch::outfitsDone()
{
+ llinfos << "start" << llendl;
+
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
uuid_vec_t folders;
@@ -425,6 +441,8 @@ private:
// Copy the clothing folders from the library into the imported clothing folder
void LLLibraryOutfitsFetch::libraryDone()
{
+ llinfos << "start" << llendl;
+
if (mImportedClothingID != LLUUID::null)
{
// Skip straight to fetching the contents of the imported folder
@@ -480,6 +498,8 @@ void LLLibraryOutfitsFetch::libraryDone()
void LLLibraryOutfitsFetch::importedFolderFetch()
{
+ llinfos << "start" << llendl;
+
// Fetch the contents of the Imported Clothing Folder
uuid_vec_t folders;
folders.push_back(mImportedClothingID);
@@ -495,6 +515,8 @@ void LLLibraryOutfitsFetch::importedFolderFetch()
void LLLibraryOutfitsFetch::importedFolderDone()
{
+ llinfos << "start" << llendl;
+
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
uuid_vec_t folders;
@@ -525,6 +547,8 @@ void LLLibraryOutfitsFetch::importedFolderDone()
void LLLibraryOutfitsFetch::contentsDone()
{
+ llinfos << "start" << llendl;
+
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 3947be49bb..f088a620d6 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1697,9 +1697,10 @@ void LLAppearanceMgr::getUserDescendents(const LLUUID& category,
void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append)
{
- gAgentWearables.notifyLoadingStarted();
if(!category) return;
+ gAgentWearables.notifyLoadingStarted();
+
llinfos << "wearInventoryCategory( " << category->getName()
<< " )" << llendl;
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index ab4ff1bcfc..61779d5c0e 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -34,10 +34,12 @@
#define LL_LLAPPEARANCEMGR_H
#include "llsingleton.h"
+
+#include "llagentwearables.h"
+#include "llcallbacklist.h"
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "llviewerinventory.h"
-#include "llcallbacklist.h"
class LLWearable;
class LLWearableHoldingPattern;
@@ -360,6 +362,9 @@ public:
<< llendl;
//dec_busy_count();
gInventory.removeObserver(this);
+
+ // lets notify observers that loading is finished.
+ gAgentWearables.notifyLoadingFinished();
delete this;
return;
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 6542afc366..b3d39f2a4a 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -103,8 +103,13 @@ protected:
{
return get_is_category_renameable(&gInventory, outfit_cat_id);
}
+ else if ("wear_replace" == param)
+ {
+ return !gAgentWearables.isCOFChangeInProgress();
+ }
else if ("wear_add" == param)
{
+ if (gAgentWearables.isCOFChangeInProgress()) return false;
return LLAppearanceMgr::getCanAddToCOF(outfit_cat_id);
}
else if ("take_off" == param)
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 4402b2130f..71edd39348 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -977,6 +977,7 @@ void LLPanelEditWearable::revertChanges()
mWearablePtr->revertValues();
mNameEditor->setText(mWearablePtr->getName());
+ updatePanelPickerControls(mWearablePtr->getType());
}
void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show)
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 6b5eb23a9b..aac020087b 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -252,7 +252,8 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
mInitialized(false),
mAddWearablesPanel(NULL),
mFolderViewFilterCmbBox(NULL),
- mListViewFilterCmbBox(NULL)
+ mListViewFilterCmbBox(NULL),
+ mPlusBtn(NULL)
{
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
@@ -343,9 +344,9 @@ BOOL LLPanelOutfitEdit::postBuild()
mInventoryItemsPanel = getChild<LLInventoryPanel>("folder_view");
mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
- mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
-
+ mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this));
+ mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this));
+
mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel());
mFolderViewFilterCmbBox = getChild<LLComboBox>("folder_view_filter_combobox");
@@ -371,7 +372,8 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::onAddMoreButtonClicked, this));
- childSetAction("plus_btn", boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
+ mPlusBtn = getChild<LLButton>("plus_btn");
+ mPlusBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");
mEditWearableBtn->setEnabled(FALSE);
@@ -382,6 +384,8 @@ BOOL LLPanelOutfitEdit::postBuild()
mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("list_view");
+ mWearableItemsList->setCommitOnSelectionChange(true);
+ mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this));
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
return TRUE;
@@ -559,21 +563,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string)
void LLPanelOutfitEdit::onPlusBtnClicked(void)
{
- LLUUID selected_id;
- if (mInventoryItemsPanel->getVisible())
- {
- LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem();
- if (!curr_item) return;
-
- LLFolderViewEventListener* listenerp = curr_item->getListener();
- if (!listenerp) return;
-
- selected_id = listenerp->getUUID();
- }
- else if (mWearablesListViewPanel->getVisible())
- {
- selected_id = mWearableItemsList->getSelectedUUID();
- }
+ LLUUID selected_id = getSelectedItemUUID();
if (selected_id.isNull()) return;
@@ -658,22 +648,28 @@ void LLPanelOutfitEdit::onEditWearableClicked(void)
}
}
-void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+void LLPanelOutfitEdit::onInventorySelectionChange()
{
- LLFolderViewItem* current_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem();
- if (!current_item)
+ LLUUID item_uuid = getSelectedItemUUID();
+ if (item_uuid.isNull())
{
return;
}
- LLViewerInventoryItem* item = current_item->getInventoryItem();
- if (!item) return;
+ LLViewerInventoryItem* item(gInventory.getItem(item_uuid));
+ if (!item)
+ {
+ return;
+ }
switch (item->getType())
{
- case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
+ mPlusBtn->setToolTip(getString("replace_body_part"));
+ break;
+ case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_OBJECT:
+ mPlusBtn->setToolTip(LLStringUtil::null);
default:
break;
}
@@ -934,4 +930,26 @@ void LLPanelOutfitEdit::onOutfitChanging(bool started)
indicator->setVisible(started);
}
+LLUUID LLPanelOutfitEdit::getSelectedItemUUID()
+{
+ LLUUID selected_id;
+ if (mInventoryItemsPanel->getVisible())
+ {
+ LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem();
+ if (!curr_item) return selected_id;
+
+ LLFolderViewEventListener* listenerp = curr_item->getListener();
+ if (!listenerp) return selected_id;
+
+ selected_id = listenerp->getUUID();
+ }
+ else if (mWearablesListViewPanel->getVisible())
+ {
+ selected_id = mWearableItemsList->getSelectedUUID();
+ }
+
+ return selected_id;
+}
+
+
// EOF
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index f449fbca27..aa5d00903a 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -145,7 +145,7 @@ public:
void onFolderViewFilterCommitted(LLUICtrl* ctrl);
void onListViewFilterCommitted(LLUICtrl* ctrl);
void onSearchEdit(const std::string& string);
- void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+ void onInventorySelectionChange();
void onPlusBtnClicked(void);
void applyFolderViewFilter(EFolderViewItemType type);
@@ -192,7 +192,7 @@ private:
void onAddMoreButtonClicked();
void showFilteredWearablesListView(LLWearableType::EType type);
void onOutfitChanging(bool started);
-
+ LLUUID getSelectedItemUUID();
LLTextBox* mCurrentOutfitName;
LLTextBox* mStatus;
@@ -203,6 +203,7 @@ private:
LLButton* mEditWearableBtn;
LLButton* mFolderViewBtn;
LLButton* mListViewBtn;
+ LLButton* mPlusBtn;
LLPanel* mAddWearablesPanel;
LLComboBox* mFolderViewFilterCmbBox;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index d382c77430..77c135c716 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -72,11 +72,13 @@ static const std::string COF_TAB_NAME = "cof_tab";
static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
+class LLPanelOutfitsInventory;
class LLOutfitListGearMenu
{
public:
- LLOutfitListGearMenu(LLOutfitsList* olist)
+ LLOutfitListGearMenu(LLOutfitsList* olist, LLPanelOutfitsInventory* parent_panel)
: mOutfitList(olist),
+ mMyOutfitsPanel(parent_panel),
mMenu(NULL)
{
llassert_always(mOutfitList);
@@ -209,6 +211,11 @@ private:
{
return LLAppearanceMgr::getCanRemoveFromCOF(selected_outfit_id);
}
+ else if ("wear" == param)
+ {
+ return mMyOutfitsPanel->isActionEnabled(param);
+ }
+
return true;
}
@@ -233,6 +240,7 @@ private:
LLOutfitsList* mOutfitList;
LLMenuGL* mMenu;
+ LLPanelOutfitsInventory* mMyOutfitsPanel;
};
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
@@ -550,13 +558,13 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
, _7 // EAcceptance* accept
));
- mGearMenu = new LLOutfitListGearMenu(mMyOutfitsPanel);
+ mGearMenu = new LLOutfitListGearMenu(mMyOutfitsPanel, this);
}
void LLPanelOutfitsInventory::updateListCommands()
{
bool trash_enabled = isActionEnabled("delete");
- bool wear_enabled = !gAgentWearables.isCOFChangeInProgress() && isActionEnabled("wear");
+ bool wear_enabled = isActionEnabled("wear");
bool wear_visible = !isCOFPanelActive();
bool make_outfit_enabled = isActionEnabled("save_outfit");
@@ -710,6 +718,8 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "wear")
{
+ if (gAgentWearables.isCOFChangeInProgress()) return FALSE;
+
if (isCOFPanelActive())
{
return FALSE;
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index eabfda7f8c..287fcbf4bb 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -112,6 +112,9 @@ private:
//////////////////////////////////////////////////////////////////////////////////
// List Commands //
+public:
+ BOOL isActionEnabled(const LLSD& command_name);
+
protected:
void initListCommandsHandlers();
void updateListCommands();
@@ -119,7 +122,6 @@ protected:
void showGearMenu();
void onTrashButtonClick();
void onClipboardAction(const LLSD& userdata);
- BOOL isActionEnabled(const LLSD& command_name);
void onCustomAction(const LLSD& command_name);
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
bool hasItemsSelected();
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index ff315d3c53..a7b4873fed 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -876,6 +876,7 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
self->mDirty = FALSE;
self->refresh();
+ self->refreshFromItem(); // to update description and title
}
else
{
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 0d1be91125..ea5796d766 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -390,8 +390,8 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
return;
}
- std::string look_name = gAgentWearables.isCOFChangeInProgress() ? "" : getString("No Outfit");
- mCurrentLookName->setText(look_name);
+ std::string string_name = gAgentWearables.isCOFChangeInProgress() ? "Changing outfits" : "No Outfit";
+ mCurrentLookName->setText(getString(string_name));
mOpenOutfitBtn->setEnabled(FALSE);
}
else
@@ -475,6 +475,12 @@ void LLSidepanelAppearance::setWearablesLoading(bool val)
{
childSetVisible("wearables_loading_indicator", val);
childSetVisible("edit_outfit_btn", !val);
+
+ if (!val)
+ {
+ // refresh outfit name when COF is already changed.
+ refreshCurrentOutfitName();
+ }
}
void LLSidepanelAppearance::showDefaultSubpart()
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 5aa46686e8..cf3c030f08 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -93,7 +93,7 @@ public:
// Load default fonts not already loaded at start screen
static void fontInit();
- static void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures);
+ static void copyLibraryGestures(const std::string& same_gender_gestures);
// outfit_folder_name can be a folder anywhere in your inventory,
// but the name must be a case-sensitive exact match.
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
index 9c3151fe07..8c8bb29baf 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
@@ -8,6 +8,9 @@
name="wear_replace">
<on_click
function="Outfit.WearReplace" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="wear_replace" />
<on_visible
function="Outfit.OnVisible"
parameter="wear_replace" />
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index 1ab9f722d0..06255353a7 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -390,7 +390,7 @@
<button
follows="bottomleft"
height="23"
- label="Revert"
+ label="Undo Changes"
layout="topleft"
left_pad="7"
name="revert_button"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 819ba7f878..d6549adfef 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -54,6 +54,9 @@
<string name="Filter.Clothing" value="Clothing"/>
<string name="Filter.Bodyparts" value="Body parts"/>
+ <string
+ name="replace_body_part"
+ value="Click to replace your existing shape"/>
<button
follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
index 78d64620a5..a8cd380f20 100644
--- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
@@ -12,7 +12,7 @@
layout="topleft"
left="12"
name="min param text"
- text_color="EmphasisColor"
+ text_color="White"
font_shadow="hard"
top="120"
width="120" />
@@ -22,7 +22,7 @@
layout="topleft"
left="155"
name="max param text"
- text_color="EmphasisColor"
+ text_color="White"
font_shadow="hard"
top_delta="0"
width="120" />
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index e189d11d35..9a07d3a48a 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -21,6 +21,9 @@ width="333">
<string
name="Now Wearing"
value="Now wearing..." />
+ <string
+ name="Changing outfits"
+ value="Changing outfits" />
<panel
background_opaque="true"
background_visible="true"