PE merge.

meow-7.2.2
Tofu Linden 2010-03-15 15:23:28 +00:00
commit 42d1aaee2e
8 changed files with 48 additions and 16 deletions

View File

@ -417,11 +417,6 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
S32 total_width = LEFT_PAD;
S32 running_height = mDebugFilters ? llceil(LLFontGL::getFontMonospace()->getLineHeight()) : 0;
S32 target_height = running_height;
if(!mHasVisibleChildren)// is there any filtered items ?
{
//Nope. We need to display status textbox, let's reserve some place for it
target_height += mStatusTextBox->getTextPixelHeight();
}
S32 parent_item_height = getRect().getHeight();
for (folders_t::iterator iter = mFolders.begin();
@ -481,6 +476,13 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
}
}
if(!mHasVisibleChildren)// is there any filtered items ?
{
//Nope. We need to display status textbox, let's reserve some place for it
running_height = mStatusTextBox->getTextPixelHeight();
target_height = running_height;
}
LLRect scroll_rect = mScrollContainer->getContentWindowRect();
reshape( llmax(scroll_rect.getWidth(), total_width), running_height );
@ -1829,7 +1831,9 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
BOOL handled = childrenHandleRightMouseDown(x, y, mask) != NULL;
S32 count = mSelectedItems.size();
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
if(handled && (count > 0) && menu)
if ( handled
&& ( count > 0 && (hasVisibleChildren() || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS) ) // show menu only if selected items are visible
&& menu )
{
if (mCallbackRegistrar)
mCallbackRegistrar->pushScope();

View File

@ -76,8 +76,6 @@
#define LABEL_PICK = "Pick"
#define LABEL_CHANGES = "Changes"
std::string SET_LOCATION_NOTICE("(will update after save)");
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@ -410,7 +408,7 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
childSetValue("pick_name", pick_name.empty() ? region_name : pick_name);
childSetValue("pick_desc", pick_desc);
setSnapshotId(snapshot_id);
setPickLocation(createLocationText(SET_LOCATION_NOTICE, pick_name, region_name, getPosGlobal()));
setPickLocation(createLocationText(getLocationNotice(), pick_name, region_name, getPosGlobal()));
enableSaveButton(true);
}
@ -578,7 +576,7 @@ void LLPanelPickEdit::onClickSetLocation()
region_name = region->getName();
}
setPickLocation(createLocationText(SET_LOCATION_NOTICE, parcel_name, region_name, getPosGlobal()));
setPickLocation(createLocationText(getLocationNotice(), parcel_name, region_name, getPosGlobal()));
mLocationChanged = true;
enableSaveButton(TRUE);
@ -595,6 +593,12 @@ void LLPanelPickEdit::onClickSave()
notifyParent(params);
}
std::string LLPanelPickEdit::getLocationNotice()
{
static std::string notice = getString("location_notice");
return notice;
}
void LLPanelPickEdit::processProperties(void* data, EAvatarProcessorType type)
{
if(mNeedData)

View File

@ -248,6 +248,8 @@ protected:
*/
void onClickSave();
std::string getLocationNotice();
protected:
bool mLocationChanged;

View File

@ -4458,20 +4458,37 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
// have missed something during an event.
// *TODO: Translate
LLSD args;
args["MESSAGE"] = desc;
// this is a marker to retrieve avatar name from server message:
// "<avatar name> paid you L$"
const std::string marker = "paid you L$";
args["MESSAGE"] = desc;
// extract avatar name from system message
std::string name = desc.substr(0, desc.find(marker, 0));
S32 marker_pos = desc.find(marker, 0);
std::string base_name = desc.substr(0, marker_pos);
std::string name = base_name;
LLStringUtil::trim(name);
// if name extracted and name cache contains avatar id send loggable notification
LLUUID from_id;
if(name.size() > 0 && gCacheName->getUUID(name, from_id))
{
//description always comes not localized. lets fix this
//ammount paid
std::string ammount = desc.substr(marker_pos + marker.length(),desc.length() - marker.length() - marker_pos);
//reform description
std::string paid_you = LLTrans::getString("paid_you_ldollars");
std::string new_description = base_name + paid_you + ammount;
args["MESSAGE"] = new_description;
args["NAME"] = name;
LLSD payload;
payload["from_id"] = from_id;

View File

@ -25,10 +25,6 @@
name="Title">
Notecard: [NAME]
</floater.string>
<floater.string
name="Save">
Save
</floater.string>
<icon
follows="top|right"
height="18"

View File

@ -12,6 +12,10 @@
help_topic="profile_edit_pick"
top="0"
width="333">
<panel.string
name="location_notice">
(will update after save)
</panel.string>
<button
follows="top|right"
height="23"

View File

@ -337,6 +337,7 @@
top_pad="5"
width="400" />
<text
name="show_ims_in_label"
follows="left|top"
layout="topleft"
left="30"
@ -346,6 +347,7 @@
Show IMs in:
</text>
<text
name="requires_restart_label"
follows="left|top"
layout="topleft"
top_delta="0"

View File

@ -3015,4 +3015,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="unread_chat_multiple">
[SOURCES] have said something new
</string>"
<string name="paid_you_ldollars">"paid you L$"</string>"
</strings>