summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llnotifications.cpp11
-rw-r--r--indra/newview/app_settings/settings.xml6
-rw-r--r--indra/newview/llpaneloutfitedit.cpp102
-rw-r--r--indra/newview/llpaneloutfitedit.h6
-rw-r--r--indra/newview/llviewermessage.cpp2
-rw-r--r--indra/newview/llviewerstats.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml15
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml2
8 files changed, 116 insertions, 31 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 621e72ce38..9e272a0949 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -34,6 +34,7 @@
#include "llnotifications.h"
+#include "llinstantmessage.h"
#include "llxmlnode.h"
#include "lluictrl.h"
#include "lluictrlfactory.h"
@@ -41,6 +42,7 @@
#include "llsdserialize.h"
#include "lltrans.h"
#include "llnotificationslistener.h"
+#include "llstring.h"
#include <algorithm>
#include <boost/regex.hpp>
@@ -1487,7 +1489,14 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification)
void LLPostponedNotification::onCachedNameReceived(const LLUUID& id, const std::string& first,
const std::string& last, bool is_group)
{
- gCacheName->getFullName(id, mName);
+ mName = first + " " + last;
+
+ LLStringUtil::trim(mName);
+ if (mName.empty())
+ {
+ llwarns << "Empty name received for Id: " << id << llendl;
+ mName = SYSTEM_FROM;
+ }
modifyNotificationParams();
LLNotifications::instance().add(mParams);
cleanup();
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1c32f33290..af296f918e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4666,7 +4666,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string>
+ <string>http://marketplace.secondlife.com/</string>
</map>
<key>MarketplaceURL_objectFemale</key>
<map>
@@ -4721,7 +4721,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string>
+ <string>http://marketplace.secondlife.com</string>
</map>
<key>MarketplaceURL_bodypartMale</key>
<map>
@@ -4732,7 +4732,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string>
+ <string>http://marketplace.secondlife.com/</string>
</map>
<key>MarketplaceURL_glovesMale</key>
<map>
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 31c427d2ba..937b794686 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -71,6 +71,7 @@
#include "llsdutil.h"
#include "llsidepanelappearance.h"
#include "lltoggleablemenu.h"
+#include "llvoavatarself.h"
#include "llwearablelist.h"
#include "llwearableitemslist.h"
#include "llwearabletype.h"
@@ -347,8 +348,8 @@ BOOL LLPanelOutfitEdit::postBuild()
mInventoryItemsPanel = getChild<LLInventoryPanel>("folder_view");
mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this));
- mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this));
+ mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
+ mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel());
@@ -388,7 +389,7 @@ BOOL LLPanelOutfitEdit::postBuild()
mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("list_view");
mWearableItemsList->setCommitOnSelectionChange(true);
- mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this));
+ mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
@@ -442,6 +443,9 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables)
mListViewFilterCmbBox->setVisible(false);
showWearablesFilter();
+
+ // Reset mWearableItemsList position to top. See EXT-8180.
+ mWearableItemsList->goToTop();
}
//switching button bars
@@ -619,15 +623,52 @@ void LLPanelOutfitEdit::onShopButtonClicked()
{
static LLShopURLDispatcher url_resolver;
+ // will contain the resultant URL
std::string url;
+
+ if (isAgentAvatarValid())
+ {
+ // try to get wearable type from 'Add More' panel first (EXT-7639)
+ LLWearableType::EType type = getAddMorePanelSelectionType();
+
+ if (type == LLWearableType::WT_NONE)
+ {
+ type = getCOFWearablesSelectionType();
+ }
+
+ ESex sex = gAgentAvatarp->getSex();
+
+ // WT_INVALID comes for attachments
+ if (type != LLWearableType::WT_INVALID && type != LLWearableType::WT_NONE)
+ {
+ url = url_resolver.resolveURL(type, sex);
+ }
+
+ if (url.empty())
+ {
+ url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex);
+ }
+ }
+ else
+ {
+ llwarns << "Agent avatar is invalid" << llendl;
+
+ // the second argument is not important in this case: generic market place will be opened
+ url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE);
+ }
+
+ LLWeb::loadURLExternal(url);
+}
+
+LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const
+{
std::vector<LLPanel*> selected_items;
- mCOFWearables->getSelectedItems(selected_items);
+ LLWearableType::EType type = LLWearableType::WT_NONE;
- ESex sex = gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE;
+ mCOFWearables->getSelectedItems(selected_items);
if (selected_items.size() == 1)
{
- LLWearableType::EType type = LLWearableType::WT_NONE;
LLPanel* item = selected_items.front();
// LLPanelDummyClothingListItem is lower then LLPanelInventoryListItemBase in hierarchy tree
@@ -639,20 +680,45 @@ void LLPanelOutfitEdit::onShopButtonClicked()
{
type = real_item->getWearableType();
}
+ }
- // WT_INVALID comes for attachments
- if (type != LLWearableType::WT_INVALID)
+ return type;
+}
+
+LLWearableType::EType LLPanelOutfitEdit::getAddMorePanelSelectionType() const
+{
+ LLWearableType::EType type = LLWearableType::WT_NONE;
+
+ if (mAddWearablesPanel != NULL && mAddWearablesPanel->getVisible())
+ {
+ if (mInventoryItemsPanel != NULL && mInventoryItemsPanel->getVisible())
{
- url = url_resolver.resolveURL(type, sex);
+ std::set<LLUUID> selected_uuids = mInventoryItemsPanel->getRootFolder()->getSelectionList();
+
+ if (selected_uuids.size() == 1)
+ {
+ type = getWearableTypeByItemUUID(*(selected_uuids.begin()));
+ }
}
- }
+ else if (mWearableItemsList != NULL && mWearableItemsList->getVisible())
+ {
+ std::vector<LLUUID> selected_uuids;
+ mWearableItemsList->getSelectedUUIDs(selected_uuids);
- if (url.empty())
- {
- url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex);
+ if (selected_uuids.size() == 1)
+ {
+ type = getWearableTypeByItemUUID(selected_uuids.front());
+ }
+ }
}
- LLWeb::loadURLExternal(url);
+ return type;
+}
+
+LLWearableType::EType LLPanelOutfitEdit::getWearableTypeByItemUUID(const LLUUID& item_uuid) const
+{
+ LLViewerInventoryItem* item = gInventory.getLinkedItem(item_uuid);
+ return (item != NULL) ? item->getWearableType() : LLWearableType::WT_NONE;
}
void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
@@ -672,7 +738,7 @@ void LLPanelOutfitEdit::onEditWearableClicked(void)
}
}
-void LLPanelOutfitEdit::onInventorySelectionChange()
+void LLPanelOutfitEdit::updatePlusButton()
{
uuid_vec_t selected_items;
getSelectedItemsUUID(selected_items);
@@ -915,6 +981,9 @@ void LLPanelOutfitEdit::updateVerbs()
mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing"));
updateCurrentOutfitName();
+
+ //updating state of "Wear Item" button previously known as "Plus" button
+ updatePlusButton();
}
bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel)
@@ -950,9 +1019,6 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type
showAddWearablesPanel(true);
showWearablesListView();
- // Reset mWearableItemsList position to top. See EXT-8180.
- mWearableItemsList->goToTop();
-
//e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE
applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type));
}
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 1eef211276..770e2a229b 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -145,7 +145,7 @@ public:
void onFolderViewFilterCommitted(LLUICtrl* ctrl);
void onListViewFilterCommitted(LLUICtrl* ctrl);
void onSearchEdit(const std::string& string);
- void onInventorySelectionChange();
+ void updatePlusButton();
void onPlusBtnClicked(void);
void onVisibilityChange(const LLSD &in_visible_chain);
@@ -198,6 +198,10 @@ private:
void getCurrentItemUUID(LLUUID& selected_id);
void onCOFChanged();
+ LLWearableType::EType getCOFWearablesSelectionType() const;
+ LLWearableType::EType getAddMorePanelSelectionType() const;
+ LLWearableType::EType getWearableTypeByItemUUID(const LLUUID& item_uuid) const;
+
LLTextBox* mCurrentOutfitName;
LLTextBox* mStatus;
LLInventoryPanel* mInventoryItemsPanel;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 07b6431c92..53fb01aec3 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2585,7 +2585,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
params.substitutions = substitutions;
params.payload = payload;
- LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, false);
+ LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, from_group);
}
break;
case IM_FROM_TASK_AS_ALERT:
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index b5cea9d6a8..5202b8a36f 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -235,7 +235,8 @@ public:
inline void reset()
{
- mCount = mSum = mSumOfSquares = 0;
+ mCount = 0;
+ mSum = mSumOfSquares = 0.0;
mCountOfNextUpdatesToIgnore = 0;
}
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 8c3aa2c9a4..da2be18db6 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -71,7 +71,8 @@
image_name="Cam_Preset_Front_Off" />
<panel_camera_item.selected_picture
image_name="Cam_Preset_Front_On" />
- <panel_camera_item.text>
+ <panel_camera_item.text
+ name="front_view_text">
Front View
</panel_camera_item.text>
</panel_camera_item>
@@ -85,7 +86,8 @@
image_name="Cam_Preset_Side_Off" />
<panel_camera_item.selected_picture
image_name="Cam_Preset_Side_On" />
- <panel_camera_item.text>
+ <panel_camera_item.text
+ name="side_view_text">
Side View
</panel_camera_item.text>
</panel_camera_item>
@@ -100,7 +102,8 @@
image_name="Cam_Preset_Back_Off" />
<panel_camera_item.selected_picture
image_name="Cam_Preset_Back_On" />
- <panel_camera_item.text>
+ <panel_camera_item.text
+ name="rear_view_text">
Rear View
</panel_camera_item.text>
</panel_camera_item>
@@ -122,7 +125,8 @@
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="object_view" />
- <panel_camera_item.text>
+ <panel_camera_item.text
+ name="object_view_text">
Object View
</panel_camera_item.text>
<panel_camera_item.picture
@@ -136,7 +140,8 @@
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="mouselook_view" />
- <panel_camera_item.text>
+ <panel_camera_item.text
+ name="mouselook_view_text">
Mouselook View
</panel_camera_item.text>
<panel_camera_item.picture
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 60d3fb708e..04bdb4302c 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -819,7 +819,7 @@ Delete pick &lt;nolink&gt;[PICK]&lt;/nolink&gt;?
icon="alertmodal.tga"
name="DeleteOutfits"
type="alertmodal">
- Delete the selected outfit/s?
+ Delete the selected outfit?
<usetemplate
name="okcancelbuttons"
notext="Cancel"