summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-07-23 09:51:15 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-07-23 09:51:15 +0100
commit77911533dc68731f50f40b18cd44e287df28f476 (patch)
treed2f08b7df7c836cf6d23551a0a97cf0769e1ec3a /indra
parent7ee930ea4a5721077974bc5b24d8cc1c6b6a2fae (diff)
parent66bdd0903d1ded7a2e113938ad47ad8d6076416b (diff)
merge from PE's viewer-release
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llformat.cpp32
-rw-r--r--indra/llcommon/llformat.h4
-rw-r--r--indra/llcommon/llstring.cpp31
-rw-r--r--indra/llcommon/llstring.h15
-rw-r--r--indra/llui/llresmgr.cpp4
-rw-r--r--indra/newview/llinventorylistitem.cpp7
-rw-r--r--indra/newview/llpanelgrouproles.cpp7
-rw-r--r--indra/newview/llpanelplaceinfo.cpp13
-rw-r--r--indra/newview/llviewerinventory.cpp18
-rw-r--r--indra/newview/llviewermessage.cpp18
-rw-r--r--indra/newview/llviewertexteditor.cpp50
-rw-r--r--indra/newview/llviewertexteditor.h7
-rw-r--r--indra/newview/llworldmap.cpp9
-rw-r--r--indra/newview/llworldmap.h2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml4
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
-rw-r--r--indra/win_crash_logger/llcrashloggerwindows.cpp6
17 files changed, 181 insertions, 47 deletions
diff --git a/indra/llcommon/llformat.cpp b/indra/llcommon/llformat.cpp
index cf509bee14..689f649d0a 100644
--- a/indra/llcommon/llformat.cpp
+++ b/indra/llcommon/llformat.cpp
@@ -37,16 +37,40 @@
#include <cstdarg>
-std::string llformat(const char *fmt, ...)
+// common used function with va_list argument
+// wrapper for vsnprintf to be called from llformatXXX functions.
+static void va_format(std::string& out, const char *fmt, va_list va)
{
char tstr[1024]; /* Flawfinder: ignore */
- va_list va;
- va_start(va, fmt);
#if LL_WINDOWS
_vsnprintf(tstr, 1024, fmt, va);
#else
vsnprintf(tstr, 1024, fmt, va); /* Flawfinder: ignore */
#endif
+ out.assign(tstr);
+}
+
+std::string llformat(const char *fmt, ...)
+{
+ std::string res;
+ va_list va;
+ va_start(va, fmt);
+ va_format(res, fmt, va);
va_end(va);
- return std::string(tstr);
+ return res;
+}
+
+std::string llformat_to_utf8(const char *fmt, ...)
+{
+ std::string res;
+ va_list va;
+ va_start(va, fmt);
+ va_format(res, fmt, va);
+ va_end(va);
+
+#if LL_WINDOWS
+ // made converting to utf8. See EXT-8318.
+ res = ll_convert_string_to_utf8_string(res);
+#endif
+ return res;
}
diff --git a/indra/llcommon/llformat.h b/indra/llcommon/llformat.h
index dc64edb26d..17d8b4a8ad 100644
--- a/indra/llcommon/llformat.h
+++ b/indra/llcommon/llformat.h
@@ -42,4 +42,8 @@
std::string LL_COMMON_API llformat(const char *fmt, ...);
+// the same version as above but ensures that returned string is in utf8 on windows
+// to enable correct converting utf8_to_wstring.
+std::string LL_COMMON_API llformat_to_utf8(const char *fmt, ...);
+
#endif // LL_LLFORMAT_H
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index 1561bda201..804c00fd60 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -633,14 +633,14 @@ namespace snprintf_hack
}
}
-std::string ll_convert_wide_to_string(const wchar_t* in)
+std::string ll_convert_wide_to_string(const wchar_t* in, unsigned int code_page)
{
std::string out;
if(in)
{
int len_in = wcslen(in);
int len_out = WideCharToMultiByte(
- CP_ACP,
+ code_page,
0,
in,
len_in,
@@ -655,7 +655,7 @@ std::string ll_convert_wide_to_string(const wchar_t* in)
if(pout)
{
WideCharToMultiByte(
- CP_ACP,
+ code_page,
0,
in,
len_in,
@@ -669,6 +669,31 @@ std::string ll_convert_wide_to_string(const wchar_t* in)
}
return out;
}
+
+wchar_t* ll_convert_string_to_wide(const std::string& in, unsigned int code_page)
+{
+ int output_str_len = MultiByteToWideChar(code_page, 0, in.c_str(), in.length(), NULL, 0);
+
+ // reserve place to NULL terminator
+ wchar_t* w_out = new wchar_t[output_str_len + 1];
+
+ memset(w_out, 0, output_str_len + 1);
+ MultiByteToWideChar (code_page, 0, in.c_str(), in.length(), w_out, output_str_len);
+
+ //looks like MultiByteToWideChar didn't add null terminator to converted string, see EXT-4858.
+ w_out[output_str_len] = 0;
+
+ return w_out;
+}
+
+std::string ll_convert_string_to_utf8_string(const std::string& in)
+{
+ wchar_t* w_mesg = ll_convert_string_to_wide(in, CP_ACP);
+ std::string out_utf8 = ll_convert_wide_to_string(w_mesg, CP_UTF8);
+ delete[] w_mesg;
+
+ return out_utf8;
+}
#endif // LL_WINDOWS
long LLStringOps::sPacificTimeOffset = 0;
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 8071c8aa2d..41fac0f8cc 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -564,7 +564,20 @@ using snprintf_hack::snprintf;
*
* This replaces the unsafe W2A macro from ATL.
*/
-LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in);
+LL_COMMON_API std::string ll_convert_wide_to_string(const wchar_t* in, unsigned int code_page);
+
+/**
+ * Converts a string to wide string.
+ *
+ * It will allocate memory for result string with "new []". Don't forget to release it with "delete []".
+ */
+LL_COMMON_API wchar_t* ll_convert_string_to_wide(const std::string& in, unsigned int code_page);
+
+/**
+ * Converts incoming string into urf8 string
+ *
+ */
+LL_COMMON_API std::string ll_convert_string_to_utf8_string(const std::string& in);
//@}
#endif // LL_WINDOWS
diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp
index ed870d46d5..9158bc70f5 100644
--- a/indra/llui/llresmgr.cpp
+++ b/indra/llui/llresmgr.cpp
@@ -298,11 +298,11 @@ void LLResMgr::getIntegerString( std::string& output, S32 input ) const
{
if (fraction == remaining_count)
{
- fraction_string = llformat("%d%c", fraction, getThousandsSeparator());
+ fraction_string = llformat_to_utf8("%d%c", fraction, getThousandsSeparator());
}
else
{
- fraction_string = llformat("%3.3d%c", fraction, getThousandsSeparator());
+ fraction_string = llformat_to_utf8("%3.3d%c", fraction, getThousandsSeparator());
}
output = fraction_string + output;
}
diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp
index e4a7a158a3..2546390fcb 100644
--- a/indra/newview/llinventorylistitem.cpp
+++ b/indra/newview/llinventorylistitem.cpp
@@ -96,9 +96,12 @@ void LLPanelInventoryListItemBase::draw()
if (mSeparatorVisible && mSeparatorImage)
{
- // stretch along bottom of listitem, using image height
+ // place under bottom of listitem, using image height
+ // item_pad in list using the item should be >= image height
+ // to avoid cropping of top of the next item.
LLRect separator_rect = getLocalRect();
- separator_rect.mTop = mSeparatorImage->getHeight();
+ separator_rect.mTop = separator_rect.mBottom;
+ separator_rect.mBottom -= mSeparatorImage->getHeight();
mSeparatorImage->draw(separator_rect);
}
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 26e8a932aa..445cfe64f7 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1593,6 +1593,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end();
+ LLUIString donated = getString("donation_area");
S32 i = 0;
for( ; mMemberProgress != end && i<UPDATE_MEMBERS_PER_FRAME;
@@ -1614,9 +1615,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
if (add_member)
{
- // Build the donated tier string.
- std::ostringstream donated;
- donated << mMemberProgress->second->getContribution() << " sq. m.";
+ donated.setArg("[AREA]", llformat("%d", mMemberProgress->second->getContribution()));
LLSD row;
row["id"] = (*mMemberProgress).first;
@@ -1625,7 +1624,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
// value is filled in by name list control
row["columns"][1]["column"] = "donated";
- row["columns"][1]["value"] = donated.str();
+ row["columns"][1]["value"] = donated.getString();
row["columns"][2]["column"] = "online";
row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus();
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 8c1f5d0915..99e48cca6d 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -60,7 +60,8 @@ LLPanelPlaceInfo::LLPanelPlaceInfo()
mScrollingPanelWidth(0),
mInfoType(UNKNOWN),
mScrollingPanel(NULL),
- mScrollContainer(NULL)
+ mScrollContainer(NULL),
+ mDescEditor(NULL)
{}
//virtual
@@ -248,6 +249,16 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
// virtual
void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent)
{
+
+ // This if was added to force collapsing description textbox on Windows at the beginning of reshape
+ // (the only case when reshape is skipped here is when it's caused by this textbox, so called_from_parent is FALSE)
+ // This way it is consistent with Linux where topLost collapses textbox at the beginning of reshape.
+ // On windows it collapsed only after reshape which caused EXT-8342.
+ if(called_from_parent)
+ {
+ if(mDescEditor) mDescEditor->onTopLost();
+ }
+
LLPanel::reshape(width, height, called_from_parent);
if (!mScrollContainer || !mScrollingPanel)
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 2d57c16889..5d90af0cfe 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1172,6 +1172,14 @@ void move_inventory_item(
void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
{
+ if (NULL == src)
+ {
+ LL_WARNS("copy_inventory_from_notecard") << "Null pointer to item was passed for object_id "
+ << object_id << " and notecard_inv_id "
+ << notecard_inv_id << LL_ENDL;
+ return;
+ }
+
LLViewerRegion* viewer_region = NULL;
LLViewerObject* vo = NULL;
if (object_id.notNull() && (vo = gObjectList.findObject(object_id)) != NULL)
@@ -1194,6 +1202,16 @@ void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecar
return;
}
+ // check capability to prevent a crash while LL_ERRS in LLCapabilityListener::capListener. See EXT-8459.
+ std::string url = viewer_region->getCapability("CopyInventoryFromNotecard");
+ if (url.empty())
+ {
+ LL_WARNS("copy_inventory_from_notecard") << "There is no 'CopyInventoryFromNotecard' capability"
+ << " for region: " << viewer_region->getName()
+ << LL_ENDL;
+ return;
+ }
+
LLSD request, body;
body["notecard-id"] = notecard_inv_id;
body["object-id"] = object_id;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 04eb8164f8..fa0e860ae9 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1138,10 +1138,26 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
}
else if(from_name.empty())
{
+ std::string folder_name;
+ if (parent_folder)
+ {
+ // Localize folder name.
+ // *TODO: share this code?
+ folder_name = parent_folder->getName();
+ if (LLFolderType::lookupIsProtectedType(parent_folder->getPreferredType()))
+ {
+ LLTrans::findString(folder_name, "InvFolder " + folder_name);
+ }
+ }
+ else
+ {
+ folder_name = LLTrans::getString("Unknown");
+ }
+
// we receive a message from LLOpenTaskOffer, it mean that new landmark has been added.
LLSD args;
args["LANDMARK_NAME"] = item->getName();
- args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown");
+ args["FOLDER_NAME"] = folder_name;
LLNotificationsUtil::add("LandmarkCreated", args);
}
}
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 59efae4cb2..8bd43bb30c 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -90,7 +90,7 @@ public:
}
static void processForeignLandmark(LLLandmark* landmark,
const LLUUID& object_id, const LLUUID& notecard_inventory_id,
- LLInventoryItem* item)
+ LLPointer<LLInventoryItem> item_ptr)
{
LLVector3d global_pos;
landmark->getGlobalPos(global_pos);
@@ -103,8 +103,16 @@ public:
}
else
{
- LLPointer<LLEmbeddedLandmarkCopied> cb = new LLEmbeddedLandmarkCopied();
- copy_inventory_from_notecard(object_id, notecard_inventory_id, item, gInventoryCallbacks.registerCB(cb));
+ if (item_ptr.isNull())
+ {
+ // check to prevent a crash. See EXT-8459.
+ llwarns << "Passed handle contains a dead inventory item. Most likely notecard has been closed and embedded item was destroyed." << llendl;
+ }
+ else
+ {
+ LLPointer<LLEmbeddedLandmarkCopied> cb = new LLEmbeddedLandmarkCopied();
+ copy_inventory_from_notecard(object_id, notecard_inventory_id, item_ptr.get(), gInventoryCallbacks.registerCB(cb));
+ }
}
}
};
@@ -300,14 +308,14 @@ public:
void markSaved();
- static LLInventoryItem* getEmbeddedItem(llwchar ext_char); // returns item from static list
+ static LLPointer<LLInventoryItem> getEmbeddedItemPtr(llwchar ext_char); // returns pointer to item from static list
static BOOL getEmbeddedItemSaved(llwchar ext_char); // returns whether item from static list is saved
private:
struct embedded_info_t
{
- LLPointer<LLInventoryItem> mItem;
+ LLPointer<LLInventoryItem> mItemPtr;
BOOL mSaved;
};
typedef std::map<llwchar, embedded_info_t > item_map_t;
@@ -378,7 +386,7 @@ BOOL LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_ch
++wc_emb;
}
- sEntries[wc_emb].mItem = item;
+ sEntries[wc_emb].mItemPtr = item;
sEntries[wc_emb].mSaved = is_new ? FALSE : TRUE;
*ext_char = wc_emb;
mEmbeddedUsedChars.insert(wc_emb);
@@ -400,14 +408,14 @@ BOOL LLEmbeddedItems::removeEmbeddedItem( llwchar ext_char )
}
// static
-LLInventoryItem* LLEmbeddedItems::getEmbeddedItem(llwchar ext_char)
+LLPointer<LLInventoryItem> LLEmbeddedItems::getEmbeddedItemPtr(llwchar ext_char)
{
if( ext_char >= LLTextEditor::FIRST_EMBEDDED_CHAR && ext_char <= LLTextEditor::LAST_EMBEDDED_CHAR )
{
item_map_t::iterator iter = sEntries.find(ext_char);
if (iter != sEntries.end())
{
- return iter->second.mItem;
+ return iter->second.mItemPtr;
}
}
return NULL;
@@ -505,7 +513,7 @@ BOOL LLEmbeddedItems::hasEmbeddedItem(llwchar ext_char)
LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const
{
- LLInventoryItem* item = getEmbeddedItem(ext_char);
+ LLInventoryItem* item = getEmbeddedItemPtr(ext_char);
if (item)
{
const char* img_name = "";
@@ -567,7 +575,7 @@ void LLEmbeddedItems::getEmbeddedItemList( std::vector<LLPointer<LLInventoryItem
for (std::set<llwchar>::iterator iter = mEmbeddedUsedChars.begin(); iter != mEmbeddedUsedChars.end(); ++iter)
{
llwchar wc = *iter;
- LLPointer<LLInventoryItem> item = getEmbeddedItem(wc);
+ LLPointer<LLInventoryItem> item = getEmbeddedItemPtr(wc);
if (item)
{
items.push_back(item);
@@ -698,7 +706,7 @@ BOOL LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
{
wc = getWText()[mCursorPos];
}
- LLInventoryItem* item_at_pos = LLEmbeddedItems::getEmbeddedItem(wc);
+ LLPointer<LLInventoryItem> item_at_pos = LLEmbeddedItems::getEmbeddedItemPtr(wc);
if (item_at_pos)
{
mDragItem = item_at_pos;
@@ -1019,7 +1027,7 @@ llwchar LLViewerTextEditor::pasteEmbeddedItem(llwchar ext_char)
{
return ext_char; // already exists in my list
}
- LLInventoryItem* item = LLEmbeddedItems::getEmbeddedItem(ext_char);
+ LLInventoryItem* item = LLEmbeddedItems::getEmbeddedItemPtr(ext_char);
if (item)
{
// Add item to my list and return new llwchar associated with it
@@ -1053,7 +1061,7 @@ void LLViewerTextEditor::findEmbeddedItemSegments(S32 start, S32 end)
&& embedded_char <= LAST_EMBEDDED_CHAR
&& mEmbeddedItemList->hasEmbeddedItem(embedded_char) )
{
- LLInventoryItem* itemp = mEmbeddedItemList->getEmbeddedItem(embedded_char);
+ LLInventoryItem* itemp = mEmbeddedItemList->getEmbeddedItemPtr(embedded_char);
LLUIImagePtr image = mEmbeddedItemList->getItemImage(embedded_char);
insertSegment(new LLEmbeddedItemSegment(idx, image, itemp, *this));
}
@@ -1065,7 +1073,7 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
if( pos < getLength())
{
llwchar wc = getWText()[pos];
- LLInventoryItem* item = LLEmbeddedItems::getEmbeddedItem( wc );
+ LLPointer<LLInventoryItem> item = LLEmbeddedItems::getEmbeddedItemPtr( wc );
if( item )
{
BOOL saved = LLEmbeddedItems::getEmbeddedItemSaved( wc );
@@ -1083,7 +1091,7 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos)
}
-BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc)
+BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer<LLInventoryItem> item, llwchar wc)
{
switch( item->getType() )
@@ -1151,17 +1159,17 @@ void LLViewerTextEditor::openEmbeddedSound( LLInventoryItem* item, llwchar wc )
}
-void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item, llwchar wc )
+void LLViewerTextEditor::openEmbeddedLandmark( LLPointer<LLInventoryItem> item_ptr, llwchar wc )
{
- if (!item)
+ if (item_ptr.isNull())
return;
- LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID(),
- boost::bind(&LLEmbeddedLandmarkCopied::processForeignLandmark, _1, mObjectID, mNotecardInventoryID, item));
+ LLLandmark* landmark = gLandmarkList.getAsset(item_ptr->getAssetUUID(),
+ boost::bind(&LLEmbeddedLandmarkCopied::processForeignLandmark, _1, mObjectID, mNotecardInventoryID, item_ptr));
if (landmark)
{
LLEmbeddedLandmarkCopied::processForeignLandmark(landmark, mObjectID,
- mNotecardInventoryID, item);
+ mNotecardInventoryID, item_ptr);
}
}
@@ -1220,7 +1228,7 @@ bool LLViewerTextEditor::onCopyToInvDialog(const LLSD& notification, const LLSD&
{
LLUUID item_id = notification["payload"]["item_id"].asUUID();
llwchar wc = llwchar(notification["payload"]["item_wc"].asInteger());
- LLInventoryItem* itemp = LLEmbeddedItems::getEmbeddedItem(wc);
+ LLInventoryItem* itemp = LLEmbeddedItems::getEmbeddedItemPtr(wc);
if (itemp)
copyInventory(itemp);
}
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index ba0c40cb2e..74b6d70640 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -104,13 +104,16 @@ private:
virtual llwchar pasteEmbeddedItem(llwchar ext_char);
BOOL openEmbeddedItemAtPos( S32 pos );
- BOOL openEmbeddedItem(LLInventoryItem* item, llwchar wc);
+ BOOL openEmbeddedItem(LLPointer<LLInventoryItem> item, llwchar wc);
S32 insertEmbeddedItem(S32 pos, LLInventoryItem* item);
+ // *NOTE: most of openEmbeddedXXX methods except openEmbeddedLandmark take pointer to LLInventoryItem.
+ // Be sure they don't bind it to callback function to avoid situation when it gets invalid when
+ // callback is trigged after text editor is closed. See EXT-8459.
void openEmbeddedTexture( LLInventoryItem* item, llwchar wc );
void openEmbeddedSound( LLInventoryItem* item, llwchar wc );
- void openEmbeddedLandmark( LLInventoryItem* item, llwchar wc );
+ void openEmbeddedLandmark( LLPointer<LLInventoryItem> item_ptr, llwchar wc );
void openEmbeddedNotecard( LLInventoryItem* item, llwchar wc);
void openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc);
void showCopyToInvDialog( LLInventoryItem* item, llwchar wc );
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 66cb02ce99..9bbe005de8 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -37,6 +37,7 @@
#include "llworldmapmessage.h"
#include "message.h"
#include "lltracker.h"
+#include "lluistring.h"
#include "llviewertexturelist.h"
#include "lltrans.h"
@@ -522,8 +523,12 @@ bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID&
case MAP_ITEM_LAND_FOR_SALE: // land for sale
case MAP_ITEM_LAND_FOR_SALE_ADULT: // adult land for sale
{
- std::string tooltip = llformat("%d sq. m. L$%d", extra, extra2);
- new_item.setTooltip(tooltip);
+ static LLUIString tooltip_fmt = LLTrans::getString("worldmap_item_tooltip_format");
+
+ tooltip_fmt.setArg("[AREA]", llformat("%d", extra));
+ tooltip_fmt.setArg("[PRICE]", llformat("%d", extra2));
+ new_item.setTooltip(tooltip_fmt.getString());
+
if (type == MAP_ITEM_LAND_FOR_SALE)
{
siminfo->insertLandForSale(new_item);
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index e4e677eb64..b97e5249e1 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -52,7 +52,7 @@ public:
LLItemInfo(F32 global_x, F32 global_y, const std::string& name, LLUUID id);
// Setters
- void setTooltip(std::string& tooltip) { mToolTip = tooltip; }
+ void setTooltip(const std::string& tooltip) { mToolTip = tooltip; }
void setElevation(F64 z) { mPosGlobal.mdV[VZ] = z; }
void setCount(S32 count) { mCount = count; }
// void setSelected(bool selected) { mSelected = selected; }
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index 0eb5c47f85..18a2f37ba2 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -50,6 +50,10 @@ Select multiple Members by holding the Ctrl key and
clicking on their names.
</panel.string>
<panel.string
+ name="donation_area">
+ [AREA] m²
+ </panel.string>
+ <panel.string
name="power_folder_icon" translate="false">
Inv_FolderClosed
</panel.string>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index e5bd549036..3d8ceb9912 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -278,6 +278,7 @@
<!-- world map -->
<string name="texture_loading">Loading...</string>
<string name="worldmap_offline">Offline</string>
+ <string name="worldmap_item_tooltip_format">[AREA] m² L$[PRICE]</string>
<string name="worldmap_results_none_found">None found.</string>
<!-- animations uploading status codes -->
diff --git a/indra/win_crash_logger/llcrashloggerwindows.cpp b/indra/win_crash_logger/llcrashloggerwindows.cpp
index 2884231299..01c750487e 100644
--- a/indra/win_crash_logger/llcrashloggerwindows.cpp
+++ b/indra/win_crash_logger/llcrashloggerwindows.cpp
@@ -145,7 +145,7 @@ void LLCrashLoggerWindows::ProcessCaption(HWND hWnd)
TCHAR header[MAX_STRING];
std::string final;
GetWindowText(hWnd, templateText, sizeof(templateText));
- final = llformat(ll_convert_wide_to_string(templateText).c_str(), gProductName.c_str());
+ final = llformat(ll_convert_wide_to_string(templateText, CP_ACP).c_str(), gProductName.c_str());
ConvertLPCSTRToLPWSTR(final.c_str(), header);
SetWindowText(hWnd, header);
}
@@ -158,7 +158,7 @@ void LLCrashLoggerWindows::ProcessDlgItemText(HWND hWnd, int nIDDlgItem)
TCHAR header[MAX_STRING];
std::string final;
GetDlgItemText(hWnd, nIDDlgItem, templateText, sizeof(templateText));
- final = llformat(ll_convert_wide_to_string(templateText).c_str(), gProductName.c_str());
+ final = llformat(ll_convert_wide_to_string(templateText, CP_ACP).c_str(), gProductName.c_str());
ConvertLPCSTRToLPWSTR(final.c_str(), header);
SetDlgItemText(hWnd, nIDDlgItem, header);
}
@@ -201,7 +201,7 @@ bool handle_button_click(WORD button_id)
wbuffer, // pointer to buffer for text
20000 // maximum size of string
);
- std::string user_text(ll_convert_wide_to_string(wbuffer));
+ std::string user_text(ll_convert_wide_to_string(wbuffer, CP_ACP));
// Activate and show the window.
ShowWindow(gHwndProgress, SW_SHOW);
// Try doing this second to make the progress window go frontmost.