summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt5
-rw-r--r--indra/newview/app_settings/settings.xml26
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl11
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl7
-rw-r--r--indra/newview/llagentwearables.cpp4
-rw-r--r--indra/newview/llappearancemgr.cpp10
-rw-r--r--indra/newview/llappearancemgr.h12
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llavatarlist.cpp8
-rw-r--r--indra/newview/llchannelmanager.cpp16
-rw-r--r--indra/newview/llchannelmanager.h5
-rw-r--r--indra/newview/llchiclet.h3
-rw-r--r--indra/newview/llcofwearables.cpp155
-rw-r--r--indra/newview/llcofwearables.h10
-rw-r--r--indra/newview/llfolderview.cpp4
-rw-r--r--indra/newview/llgrouplist.cpp13
-rw-r--r--indra/newview/llimfloater.cpp23
-rw-r--r--indra/newview/llimfloater.h2
-rw-r--r--indra/newview/llimview.cpp33
-rw-r--r--indra/newview/llinventorybridge.cpp120
-rw-r--r--indra/newview/llinventorybridge.h2
-rw-r--r--indra/newview/llinventoryfilter.cpp5
-rw-r--r--indra/newview/llinventoryfilter.h2
-rw-r--r--indra/newview/llinventoryfunctions.cpp23
-rw-r--r--indra/newview/llinventoryfunctions.h6
-rw-r--r--indra/newview/llinventoryitemslist.cpp223
-rw-r--r--indra/newview/llinventoryitemslist.h132
-rw-r--r--indra/newview/llinventoryobserver.cpp76
-rw-r--r--indra/newview/llinventoryobserver.h13
-rw-r--r--indra/newview/lloutfitslist.cpp119
-rw-r--r--indra/newview/lloutfitslist.h17
-rw-r--r--indra/newview/llpaneleditwearable.cpp460
-rw-r--r--indra/newview/llpaneleditwearable.h5
-rw-r--r--indra/newview/llpanellandmarks.cpp1
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp30
-rw-r--r--indra/newview/llpanelpeople.cpp20
-rw-r--r--indra/newview/llpanelpeople.h1
-rw-r--r--indra/newview/llpanelplaces.cpp3
-rw-r--r--indra/newview/llpreviewnotecard.cpp30
-rw-r--r--indra/newview/llpreviewnotecard.h4
-rw-r--r--indra/newview/llscreenchannel.cpp25
-rw-r--r--indra/newview/llscreenchannel.h6
-rw-r--r--indra/newview/llselectmgr.cpp6
-rw-r--r--indra/newview/llsidepanelappearance.cpp3
-rw-r--r--indra/newview/lltexturefetch.cpp53
-rw-r--r--indra/newview/llvieweraudio.cpp4
-rw-r--r--indra/newview/llviewermedia.cpp19
-rw-r--r--indra/newview/llviewermessage.cpp2
-rw-r--r--indra/newview/llwearableitemslist.cpp238
-rw-r--r--indra/newview/llwearableitemslist.h109
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_1.pngbin464 -> 470 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_10.pngbin461 -> 461 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_11.pngbin471 -> 475 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_12.pngbin457 -> 455 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_2.pngbin461 -> 453 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_3.pngbin487 -> 454 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_4.pngbin466 -> 454 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_5.pngbin477 -> 468 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_6.pngbin460 -> 462 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_7.pngbin483 -> 469 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_8.pngbin467 -> 454 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Progress_9.pngbin483 -> 469 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml24
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_notecard.xml12
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml10
-rw-r--r--indra/newview/skins/default/xui/en/mime_types.xml32
-rw-r--r--indra/newview/skins/default/xui/en/mime_types_linux.xml32
-rw-r--r--indra/newview/skins/default/xui/en/mime_types_mac.xml30
-rw-r--r--indra/newview/skins/default/xui/en/outfit_accordion_tab.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml72
-rw-r--r--indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml36
-rw-r--r--indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml37
-rw-r--r--indra/newview/skins/default/xui/en/panel_clothing_list_item.xml104
-rw-r--r--indra/newview/skins/default/xui/en/panel_cof_wearables.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml62
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_alpha.xml25
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_eyes.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_gloves.xml14
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_hair.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_jacket.xml15
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pants.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_shirt.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_shoes.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_skin.xml17
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_skirt.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_socks.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_underpants.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_undershirt.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml24
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml22
-rw-r--r--indra/newview/skins/default/xui/it/menu_participant_list.xml2
-rw-r--r--indra/newview/skins/default/xui/it/notifications.xml2
-rw-r--r--indra/newview/skins/default/xui/it/panel_edit_pick.xml4
-rw-r--r--indra/newview/skins/default/xui/it/panel_preferences_advanced.xml4
-rw-r--r--indra/newview/skins/default/xui/it/strings.xml6
-rw-r--r--indra/newview/skins/default/xui/it/teleport_strings.xml2
-rwxr-xr-xindra/newview/viewer_manifest.py6
101 files changed, 2450 insertions, 362 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 75807cec95..3664a5f05c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1472,8 +1472,6 @@ if (WINDOWS)
${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll
${CMAKE_CURRENT_SOURCE_DIR}/fmod.dll
- ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_quicktime.dll
- ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_webkit.dll
${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll
${ARCH_PREBUILT_DIRS_RELEASE}/qtcore4.dll
${ARCH_PREBUILT_DIRS_RELEASE}/qtgui4.dll
@@ -1513,6 +1511,7 @@ if (WINDOWS)
SLPlugin
media_plugin_quicktime
media_plugin_webkit
+ winmm_shim
windows-crash-logger
windows-updater
)
@@ -1553,8 +1552,6 @@ if (WINDOWS)
add_dependencies(${VIEWER_BINARY_NAME}
SLPlugin
- media_plugin_quicktime
- media_plugin_webkit
windows-updater
windows-crash-logger
)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index a820d82f6f..c5602d1bcc 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5596,6 +5596,19 @@
<key>Value</key>
<integer>8</integer>
</map>
+
+ <key>PluginUseReadThread</key>
+ <map>
+ <key>Comment</key>
+ <string>Use a separate thread to read incoming messages from plugins</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+
<key>PrecachingDelay</key>
<map>
<key>Comment</key>
@@ -5849,7 +5862,18 @@
<key>Value</key>
<real>1.0</real>
</map>
- <key>RecentItemsSortOrder</key>
+ <key>MediaRollOffFactor</key>
+ <map>
+ <key>Comment</key>
+ <string>Multiplier to change rate of media attenuation</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>10.0</real>
+ </map>
+ <key>RecentItemsSortOrder</key>
<map>
<key>Comment</key>
<string>Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top)</string>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
index 1c29dae5f7..6e38caf5ef 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
@@ -14,14 +14,15 @@ varying vec3 vary_mat2;
void main()
{
- vec3 col = texture2D(diffuseMap, gl_TexCoord[0].xy).rgb;
+ vec3 col = gl_Color.rgb * texture2D(diffuseMap, gl_TexCoord[0].xy).rgb;
vec3 norm = texture2D(bumpMap, gl_TexCoord[0].xy).rgb * 2.0 - 1.0;
vec3 tnorm = vec3(dot(norm,vary_mat0),
- dot(norm,vary_mat1),
- dot(norm,vary_mat2));
+ dot(norm,vary_mat1),
+ dot(norm,vary_mat2));
- gl_FragData[0] = vec4(gl_Color.rgb*col, 0.0);
- gl_FragData[1] = vec4(col*gl_Color.a, gl_Color.a);
+ gl_FragData[0] = vec4(col, 0.0);
+ gl_FragData[1] = gl_Color.aaaa; // spec
+ //gl_FragData[1] = vec4(vec3(gl_Color.a), gl_Color.a+(1.0-gl_Color.a)*gl_Color.a); // spec - from former class3 - maybe better, but not so well tested
gl_FragData[2] = vec4(normalize(tnorm)*0.5+0.5, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
index 5895ebda84..112103956d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
@@ -11,8 +11,9 @@ varying vec3 vary_normal;
void main()
{
- vec3 col = texture2D(diffuseMap, gl_TexCoord[0].xy).rgb;
- gl_FragData[0] = vec4(gl_Color.rgb*col, 0.0);
- gl_FragData[1] = vec4(col*(gl_Color.a*1.5), gl_Color.a);
+ vec3 col = gl_Color.rgb * texture2D(diffuseMap, gl_TexCoord[0].xy).rgb;
+ gl_FragData[0] = vec4(col, 0.0);
+ gl_FragData[1] = gl_Color.aaaa; // spec
+ //gl_FragData[1] = vec4(vec3(gl_Color.a), gl_Color.a+(1.0-gl_Color.a)*gl_Color.a); // spec - from former class3 - maybe better, but not so well tested
gl_FragData[2] = vec4(normalize(vary_normal)*0.5+0.5, 0.0);
}
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 8a880e5ace..b5fde0baca 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1974,7 +1974,11 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
msg->nextBlockFast(_PREHASH_ObjectData );
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
+#if ENABLE_MULTIATTACHMENTS
+ msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD );
+#else
msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point
+#endif
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
msg->addStringFast(_PREHASH_Name, item->getName());
msg->addStringFast(_PREHASH_Description, item->getDescription());
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 5586b3cd4d..e93e29ecde 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1092,7 +1092,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF()
}
//preparing the list of wearables in the correct order for LLAgentWearables
- std::sort(wear_items.begin(), wear_items.end(), sort_by_description);
+ sortItemsByActualDescription(wear_items);
+
LLWearableHoldingPattern* holder = new LLWearableHoldingPattern;
@@ -1910,6 +1911,13 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b
return result;
}
+//static
+void LLAppearanceMgr::sortItemsByActualDescription(LLInventoryModel::item_array_t& items)
+{
+ if (items.size() < 2) return;
+
+ std::sort(items.begin(), items.end(), sort_by_description);
+}
//#define DUMP_CAT_VERBOSE
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index a308a3efa9..516dada39d 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -48,6 +48,8 @@ class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr>
friend class LLSingleton<LLAppearanceMgr>;
public:
+ typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t;
+
void updateAppearanceFromCOF();
bool needToSaveCOF();
void updateCOF(const LLUUID& category, bool append = false);
@@ -143,17 +145,17 @@ public:
bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body);
+ static void sortItemsByActualDescription(LLInventoryModel::item_array_t& items);
+
+ //Divvy items into arrays by wearable type
+ static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type);
+
protected:
LLAppearanceMgr();
~LLAppearanceMgr();
private:
- typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t;
-
- //Divvy items into arrays by wearable type
- static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type);
-
//Check ordering information on wearables stored in links' descriptions and update if it is invalid
void updateClothingOrderingInfo();
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7bfe6a46c9..8f14b8d782 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1548,6 +1548,9 @@ bool LLAppViewer::cleanup()
LLViewerMedia::saveCookieFile();
+ // Stop the plugin read thread if it's running.
+ LLPluginProcessParent::setUseReadThread(false);
+
llinfos << "Shutting down Threads" << llendflush;
// Let threads finish
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index fd0b20281b..dfb213716c 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -177,13 +177,15 @@ void LLAvatarList::clear()
void LLAvatarList::setNameFilter(const std::string& filter)
{
- if (mNameFilter != filter)
+ std::string filter_upper = filter;
+ LLStringUtil::toUpper(filter_upper);
+ if (mNameFilter != filter_upper)
{
- mNameFilter = filter;
+ mNameFilter = filter_upper;
// update message for empty state here instead of refresh() to avoid blinking when switch
// between tabs.
- updateNoItemsMessage(!mNameFilter.empty());
+ updateNoItemsMessage(filter);
setDirty();
}
}
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 4f9434030f..fafa315a59 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -243,3 +243,19 @@ void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLS
}
}
+// static
+LLNotificationsUI::LLScreenChannel* LLChannelManager::getNotificationScreenChannel()
+{
+ LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
+ (LLNotificationsUI::LLChannelManager::getInstance()->
+ findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+
+ if (channel == NULL)
+ {
+ llwarns << "Can't find screen channel by NotificationChannelUUID" << llendl;
+ llassert(!"Can't find screen channel by NotificationChannelUUID");
+ }
+
+ return channel;
+}
+
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index c2be39122f..8c725f2660 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -114,6 +114,11 @@ public:
*/
void killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher);
+ /**
+ * Returns notification screen channel.
+ */
+ static LLNotificationsUI::LLScreenChannel* getNotificationScreenChannel();
+
private:
LLScreenChannel* createChannel(LLChannelManager::Params& p);
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 489c66be71..9d421b4f0b 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -921,6 +921,9 @@ protected:
class LLNotificationChiclet : public LLSysWellChiclet
{
friend class LLUICtrlFactory;
+public:
+ struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{};
+
protected:
LLNotificationChiclet(const Params& p);
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index f0442ee3f6..b8222ebb18 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -89,52 +89,144 @@ void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list)
onCommit();
}
+#include "llwearableitemslist.h"
void LLCOFWearables::refresh()
{
clear();
LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
+ LLInventoryModel::item_array_t cof_items;
+
+ gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, cof_items, LLInventoryModel::EXCLUDE_TRASH);
+
+ populateAttachmentsAndBodypartsLists(cof_items);
+
+
+ LLAppearanceMgr::wearables_by_type_t clothing_by_type(WT_COUNT);
+ LLAppearanceMgr::getInstance()->divvyWearablesByType(cof_items, clothing_by_type);
- gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, items, LLInventoryModel::EXCLUDE_TRASH);
- if (items.empty()) return;
+ populateClothingList(clothing_by_type);
+}
+
- for (U32 i = 0; i < items.size(); ++i)
+void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items)
+{
+ for (U32 i = 0; i < cof_items.size(); ++i)
{
- LLViewerInventoryItem* item = items.get(i);
+ LLViewerInventoryItem* item = cof_items.get(i);
if (!item) continue;
- LLPanelInventoryListItem* item_panel = LLPanelInventoryListItem::createItemPanel(item);
- if (!item_panel) continue;
-
- switch (item->getType())
+ const LLAssetType::EType item_type = item->getType();
+ if (item_type == LLAssetType::AT_CLOTHING) continue;
+ LLPanelInventoryListItemBase* item_panel = NULL;
+ if (item_type == LLAssetType::AT_OBJECT)
{
- case LLAssetType::AT_OBJECT:
- mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
- break;
+ item_panel = LLPanelInventoryListItemBase::create(item);
+ mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
+ }
+ else if (item_type == LLAssetType::AT_BODYPART)
+ {
+ item_panel = LLPanelBodyPartsListItem::create(item);
+ mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
+ addWearableTypeSeparator(mBodyParts);
+ }
+ }
+
+ if (mAttachments->size())
+ {
+ mAttachments->sort(); //*TODO by Name
+ mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false)
+ }
- case LLAssetType::AT_BODYPART:
- mBodyParts->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
- break;
+ if (mBodyParts->size())
+ {
+ mBodyParts->sort(); //*TODO by name
+ }
+
+ addListButtonBar(mBodyParts, "panel_bodyparts_list_button_bar.xml");
+ mBodyParts->notify(REARRANGE);
+}
+
+
+void LLCOFWearables::populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type)
+{
+ llassert(clothing_by_type.size() == WT_COUNT);
+
+ addListButtonBar(mClothing, "panel_clothing_list_button_bar.xml");
+
+ for (U32 type = WT_SHIRT; type < WT_COUNT; ++type)
+ {
+ U32 size = clothing_by_type[type].size();
+ if (!size) continue;
+
+ LLAppearanceMgr::sortItemsByActualDescription(clothing_by_type[type]);
+
+ for (U32 i = 0; i < size; i++)
+ {
+ LLViewerInventoryItem* item = clothing_by_type[type][i];
- case LLAssetType::AT_CLOTHING:
- mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
- break;
+ LLPanelInventoryListItemBase* item_panel = LLPanelClothingListItem::create(item);
+ if (!item_panel) continue;
- default: break;
+ mClothing->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);
}
+
+ addWearableTypeSeparator(mClothing);
}
- mAttachments->sort(); //*TODO by Name
- mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false)
-
- mClothing->sort(); //*TODO by actual inventory item description
+ addClothingTypesDummies(clothing_by_type);
+
mClothing->notify(REARRANGE);
+}
+
+void LLCOFWearables::addListButtonBar(LLFlatListView* list, std::string xml_filename)
+{
+ llassert(list);
+ llassert(xml_filename.length());
- mBodyParts->sort(); //*TODO by name
- mBodyParts->notify(REARRANGE);
+ LLPanel::Params params;
+ LLPanel* button_bar = LLUICtrlFactory::create<LLPanel>(params);
+ LLUICtrlFactory::instance().buildPanel(button_bar, xml_filename);
+
+ LLRect rc = button_bar->getRect();
+ button_bar->reshape(list->getItemsRect().getWidth(), rc.getHeight());
+
+ list->addItem(button_bar, LLUUID::null, ADD_TOP, false);
+}
+
+//adding dummy items for missing wearable types
+void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type)
+{
+ llassert(clothing_by_type.size() == WT_COUNT);
+
+ for (U32 type = WT_SHIRT; type < WT_COUNT; type++)
+ {
+ U32 size = clothing_by_type[type].size();
+ if (size) continue;
+
+ EWearableType w_type = static_cast<EWearableType>(type);
+ LLPanelInventoryListItemBase* item_panel = LLPanelDummyClothingListItem::create(w_type);
+ if(!item_panel) continue;
+ mClothing->addItem(item_panel, LLUUID::null, ADD_BOTTOM, false);
+ addWearableTypeSeparator(mClothing);
+ }
}
+void LLCOFWearables::addWearableTypeSeparator(LLFlatListView* list)
+{
+ llassert(list);
+
+ static LLXMLNodePtr separator_xml_node = getXMLNode("panel_wearable_type_separator.xml");
+ if (separator_xml_node->isNull()) return;
+
+ LLPanel* separator = LLUICtrlFactory::defaultBuilder<LLPanel>(separator_xml_node, NULL, NULL);
+
+ LLRect rc = separator->getRect();
+ rc.setOriginAndSize(0, 0, list->getItemsRect().getWidth(), rc.getHeight());
+ separator->setRect(rc);
+
+ list->addItem(separator, LLUUID::null, ADD_BOTTOM, false);
+}
LLUUID LLCOFWearables::getSelectedUUID()
{
@@ -150,4 +242,17 @@ void LLCOFWearables::clear()
mBodyParts->clear();
}
+LLXMLNodePtr LLCOFWearables::getXMLNode(std::string xml_filename)
+{
+ LLXMLNodePtr xmlNode = NULL;
+ bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, xmlNode);
+ if (!success)
+ {
+ llwarning("Failed to read xml", 0);
+ return NULL;
+ }
+
+ return xmlNode;
+}
+
//EOF
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index 58d67ed32f..fec6d34db2 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -34,6 +34,8 @@
#define LL_LLCOFWEARABLES_H
#include "llpanel.h"
+#include "llinventorymodel.h"
+#include "llappearancemgr.h"
class LLFlatListView;
@@ -52,8 +54,16 @@ public:
protected:
+ void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items);
+ void populateClothingList(LLAppearanceMgr::wearables_by_type_t& clothing_by_type);
+
+ void addListButtonBar(LLFlatListView* list, std::string xml_filename);
+ void addClothingTypesDummies(const LLAppearanceMgr::wearables_by_type_t& clothing_by_type);
+ void addWearableTypeSeparator(LLFlatListView* list);
void onSelectionChange(LLFlatListView* selected_list);
+ LLXMLNodePtr getXMLNode(std::string xml_filename);
+
LLFlatListView* mAttachments;
LLFlatListView* mClothing;
LLFlatListView* mBodyParts;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index c492bfcef1..eba4cdfa31 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -946,7 +946,9 @@ void LLFolderView::draw()
}
else
{
- mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage());
+ LLStringUtil::format_map_t args;
+ args["[SEARCH_TERM]"] = LLURI::escape(getFilter()->getFilterSubStringOrig());
+ mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage(), args);
//font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
}
mStatusTextBox->setValue(mStatusText);
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index f21b6e1085..252c34cf9c 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -131,9 +131,15 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask)
void LLGroupList::setNameFilter(const std::string& filter)
{
- if (mNameFilter != filter)
+ std::string filter_upper = filter;
+ LLStringUtil::toUpper(filter_upper);
+ if (mNameFilter != filter_upper)
{
- mNameFilter = filter;
+ mNameFilter = filter_upper;
+
+ // set no items message depend on filter state
+ updateNoItemsMessage(filter);
+
setDirty();
}
}
@@ -151,9 +157,6 @@ void LLGroupList::refresh()
LLUUID id;
bool have_filter = !mNameFilter.empty();
- // set no items message depend on filter state & total count of groups
- updateNoItemsMessage(have_filter);
-
clear();
for(S32 i = 0; i < count; ++i)
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 19dbc564d1..c0cc3f1985 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -53,6 +53,7 @@
#include "llsyswellwindow.h"
#include "lltrans.h"
#include "llchathistory.h"
+#include "llnotifications.h"
#include "llviewerwindow.h"
#include "llvoicechannel.h"
#include "lltransientfloatermgr.h"
@@ -371,6 +372,8 @@ void LLIMFloater::onSlide()
//static
LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
{
+ closeHiddenIMToasts();
+
if (!gIMMgr->hasSession(session_id)) return NULL;
if(!isChatMultiTab())
@@ -1084,6 +1087,26 @@ void LLIMFloater::removeTypingIndicator(const LLIMInfo* im_info)
}
// static
+void LLIMFloater::closeHiddenIMToasts()
+{
+ class IMToastMatcher: public LLNotificationsUI::LLScreenChannel::Matcher
+ {
+ public:
+ bool matches(const LLNotificationPtr notification) const
+ {
+ // "notifytoast" type of notifications is reserved for IM notifications
+ return "notifytoast" == notification->getType();
+ }
+ };
+
+ LLNotificationsUI::LLScreenChannel* channel = LLNotificationsUI::LLChannelManager::getNotificationScreenChannel();
+ if (channel != NULL)
+ {
+ channel->closeHiddenToasts(IMToastMatcher());
+ }
+}
+
+// static
bool LLIMFloater::isChatMultiTab()
{
// Restart is required in order to change chat window type.
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 763dd5655b..f9dd8b9b85 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -148,6 +148,8 @@ private:
// Remove the "User is typing..." indicator.
void removeTypingIndicator(const LLIMInfo* im_info = NULL);
+ static void closeHiddenIMToasts();
+
LLPanelChatControlPanel* mControlPanel;
LLUUID mSessionID;
S32 mLastMessageIndex;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index f03026715d..15dbc03f70 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -257,9 +257,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
{
- std::string you = LLTrans::getString("You");
- std::string started_call = LLTrans::getString("started_call");
- std::string joined_call = LLTrans::getString("joined_call");
+ std::string you_joined_call = LLTrans::getString("you_joined_call");
+ std::string you_started_call = LLTrans::getString("you_started_call");
std::string other_avatar_name = "";
std::string message;
@@ -277,13 +276,15 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
switch(new_state)
{
case LLVoiceChannel::STATE_CALL_STARTED :
- message = other_avatar_name + " " + started_call;
- LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
-
- break;
+ {
+ LLStringUtil::format_map_t string_args;
+ string_args["[NAME]"] = other_avatar_name;
+ message = LLTrans::getString("name_started_call", string_args);
+ LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
+ break;
+ }
case LLVoiceChannel::STATE_CONNECTED :
- message = you + " " + joined_call;
- LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
+ LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_joined_call);
default:
break;
}
@@ -293,8 +294,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
switch(new_state)
{
case LLVoiceChannel::STATE_CALL_STARTED :
- message = you + " " + started_call;
- LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
+ LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_started_call);
break;
case LLVoiceChannel::STATE_CONNECTED :
message = LLTrans::getString("answered_call");
@@ -312,8 +312,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
switch(new_state)
{
case LLVoiceChannel::STATE_CONNECTED :
- message = you + " " + joined_call;
- LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
+ LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_joined_call);
default:
break;
}
@@ -323,8 +322,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
switch(new_state)
{
case LLVoiceChannel::STATE_CALL_STARTED :
- message = you + " " + started_call;
- LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message);
+ LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, you_started_call);
break;
default:
break;
@@ -2069,8 +2067,9 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
// send notification message to the corresponding chat
if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc")
{
- std::string started_call = LLTrans::getString("started_call");
- std::string message = mPayload["caller_name"].asString() + " " + started_call;
+ LLStringUtil::format_map_t string_args;
+ string_args["[NAME]"] = mPayload["caller_name"].asString();
+ std::string message = LLTrans::getString("name_started_call", string_args);
LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message);
}
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 9a83d9d3b1..ea43670da0 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -212,10 +212,14 @@ BOOL LLInvFVBridge::isItemRemovable() const
return FALSE;
}
- // Disable delete from COF folder; have users explicitly choose "detach/take off".
+ // Disable delete from COF folder; have users explicitly choose "detach/take off",
+ // unless the item is not worn but in the COF (i.e. is bugged).
if (LLAppearanceMgr::instance().getIsProtectedCOFItem(mUUID))
{
- return FALSE;
+ if (get_is_item_worn(mUUID))
+ {
+ return FALSE;
+ }
}
const LLInventoryObject *obj = model->getItem(mUUID);
@@ -495,7 +499,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
}
}
const LLViewerInventoryCategory *cat = model->getCategory(objects.get(i));
- if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
+ if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
return FALSE;
}
@@ -642,13 +646,10 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
disabled_items.push_back(std::string("Paste"));
}
- if (gAgent.isGodlike())
+ items.push_back(std::string("Paste As Link"));
+ if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
{
- items.push_back(std::string("Paste As Link"));
- if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
- {
- disabled_items.push_back(std::string("Paste As Link"));
- }
+ disabled_items.push_back(std::string("Paste As Link"));
}
items.push_back(std::string("Paste Separator"));
@@ -678,7 +679,8 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Share"));
}
- items.push_back(std::string("Open"));
+
+ addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
getClipboardEntries(true, items, disabled_items, flags);
@@ -713,7 +715,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items,
const LLInventoryObject *obj = getInventoryObject();
// Don't allow delete as a direct option from COF folder.
- if (obj && obj->getIsLinkType() && isCOFFolder())
+ if (obj && obj->getIsLinkType() && isCOFFolder() && get_is_item_worn(mUUID))
{
return;
}
@@ -734,6 +736,17 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items,
}
}
+void LLInvFVBridge::addOpenRightClickMenuOption(menuentry_vec_t &items)
+{
+ const LLInventoryObject *obj = getInventoryObject();
+ const BOOL is_link = (obj && obj->getIsLinkType());
+
+ if (is_link)
+ items.push_back(std::string("Open Original"));
+ else
+ items.push_back(std::string("Open"));
+}
+
// *TODO: remove this
BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
@@ -841,21 +854,7 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model,
const LLUUID& new_parent_id,
BOOL restamp)
{
- if (item->getParentUUID() != new_parent_id)
- {
- LLInventoryModel::update_list_t update;
- LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1);
- update.push_back(old_folder);
- LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
- update.push_back(new_folder);
- gInventory.accountForUpdate(update);
-
- LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
- new_item->setParent(new_parent_id);
- new_item->updateParentOnServer(restamp);
- model->updateItem(new_item);
- model->notifyObservers();
- }
+ change_item_parent(model, item, new_parent_id, restamp);
}
// static
@@ -1108,7 +1107,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
gotoItem();
}
- if ("open" == action)
+ if ("open" == action || "open_original" == action)
{
openItem();
return;
@@ -1454,17 +1453,11 @@ BOOL LLItemBridge::isItemCopyable() const
return FALSE;
}
- if (gAgent.isGodlike())
- {
- // All items can be copied in god mode since you can
- // at least paste-as-link the item, though you
- // still may not be able paste the item.
- return TRUE;
- }
- else
- {
- return (item->getPermissions().allowCopyBy(gAgent.getID()));
- }
+ // All items can be copied in god mode since you can
+ // at least paste-as-link the item, though you
+ // still may not be able paste the item.
+ return TRUE;
+ // return (item->getPermissions().allowCopyBy(gAgent.getID()));
}
return FALSE;
}
@@ -1605,7 +1598,8 @@ BOOL LLFolderBridge::isUpToDate() const
BOOL LLFolderBridge::isItemCopyable() const
{
- return FALSE;
+ // Can copy folders to paste-as-link, but not for straight paste.
+ return TRUE;
}
BOOL LLFolderBridge::copyToClipboard() const
@@ -1836,11 +1830,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
else
{
LLPointer<LLInventoryCallback> cb = NULL;
+ const std::string empty_description = "";
link_inventory_item(
gAgent.getID(),
inv_cat->getUUID(),
mUUID,
inv_cat->getName(),
+ empty_description,
LLAssetType::AT_LINK_FOLDER,
cb);
}
@@ -2512,30 +2508,29 @@ void LLFolderBridge::pasteLinkFromClipboard()
++iter)
{
const LLUUID &object_id = (*iter);
-#if SUPPORT_ENSEMBLES
if (LLInventoryCategory *cat = model->getCategory(object_id))
{
+ const std::string empty_description = "";
link_inventory_item(
gAgent.getID(),
cat->getUUID(),
parent_id,
cat->getName(),
+ empty_description,
LLAssetType::AT_LINK_FOLDER,
LLPointer<LLInventoryCallback>(NULL));
}
- else
-#endif
- if (LLInventoryItem *item = model->getItem(object_id))
- {
- link_inventory_item(
- gAgent.getID(),
- item->getLinkedUUID(),
- parent_id,
- item->getName(),
- item->getDescription(),
- LLAssetType::AT_LINK,
- LLPointer<LLInventoryCallback>(NULL));
- }
+ else if (LLInventoryItem *item = model->getItem(object_id))
+ {
+ link_inventory_item(
+ gAgent.getID(),
+ item->getLinkedUUID(),
+ parent_id,
+ item->getName(),
+ item->getDescription(),
+ LLAssetType::AT_LINK,
+ LLPointer<LLInventoryCallback>(NULL));
+ }
}
}
}
@@ -3346,7 +3341,7 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Share"));
}
- items.push_back(std::string("Open"));
+ addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
getClipboardEntries(true, items, disabled_items, flags);
@@ -3712,7 +3707,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
disabled_items.push_back(std::string("Share"));
}
- items.push_back(std::string("Open"));
+ addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
getClipboardEntries(true, items, disabled_items, flags);
@@ -3992,7 +3987,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if (!is_sidepanel)
{
- items.push_back(std::string("Open"));
+ addOpenRightClickMenuOption(items);
items.push_back(std::string("Properties"));
}
@@ -4730,7 +4725,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if (can_open && !is_sidepanel)
{
- items.push_back(std::string("Open"));
+ addOpenRightClickMenuOption(items);
}
if (!is_sidepanel)
@@ -5250,9 +5245,13 @@ const LLUUID &LLLinkFolderBridge::getFolderID() const
// static
void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type,
- const LLUUID& uuid,LLInventoryModel* model)
+ const LLUUID& uuid,
+ LLInventoryModel* model)
{
- LLInvFVBridgeAction* action = createAction(asset_type,uuid,model);
+ // Perform indirection in case of link.
+ const LLUUID& linked_uuid = gInventory.getLinkedItemID(uuid);
+
+ LLInvFVBridgeAction* action = createAction(asset_type,linked_uuid,model);
if(action)
{
action->doIt();
@@ -5365,7 +5364,8 @@ protected:
};
-class LLNotecardBridgeAction: public LLInvFVBridgeAction
+class LLNotecardBridgeAction
+: public LLInvFVBridgeAction
{
friend class LLInvFVBridgeAction;
public:
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 6248de4bd1..d0f743f388 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -136,7 +136,7 @@ protected:
menuentry_vec_t &disabled_items);
virtual void addDeleteContextMenuOptions(menuentry_vec_t &items,
menuentry_vec_t &disabled_items);
-
+ virtual void addOpenRightClickMenuOption(menuentry_vec_t &items);
protected:
LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid);
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 1a488175ac..901a570487 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -329,9 +329,10 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
// appending new characters
const BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString);
- mFilterSubString = string;
+ mFilterSubStringOrig = string;
+ LLStringUtil::trimHead(mFilterSubStringOrig);
+ mFilterSubString = mFilterSubStringOrig;
LLStringUtil::toUpper(mFilterSubString);
- LLStringUtil::trimHead(mFilterSubString);
if (less_restrictive)
{
setModified(FILTER_LESS_RESTRICTIVE);
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index b01554edc8..2376ba5d22 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -84,6 +84,7 @@ public:
void setFilterSubString(const std::string& string);
const std::string& getFilterSubString(BOOL trim = FALSE) const;
+ const std::string& getFilterSubStringOrig() const { return mFilterSubStringOrig; }
BOOL hasFilterString() const;
void setFilterPermissions(PermissionMask perms);
@@ -181,6 +182,7 @@ private:
std::string::size_type mSubStringMatchOffset;
std::string mFilterSubString;
+ std::string mFilterSubStringOrig;
const std::string mName;
S32 mFilterGeneration;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 449b1b5b4d..6c7251579d 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -585,3 +585,26 @@ BOOL get_is_item_worn(const LLUUID& id)
}
return FALSE;
}
+
+
+void change_item_parent(LLInventoryModel* model,
+ LLViewerInventoryItem* item,
+ const LLUUID& new_parent_id,
+ BOOL restamp)
+{
+ if (item->getParentUUID() != new_parent_id)
+ {
+ LLInventoryModel::update_list_t update;
+ LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1);
+ update.push_back(old_folder);
+ LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
+ update.push_back(new_folder);
+ gInventory.accountForUpdate(update);
+
+ LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
+ new_item->setParent(new_parent_id);
+ new_item->updateParentOnServer(restamp);
+ model->updateItem(new_item);
+ model->notifyObservers();
+ }
+}
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index e3cd988e39..6f373f7392 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -310,6 +310,12 @@ LLUIImagePtr get_item_icon(LLAssetType::EType asset_type,
// Is this item or its baseitem is worn, attached, etc...
BOOL get_is_item_worn(const LLUUID& id);
+
+void change_item_parent(LLInventoryModel* model,
+ LLViewerInventoryItem* item,
+ const LLUUID& new_parent_id,
+ BOOL restamp);
+
#endif // LL_LLINVENTORYFUNCTIONS_H
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index dca130c672..8dfdb0788a 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -50,76 +50,224 @@
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
-// static
-LLPanelInventoryListItem* LLPanelInventoryListItem::createItemPanel(const LLViewerInventoryItem* item)
+static const S32 WIDGET_SPACING = 3;
+
+LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item)
{
+ LLPanelInventoryListItemBase* list_item = NULL;
if (item)
{
- return new LLPanelInventoryListItem(item);
+ list_item = new LLPanelInventoryListItemBase(item);
+ list_item->init();
}
- else
+ return list_item;
+}
+
+void LLPanelInventoryListItemBase::updateItem()
+{
+ setIconImage(mIconImage);
+ setTitle(mItem->getName(), mHighlightedText);
+}
+
+void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/)
+{
+ LLUICtrl* ctrl = findChild<LLUICtrl>(name);
+ if(ctrl)
{
- return NULL;
+ addWidgetToLeftSide(ctrl, show_widget);
}
}
-LLPanelInventoryListItem::~LLPanelInventoryListItem()
-{}
+void LLPanelInventoryListItemBase::addWidgetToLeftSide(LLUICtrl* ctrl, bool show_widget/* = true*/)
+{
+ mLeftSideWidgets.push_back(ctrl);
+ setShowWidget(ctrl, show_widget);
+}
+
+void LLPanelInventoryListItemBase::addWidgetToRightSide(const std::string& name, bool show_widget/* = true*/)
+{
+ LLUICtrl* ctrl = findChild<LLUICtrl>(name);
+ if(ctrl)
+ {
+ addWidgetToRightSide(ctrl, show_widget);
+ }
+}
+
+void LLPanelInventoryListItemBase::addWidgetToRightSide(LLUICtrl* ctrl, bool show_widget/* = true*/)
+{
+ mRightSideWidgets.push_back(ctrl);
+ setShowWidget(ctrl, show_widget);
+}
+
+void LLPanelInventoryListItemBase::setShowWidget(const std::string& name, bool show)
+{
+ LLUICtrl* widget = findChild<LLUICtrl>(name);
+ if(widget)
+ {
+ setShowWidget(widget, show);
+ }
+}
+
+void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show)
+{
+ // Enable state determines whether widget may become visible in setWidgetsVisible()
+ ctrl->setEnabled(show);
+}
-//virtual
-BOOL LLPanelInventoryListItem::postBuild()
+BOOL LLPanelInventoryListItemBase::postBuild()
{
- mIcon = getChild<LLIconCtrl>("item_icon");
- mTitle = getChild<LLTextBox>("item_name");
+ setIconCtrl(getChild<LLIconCtrl>("item_icon"));
+ setTitleCtrl(getChild<LLTextBox>("item_name"));
+
+ mIconImage = get_item_icon(mItem->getType(), mItem->getInventoryType(), mItem->getFlags(), FALSE);
updateItem();
+ setWidgetsVisible(false);
+ reshapeWidgets();
+
return TRUE;
}
-//virtual
-void LLPanelInventoryListItem::setValue(const LLSD& value)
+void LLPanelInventoryListItemBase::setValue(const LLSD& value)
{
if (!value.isMap()) return;
if (!value.has("selected")) return;
childSetVisible("selected_icon", value["selected"]);
}
-void LLPanelInventoryListItem::updateItem()
+void LLPanelInventoryListItemBase::onMouseEnter(S32 x, S32 y, MASK mask)
{
- if (mItemIcon.notNull())
- mIcon->setImage(mItemIcon);
+ childSetVisible("hovered_icon", true);
+ LLPanel::onMouseEnter(x, y, mask);
+}
+void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ childSetVisible("hovered_icon", false);
+ LLPanel::onMouseLeave(x, y, mask);
+}
+
+LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem* item)
+: LLPanel()
+, mItem(item)
+, mIconCtrl(NULL)
+, mTitleCtrl(NULL)
+, mWidgetSpacing(WIDGET_SPACING)
+, mLeftWidgetsWidth(0)
+, mRightWidgetsWidth(0)
+{
+}
+
+void LLPanelInventoryListItemBase::init()
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
+}
+
+class WidgetVisibilityChanger
+{
+public:
+ WidgetVisibilityChanger(bool visible) : mVisible(visible){}
+ void operator()(LLUICtrl* widget)
+ {
+ // Disabled widgets never become visible. see LLPanelInventoryListItemBase::setShowWidget()
+ widget->setVisible(mVisible && widget->getEnabled());
+ }
+private:
+ bool mVisible;
+};
+
+void LLPanelInventoryListItemBase::setWidgetsVisible(bool visible)
+{
+ std::for_each(mLeftSideWidgets.begin(), mLeftSideWidgets.end(), WidgetVisibilityChanger(visible));
+ std::for_each(mRightSideWidgets.begin(), mRightSideWidgets.end(), WidgetVisibilityChanger(visible));
+}
+
+void LLPanelInventoryListItemBase::reshapeWidgets()
+{
+ // disabled reshape left for now to reserve space for 'delete' button in LLPanelClothingListItem
+ /*reshapeLeftWidgets();*/
+ reshapeRightWidgets();
+ reshapeMiddleWidgets();
+}
+
+void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image)
+{
+ if(image)
+ {
+ mIconImage = image;
+ mIconCtrl->setImage(mIconImage);
+ }
+}
+
+void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text)
+{
LLTextUtil::textboxSetHighlightedVal(
- mTitle,
+ mTitleCtrl,
LLStyle::Params(),
- mItemName,
- mHighlightedText);
+ title,
+ highlit_text);
}
-void LLPanelInventoryListItem::onMouseEnter(S32 x, S32 y, MASK mask)
+void LLPanelInventoryListItemBase::reshapeLeftWidgets()
{
- childSetVisible("hovered_icon", true);
+ S32 widget_left = 0;
+ mLeftWidgetsWidth = 0;
- LLPanel::onMouseEnter(x, y, mask);
+ widget_array_t::const_iterator it = mLeftSideWidgets.begin();
+ const widget_array_t::const_iterator it_end = mLeftSideWidgets.end();
+ for( ; it_end != it; ++it)
+ {
+ LLUICtrl* widget = *it;
+ if(!widget->getVisible())
+ {
+ continue;
+ }
+ LLRect widget_rect(widget->getRect());
+ widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight());
+ widget->setShape(widget_rect);
+
+ widget_left += widget_rect.getWidth() + getWidgetSpacing();
+ mLeftWidgetsWidth = widget_rect.mRight;
+ }
}
-void LLPanelInventoryListItem::onMouseLeave(S32 x, S32 y, MASK mask)
+void LLPanelInventoryListItemBase::reshapeRightWidgets()
{
- childSetVisible("hovered_icon", false);
+ S32 widget_right = getLocalRect().getWidth();
+ S32 widget_left = widget_right;
- LLPanel::onMouseLeave(x, y, mask);
+ widget_array_t::const_reverse_iterator it = mRightSideWidgets.rbegin();
+ const widget_array_t::const_reverse_iterator it_end = mRightSideWidgets.rend();
+ for( ; it_end != it; ++it)
+ {
+ LLUICtrl* widget = *it;
+ if(!widget->getVisible())
+ {
+ continue;
+ }
+ LLRect widget_rect(widget->getRect());
+ widget_left = widget_right - widget_rect.getWidth();
+ widget_rect.setLeftTopAndSize(widget_left, widget_rect.mTop, widget_rect.getWidth(), widget_rect.getHeight());
+ widget->setShape(widget_rect);
+
+ widget_right = widget_left - getWidgetSpacing();
+ }
+ mRightWidgetsWidth = getLocalRect().getWidth() - widget_left;
}
-LLPanelInventoryListItem::LLPanelInventoryListItem(const LLViewerInventoryItem* item)
-: LLPanel()
- ,mIcon(NULL)
- ,mTitle(NULL)
+void LLPanelInventoryListItemBase::reshapeMiddleWidgets()
{
- mItemName = item->getName();
- mItemIcon = get_item_icon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
-
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml");
+ LLRect icon_rect(mIconCtrl->getRect());
+ icon_rect.setLeftTopAndSize(mLeftWidgetsWidth + getWidgetSpacing(), icon_rect.mTop,
+ icon_rect.getWidth(), icon_rect.getHeight());
+ mIconCtrl->setShape(icon_rect);
+
+ S32 name_left = icon_rect.mRight + getWidgetSpacing();
+ S32 name_right = getLocalRect().getWidth() - mRightWidgetsWidth - getWidgetSpacing();
+ LLRect name_rect(mTitleCtrl->getRect());
+ name_rect.set(name_left, name_rect.mTop, name_right, name_rect.mBottom);
+ mTitleCtrl->setShape(name_rect);
}
////////////////////////////////////////////////////////////////////////////////
@@ -220,17 +368,18 @@ void LLInventoryItemsList::addNewItem(LLViewerInventoryItem* item)
if (!item)
{
llwarns << "No inventory item. Couldn't create flat list item." << llendl;
- llassert(!"No inventory item. Couldn't create flat list item.");
+ llassert(item != NULL);
}
- LLPanelInventoryListItem *list_item = LLPanelInventoryListItem::createItemPanel(item);
+ LLPanelInventoryListItemBase *list_item = LLPanelInventoryListItemBase::create(item);
if (!list_item)
return;
- if (!addItem(list_item, item->getUUID()))
+ bool is_item_added = addItem(list_item, item->getUUID());
+ if (!is_item_added)
{
llwarns << "Couldn't add flat list item." << llendl;
- llassert(!"Couldn't add flat list item.");
+ llassert(is_item_added);
}
}
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index b496f4b9e9..152aafbd7e 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -47,33 +47,141 @@ class LLIconCtrl;
class LLTextBox;
class LLViewerInventoryItem;
-class LLPanelInventoryListItem : public LLPanel
+/**
+ * @class LLPanelInventoryListItemBase
+ *
+ * Base class for Inventory flat list item. Panel consists of inventory icon
+ * and inventory item name.
+ * This class is able to display widgets(buttons) on left(before icon) and right(after text-box) sides
+ * of panel.
+ *
+ * How to use (see LLPanelClothingListItem for example):
+ * - implement init() to build panel from xml
+ * - create new xml file, fill it with widgets you want to dynamically show/hide/reshape on left/right sides
+ * - redefine postBuild()(call base implementation) and add needed widgets to needed sides,
+ *
+ */
+class LLPanelInventoryListItemBase : public LLPanel
{
public:
- static LLPanelInventoryListItem* createItemPanel(const LLViewerInventoryItem* item);
- virtual ~LLPanelInventoryListItem();
+ static LLPanelInventoryListItemBase* create(LLViewerInventoryItem* item);
+ /**
+ * Called after inventory item was updated, update panel widgets to reflect inventory changes.
+ */
+ virtual void updateItem();
+
+ /**
+ * Add widget to left side
+ */
+ void addWidgetToLeftSide(const std::string& name, bool show_widget = true);
+ void addWidgetToLeftSide(LLUICtrl* ctrl, bool show_widget = true);
+
+ /**
+ * Add widget to right side, widget is supposed to be child of calling panel
+ */
+ void addWidgetToRightSide(const std::string& name, bool show_widget = true);
+ void addWidgetToRightSide(LLUICtrl* ctrl, bool show_widget = true);
+
+ /**
+ * Mark widgets as visible. Only visible widgets take part in reshaping children
+ */
+ void setShowWidget(const std::string& name, bool show);
+ void setShowWidget(LLUICtrl* ctrl, bool show);
+
+ /**
+ * Set spacing between widgets during reshape
+ */
+ void setWidgetSpacing(S32 spacing) { mWidgetSpacing = spacing; }
+
+ S32 getWidgetSpacing() { return mWidgetSpacing; }
+
+ /**
+ * Inheritors need to call base implementation of postBuild()
+ */
/*virtual*/ BOOL postBuild();
+
+ /**
+ * Handles item selection
+ */
/*virtual*/ void setValue(const LLSD& value);
- void updateItem();
+ /* Highlights item */
+ /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
+ /* Removes item highlight */
+ /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
- void onMouseEnter(S32 x, S32 y, MASK mask);
- void onMouseLeave(S32 x, S32 y, MASK mask);
+ virtual ~LLPanelInventoryListItemBase(){}
protected:
- LLPanelInventoryListItem(const LLViewerInventoryItem* item);
+
+ LLPanelInventoryListItemBase(LLViewerInventoryItem* item);
+
+ typedef std::vector<LLUICtrl*> widget_array_t;
+
+ /**
+ * Use it from a factory function to build panel, do not build panel in constructor
+ */
+ virtual void init();
+
+ /** setter for mIconCtrl */
+ void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; }
+ /** setter for MTitleCtrl */
+ void setTitleCtrl(LLTextBox* tb) { mTitleCtrl = tb; }
+
+ void setLeftWidgetsWidth(S32 width) { mLeftWidgetsWidth = width; }
+ void setRightWidgetsWidth(S32 width) { mRightWidgetsWidth = width; }
+
+ /**
+ * Set all widgets from both side visible/invisible. Only enabled widgets
+ * (see setShowWidget()) can become visible
+ */
+ virtual void setWidgetsVisible(bool visible);
+
+ /**
+ * Reshape all child widgets - icon, text-box and side widgets
+ */
+ virtual void reshapeWidgets();
+
+ /** set wearable type icon image */
+ void setIconImage(const LLUIImagePtr& image);
+
+ /** Set item title - inventory item name usually */
+ void setTitle(const std::string& title, const std::string& highlit_text);
private:
- LLIconCtrl* mIcon;
- LLTextBox* mTitle;
- LLUIImagePtr mItemIcon;
- std::string mItemName;
+ /** reshape left side widgets
+ * Deprecated for now. Disabled reshape left for now to reserve space for 'delete'
+ * button in LLPanelClothingListItem according to Neal's comment (https://codereview.productengine.com/secondlife/r/325/)
+ */
+ void reshapeLeftWidgets();
+
+ /** reshape right side widgets */
+ void reshapeRightWidgets();
+
+ /** reshape remaining widgets */
+ void reshapeMiddleWidgets();
+
+ LLViewerInventoryItem* mItem;
+
+ LLIconCtrl* mIconCtrl;
+ LLTextBox* mTitleCtrl;
+
+ LLUIImagePtr mIconImage;
std::string mHighlightedText;
+
+ widget_array_t mLeftSideWidgets;
+ widget_array_t mRightSideWidgets;
+ S32 mWidgetSpacing;
+
+ S32 mLeftWidgetsWidth;
+ S32 mRightWidgetsWidth;
};
+//////////////////////////////////////////////////////////////////////////
+
class LLInventoryItemsList : public LLFlatListView
{
public:
@@ -117,7 +225,7 @@ protected:
/**
* Add an item to the list
*/
- void addNewItem(LLViewerInventoryItem* item);
+ virtual void addNewItem(LLViewerInventoryItem* item);
private:
uuid_vec_t mIDs; // IDs of items that were added in refreshList().
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 214b5d317a..86147d65e6 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -215,7 +215,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask)
void fetch_items_from_llsd(const LLSD& items_llsd)
{
- if (!items_llsd.size()) return;
+ if (!items_llsd.size() || gDisconnected) return;
LLSD body;
body[0]["cap_name"] = "FetchInventory";
body[1]["cap_name"] = "FetchLib";
@@ -235,6 +235,11 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
for (S32 i=0; i<body.size(); i++)
{
+ if(!gAgent.getRegion())
+ {
+ llwarns<<"Agent's region is null"<<llendl;
+ break;
+ }
if (0 >= body[i].size()) continue;
std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString());
@@ -664,36 +669,87 @@ void LLInventoryCategoriesObserver::changed(U32 mask)
if (!category)
continue;
- S32 version = category->getVersion();
- if (version != (*iter).second.mVersion)
+ const S32 version = category->getVersion();
+ const S32 expected_num_descendents = category->getDescendentCount();
+ if ((version == LLViewerInventoryCategory::VERSION_UNKNOWN) ||
+ (expected_num_descendents == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN))
{
- // Update category version in map.
- (*iter).second.mVersion = version;
- (*iter).second.mCallback();
+ continue;
+ }
+
+ // Check number of known descendents to find out whether it has changed.
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf((*iter).first, cats, items);
+ if (!cats || !items)
+ {
+ llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl;
+ // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
+ // that the cat just doesn't have any items or subfolders).
+ // Unrecoverable, so just skip this category.
+
+ llassert(cats != NULL && items != NULL);
+ }
+ const S32 current_num_known_descendents = cats->count() + items->count();
+
+ LLCategoryData cat_data = (*iter).second;
+
+ // If category version or descendents count has changed
+ // update category data in mCategoryMap and fire a callback.
+ if (version != cat_data.mVersion || current_num_known_descendents != cat_data.mDescendentsCount)
+ {
+ cat_data.mVersion = version;
+ cat_data.mDescendentsCount = current_num_known_descendents;
+
+ cat_data.mCallback();
}
}
}
-void LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb)
+bool LLInventoryCategoriesObserver::addCategory(const LLUUID& cat_id, callback_t cb)
{
S32 version;
+ S32 current_num_known_descendents;
+ bool can_be_added = true;
+
LLViewerInventoryCategory* category = gInventory.getCategory(cat_id);
if (category)
{
// Inventory category version is used to find out if some changes
// to a category have been made.
version = category->getVersion();
+
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(cat_id, cats, items);
+ if (!cats || !items)
+ {
+ llwarns << "Category '" << category->getName() << "' descendents corrupted, fetch failed." << llendl;
+ // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
+ // that the cat just doesn't have any items or subfolders).
+ // Unrecoverable, so just return "false" meaning that the category can't be observed.
+ can_be_added = false;
+
+ llassert(cats != NULL && items != NULL);
+ }
+ current_num_known_descendents = cats->count() + items->count();
}
else
{
// If category could not be retrieved it might mean that
// inventory is unusable at the moment so the category is
- // stored with VERSION_UNKNOWN and it may be updated later.
+ // stored with VERSION_UNKNOWN and DESCENDENT_COUNT_UNKNOWN,
+ // it may be updated later.
version = LLViewerInventoryCategory::VERSION_UNKNOWN;
+ current_num_known_descendents = LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN;
+ }
+
+ if (can_be_added)
+ {
+ mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version, current_num_known_descendents)));
}
- version = category->getVersion();
- mCategoryMap.insert(category_map_value_t(cat_id, LLCategoryData(cb, version)));
+ return can_be_added;
}
void LLInventoryCategoriesObserver::removeCategory(const LLUUID& cat_id)
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index e63b67d2ad..036e6ca40d 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -276,19 +276,28 @@ public:
LLInventoryCategoriesObserver() {};
virtual void changed(U32 mask);
- void addCategory(const LLUUID& cat_id, callback_t cb);
+ /**
+ * Add cat_id to the list of observed categories with a
+ * callback fired on category being changed.
+ *
+ * @return "true" if category was added, "false" if it could
+ * not be found.
+ */
+ bool addCategory(const LLUUID& cat_id, callback_t cb);
void removeCategory(const LLUUID& cat_id);
protected:
struct LLCategoryData
{
- LLCategoryData(callback_t cb, S32 version)
+ LLCategoryData(callback_t cb, S32 version, S32 num_descendents)
: mCallback(cb)
, mVersion(version)
+ , mDescendentsCount(num_descendents)
{}
callback_t mCallback;
S32 mVersion;
+ S32 mDescendentsCount;
};
typedef std::map<LLUUID, LLCategoryData> category_map_t;
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 1215272685..b103ec45d0 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -41,6 +41,7 @@
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
+#include "llappearancemgr.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llwearableitemslist.h"
@@ -51,6 +52,7 @@ LLOutfitsList::LLOutfitsList()
: LLPanel()
, mAccordion(NULL)
, mListCommands(NULL)
+ , mSelectedList(NULL)
{
mCategoriesObserver = new LLInventoryCategoriesObserver();
gInventory.addObserver(mCategoriesObserver);
@@ -135,30 +137,37 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
{
const LLUUID cat_id = (*iter);
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
- if (!cat)
- continue;
+ if (!cat) continue;
std::string name = cat->getName();
static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode();
-
- accordionXmlNode->setAttributeString("name", name);
- accordionXmlNode->setAttributeString("title", name);
LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL);
+ tab->setName(name);
+ tab->setTitle(name);
+
// *TODO: LLUICtrlFactory::defaultBuilder does not use "display_children" from xml. Should be investigated.
tab->setDisplayChildren(false);
mAccordion->addCollapsibleCtrl(tab);
+ // Start observing the new outfit category.
+ LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list");
+ if (!mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id)))
+ {
+ // Remove accordion tab if category could not be added to observer.
+ mAccordion->removeCollapsibleCtrl(tab);
+ continue;
+ }
+
// Map the new tab with outfit category UUID.
mOutfitsMap.insert(LLOutfitsList::outfits_map_value_t(cat_id, tab));
- // Start observing the new outfit category.
- LLWearableItemsList* list = tab->getChild<LLWearableItemsList>("wearable_items_list");
- mCategoriesObserver->addCategory(cat_id, boost::bind(&LLWearableItemsList::updateList, list, cat_id));
+ // Setting tab focus callback to monitor currently selected outfit.
+ tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id));
- // Setting drop down callback to monitor currently selected outfit.
- tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::onTabExpandedCollapsed, this, list));
+ // Setting list commit callback to monitor currently selected wearable item.
+ list->setCommitCallback(boost::bind(&LLOutfitsList::onSelectionChange, this, _1));
// Fetch the new outfit contents.
cat->fetch();
@@ -178,10 +187,18 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// 1. Remove outfit accordion tab from accordion.
mAccordion->removeCollapsibleCtrl(outfits_iter->second);
+ const LLUUID& outfit_id = outfits_iter->first;
+
// 2. Remove outfit category from observer to stop monitoring its changes.
- mCategoriesObserver->removeCategory(outfits_iter->first);
+ mCategoriesObserver->removeCategory(outfit_id);
- // 3. Remove category UUID to accordion tab mapping.
+ // 3. Reset selection if selected outfit is being removed.
+ if (mSelectedOutfitUUID == outfit_id)
+ {
+ changeOutfitSelection(NULL, LLUUID());
+ }
+
+ // 4. Remove category UUID to accordion tab mapping.
mOutfitsMap.erase(outfits_iter);
}
}
@@ -199,40 +216,30 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
mAccordion->arrange();
}
-void LLOutfitsList::updateOutfitTab(const LLUUID& category_id)
+void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl)
{
- outfits_map_t::iterator outfits_iter = mOutfitsMap.find(category_id);
- if (outfits_iter != mOutfitsMap.end())
- {
- LLViewerInventoryCategory *cat = gInventory.getCategory(category_id);
- if (!cat)
- return;
+ LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl);
+ if (!list) return;
- std::string name = cat->getName();
+ LLViewerInventoryItem *item = gInventory.getItem(list->getSelectedUUID());
+ if (!item) return;
- // Update tab name with the new category name.
- LLAccordionCtrlTab* tab = outfits_iter->second;
- if (tab)
- {
- tab->setName(name);
- }
-
- // Update tab title with the new category name using textbox
- // in accordion tab header.
- LLTextBox* tab_title = tab->findChild<LLTextBox>("dd_textbox");
- if (tab_title)
- {
- tab_title->setText(name);
- }
- }
+ changeOutfitSelection(list, item->getParentUUID());
}
-void LLOutfitsList::onTabExpandedCollapsed(LLWearableItemsList* list)
+void LLOutfitsList::performAction(std::string action)
{
- if (!list)
- return;
+ LLViewerInventoryCategory* cat = gInventory.getCategory(mSelectedOutfitUUID);
+ if (!cat) return;
- // TODO: Add outfit selection handling.
+ if ("replaceoutfit" == action)
+ {
+ LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE );
+ }
+ else if ("addtooutfit" == action)
+ {
+ LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, TRUE );
+ }
}
void LLOutfitsList::setFilterSubString(const std::string& string)
@@ -240,7 +247,6 @@ void LLOutfitsList::setFilterSubString(const std::string& string)
mFilterSubString = string;
}
-
//////////////////////////////////////////////////////////////////////////
// Private methods
//////////////////////////////////////////////////////////////////////////
@@ -283,4 +289,37 @@ void LLOutfitsList::computeDifference(
LLCommonUtils::computeDifference(vnew, vcur, vadded, vremoved);
}
+void LLOutfitsList::updateOutfitTab(const LLUUID& category_id)
+{
+ outfits_map_t::iterator outfits_iter = mOutfitsMap.find(category_id);
+ if (outfits_iter != mOutfitsMap.end())
+ {
+ LLViewerInventoryCategory *cat = gInventory.getCategory(category_id);
+ if (!cat) return;
+
+ std::string name = cat->getName();
+
+ // Update tab name with the new category name.
+ LLAccordionCtrlTab* tab = outfits_iter->second;
+ if (tab)
+ {
+ tab->setName(name);
+ tab->setTitle(name);
+ }
+ }
+}
+
+void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id)
+{
+ // Reset selection in previously selected tab
+ // if a new one is selected.
+ if (list && mSelectedList && mSelectedList != list)
+ {
+ mSelectedList->resetSelection();
+ }
+
+ mSelectedList = list;
+ mSelectedOutfitUUID = category_id;
+}
+
// EOF
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 2d103ea356..d86cf5a703 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -65,10 +65,9 @@ public:
void refreshList(const LLUUID& category_id);
- // Update tab displaying outfit identified by category_id.
- void updateOutfitTab(const LLUUID& category_id);
+ void onSelectionChange(LLUICtrl* ctrl);
- void onTabExpandedCollapsed(LLWearableItemsList* list);
+ void performAction(std::string action);
void setFilterSubString(const std::string& string);
@@ -85,12 +84,24 @@ private:
*/
void computeDifference(const LLInventoryModel::cat_array_t& vcats, uuid_vec_t& vadded, uuid_vec_t& vremoved);
+ /**
+ * Updates tab displaying outfit identified by category_id.
+ */
+ void updateOutfitTab(const LLUUID& category_id);
+
+ /**
+ * Resets previous selection and stores newly selected list and outfit id.
+ */
+ void changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id);
LLInventoryCategoriesObserver* mCategoriesObserver;
LLAccordionCtrl* mAccordion;
LLPanel* mListCommands;
+ LLWearableItemsList* mSelectedList;
+ LLUUID mSelectedOutfitUUID;
+
std::string mFilterSubString;
typedef std::map<LLUUID, LLAccordionCtrlTab*> outfits_map_t;
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index da74295f9e..3c112b8b5e 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -51,6 +51,12 @@
#include "llagentwearables.h"
#include "llscrollingpanelparam.h"
+#include "llcolorswatch.h"
+#include "lltexturectrl.h"
+#include "lltextureentry.h"
+#include "llviewercontrol.h" // gSavedSettings
+#include "llviewertexturelist.h"
+
// register panel with appropriate XML
static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable");
@@ -88,6 +94,8 @@ enum ESubpart {
SUBPART_TATTOO
};
+using namespace LLVOAvatarDefines;
+
typedef std::vector<ESubpart> subpart_vec_t;
// Locally defined classes
@@ -110,14 +118,17 @@ public:
WearableEntry(EWearableType type,
const std::string &title,
const std::string &desc_title,
- U8 num_subparts, ... ); // number of subparts followed by a list of ESubparts
+ U8 num_color_swatches, // number of 'color_swatches'
+ U8 num_texture_pickers, // number of 'texture_pickers'
+ U8 num_subparts, ... ); // number of subparts followed by a list of ETextureIndex and ESubparts
const EWearableType mWearableType;
const std::string mTitle;
const std::string mDescTitle;
subpart_vec_t mSubparts;
-
+ texture_vec_t mColorSwatchCtrls;
+ texture_vec_t mTextureCtrls;
};
struct Wearables : public LLDictionary<EWearableType, WearableEntry>
@@ -158,6 +169,35 @@ public:
} mSubparts;
const SubpartEntry* getSubpart(ESubpart subpart) const { return mSubparts.lookup(subpart); }
+
+ //--------------------------------------------------------------------
+ // Picker Control Entries
+ //--------------------------------------------------------------------
+public:
+ struct PickerControlEntry : public LLDictionaryEntry
+ {
+ PickerControlEntry(ETextureIndex tex_index,
+ const std::string name,
+ const LLUUID default_image_id = LLUUID::null,
+ const bool allow_no_texture = false);
+ ETextureIndex mTextureIndex;
+ const std::string mControlName;
+ const LLUUID mDefaultImageId;
+ const bool mAllowNoTexture;
+ };
+
+ struct ColorSwatchCtrls : public LLDictionary<ETextureIndex, PickerControlEntry>
+ {
+ ColorSwatchCtrls();
+ } mColorSwatchCtrls;
+
+ struct TextureCtrls : public LLDictionary<ETextureIndex, PickerControlEntry>
+ {
+ TextureCtrls();
+ } mTextureCtrls;
+
+ const PickerControlEntry* getTexturePicker(ETextureIndex index) const { return mTextureCtrls.lookup(index); }
+ const PickerControlEntry* getColorSwatch(ETextureIndex index) const { return mColorSwatchCtrls.lookup(index); }
};
LLEditWearableDictionary::LLEditWearableDictionary()
@@ -172,26 +212,28 @@ LLEditWearableDictionary::~LLEditWearableDictionary()
LLEditWearableDictionary::Wearables::Wearables()
{
- addEntry(WT_SHAPE, new WearableEntry(WT_SHAPE,"edit_shape_title","shape_desc_text",9, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE));
- addEntry(WT_SKIN, new WearableEntry(WT_SKIN,"edit_skin_title","skin_desc_text",4, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL));
- addEntry(WT_HAIR, new WearableEntry(WT_HAIR,"edit_hair_title","hair_desc_text",4, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL));
- addEntry(WT_EYES, new WearableEntry(WT_EYES,"edit_eyes_title","eyes_desc_text",1, SUBPART_EYES));
- addEntry(WT_SHIRT, new WearableEntry(WT_SHIRT,"edit_shirt_title","shirt_desc_text",1, SUBPART_SHIRT));
- addEntry(WT_PANTS, new WearableEntry(WT_PANTS,"edit_pants_title","pants_desc_text",1, SUBPART_PANTS));
- addEntry(WT_SHOES, new WearableEntry(WT_SHOES,"edit_shoes_title","shoes_desc_text",1, SUBPART_SHOES));
- addEntry(WT_SOCKS, new WearableEntry(WT_SOCKS,"edit_socks_title","socks_desc_text",1, SUBPART_SOCKS));
- addEntry(WT_JACKET, new WearableEntry(WT_JACKET,"edit_jacket_title","jacket_desc_text",1, SUBPART_JACKET));
- addEntry(WT_GLOVES, new WearableEntry(WT_GLOVES,"edit_gloves_title","gloves_desc_text",1, SUBPART_GLOVES));
- addEntry(WT_UNDERSHIRT, new WearableEntry(WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1, SUBPART_UNDERSHIRT));
- addEntry(WT_UNDERPANTS, new WearableEntry(WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1, SUBPART_UNDERPANTS));
- addEntry(WT_SKIRT, new WearableEntry(WT_SKIRT,"edit_skirt_title","skirt_desc_text",1, SUBPART_SKIRT));
- addEntry(WT_ALPHA, new WearableEntry(WT_ALPHA,"edit_alpha_title","alpha_desc_text",1, SUBPART_ALPHA));
- addEntry(WT_TATTOO, new WearableEntry(WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",1, SUBPART_TATTOO));
+ addEntry(WT_SHAPE, new WearableEntry(WT_SHAPE,"edit_shape_title","shape_desc_text",0,0,9, SUBPART_SHAPE_HEAD, SUBPART_SHAPE_EYES, SUBPART_SHAPE_EARS, SUBPART_SHAPE_NOSE, SUBPART_SHAPE_MOUTH, SUBPART_SHAPE_CHIN, SUBPART_SHAPE_TORSO, SUBPART_SHAPE_LEGS, SUBPART_SHAPE_WHOLE));
+ addEntry(WT_SKIN, new WearableEntry(WT_SKIN,"edit_skin_title","skin_desc_text",0,3,4, TEX_HEAD_BODYPAINT, TEX_UPPER_BODYPAINT, TEX_LOWER_BODYPAINT, SUBPART_SKIN_COLOR, SUBPART_SKIN_FACEDETAIL, SUBPART_SKIN_MAKEUP, SUBPART_SKIN_BODYDETAIL));
+ addEntry(WT_HAIR, new WearableEntry(WT_HAIR,"edit_hair_title","hair_desc_text",0,1,4, TEX_HAIR, SUBPART_HAIR_COLOR, SUBPART_HAIR_STYLE, SUBPART_HAIR_EYEBROWS, SUBPART_HAIR_FACIAL));
+ addEntry(WT_EYES, new WearableEntry(WT_EYES,"edit_eyes_title","eyes_desc_text",0,1,1, TEX_EYES_IRIS, SUBPART_EYES));
+ addEntry(WT_SHIRT, new WearableEntry(WT_SHIRT,"edit_shirt_title","shirt_desc_text",1,1,1, TEX_UPPER_SHIRT, TEX_UPPER_SHIRT, SUBPART_SHIRT));
+ addEntry(WT_PANTS, new WearableEntry(WT_PANTS,"edit_pants_title","pants_desc_text",1,1,1, TEX_LOWER_PANTS, TEX_LOWER_PANTS, SUBPART_PANTS));
+ addEntry(WT_SHOES, new WearableEntry(WT_SHOES,"edit_shoes_title","shoes_desc_text",1,1,1, TEX_LOWER_SHOES, TEX_LOWER_SHOES, SUBPART_SHOES));
+ addEntry(WT_SOCKS, new WearableEntry(WT_SOCKS,"edit_socks_title","socks_desc_text",1,1,1, TEX_LOWER_SOCKS, TEX_LOWER_SOCKS, SUBPART_SOCKS));
+ addEntry(WT_JACKET, new WearableEntry(WT_JACKET,"edit_jacket_title","jacket_desc_text",1,2,1, TEX_UPPER_JACKET, TEX_UPPER_JACKET, TEX_LOWER_JACKET, SUBPART_JACKET));
+ addEntry(WT_GLOVES, new WearableEntry(WT_GLOVES,"edit_gloves_title","gloves_desc_text",1,1,1, TEX_UPPER_GLOVES, TEX_UPPER_GLOVES, SUBPART_GLOVES));
+ addEntry(WT_UNDERSHIRT, new WearableEntry(WT_UNDERSHIRT,"edit_undershirt_title","undershirt_desc_text",1,1,1, TEX_UPPER_UNDERSHIRT, TEX_UPPER_UNDERSHIRT, SUBPART_UNDERSHIRT));
+ addEntry(WT_UNDERPANTS, new WearableEntry(WT_UNDERPANTS,"edit_underpants_title","underpants_desc_text",1,1,1, TEX_LOWER_UNDERPANTS, TEX_LOWER_UNDERPANTS, SUBPART_UNDERPANTS));
+ addEntry(WT_SKIRT, new WearableEntry(WT_SKIRT,"edit_skirt_title","skirt_desc_text",1,1,1, TEX_SKIRT, TEX_SKIRT, SUBPART_SKIRT));
+ addEntry(WT_ALPHA, new WearableEntry(WT_ALPHA,"edit_alpha_title","alpha_desc_text",0,5,1, TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA, SUBPART_ALPHA));
+ addEntry(WT_TATTOO, new WearableEntry(WT_TATTOO,"edit_tattoo_title","tattoo_desc_text",0,3,1, TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO, SUBPART_TATTOO));
}
LLEditWearableDictionary::WearableEntry::WearableEntry(EWearableType type,
const std::string &title,
const std::string &desc_title,
+ U8 num_color_swatches,
+ U8 num_texture_pickers,
U8 num_subparts, ... ) :
LLDictionaryEntry(title),
mWearableType(type),
@@ -201,6 +243,18 @@ LLEditWearableDictionary::WearableEntry::WearableEntry(EWearableType type,
va_list argp;
va_start(argp, num_subparts);
+ for (U8 i = 0; i < num_color_swatches; ++i)
+ {
+ ETextureIndex index = (ETextureIndex)va_arg(argp,int);
+ mColorSwatchCtrls.push_back(index);
+ }
+
+ for (U8 i = 0; i < num_texture_pickers; ++i)
+ {
+ ETextureIndex index = (ETextureIndex)va_arg(argp,int);
+ mTextureCtrls.push_back(index);
+ }
+
for (U8 i = 0; i < num_subparts; ++i)
{
ESubpart part = (ESubpart)va_arg(argp,int);
@@ -265,6 +319,268 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part,
{
}
+LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls()
+{
+ addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Color/Tint" ));
+ addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Color/Tint" ));
+ addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Color/Tint" ));
+ addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Color/Tint" ));
+ addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Color/Tint" ));
+ addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Color/Tint" ));
+ addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Color/Tint" ));
+ addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" ));
+ addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" ));
+}
+
+LLEditWearableDictionary::TextureCtrls::TextureCtrls()
+{
+ addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head Tattoos", LLUUID::null, TRUE ));
+ addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Tattoos", LLUUID::null, TRUE ));
+ addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Tattoos", LLUUID::null, TRUE ));
+ addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE ));
+ addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE ));
+ addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE ));
+ addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), FALSE ));
+ addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), FALSE ));
+ addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), FALSE ));
+ addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE ));
+ addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE ));
+ addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), FALSE ));
+ addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), FALSE ));
+ addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE ));
+ addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE ));
+ addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
+ addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
+ addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
+ addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
+ addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE ));
+ addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE ));
+ addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE ));
+ addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE ));
+}
+
+LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index,
+ const std::string name,
+ const LLUUID default_image_id,
+ const bool allow_no_texture) :
+ LLDictionaryEntry(name),
+ mTextureIndex(tex_index),
+ mControlName(name),
+ mDefaultImageId(default_image_id),
+ mAllowNoTexture(allow_no_texture)
+{
+}
+
+// Helper functions.
+static const texture_vec_t null_texture_vec;
+
+// Specializations of this template function return a vector of texture indexes of particular control type
+// (i.e. LLColorSwatchCtrl or LLTextureCtrl) which are contained in given WearableEntry.
+template <typename T>
+const texture_vec_t&
+get_pickers_indexes(const LLEditWearableDictionary::WearableEntry *wearable_entry) { return null_texture_vec; }
+
+// Specializations of this template function return picker control entry for particular control type.
+template <typename T>
+const LLEditWearableDictionary::PickerControlEntry*
+get_picker_entry (const ETextureIndex index) { return NULL; }
+
+typedef boost::function<void(LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry*)> function_t;
+
+typedef struct PickerControlEntryNamePredicate
+{
+ PickerControlEntryNamePredicate(const std::string name) : mName (name) {};
+ bool operator()(const LLEditWearableDictionary::PickerControlEntry* entry) const
+ {
+ return (entry && entry->mName == mName);
+ }
+private:
+ const std::string mName;
+} PickerControlEntryNamePredicate;
+
+// A full specialization of get_pickers_indexes for LLColorSwatchCtrl
+template <>
+const texture_vec_t&
+get_pickers_indexes<LLColorSwatchCtrl> (const LLEditWearableDictionary::WearableEntry *wearable_entry)
+{
+ if (!wearable_entry)
+ {
+ llwarns << "could not get LLColorSwatchCtrl indexes for null wearable entry." << llendl;
+ return null_texture_vec;
+ }
+ return wearable_entry->mColorSwatchCtrls;
+}
+
+// A full specialization of get_pickers_indexes for LLTextureCtrl
+template <>
+const texture_vec_t&
+get_pickers_indexes<LLTextureCtrl> (const LLEditWearableDictionary::WearableEntry *wearable_entry)
+{
+ if (!wearable_entry)
+ {
+ llwarns << "could not get LLTextureCtrl indexes for null wearable entry." << llendl;
+ return null_texture_vec;
+ }
+ return wearable_entry->mTextureCtrls;
+}
+
+// A full specialization of get_picker_entry for LLColorSwatchCtrl
+template <>
+const LLEditWearableDictionary::PickerControlEntry*
+get_picker_entry<LLColorSwatchCtrl> (const ETextureIndex index)
+{
+ return LLEditWearableDictionary::getInstance()->getColorSwatch(index);
+}
+
+// A full specialization of get_picker_entry for LLTextureCtrl
+template <>
+const LLEditWearableDictionary::PickerControlEntry*
+get_picker_entry<LLTextureCtrl> (const ETextureIndex index)
+{
+ return LLEditWearableDictionary::getInstance()->getTexturePicker(index);
+}
+
+template <typename CtrlType, class Predicate>
+const LLEditWearableDictionary::PickerControlEntry*
+find_picker_ctrl_entry_if(EWearableType type, const Predicate pred)
+{
+ const LLEditWearableDictionary::WearableEntry *wearable_entry
+ = LLEditWearableDictionary::getInstance()->getWearable(type);
+ if (!wearable_entry)
+ {
+ llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl;
+ return NULL;
+ }
+ const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry);
+ for (texture_vec_t::const_iterator
+ iter = indexes.begin(),
+ iter_end = indexes.end();
+ iter != iter_end; ++iter)
+ {
+ const ETextureIndex te = *iter;
+ const LLEditWearableDictionary::PickerControlEntry* entry
+ = get_picker_entry<CtrlType>(te);
+ if (!entry)
+ {
+ llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl;
+ continue;
+ }
+ if (pred(entry))
+ {
+ return entry;
+ }
+ }
+ return NULL;
+}
+
+template <typename CtrlType>
+void
+for_each_picker_ctrl_entry(LLPanel* panel, EWearableType type, function_t fun)
+{
+ if (!panel)
+ {
+ llwarns << "the panel wasn't passed for wearable of type: " << type << llendl;
+ return;
+ }
+ const LLEditWearableDictionary::WearableEntry *wearable_entry
+ = LLEditWearableDictionary::getInstance()->getWearable(type);
+ if (!wearable_entry)
+ {
+ llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl;
+ return;
+ }
+ const texture_vec_t& indexes = get_pickers_indexes<CtrlType>(wearable_entry);
+ for (texture_vec_t::const_iterator
+ iter = indexes.begin(),
+ iter_end = indexes.end();
+ iter != iter_end; ++iter)
+ {
+ const ETextureIndex te = *iter;
+ const LLEditWearableDictionary::PickerControlEntry* entry
+ = get_picker_entry<CtrlType>(te);
+ if (!entry)
+ {
+ llwarns << "could not get picker dictionary entry (" << te << ") for wearable of type: " << type << llendl;
+ continue;
+ }
+ fun (panel, entry);
+ }
+}
+
+// The helper functions for pickers management
+static void init_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry)
+{
+ LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName);
+ if (color_swatch_ctrl)
+ {
+ color_swatch_ctrl->setOriginal(self->getWearable()->getClothesColor(entry->mTextureIndex));
+ }
+}
+
+static void init_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry)
+{
+ LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName);
+ if (texture_ctrl)
+ {
+ texture_ctrl->setDefaultImageAssetID(entry->mDefaultImageId);
+ texture_ctrl->setAllowNoTexture(entry->mAllowNoTexture);
+ // Don't allow (no copy) or (notransfer) textures to be selected.
+ texture_ctrl->setImmediateFilterPermMask(PERM_NONE);
+ texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE);
+ }
+}
+
+static void update_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry)
+{
+ LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName);
+ if (color_swatch_ctrl)
+ {
+ color_swatch_ctrl->set(self->getWearable()->getClothesColor(entry->mTextureIndex));
+ }
+}
+
+static void update_texture_ctrl(LLPanelEditWearable* self, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry)
+{
+ LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName);
+ if (texture_ctrl)
+ {
+ LLUUID new_id;
+ LLLocalTextureObject *lto = self->getWearable()->getLocalTextureObject(entry->mTextureIndex);
+ if( lto && (lto->getID() != IMG_DEFAULT_AVATAR) )
+ {
+ new_id = lto->getID();
+ }
+ else
+ {
+ new_id = LLUUID::null;
+ }
+ LLUUID old_id = texture_ctrl->getImageAssetID();
+ if (old_id != new_id)
+ {
+ // texture has changed, close the floater to avoid DEV-22461
+ texture_ctrl->closeDependentFloater();
+ }
+ texture_ctrl->setImageAssetID(new_id);
+ }
+}
+
+static void set_enabled_color_swatch_ctrl(bool enabled, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry)
+{
+ LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName);
+ if (color_swatch_ctrl)
+ {
+ color_swatch_ctrl->setEnabled(enabled);
+ }
+}
+
+static void set_enabled_texture_ctrl(bool enabled, LLPanel* panel, const LLEditWearableDictionary::PickerControlEntry* entry)
+{
+ LLTextureCtrl* texture_ctrl = panel->getChild<LLTextureCtrl>(entry->mControlName);
+ if (texture_ctrl)
+ {
+ texture_ctrl->setEnabled(enabled);
+ }
+}
// LLPanelEditWearable
@@ -273,6 +589,8 @@ LLPanelEditWearable::LLPanelEditWearable()
, mWearablePtr(NULL)
, mWearableItem(NULL)
{
+ mCommitCallbackRegistrar.add("ColorSwatch.Commit", boost::bind(&LLPanelEditWearable::onColorSwatchCommit, this, _1));
+ mCommitCallbackRegistrar.add("TexturePicker.Commit", boost::bind(&LLPanelEditWearable::onTexturePickerCommit, this, _1));
}
//virtual
@@ -341,6 +659,10 @@ BOOL LLPanelEditWearable::isDirty() const
void LLPanelEditWearable::draw()
{
updateVerbs();
+ if (getWearable())
+ {
+ updatePanelPickerControls(getWearable()->getType());
+ }
LLPanel::draw();
}
@@ -361,6 +683,102 @@ void LLPanelEditWearable::onRevertButtonClicked(void* userdata)
panel->revertChanges();
}
+void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl)
+{
+ const LLTextureCtrl* texture_ctrl = dynamic_cast<const LLTextureCtrl*>(ctrl);
+ if (!texture_ctrl)
+ {
+ llwarns << "got commit signal from not LLTextureCtrl." << llendl;
+ return;
+ }
+
+ if (getWearable())
+ {
+ EWearableType type = getWearable()->getType();
+ const PickerControlEntryNamePredicate name_pred(texture_ctrl->getName());
+ const LLEditWearableDictionary::PickerControlEntry* entry
+ = find_picker_ctrl_entry_if<LLTextureCtrl, PickerControlEntryNamePredicate>(type, name_pred);
+ if (entry)
+ {
+ // Set the new version
+ LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(texture_ctrl->getImageAssetID());
+ if( image->getID().isNull() )
+ {
+ image = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR);
+ }
+ if (getWearable())
+ {
+ U32 index = gAgentWearables.getWearableIndex(getWearable());
+ gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index);
+ LLVisualParamHint::requestHintUpdates();
+ gAgentAvatarp->wearableUpdated(type, FALSE);
+ }
+ }
+ else
+ {
+ llwarns << "could not get texture picker dictionary entry for wearable of type: " << type << llendl;
+ }
+ }
+}
+
+void LLPanelEditWearable::onColorSwatchCommit(const LLUICtrl* ctrl)
+{
+ if (getWearable())
+ {
+ EWearableType type = getWearable()->getType();
+ const PickerControlEntryNamePredicate name_pred(ctrl->getName());
+ const LLEditWearableDictionary::PickerControlEntry* entry
+ = find_picker_ctrl_entry_if<LLColorSwatchCtrl, PickerControlEntryNamePredicate>(type, name_pred);
+ if (entry)
+ {
+ const LLColor4& old_color = getWearable()->getClothesColor(entry->mTextureIndex);
+ const LLColor4& new_color = LLColor4(ctrl->getValue());
+ if( old_color != new_color )
+ {
+ getWearable()->setClothesColor(entry->mTextureIndex, new_color, TRUE);
+ LLVisualParamHint::requestHintUpdates();
+ gAgentAvatarp->wearableUpdated(getWearable()->getType(), FALSE);
+ }
+ }
+ else
+ {
+ llwarns << "could not get color swatch dictionary entry for wearable of type: " << type << llendl;
+ }
+ }
+}
+
+void LLPanelEditWearable::updatePanelPickerControls(EWearableType type)
+{
+ LLPanel* panel = getPanel(type);
+ if (!panel)
+ return;
+
+ bool is_modifiable = false;
+ bool is_complete = false;
+ bool is_copyable = false;
+
+ if(mWearableItem)
+ {
+ const LLPermissions& perm = mWearableItem->getPermissions();
+ is_modifiable = perm.allowModifyBy(gAgent.getID(), gAgent.getGroupID());
+ is_copyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID());
+ is_complete = mWearableItem->isFinished();
+ }
+
+ if (is_modifiable && is_complete)
+ {
+ // Update picker controls
+ for_each_picker_ctrl_entry <LLColorSwatchCtrl> (panel, type, boost::bind(update_color_swatch_ctrl, this, _1, _2));
+ for_each_picker_ctrl_entry <LLTextureCtrl> (panel, type, boost::bind(update_texture_ctrl, this, _1, _2));
+ }
+
+ if (!is_modifiable || !is_complete || !is_copyable)
+ {
+ // Disable controls
+ for_each_picker_ctrl_entry <LLColorSwatchCtrl> (panel, type, boost::bind(set_enabled_color_swatch_ctrl, false, _1, _2));
+ for_each_picker_ctrl_entry <LLTextureCtrl> (panel, type, boost::bind(set_enabled_texture_ctrl, false, _1, _2));
+ }
+}
void LLPanelEditWearable::saveChanges()
{
@@ -428,6 +846,9 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show)
mDescTitle->setText(description_title);
}
+ // Update picker controls state
+ for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2));
+ for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2));
}
void LLPanelEditWearable::initializePanel()
@@ -493,6 +914,11 @@ void LLPanelEditWearable::initializePanel()
updateScrollingPanelUI();
}
+
+ // initialize texture and color picker controls
+ for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2));
+ for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2));
+
updateVerbs();
}
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index 8b63685177..76b0ddb3cc 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -77,6 +77,10 @@ private:
// update bottom bar buttons ("Save", "Revert", etc)
void updateVerbs();
+ void onColorSwatchCommit(const LLUICtrl*);
+ void onTexturePickerCommit(const LLUICtrl*);
+ void updatePanelPickerControls(EWearableType type);
+
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
LLWearable *mWearablePtr;
LLViewerInventoryItem* mWearableItem;
@@ -112,7 +116,6 @@ private:
LLPanel *mPanelSkirt;
LLPanel *mPanelAlpha;
LLPanel *mPanelTattoo;
-
};
#endif
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 67d40a39b1..0a978d1b26 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -583,6 +583,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list
if (!inventory_list->getFilter())
return;
+ inventory_list->getFilter()->setEmptyLookupMessage("PlacesNoMatchingItems");
inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK);
inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2));
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 789e85b46f..80964938f5 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -188,19 +188,37 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
void LLPanelOutfitsInventory::onWearButtonClick()
{
- LLFolderViewEventListener* listenerp = getCorrectListenerForAction();
- if (listenerp)
+ // TODO: Remove if/else, add common interface
+ // for "My Outfits" and "Wearing" tabs.
+ if (!isCOFPanelActive())
+ {
+ mMyOutfitsPanel->performAction("replaceoutfit");
+ }
+ else
{
- listenerp->performAction(NULL, "replaceoutfit");
+ LLFolderViewEventListener* listenerp = getCorrectListenerForAction();
+ if (listenerp)
+ {
+ listenerp->performAction(NULL, "replaceoutfit");
+ }
}
}
void LLPanelOutfitsInventory::onAdd()
{
- LLFolderViewEventListener* listenerp = getCorrectListenerForAction();
- if (listenerp)
+ // TODO: Remove if/else, add common interface
+ // for "My Outfits" and "Wearing" tabs.
+ if (!isCOFPanelActive())
+ {
+ mMyOutfitsPanel->performAction("addtooutfit");
+ }
+ else
{
- listenerp->performAction(NULL, "addtooutfit");
+ LLFolderViewEventListener* listenerp = getCorrectListenerForAction();
+ if (listenerp)
+ {
+ listenerp->performAction(NULL, "addtooutfit");
+ }
}
}
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index f60951ca66..f2c0f92f9b 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -443,6 +443,7 @@ public:
LLPanelPeople::LLPanelPeople()
: LLPanel(),
mFilterSubString(LLStringUtil::null),
+ mFilterSubStringOrig(LLStringUtil::null),
mFilterEditor(NULL),
mTabContainer(NULL),
mOnlineFriendList(NULL),
@@ -658,7 +659,9 @@ void LLPanelPeople::updateFriendListHelpText()
{
//update help text for empty lists
std::string message_name = mFilterSubString.empty() ? "no_friends_msg" : "no_filtered_friends_msg";
- no_friends_text->setText(getString(message_name));
+ LLStringUtil::format_map_t args;
+ args["[SEARCH_TERM]"] = LLURI::escape(mFilterSubStringOrig);
+ no_friends_text->setText(getString(message_name, args));
}
}
@@ -981,10 +984,11 @@ bool LLPanelPeople::isRealGroup()
void LLPanelPeople::onFilterEdit(const std::string& search_string)
{
- std::string search_upper = search_string;
+ mFilterSubStringOrig = search_string;
+ LLStringUtil::trimHead(mFilterSubStringOrig);
// Searches are case-insensitive
+ std::string search_upper = mFilterSubStringOrig;
LLStringUtil::toUpper(search_upper);
- LLStringUtil::trimHead(search_upper);
if (mFilterSubString == search_upper)
return;
@@ -999,11 +1003,11 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)
// Apply new filter.
- mNearbyList->setNameFilter(mFilterSubString);
- mOnlineFriendList->setNameFilter(mFilterSubString);
- mAllFriendList->setNameFilter(mFilterSubString);
- mRecentList->setNameFilter(mFilterSubString);
- mGroupList->setNameFilter(mFilterSubString);
+ mNearbyList->setNameFilter(mFilterSubStringOrig);
+ mOnlineFriendList->setNameFilter(mFilterSubStringOrig);
+ mAllFriendList->setNameFilter(mFilterSubStringOrig);
+ mRecentList->setNameFilter(mFilterSubStringOrig);
+ mGroupList->setNameFilter(mFilterSubStringOrig);
setAccordionCollapsedByUser("tab_online", false);
setAccordionCollapsedByUser("tab_all", false);
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 1bd3ea471c..17c45a034b 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -169,6 +169,7 @@ private:
Updater* mRecentListUpdater;
std::string mFilterSubString;
+ std::string mFilterSubStringOrig;
};
#endif //LL_LLPANELPEOPLE_H
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 89293d0e50..51a11e97e4 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -528,8 +528,7 @@ void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_fi
std::string string = search_string;
// Searches are case-insensitive
- LLStringUtil::toUpper(string);
- LLStringUtil::trimHead(string);
+ // but we don't convert the typed string to upper-case so that it can be fed to the web search as-is.
mActivePanel->onSearchEdit(string);
}
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 75702dc8e5..fb7ac0d86b 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -35,6 +35,7 @@
#include "llpreviewnotecard.h"
#include "llinventory.h"
+#include "llinventoryfunctions.h" // for change_item_parent()
#include "llagent.h"
#include "llassetuploadresponders.h"
@@ -92,11 +93,17 @@ BOOL LLPreviewNotecard::postBuild()
childSetAction("Save", onClickSave, this);
childSetVisible("lock", FALSE);
+ childSetAction("Delete", onClickDelete, this);
+ childSetEnabled("Delete", false);
+
const LLInventoryItem* item = getItem();
childSetCommitCallback("desc", LLPreview::onText, this);
if (item)
+ {
childSetText("desc", item->getDescription());
+ childSetEnabled("Delete", true);
+ }
childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
return LLPreview::postBuild();
@@ -374,6 +381,17 @@ void LLPreviewNotecard::onClickSave(void* user_data)
}
}
+
+// static
+void LLPreviewNotecard::onClickDelete(void* user_data)
+{
+ LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
+ if(preview)
+ {
+ preview->deleteNotecard();
+ }
+}
+
struct LLSaveNotecardInfo
{
LLPreviewNotecard* mSelf;
@@ -466,6 +484,18 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
return true;
}
+void LLPreviewNotecard::deleteNotecard()
+{
+ LLViewerInventoryItem* item = gInventory.getItem(mItemUUID);
+ if (item != NULL)
+ {
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ change_item_parent(&gInventory, item, trash_id, FALSE);
+ }
+
+ closeFloater();
+}
+
// static
void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index e0363eef54..98de99aa33 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -83,6 +83,8 @@ protected:
virtual void loadAsset();
bool saveIfNeeded(LLInventoryItem* copyitem = NULL);
+ void deleteNotecard();
+
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
@@ -90,6 +92,8 @@ protected:
static void onClickSave(void* data);
+ static void onClickDelete(void* data);
+
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
S32 status, LLExtStat ext_status);
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index af440a3689..de1da248c1 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -706,6 +706,31 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id)
}
}
+void LLScreenChannel::closeHiddenToasts(const Matcher& matcher)
+{
+ // since we can't guarantee that close toast operation doesn't change mToastList
+ // we collect matched toasts that should be closed into separate list
+ std::list<ToastElem> toasts;
+ for (std::vector<ToastElem>::iterator it = mToastList.begin(); it
+ != mToastList.end(); it++)
+ {
+ LLToast * toast = it->toast;
+ // add to list valid toast that match to provided matcher criteria
+ if (toast != NULL && !toast->isDead() && toast->getNotification() != NULL
+ && !toast->getVisible() && matcher.matches(toast->getNotification()))
+ {
+ toasts.push_back(*it);
+ }
+ }
+
+ // close collected toasts
+ for (std::list<ToastElem>::iterator it = toasts.begin(); it
+ != toasts.end(); it++)
+ {
+ it->toast->closeFloater();
+ }
+}
+
//--------------------------------------------------------------------------
void LLScreenChannel::removeToastsFromChannel()
{
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 88053d87d9..46c5fed7b6 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -173,6 +173,12 @@ public:
void hideToastsFromScreen();
// hide toast by notification id
void hideToast(const LLUUID& notification_id);
+
+ /**
+ * Closes hidden matched toasts from channel.
+ */
+ void closeHiddenToasts(const Matcher& matcher);
+
// removes all toasts from a channel
void removeToastsFromChannel();
// show all toasts in a channel
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index cfa05987ab..e66be1023d 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3624,14 +3624,14 @@ void LLSelectMgr::sendAttach(U8 attachment_point)
return;
}
-#if ENABLE_MULTIATTACHMENTS
- attachment_point |= ATTACHMENT_ADD;
-#endif
BOOL build_mode = LLToolMgr::getInstance()->inEdit();
// Special case: Attach to default location for this object.
if (0 == attachment_point ||
get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))
{
+#if ENABLE_MULTIATTACHMENTS
+ attachment_point |= ATTACHMENT_ADD;
+#endif
sendListToRegions(
"ObjectAttach",
packAgentIDAndSessionAndAttachment,
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 87494daaa9..f38df19de0 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -197,8 +197,7 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string)
mFilterSubString = search_string;
// Searches are case-insensitive
- LLStringUtil::toUpper(mFilterSubString);
- LLStringUtil::trimHead(mFilterSubString);
+ // but we don't convert the typed string to upper-case so that it can be fed to the web search as-is.
mPanelOutfitsInventory->onSearchEdit(mFilterSubString);
}
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index e64696b120..3d447dd411 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -167,8 +167,6 @@ public:
}
protected:
- LLTextureFetchWorker(LLTextureFetch* fetcher, const LLUUID& id, const LLHost& host,
- F32 priority, S32 discard, S32 size);
LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host,
F32 priority, S32 discard, S32 size);
@@ -215,8 +213,15 @@ private:
QUEUED = 1,
SENT_SIM = 2
};
+ enum e_write_to_cache_state //mWriteToCacheState
+ {
+ NOT_WRITE = 0,
+ CAN_WRITE = 1,
+ SHOULD_WRITE = 2
+ };
static const char* sStateDescs[];
e_state mState;
+ e_write_to_cache_state mWriteToCacheState;
LLTextureFetch* mFetcher;
LLPointer<LLImageFormatted> mFormattedImage;
LLPointer<LLImageRaw> mRawImage;
@@ -377,6 +382,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
S32 size) // Desired size
: LLWorkerClass(fetcher, "TextureFetch"),
mState(INIT),
+ mWriteToCacheState(NOT_WRITE),
mFetcher(fetcher),
mID(id),
mHost(host),
@@ -595,7 +601,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
if (mState == INIT)
- {
+ {
mRawImage = NULL ;
mRequestedDiscard = -1;
mLoadedDiscard = -1;
@@ -636,17 +642,18 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFileSize = 0;
mLoaded = FALSE;
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
-
- CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);
+
if (mUrl.compare(0, 7, "file://") == 0)
{
// read file from local disk
std::string filename = mUrl.substr(7, std::string::npos);
+ CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);
mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority,
offset, size, responder);
}
else if (mUrl.empty())
{
+ CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);
mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority,
offset, size, responder);
}
@@ -659,8 +666,6 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
mState = SEND_HTTP_REQ;
- delete responder;
- responder = NULL;
}
}
@@ -694,6 +699,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
llassert_always(mFormattedImage->getDataSize() > 0);
mLoadedDiscard = mDesiredDiscard;
mState = DECODE_IMAGE;
+ mWriteToCacheState = NOT_WRITE ;
LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
@@ -735,6 +741,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (!http_url.empty())
{
mUrl = http_url + "/?texture_id=" + mID.asString().c_str();
+ mWriteToCacheState = CAN_WRITE ; //because this texture has a fixed texture id.
}
}
else
@@ -747,12 +754,17 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mState = LLTextureFetchWorker::SEND_HTTP_REQ;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ if(mWriteToCacheState != NOT_WRITE)
+ {
+ mWriteToCacheState = CAN_WRITE ;
+ }
// don't return, fall through to next state
}
else if (mSentRequest == UNSENT)
{
// Add this to the network queue and sit here.
// LLTextureFetch::update() will send off a request which will change our state
+ mWriteToCacheState = CAN_WRITE ;
mRequestedSize = mDesiredSize;
mRequestedDiscard = mDesiredDiscard;
mSentRequest = QUEUED;
@@ -789,6 +801,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
mState = DECODE_IMAGE;
+ mWriteToCacheState = SHOULD_WRITE ;
}
else
{
@@ -850,7 +863,6 @@ bool LLTextureFetchWorker::doWork(S32 param)
mState = WAIT_HTTP_REQ;
mFetcher->addToHTTPQueue(mID);
- mSentRequest = QUEUED;
// Will call callbackHttpGet when curl request completes
std::vector<std::string> headers;
headers.push_back("Accept: image/x-j2c");
@@ -933,15 +945,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
llassert_always(mBufferSize == cur_size + mRequestedSize);
- if (mHaveAllData)
+ if (mHaveAllData && mRequestedDiscard == 0) //the image file is fully loaded.
{
mFileSize = mBufferSize;
}
- else //the file size is unknown
+ else //the file size is unknown.
{
- mFileSize = S32_MAX ; //flag the file is not fully loaded.
+ mFileSize = mBufferSize + 1 ; //flag the file is not fully loaded.
}
-
+
U8* buffer = new U8[mBufferSize];
if (cur_size > 0)
{
@@ -956,6 +968,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
mBufferSize = 0;
mLoadedDiscard = mRequestedDiscard;
mState = DECODE_IMAGE;
+ if(mWriteToCacheState != NOT_WRITE)
+ {
+ mWriteToCacheState = SHOULD_WRITE ;
+ }
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false;
}
@@ -1055,7 +1071,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mState == WRITE_TO_CACHE)
{
- if (mInLocalCache || mSentRequest == UNSENT || mFormattedImage.isNull())
+ if (mWriteToCacheState != SHOULD_WRITE || mFormattedImage.isNull())
{
// If we're in a local cache or we didn't actually receive any new data,
// or we failed to load anything, skip
@@ -1063,6 +1079,17 @@ bool LLTextureFetchWorker::doWork(S32 param)
return false;
}
S32 datasize = mFormattedImage->getDataSize();
+ if(mFileSize < datasize)//This could happen when http fetching and sim fetching mixed.
+ {
+ if(mHaveAllData)
+ {
+ mFileSize = datasize ;
+ }
+ else
+ {
+ mFileSize = datasize + 1 ; //flag not fully loaded.
+ }
+ }
llassert_always(datasize);
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
U32 cache_priority = mWorkPriority;
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 2661c9f32b..9559311e3c 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -145,7 +145,7 @@ void audio_update_volume(bool force_update)
{
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
- music_volume = mute_volume * master_volume * (music_volume*music_volume);
+ music_volume = mute_volume * master_volume * music_volume;
gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume );
}
@@ -153,7 +153,7 @@ void audio_update_volume(bool force_update)
// Streaming Media
F32 media_volume = gSavedSettings.getF32("AudioLevelMedia");
BOOL media_muted = gSavedSettings.getBOOL("MuteMedia");
- media_volume = mute_volume * master_volume * (media_volume*media_volume);
+ media_volume = mute_volume * master_volume * media_volume;
LLViewerMedia::setVolume( media_muted ? 0.0f : media_volume );
// Voice
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 3c0345df90..a4d8dddfe4 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -732,10 +732,17 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi
}
}
+static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE("Update Media");
+
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::updateMedia(void *dummy_arg)
{
+ LLFastTimer t1(FTM_MEDIA_UPDATE);
+
+ // Enable/disable the plugin read thread
+ LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread"));
+
sAnyMediaShowing = false;
sUpdatedCookies = getCookieStore()->getChangedCookies();
if(!sUpdatedCookies.empty())
@@ -1914,7 +1921,15 @@ void LLViewerMediaImpl::updateVolume()
{
if(mMediaSource)
{
- mMediaSource->setVolume(mRequestedVolume * LLViewerMedia::getVolume());
+ F32 attenuation_multiplier = 1.0;
+
+ if (mProximityDistance > 0)
+ {
+ // the attenuation multiplier should never be more than one since that would increase volume
+ attenuation_multiplier = llmin(1.0, gSavedSettings.getF32("MediaRollOffFactor")/mProximityDistance);
+ }
+
+ mMediaSource->setVolume(mRequestedVolume * LLViewerMedia::getVolume() * attenuation_multiplier);
}
}
@@ -2427,6 +2442,8 @@ void LLViewerMediaImpl::update()
}
else
{
+ updateVolume();
+
// If we didn't just create the impl, it may need to get cookie updates.
if(!sUpdatedCookies.empty())
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 78be6bdfd0..8e82725bb7 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1091,7 +1091,7 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name)
////////////////////////////////////////////////////////////////////////////////
// Special handling for various types.
- const LLAssetType::EType asset_type = item->getType();
+ const LLAssetType::EType asset_type = item->getActualType();
if (check_offer_throttle(from_name, false)) // If we are throttled, don't display
{
LL_DEBUGS("Messaging") << "Highlighting inventory item: " << item->getUUID() << LL_ENDL;
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 3d110dcc78..56b2791993 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -33,8 +33,11 @@
#include "llwearableitemslist.h"
+#include "lliconctrl.h"
+
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
+#include "lltransutil.h"
class LLFindOutfitItems : public LLInventoryCollectFunctor
{
@@ -60,6 +63,239 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,
return FALSE;
}
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+void LLPanelWearableListItem::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+ LLPanelInventoryListItemBase::onMouseEnter(x, y, mask);
+ setWidgetsVisible(true);
+ reshapeWidgets();
+}
+
+void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ LLPanelInventoryListItemBase::onMouseLeave(x, y, mask);
+ setWidgetsVisible(false);
+ reshapeWidgets();
+}
+
+LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item)
+: LLPanelInventoryListItemBase(item)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+// static
+LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* item)
+{
+ LLPanelClothingListItem* list_item = NULL;
+ if(item)
+ {
+ list_item = new LLPanelClothingListItem(item);
+ list_item->init();
+ }
+ return list_item;
+}
+
+LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item)
+ : LLPanelWearableListItem(item)
+{
+}
+
+LLPanelClothingListItem::~LLPanelClothingListItem()
+{
+}
+
+void LLPanelClothingListItem::init()
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_clothing_list_item.xml");
+}
+
+BOOL LLPanelClothingListItem::postBuild()
+{
+ LLPanelInventoryListItemBase::postBuild();
+
+ addWidgetToLeftSide("btn_delete");
+ addWidgetToRightSide("btn_move_up");
+ addWidgetToRightSide("btn_move_down");
+ addWidgetToRightSide("btn_lock");
+ addWidgetToRightSide("btn_edit");
+
+ LLButton* delete_btn = getChild<LLButton>("btn_delete");
+ // Reserve space for 'delete' button event if it is invisible.
+ setLeftWidgetsWidth(delete_btn->getRect().mRight);
+
+ setWidgetsVisible(false);
+ reshapeWidgets();
+
+ return TRUE;
+}
+
+void LLPanelClothingListItem::setShowDeleteButton(bool show)
+{
+ setShowWidget("btn_delete", show);
+}
+
+void LLPanelClothingListItem::setShowMoveUpButton(bool show)
+{
+ setShowWidget("btn_move_up", show);
+}
+
+void LLPanelClothingListItem::setShowMoveDownButton(bool show)
+{
+ setShowWidget("btn_move_down", show);
+}
+
+void LLPanelClothingListItem::setShowLockButton(bool show)
+{
+ setShowWidget("btn_lock", show);
+}
+
+void LLPanelClothingListItem::setShowEditButton(bool show)
+{
+ setShowWidget("btn_edit", show);
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+// static
+LLPanelBodyPartsListItem* LLPanelBodyPartsListItem::create(LLViewerInventoryItem* item)
+{
+ LLPanelBodyPartsListItem* list_item = NULL;
+ if(item)
+ {
+ list_item = new LLPanelBodyPartsListItem(item);
+ list_item->init();
+ }
+ return list_item;
+}
+
+LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item)
+: LLPanelWearableListItem(item)
+{
+}
+
+LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem()
+{
+}
+
+void LLPanelBodyPartsListItem::init()
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_body_parts_list_item.xml");
+}
+
+BOOL LLPanelBodyPartsListItem::postBuild()
+{
+ LLPanelInventoryListItemBase::postBuild();
+
+ addWidgetToRightSide("btn_lock");
+ addWidgetToRightSide("btn_edit");
+
+ return TRUE;
+}
+
+void LLPanelBodyPartsListItem::setShowLockButton(bool show)
+{
+ setShowWidget("btn_lock", show);
+}
+
+void LLPanelBodyPartsListItem::setShowEditButton(bool show)
+{
+ setShowWidget("btn_edit", show);
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(EWearableType w_type)
+{
+ LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type);
+ list_item->init();
+ return list_item;
+}
+
+void LLPanelDummyClothingListItem::updateItem()
+{
+ std::string title = wearableTypeToString(mWearableType);
+ setTitle(title, LLStringUtil::null);
+}
+
+BOOL LLPanelDummyClothingListItem::postBuild()
+{
+ LLIconCtrl* icon = getChild<LLIconCtrl>("item_icon");
+ setIconCtrl(icon);
+ setTitleCtrl(getChild<LLTextBox>("item_name"));
+
+ addWidgetToRightSide("btn_add");
+
+ setIconImage(get_item_icon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE));
+ updateItem();
+
+ // Make it look loke clothing item - reserve space for 'delete' button
+ setLeftWidgetsWidth(icon->getRect().mLeft);
+
+ setWidgetsVisible(false);
+ reshapeWidgets();
+
+ return TRUE;
+}
+
+LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(EWearableType w_type)
+ : LLPanelWearableListItem(NULL)
+ , mWearableType(w_type)
+{
+}
+
+void LLPanelDummyClothingListItem::init()
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_dummy_clothing_list_item.xml");
+}
+
+typedef std::map<EWearableType, std::string> clothing_to_string_map_t;
+
+clothing_to_string_map_t init_clothing_string_map()
+{
+ clothing_to_string_map_t w_map;
+ w_map.insert(std::make_pair(WT_SHIRT, "shirt_not_worn"));
+ w_map.insert(std::make_pair(WT_PANTS, "pants_not_worn"));
+ w_map.insert(std::make_pair(WT_SHOES, "shoes_not_worn"));
+ w_map.insert(std::make_pair(WT_SOCKS, "socks_not_worn"));
+ w_map.insert(std::make_pair(WT_JACKET, "jacket_not_worn"));
+ w_map.insert(std::make_pair(WT_GLOVES, "gloves_not_worn"));
+ w_map.insert(std::make_pair(WT_UNDERSHIRT, "undershirt_not_worn"));
+ w_map.insert(std::make_pair(WT_UNDERPANTS, "underpants_not_worn"));
+ w_map.insert(std::make_pair(WT_SKIRT, "skirt_not_worn"));
+ w_map.insert(std::make_pair(WT_ALPHA, "alpha_not_worn"));
+ w_map.insert(std::make_pair(WT_TATTOO, "tattoo_not_worn"));
+ return w_map;
+}
+
+std::string LLPanelDummyClothingListItem::wearableTypeToString(EWearableType w_type)
+{
+ static const clothing_to_string_map_t w_map = init_clothing_string_map();
+ static const std::string invalid_str = LLTrans::getString("invalid_not_worn");
+
+ std::string type_str = invalid_str;
+ clothing_to_string_map_t::const_iterator it = w_map.find(w_type);
+ if(w_map.end() != it)
+ {
+ type_str = LLTrans::getString(it->second);
+ }
+ return type_str;
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list");
LLWearableItemsList::Params::Params()
@@ -89,3 +325,5 @@ void LLWearableItemsList::updateList(const LLUUID& category_id)
refreshList(item_array);
}
+
+// EOF
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index e7ccba8e6c..c4a415dfbf 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -36,6 +36,115 @@
// newview
#include "llinventoryitemslist.h"
+#include "llinventorymodel.h"
+#include "llwearabledictionary.h"
+
+/**
+ * @class LLPanelWearableListItem
+ *
+ * Extends LLPanelInventoryListItemBase:
+ * - makes side widgets show on mouse_enter and hide on
+ * mouse_leave events.
+ * - provides callback for button clicks
+ */
+class LLPanelWearableListItem : public LLPanelInventoryListItemBase
+{
+ LOG_CLASS(LLPanelWearableListItem);
+public:
+
+ /**
+ * Shows buttons when mouse is over
+ */
+ /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
+
+ /**
+ * Hides buttons when mouse is out
+ */
+ /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
+
+protected:
+
+ LLPanelWearableListItem(LLViewerInventoryItem* item);
+};
+
+/**
+ * @class LLPanelClothingListItem
+ *
+ * Provides buttons for editing, moving, deleting a wearable.
+ */
+class LLPanelClothingListItem : public LLPanelWearableListItem
+{
+ LOG_CLASS(LLPanelClothingListItem);
+public:
+
+ static LLPanelClothingListItem* create(LLViewerInventoryItem* item);
+
+ virtual ~LLPanelClothingListItem();
+
+ /*virtual*/ BOOL postBuild();
+
+ /**
+ * Make button visible during mouse over event.
+ */
+ inline void setShowDeleteButton(bool show);
+ inline void setShowMoveUpButton(bool show);
+ inline void setShowMoveDownButton(bool show);
+ inline void setShowLockButton(bool show);
+ inline void setShowEditButton(bool show);
+
+protected:
+
+ LLPanelClothingListItem(LLViewerInventoryItem* item);
+
+ /*virtual*/ void init();
+};
+
+class LLPanelBodyPartsListItem : public LLPanelWearableListItem
+{
+ LOG_CLASS(LLPanelBodyPartsListItem);
+public:
+
+ static LLPanelBodyPartsListItem* create(LLViewerInventoryItem* item);
+
+ virtual ~LLPanelBodyPartsListItem();
+
+ /*virtual*/ BOOL postBuild();
+
+ /**
+ * Make button visible during mouse over event.
+ */
+ inline void setShowLockButton(bool show);
+ inline void setShowEditButton(bool show);
+
+protected:
+ LLPanelBodyPartsListItem(LLViewerInventoryItem* item);
+
+ /*virtual*/ void init();
+};
+
+/**
+ * @class LLPanelDummyClothingListItem
+ *
+ * A dummy item panel - displays grayed clothing icon, grayed title '<clothing> not worn' and 'add' button
+ */
+class LLPanelDummyClothingListItem : public LLPanelWearableListItem
+{
+public:
+ static LLPanelDummyClothingListItem* create(EWearableType w_type);
+
+ /*virtual*/ void updateItem();
+ /*virtual*/ BOOL postBuild();
+
+protected:
+ LLPanelDummyClothingListItem(EWearableType w_type);
+
+ /*virtual*/ void init();
+
+ static std::string wearableTypeToString(EWearableType w_type);
+
+private:
+ EWearableType mWearableType;
+};
/**
* @class LLWearableItemsList
diff --git a/indra/newview/skins/default/textures/icons/Progress_1.png b/indra/newview/skins/default/textures/icons/Progress_1.png
index 58b56003c4..5d6efbfa2a 100644
--- a/indra/newview/skins/default/textures/icons/Progress_1.png
+++ b/indra/newview/skins/default/textures/icons/Progress_1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_10.png b/indra/newview/skins/default/textures/icons/Progress_10.png
index 07fe0be8a3..28203324f1 100644
--- a/indra/newview/skins/default/textures/icons/Progress_10.png
+++ b/indra/newview/skins/default/textures/icons/Progress_10.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_11.png b/indra/newview/skins/default/textures/icons/Progress_11.png
index 215d68cc46..6b87be0c3f 100644
--- a/indra/newview/skins/default/textures/icons/Progress_11.png
+++ b/indra/newview/skins/default/textures/icons/Progress_11.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_12.png b/indra/newview/skins/default/textures/icons/Progress_12.png
index d755588621..089d58b090 100644
--- a/indra/newview/skins/default/textures/icons/Progress_12.png
+++ b/indra/newview/skins/default/textures/icons/Progress_12.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_2.png b/indra/newview/skins/default/textures/icons/Progress_2.png
index 6640ee227b..94cb73b1f7 100644
--- a/indra/newview/skins/default/textures/icons/Progress_2.png
+++ b/indra/newview/skins/default/textures/icons/Progress_2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_3.png b/indra/newview/skins/default/textures/icons/Progress_3.png
index 5decbe977e..a04a5b5263 100644
--- a/indra/newview/skins/default/textures/icons/Progress_3.png
+++ b/indra/newview/skins/default/textures/icons/Progress_3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_4.png b/indra/newview/skins/default/textures/icons/Progress_4.png
index 56e81c17aa..a467098d82 100644
--- a/indra/newview/skins/default/textures/icons/Progress_4.png
+++ b/indra/newview/skins/default/textures/icons/Progress_4.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_5.png b/indra/newview/skins/default/textures/icons/Progress_5.png
index a89bf2ac62..ea64f1d907 100644
--- a/indra/newview/skins/default/textures/icons/Progress_5.png
+++ b/indra/newview/skins/default/textures/icons/Progress_5.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_6.png b/indra/newview/skins/default/textures/icons/Progress_6.png
index 233c479540..fe4447935f 100644
--- a/indra/newview/skins/default/textures/icons/Progress_6.png
+++ b/indra/newview/skins/default/textures/icons/Progress_6.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_7.png b/indra/newview/skins/default/textures/icons/Progress_7.png
index 631d7a6819..64fa294771 100644
--- a/indra/newview/skins/default/textures/icons/Progress_7.png
+++ b/indra/newview/skins/default/textures/icons/Progress_7.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_8.png b/indra/newview/skins/default/textures/icons/Progress_8.png
index ac0e3f13f7..a1c9a7f2eb 100644
--- a/indra/newview/skins/default/textures/icons/Progress_8.png
+++ b/indra/newview/skins/default/textures/icons/Progress_8.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Progress_9.png b/indra/newview/skins/default/textures/icons/Progress_9.png
index 17fb4a0335..f3e9723184 100644
--- a/indra/newview/skins/default/textures/icons/Progress_9.png
+++ b/indra/newview/skins/default/textures/icons/Progress_9.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index d72fb7144a..90388c7177 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -583,17 +583,17 @@ with the same filename but different name
<texture name="default_profile_picture.j2c" />
<texture name="locked_image.j2c" />
- <texture name="Progress_1" file_name="icons/Progress_1.png" preload="false" />
- <texture name="Progress_2" file_name="icons/Progress_2.png" preload="false" />
- <texture name="Progress_3" file_name="icons/Progress_3.png" preload="false" />
- <texture name="Progress_4" file_name="icons/Progress_4.png" preload="false" />
- <texture name="Progress_5" file_name="icons/Progress_5.png" preload="false" />
- <texture name="Progress_6" file_name="icons/Progress_6.png" preload="false" />
- <texture name="Progress_7" file_name="icons/Progress_7.png" preload="false" />
- <texture name="Progress_8" file_name="icons/Progress_8.png" preload="false" />
- <texture name="Progress_9" file_name="icons/Progress_9.png" preload="false" />
- <texture name="Progress_10" file_name="icons/Progress_10.png" preload="false" />
- <texture name="Progress_11" file_name="icons/Progress_11.png" preload="false" />
- <texture name="Progress_12" file_name="icons/Progress_12.png" preload="false" />
+ <texture name="Progress_1" file_name="icons/Progress_1.png" preload="true" />
+ <texture name="Progress_2" file_name="icons/Progress_2.png" preload="true" />
+ <texture name="Progress_3" file_name="icons/Progress_3.png" preload="true" />
+ <texture name="Progress_4" file_name="icons/Progress_4.png" preload="true" />
+ <texture name="Progress_5" file_name="icons/Progress_5.png" preload="true" />
+ <texture name="Progress_6" file_name="icons/Progress_6.png" preload="true" />
+ <texture name="Progress_7" file_name="icons/Progress_7.png" preload="true" />
+ <texture name="Progress_8" file_name="icons/Progress_8.png" preload="true" />
+ <texture name="Progress_9" file_name="icons/Progress_9.png" preload="true" />
+ <texture name="Progress_10" file_name="icons/Progress_10.png" preload="true" />
+ <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" />
+ <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" />
</textures>
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index 14c0081c0d..0e8eef2a21 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -84,8 +84,18 @@
label="Save"
label_selected="Save"
layout="topleft"
- left="288"
+ left="178"
name="Save"
top="332"
width="100" />
+ <button
+ follows="right|bottom"
+ height="22"
+ label="Delete"
+ label_selected="Delete"
+ layout="topleft"
+ left="288"
+ name="Delete"
+ top="332"
+ width="100" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 5e1f6b58e8..11459ad0e6 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -410,6 +410,14 @@
parameter="open" />
</menu_item_call>
<menu_item_call
+ label="Open Original"
+ layout="topleft"
+ name="Open Original">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="open_original" />
+ </menu_item_call>
+ <menu_item_call
label="Properties"
layout="topleft"
name="Properties">
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 6a5f9ed8f8..19b6b1b22e 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1339,6 +1339,16 @@
function="ToggleControl"
parameter="RunMultipleThreads" />
</menu_item_check>
+ <menu_item_check
+ label="Use Plugin Read Thread"
+ name="Use Plugin Read Thread">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="PluginUseReadThread" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="PluginUseReadThread" />
+ </menu_item_check>
<menu_item_call
label="Clear Group Cache"
name="ClearGroupCache">
diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml
index 8e1e5ff062..a585069faa 100644
--- a/indra/newview/skins/default/xui/en/mime_types.xml
+++ b/indra/newview/skins/default/xui/en/mime_types.xml
@@ -120,7 +120,7 @@
none
</widgettype>
<impl>
- media_plugin_quicktime
+ media_plugin_webkit
</impl>
</mimetype>
<mimetype name="none/none">
@@ -130,6 +130,9 @@
<widgettype>
none
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
@@ -160,6 +163,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
@@ -179,6 +185,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
@@ -187,6 +196,9 @@
<widgettype>
audio
</widgettype>
+ <impl>
+ media_plugin_quicktime
+ </impl>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
@@ -195,6 +207,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
@@ -203,6 +218,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
@@ -211,6 +229,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
@@ -219,6 +240,9 @@
<widgettype>
movie
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
@@ -227,6 +251,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
@@ -235,6 +262,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml
index 4748c14554..e95b371d00 100644
--- a/indra/newview/skins/default/xui/en/mime_types_linux.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml
@@ -120,7 +120,7 @@
none
</widgettype>
<impl>
- media_plugin_gstreamer
+ media_plugin_webkit
</impl>
</mimetype>
<mimetype name="none/none">
@@ -130,6 +130,9 @@
<widgettype>
none
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
@@ -160,6 +163,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
@@ -179,6 +185,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
@@ -187,6 +196,9 @@
<widgettype>
audio
</widgettype>
+ <impl>
+ media_plugin_gstreamer
+ </impl>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
@@ -195,6 +207,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
@@ -203,6 +218,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
@@ -211,6 +229,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
@@ -219,6 +240,9 @@
<widgettype>
movie
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
@@ -227,6 +251,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
@@ -235,6 +262,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml
index 8e1e5ff062..7931e55c0a 100644
--- a/indra/newview/skins/default/xui/en/mime_types_mac.xml
+++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml
@@ -130,6 +130,9 @@
<widgettype>
none
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
@@ -160,6 +163,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype menu="1" name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
@@ -179,6 +185,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
@@ -187,6 +196,9 @@
<widgettype>
audio
</widgettype>
+ <impl>
+ media_plugin_quicktime
+ </impl>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
@@ -195,6 +207,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
@@ -203,6 +218,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
@@ -211,6 +229,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
@@ -219,6 +240,9 @@
<widgettype>
movie
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
@@ -227,6 +251,9 @@
<widgettype>
web
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
@@ -235,6 +262,9 @@
<widgettype>
image
</widgettype>
+ <impl>
+ media_plugin_webkit
+ </impl>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
index b3150bb98b..5fcc9b012b 100644
--- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!-- *NOTE: mantipov: this xml is intended to be used inside panel_outfits_list.xml for each outfit folder-->
<!-- All accordion tabs in the My Appearance/My Outfits panel will be created from this one at runtime-->
+<!-- Non of string values of controls below are visible to user. They are not need to be translated. -->
<accordion_tab
display_children="false"
follows="all"
@@ -8,11 +9,13 @@
layout="topleft"
name="Mockup Tab"
title="Mockup Tab"
+ translate="false"
width="0">
<wearable_items_list
allow_select="true"
follows="all"
keep_one_selected="true"
name="wearable_items_list"
+ translate="false"
/>
</accordion_tab>
diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
new file mode 100644
index 0000000000..4313d450fb
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ follows="top|right|left"
+ height="20"
+ layout="topleft"
+ left="0"
+ name="wearable_item"
+ top="0"
+ width="380">
+ <icon
+ follows="top|right|left"
+ height="20"
+ image_name="ListItem_Over"
+ layout="topleft"
+ left="0"
+ name="hovered_icon"
+ top="0"
+ visible="false"
+ width="380" />
+ <icon
+ height="20"
+ follows="top|right|left"
+ image_name="ListItem_Select"
+ layout="topleft"
+ left="0"
+ name="selected_icon"
+ top="0"
+ visible="false"
+ width="380" />
+ <icon
+ height="16"
+ follows="top|left"
+ image_name="Inv_Object"
+ layout="topleft"
+ left="0"
+ name="item_icon"
+ top="2"
+ width="16" />
+ <text
+ follows="left|right"
+ height="16"
+ layout="topleft"
+ left_pad="5"
+ allow_html="false"
+ use_ellipses="true"
+ name="item_name"
+ text_color="white"
+ top="4"
+ value="..."
+ width="359" />
+ <icon
+ name="btn_lock"
+ layout="topleft"
+ follows="top|right"
+ image_name="Lock2"
+ top="0"
+ left="0"
+ height="20"
+ width="20"
+ tab_stop="false" />
+ <button
+ name="btn_edit"
+ layout="topleft"
+ follows="top|right"
+ image_unselected="Icon_Gear_Background"
+ image_selected="Icon_Gear_Background"
+ top="0"
+ left_pad="3"
+ height="20"
+ width="20"
+ tab_stop="false" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml
new file mode 100644
index 0000000000..9d19b89a61
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_bodyparts_list_button_bar.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+
+<panel
+ follows="left|right|top"
+ height="35"
+ layout="topleft"
+ left="0"
+ name="clothing_list_button_bar_panel"
+ top="0"
+ visible="true"
+ width="300">
+ <button
+ follows="top|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ label="Switch"
+ layout="topleft"
+ left="5"
+ name="switch_btn"
+ top="5"
+ width="45" />
+ <button
+ follows="top|right"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ label="Shop >"
+ layout="topleft"
+ right="-5"
+ name="bodyparts_shop_btn"
+ top="5"
+ width="61" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml
new file mode 100644
index 0000000000..2359719c2a
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_clothing_list_button_bar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+
+<panel
+ follows="left|right|top"
+ height="35"
+ layout="topleft"
+ left="0"
+ name="clothing_list_button_bar_panel"
+ top="0"
+ visible="true"
+ width="500">
+ <button
+ follows="top|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ label="Add +"
+ layout="topleft"
+ left="5"
+ name="add_btn"
+ top="5"
+ width="45" />
+ <button
+ follows="top|right"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ label="Shop >"
+ layout="topleft"
+ right="-5"
+ name="clothing_shop_btn"
+ top="5"
+ width="61" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
new file mode 100644
index 0000000000..8dc67de06f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ follows="top|right|left"
+ height="20"
+ layout="topleft"
+ left="0"
+ name="wearable_item"
+ top="0"
+ width="380">
+ <icon
+ follows="top|right|left"
+ height="20"
+ image_name="ListItem_Over"
+ layout="topleft"
+ left="0"
+ name="hovered_icon"
+ top="0"
+ visible="false"
+ width="380" />
+ <icon
+ height="20"
+ follows="top|right|left"
+ image_name="ListItem_Select"
+ layout="topleft"
+ left="0"
+ name="selected_icon"
+ top="0"
+ visible="false"
+ width="380" />
+ <button
+ name="btn_delete"
+ layout="topleft"
+ follows="top|left"
+ image_unselected="Toast_CloseBtn"
+ image_selected="Toast_CloseBtn"
+ top="0"
+ left="0"
+ height="20"
+ width="20"
+ tab_stop="false" />
+ <icon
+ height="16"
+ follows="top|left"
+ image_name="Inv_Object"
+ layout="topleft"
+ left_pad="3"
+ name="item_icon"
+ top="2"
+ width="16" />
+ <text
+ follows="left|right"
+ height="16"
+ layout="topleft"
+ left_pad="5"
+ allow_html="false"
+ use_ellipses="true"
+ name="item_name"
+ text_color="white"
+ top="4"
+ value="..."
+ width="359" />
+ <button
+ name="btn_move_up"
+ layout="topleft"
+ follows="top|right"
+ image_unselected="Movement_Up_Off"
+ image_selected="Movement_Up_Off"
+ top="0"
+ left="0"
+ height="20"
+ width="20"
+ tab_stop="false" />
+ <button
+ name="btn_move_down"
+ layout="topleft"
+ follows="top|right"
+ image_unselected="Movement_Down_Off"
+ image_selected="Movement_Down_Off"
+ top="0"
+ left_pad="3"
+ height="20"
+ width="20"
+ tab_stop="false" />
+ <icon
+ name="btn_lock"
+ layout="topleft"
+ follows="top|right"
+ image_name="Lock2"
+ top="0"
+ left_pad="3"
+ height="20"
+ width="20" />
+ <button
+ name="btn_edit"
+ layout="topleft"
+ follows="top|right"
+ image_unselected="Icon_Gear_Background"
+ image_selected="Icon_Gear_Background"
+ top="0"
+ left_pad="3"
+ height="20"
+ width="20"
+ tab_stop="false" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
index 01c7ae61d2..d8a8dbbea4 100644
--- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -14,6 +14,7 @@
height="373"
layout="topleft"
left="3"
+ single_expansion="true"
top="0"
name="cof_wearables_accordion"
background_visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
new file mode 100644
index 0000000000..dbbfa8f2e2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ follows="top|right|left"
+ height="20"
+ layout="topleft"
+ left="0"
+ name="dummy_clothing_item"
+ top="0"
+ width="380">
+ <icon
+ follows="top|right|left"
+ height="20"
+ image_name="ListItem_Over"
+ layout="topleft"
+ left="0"
+ name="hovered_icon"
+ top="0"
+ visible="false"
+ width="380" />
+ <icon
+ height="20"
+ follows="top|right|left"
+ image_name="ListItem_Select"
+ layout="topleft"
+ left="0"
+ name="selected_icon"
+ top="0"
+ visible="false"
+ width="380" />
+ <icon
+ height="16"
+ color="0.75 0.75 0.75 1"
+ follows="top|left"
+ image_name="Inv_Object"
+ layout="topleft"
+ left="20"
+ name="item_icon"
+ top="2"
+ width="16" />
+ <text
+ follows="left|right"
+ height="16"
+ layout="topleft"
+ left_pad="5"
+ allow_html="false"
+ use_ellipses="true"
+ name="item_name"
+ text_color="LtGray_50"
+ top="4"
+ value="..."
+ width="359" />
+ <button
+ name="btn_add"
+ layout="topleft"
+ follows="top|right"
+ label="+"
+ top="0"
+ left="0"
+ height="20"
+ width="20"
+ tab_stop="false" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
index 1d0c0a02b0..cfcdc25f81 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
@@ -32,7 +32,10 @@
name="Lower Alpha"
tool_tip="Click to choose a picture"
top="10"
- width="94" />
+ width="94" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<check_box
control_name="LowerAlphaTextureInvisible"
follows="left"
@@ -53,7 +56,10 @@
name="Upper Alpha"
tool_tip="Click to choose a picture"
top="10"
- width="94" />
+ width="94">
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<check_box
control_name="UpperAlphaTextureInvisible"
follows="left"
@@ -74,7 +80,10 @@
name="Head Alpha"
tool_tip="Click to choose a picture"
top="120"
- width="94" />
+ width="94" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<check_box
control_name="HeadAlphaTextureInvisible"
follows="left"
@@ -95,7 +104,10 @@
name="Eye Alpha"
tool_tip="Click to choose a picture"
top="120"
- width="94" />
+ width="94" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<check_box
control_name="Eye AlphaTextureInvisible"
follows="left"
@@ -116,7 +128,10 @@
name="Hair Alpha"
tool_tip="Click to choose a picture"
top="230"
- width="94" />
+ width="94" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<check_box
control_name="HairAlphaTextureInvisible"
follows="left"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
index f11ef43c76..4149a0b06f 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
@@ -32,8 +32,11 @@
name="Iris"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
- </panel>
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
+ </panel>
<panel
border="false"
bg_alpha_color="DkGray2"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
index 7d8eed5085..94fd2f9080 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,9 +46,12 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="64" />
- </panel>
- <panel
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
+ </panel>
+ <panel
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
index cd81aa2c4f..9b60e83387 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
@@ -32,8 +32,11 @@
name="Texture"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
- </panel>
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
+ </panel>
<panel
border="false"
bg_alpha_color="DkGray2"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
index ba03865937..248ae9fe04 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
@@ -32,7 +32,10 @@
name="Upper Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="74" />
+ width="74" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
@@ -44,7 +47,10 @@
name="Lower Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="74" />
+ width="74" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -55,7 +61,10 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="74" />
+ width="74" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
index 5b02d1f968..3ed1df2399 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,7 +46,10 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="64" />
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
index 7da8de4c0b..e088aa05ac 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,7 +46,10 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="64" />
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
index 84fe26f7f6..e079047a86 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,7 +46,10 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="64" />
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
index b5c8c95473..9158685c40 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
@@ -33,7 +33,10 @@
name="Head Tattoos"
tool_tip="Click to choose a picture"
top="10"
- width="74" />
+ width="74" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<texture_picker
allow_no_texture="true"
can_apply_immediately="true"
@@ -46,7 +49,10 @@
name="Upper Tattoos"
tool_tip="Click to choose a picture"
top="10"
- width="74" />
+ width="74" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<texture_picker
allow_no_texture="true"
can_apply_immediately="true"
@@ -59,8 +65,11 @@
name="Lower Tattoos"
tool_tip="Click to choose a picture"
top="10"
- width="74" />
- </panel>
+ width="74" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
+ </panel>
<panel
border="false"
bg_alpha_color="DkGray2"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
index 16f6950bd5..87f3270b31 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,7 +46,10 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="64" />
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
index e4f916703b..5bd99969a2 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,7 +46,10 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="64" />
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
index d43497c943..bbe5230341 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,7 +46,10 @@
name="Color/Tint"
tool_tip="Click to open color picker"
top="10"
- width="64" />
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
index 45c6ef4526..a79c1b9eaa 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
@@ -32,7 +32,10 @@
name="Fabric"
tool_tip="Click to choose a picture"
top="10"
- width="64" />
+ width="64" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
@@ -43,7 +46,10 @@
name="Color/Tint"
tool_tip="Click to open Color Picker"
top="10"
- width="64" />
+ width="64" >
+ <color_swatch.commit_callback
+ function="ColorSwatch.Commit" />
+ </color_swatch>
</panel>
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 27d66945d9..46625144e1 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -3,7 +3,7 @@
background_visible="true"
default_tab_group="1"
follows="all"
- height="408"
+ height="423"
label="Things"
layout="topleft"
min_height="350"
@@ -48,7 +48,7 @@
left="10"
max_length="300"
name="inventory search editor"
- top="3"
+ top="18"
width="303" />
<tab_container
bg_alpha_color="DkGray"
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 73181392c9..a9f588698a 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -234,6 +234,14 @@
name="move_further_btn"
top="1"
width="31" />
+ <icon
+ follows="bottom|left"
+ height="25"
+ image_name="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_icon"
+ width="105" />
<button
follows="bottom|right"
height="25"
@@ -440,6 +448,22 @@
name="add_to_outfit_btn"
top="1"
width="31" />
+ <icon
+ follows="bottom|left"
+ height="25"
+ image_name="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_middle_icon"
+ width="140" />
+ <icon
+ follows="bottom|left"
+ height="25"
+ image_name="Toolbar_Right_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_right_icon"
+ width="31" />
</panel>
</layout_panel>
</layout_stack>
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index fa4213667b..7e212c9383 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -16,13 +16,13 @@
value="No recent people. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." />
<string
name="no_filtered_recent_people"
- value="Didn't find what you're looking for? Try [secondlife:///app/search/people Search]." />
+ value="Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]." />
<string
name="no_one_near"
value="No one nearby. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." />
<string
name="no_one_filtered_near"
- value="Didn't find what you're looking for? Try [secondlife:///app/search/people Search]." />
+ value="Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search]." />
<string
name="no_friends_online"
value="No friends online" />
@@ -36,7 +36,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
</string>
<string
name="no_filtered_friends_msg">
- Didn't find what you're looking for? Try [secondlife:///app/search/people Search].
+ Didn't find what you're looking for? Try [secondlife:///app/search/people/[SEARCH_TERM] Search].
</string>
<string
name="people_filter_label"
@@ -50,7 +50,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
-->
<string
name="no_filtered_groups_msg"
- value="Didn't find what you're looking for? Try [secondlife:///app/search/groups Search]." />
+ value="Didn't find what you're looking for? Try [secondlife:///app/search/groups/[SEARCH_TERM] Search]." />
<string
name="no_groups_msg"
value="Looking for Groups to join? Try [secondlife:///app/search/groups Search]." />
@@ -490,6 +490,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
label="Share"
layout="topleft"
name="share_btn"
+ tool_tip="Share an inventory item"
width="62" />
<button
follows="bottom|left"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 3ef16d2dec..ba967d3e2c 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -330,7 +330,7 @@
<check_box
enabled="false"
height="16"
- label="Enable plain text chat history"
+ label="Enable plain text IM and chat history"
layout="topleft"
left_delta="0"
name="plain_text_chat_history"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index af87934c87..73df41b776 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1802,6 +1802,20 @@ Clears (deletes) the media and all params from the given face.
<string name="alpha">Alpha</string>
<string name="tattoo">Tattoo</string>
<string name="invalid">invalid</string>
+
+ <!-- Not Worn Wearable Types -->
+ <string name="shirt_not_worn">Shirt not worn</string>
+ <string name="pants_not_worn">Pants not worn</string>
+ <string name="shoes_not_worn">Shoes not worn</string>
+ <string name="socks_not_worn">Socks not worn</string>
+ <string name="jacket_not_worn">Jacket not worn</string>
+ <string name="gloves_not_worn">Gloves not worn</string>
+ <string name="undershirt_not_worn">Undershirt not worn</string>
+ <string name="underpants_not_worn">Underpants not worn</string>
+ <string name="skirt_not_worn">Skirt not worn</string>
+ <string name="alpha_not_worn">Alpha not worn</string>
+ <string name="tattoo_not_worn">Tattoo not worn</string>
+ <string name="invalid_not_worn">invalid</string>
<!-- Wearable List-->
<string name="NewWearable">New [WEARABLE_ITEM]</string>
@@ -1842,7 +1856,8 @@ Clears (deletes) the media and all params from the given face.
<string name="LeaveMouselook">Press ESC to return to World View</string>
<!-- inventory -->
- <string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all Search].</string>
+ <string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string>
+ <string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string>
<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
<string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string>
<!-- use value="" because they have preceding spaces -->
@@ -2951,8 +2966,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<!-- voice calls -->
<string name="answered_call">Your call has been answered</string>
- <string name="started_call">Started a voice call</string>
- <string name="joined_call">Joined the voice call</string>
+ <string name="you_started_call">You started a voice call</string>
+ <string name="you_joined_call">You joined the voice call</string>
+ <string name="name_started_call">[NAME] started a voice call</string>
<string name="ringing-im">
Joining voice call...
diff --git a/indra/newview/skins/default/xui/it/menu_participant_list.xml b/indra/newview/skins/default/xui/it/menu_participant_list.xml
index e641d38508..0da1d116b4 100644
--- a/indra/newview/skins/default/xui/it/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/it/menu_participant_list.xml
@@ -15,6 +15,6 @@
<menu_item_call label="Disattiva audio di questo participante" name="ModerateVoiceMuteSelected"/>
<menu_item_call label="Disattiva audio di tutti gli altri" name="ModerateVoiceMuteOthers"/>
<menu_item_call label="Riattiva audio di questo participante" name="ModerateVoiceUnMuteSelected"/>
- <menu_item_call label="Disattiva audio di tutti gli altri" name="ModerateVoiceUnMuteOthers"/>
+ <menu_item_call label="Riattiva audio di tutti gli altri" name="ModerateVoiceUnMuteOthers"/>
</context_menu>
</context_menu>
diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml
index 6736c6a6f1..f1b87bc002 100644
--- a/indra/newview/skins/default/xui/it/notifications.xml
+++ b/indra/newview/skins/default/xui/it/notifications.xml
@@ -898,7 +898,7 @@ Unisci il terreno?
In genere si tratta di un problema temporaneo. Attendi alcuni minuti per modificare e salvare nuovamente gli elementi indossabili.
</notification>
<notification name="YouHaveBeenLoggedOut">
- Accidenti. Sei stato scollegato da [SECOND_LIFE]
+ Sei stato scollegato da [SECOND_LIFE].
[MESSAGE]
<usetemplate name="okcancelbuttons" notext="Esci" yestext="Vedi IM &amp; Chat"/>
</notification>
diff --git a/indra/newview/skins/default/xui/it/panel_edit_pick.xml b/indra/newview/skins/default/xui/it/panel_edit_pick.xml
index d2d97cfc71..f93b953eac 100644
--- a/indra/newview/skins/default/xui/it/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/it/panel_edit_pick.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Modifica scelta" name="panel_edit_pick">
+<panel label="Modifica preferito" name="panel_edit_pick">
<panel.string name="location_notice">
(si aggiornerà dopo il salvataggio)
</panel.string>
<text name="title">
- Modifica scelta
+ Modifica preferito
</text>
<scroll_container name="profile_scroll">
<panel name="scroll_content_panel">
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml
index c24d3f656a..1d05f28d46 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_advanced.xml
@@ -13,10 +13,10 @@
</text>
<check_box label="Costruire/Modificare" name="edit_camera_movement" tool_tip="Utilizza il posizionamento automatico della fotocamera entrando o uscendo dalla modalità modifica"/>
<check_box label="Aspetto fisico" name="appearance_camera_movement" tool_tip="Utilizza il posizionamento automatico della camera in modalità modifica"/>
- <check_box label="Mostra in modalità Mouselook" name="first_person_avatar_visible"/>
+ <check_box label="Visualizzami in modalità soggettiva" name="first_person_avatar_visible"/>
<check_box label="Le frecce di direzione mi fanno sempre spostare" name="arrow_keys_move_avatar_check"/>
<check_box label="Doppio click e tieni premuto per correre" name="tap_tap_hold_to_run"/>
- <check_box label="Consente il movimento delle labbra dell&apos;avatar quando parla" name="enable_lip_sync"/>
+ <check_box label="Movimento delle labbra dell&apos;avatar quando parla" name="enable_lip_sync"/>
<check_box label="Chat a bolla" name="bubble_text_chat"/>
<slider label="Opacità" name="bubble_chat_opacity"/>
<color_swatch name="background" tool_tip="Scegli il colore delle vignette della chat"/>
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index a1b570d716..de9c5ba45b 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -886,13 +886,13 @@
Alto
</string>
<string name="LeaveMouselook">
- Premi ESC per tornare in visulizzazione normale
+ Premi ESC per tornare in visualizzazione normale
</string>
<string name="InventoryNoMatchingItems">
Nessun oggetto corrispondente trovato in inventario. Prova [secondlife:///app/search/groups &quot;Cerca&quot;].
</string>
<string name="FavoritesNoMatchingItems">
- Trascina qui un punto di riferimento per aggiungerlo ai tuoi preferiti.
+ Trascina qui un punto di riferimento per aggiungerlo ai Preferiti.
</string>
<string name="InventoryNoTexture">
Non hai una copia di questa texture nel tuo inventario
@@ -1566,7 +1566,7 @@
(si aggiornerà dopo la pubblicazione)
</string>
<string name="NoPicksClassifiedsText">
- Non hai creato luoghi preferiti né inserzioni. Clicca il pulsante più qui sotto per creare un luogo preferito o un&apos;inserzione.
+ Non hai creato luoghi preferiti né inserzioni. Clicca il pulsante + qui sotto per creare un luogo preferito o un&apos;inserzione.
</string>
<string name="NoAvatarPicksClassifiedsText">
L&apos;utente non ha luoghi preferiti né inserzioni
diff --git a/indra/newview/skins/default/xui/it/teleport_strings.xml b/indra/newview/skins/default/xui/it/teleport_strings.xml
index c11d41f6b9..7a1046abd3 100644
--- a/indra/newview/skins/default/xui/it/teleport_strings.xml
+++ b/indra/newview/skins/default/xui/it/teleport_strings.xml
@@ -66,7 +66,7 @@ Se si continua a visualizzare questo messaggio, consulta la pagina [SUPPORT_SITE
Elaborazione della destinazione in corso...
</message>
<message name="contacting">
- Contattando la nuova regione.
+ Contatto in corso con la nuova regione.
</message>
<message name="arriving">
In arrivo a destinazione...
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 044dbc9ed7..63437365f9 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -341,6 +341,12 @@ class WindowsManifest(ViewerManifest):
self.path("media_plugin_webkit.dll")
self.end_prefix()
+ # winmm.dll shim
+ if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst="llplugin"):
+ self.path("winmm.dll")
+ self.end_prefix()
+
+
if self.args['configuration'].lower() == 'debug':
if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'debug'),
dst="llplugin"):