automated merge

master
Loren Shih 2010-06-10 11:41:59 -04:00
commit a37f7ec200
33 changed files with 1238 additions and 2509 deletions

View File

@ -232,7 +232,6 @@ set(llcommon_HEADER_FILES
metaclasst.h
metaproperty.h
metapropertyt.h
processor.h
reflective.h
reflectivet.h
roles_constants.h
@ -290,6 +289,7 @@ if (LL_TESTS)
LL_ADD_INTEGRATION_TEST(llframetimer "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llinstancetracker "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(lllazy "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")

View File

@ -238,7 +238,7 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
#else // windows or x86-mac or x86-linux or x86-solaris
U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
{
static U64 sCPUClockFrequency = U64(CProcessor().GetCPUFrequency(50));
static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency());
// we drop the low-order byte in our timers, so report a lower frequency
return sCPUClockFrequency >> 8;

File diff suppressed because it is too large Load Diff

View File

@ -30,167 +30,26 @@
* $/LicenseInfo$
*/
// Author: Benjamin Jurke
// File history: 27.02.2002 File created.
///////////////////////////////////////////
#ifndef LLPROCESSOR_H
#define LLPROCESSOR_H
class LLProcessorInfoImpl;
// Options:
///////////
#if LL_WINDOWS
#define PROCESSOR_FREQUENCY_MEASURE_AVAILABLE
#endif
#if LL_MSVC && _M_X64
# define LL_X86_64 1
# define LL_X86 1
#elif LL_MSVC && _M_IX86
# define LL_X86 1
#elif LL_GNUC && ( defined(__amd64__) || defined(__x86_64__) )
# define LL_X86_64 1
# define LL_X86 1
#elif LL_GNUC && ( defined(__i386__) )
# define LL_X86 1
#elif LL_GNUC && ( defined(__powerpc__) || defined(__ppc__) )
# define LL_PPC 1
#endif
struct ProcessorExtensions
class LL_COMMON_API LLProcessorInfo
{
bool FPU_FloatingPointUnit;
bool VME_Virtual8086ModeEnhancements;
bool DE_DebuggingExtensions;
bool PSE_PageSizeExtensions;
bool TSC_TimeStampCounter;
bool MSR_ModelSpecificRegisters;
bool PAE_PhysicalAddressExtension;
bool MCE_MachineCheckException;
bool CX8_COMPXCHG8B_Instruction;
bool APIC_AdvancedProgrammableInterruptController;
unsigned int APIC_ID;
bool SEP_FastSystemCall;
bool MTRR_MemoryTypeRangeRegisters;
bool PGE_PTE_GlobalFlag;
bool MCA_MachineCheckArchitecture;
bool CMOV_ConditionalMoveAndCompareInstructions;
bool FGPAT_PageAttributeTable;
bool PSE36_36bitPageSizeExtension;
bool PN_ProcessorSerialNumber;
bool CLFSH_CFLUSH_Instruction;
unsigned int CLFLUSH_InstructionCacheLineSize;
bool DS_DebugStore;
bool ACPI_ThermalMonitorAndClockControl;
bool EMMX_MultimediaExtensions;
bool MMX_MultimediaExtensions;
bool FXSR_FastStreamingSIMD_ExtensionsSaveRestore;
bool SSE_StreamingSIMD_Extensions;
bool SSE2_StreamingSIMD2_Extensions;
bool Altivec_Extensions;
bool SS_SelfSnoop;
bool HT_HyperThreading;
unsigned int HT_HyterThreadingSiblings;
bool TM_ThermalMonitor;
bool IA64_Intel64BitArchitecture;
bool _3DNOW_InstructionExtensions;
bool _E3DNOW_InstructionExtensions;
bool AA64_AMD64BitArchitecture;
};
struct ProcessorCache
{
bool bPresent;
char strSize[32]; /* Flawfinder: ignore */
unsigned int uiAssociativeWays;
unsigned int uiLineSize;
bool bSectored;
char strCache[128]; /* Flawfinder: ignore */
};
struct ProcessorL1Cache
{
ProcessorCache Instruction;
ProcessorCache Data;
};
struct ProcessorTLB
{
bool bPresent;
char strPageSize[32]; /* Flawfinder: ignore */
unsigned int uiAssociativeWays;
unsigned int uiEntries;
char strTLB[128]; /* Flawfinder: ignore */
};
struct ProcessorInfo
{
char strVendor[16]; /* Flawfinder: ignore */
unsigned int uiFamily;
unsigned int uiExtendedFamily;
char strFamily[64]; /* Flawfinder: ignore */
unsigned int uiModel;
unsigned int uiExtendedModel;
char strModel[128]; /* Flawfinder: ignore */
unsigned int uiStepping;
unsigned int uiType;
char strType[64]; /* Flawfinder: ignore */
unsigned int uiBrandID;
char strBrandID[64]; /* Flawfinder: ignore */
char strProcessorSerial[64]; /* Flawfinder: ignore */
unsigned long MaxSupportedLevel;
unsigned long MaxSupportedExtendedLevel;
ProcessorExtensions _Ext;
ProcessorL1Cache _L1;
ProcessorCache _L2;
ProcessorCache _L3;
ProcessorCache _Trace;
ProcessorTLB _Instruction;
ProcessorTLB _Data;
};
// CProcessor
// ==========
// Class for detecting the processor name, type and available
// extensions as long as it's speed.
/////////////////////////////////////////////////////////////
class CProcessor
{
// Constructor / Destructor:
////////////////////////////
public:
CProcessor();
LLProcessorInfo();
~LLProcessorInfo();
// Private vars:
////////////////
public:
F64 uqwFrequency;
char strCPUName[128]; /* Flawfinder: ignore */
ProcessorInfo CPUInfo;
// Private functions:
/////////////////////
F64 getCPUFrequency() const;
bool hasSSE() const;
bool hasSSE2() const;
bool hasAltivec() const;
std::string getCPUFamilyName() const;
std::string getCPUBrandName() const;
std::string getCPUFeatureDescription() const;
private:
bool AnalyzeIntelProcessor();
bool AnalyzeAMDProcessor();
bool AnalyzeUnknownProcessor();
bool CheckCPUIDPresence();
void DecodeProcessorConfiguration(unsigned int cfg);
void TranslateProcessorConfiguration();
void GetStandardProcessorConfiguration();
void GetStandardProcessorExtensions();
// Public functions:
////////////////////
public:
F64 GetCPUFrequency(unsigned int uiMeasureMSecs);
const ProcessorInfo *GetCPUInfo();
bool CPUInfoToText(char *strBuffer, unsigned int uiMaxLen);
bool WriteInfoTextFile(const std::string& strFilename);
LLProcessorInfoImpl* mImpl;
};
#endif
#endif // LLPROCESSOR_H

View File

@ -58,7 +58,6 @@
# include <unistd.h>
# include <sys/sysinfo.h>
const char MEMINFO_FILE[] = "/proc/meminfo";
const char CPUINFO_FILE[] = "/proc/cpuinfo";
#elif LL_SOLARIS
# include <stdio.h>
# include <unistd.h>
@ -513,71 +512,21 @@ U32 LLOSInfo::getProcessResidentSizeKB()
LLCPUInfo::LLCPUInfo()
{
std::ostringstream out;
CProcessor proc;
const ProcessorInfo* info = proc.GetCPUInfo();
LLProcessorInfo proc;
// proc.WriteInfoTextFile("procInfo.txt");
mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions;
mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions;
mHasAltivec = info->_Ext.Altivec_Extensions;
mCPUMHz = (F64)(proc.GetCPUFrequency(50)/1000000.0F);
mFamily.assign( info->strFamily );
mHasSSE = proc.hasSSE();
mHasSSE2 = proc.hasSSE2();
mHasAltivec = proc.hasAltivec();
mCPUMHz = (F64)proc.getCPUFrequency();
mFamily = proc.getCPUFamilyName();
mCPUString = "Unknown";
#if LL_WINDOWS || LL_DARWIN || LL_SOLARIS
out << proc.strCPUName;
out << proc.getCPUBrandName();
if (200 < mCPUMHz && mCPUMHz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check
{
out << " (" << mCPUMHz << " MHz)";
}
mCPUString = out.str();
#elif LL_LINUX
std::map< std::string, std::string > cpuinfo;
LLFILE* cpuinfo_fp = LLFile::fopen(CPUINFO_FILE, "rb");
if(cpuinfo_fp)
{
char line[MAX_STRING];
memset(line, 0, MAX_STRING);
while(fgets(line, MAX_STRING, cpuinfo_fp))
{
// /proc/cpuinfo on Linux looks like:
// name\t*: value\n
char* tabspot = strchr( line, '\t' );
if (tabspot == NULL)
continue;
char* colspot = strchr( tabspot, ':' );
if (colspot == NULL)
continue;
char* spacespot = strchr( colspot, ' ' );
if (spacespot == NULL)
continue;
char* nlspot = strchr( line, '\n' );
if (nlspot == NULL)
nlspot = line + strlen( line ); // Fallback to terminating NUL
std::string linename( line, tabspot );
std::string llinename(linename);
LLStringUtil::toLower(llinename);
std::string lineval( spacespot + 1, nlspot );
cpuinfo[ llinename ] = lineval;
}
fclose(cpuinfo_fp);
}
# if LL_X86
std::string flags = " " + cpuinfo["flags"] + " ";
LLStringUtil::toLower(flags);
mHasSSE = ( flags.find( " sse " ) != std::string::npos );
mHasSSE2 = ( flags.find( " sse2 " ) != std::string::npos );
F64 mhz;
if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz)
&& 200.0 < mhz && mhz < 10000.0)
{
mCPUMHz = (F64)(mhz);
}
if (!cpuinfo["model name"].empty())
mCPUString = cpuinfo["model name"];
# endif // LL_X86
#endif // LL_LINUX
}
bool LLCPUInfo::hasAltivec() const
@ -607,38 +556,9 @@ std::string LLCPUInfo::getCPUString() const
void LLCPUInfo::stream(std::ostream& s) const
{
#if LL_WINDOWS || LL_DARWIN || LL_SOLARIS
// gather machine information.
char proc_buf[CPUINFO_BUFFER_SIZE]; /* Flawfinder: ignore */
CProcessor proc;
if(proc.CPUInfoToText(proc_buf, CPUINFO_BUFFER_SIZE))
{
s << proc_buf;
}
else
{
s << "Unable to collect processor information" << std::endl;
}
#else
// *NOTE: This works on linux. What will it do on other systems?
LLFILE* cpuinfo = LLFile::fopen(CPUINFO_FILE, "rb");
if(cpuinfo)
{
char line[MAX_STRING];
memset(line, 0, MAX_STRING);
while(fgets(line, MAX_STRING, cpuinfo))
{
line[strlen(line)-1] = ' ';
s << line;
}
fclose(cpuinfo);
s << std::endl;
}
else
{
s << "Unable to collect processor information" << std::endl;
}
#endif
s << LLProcessorInfo().getCPUFeatureDescription();
// These are interesting as they reflect our internal view of the
// CPU's attributes regardless of platform
s << "->mHasSSE: " << (U32)mHasSSE << std::endl;

View File

@ -0,0 +1,67 @@
/**
* @file llprocessor_test.cpp
* @date 2010-06-01
*
* $LicenseInfo:firstyear=2010&license=viewergpl$
*
* Copyright (c) 2010, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "linden_common.h"
#include "../test/lltut.h"
#include "../llprocessor.h"
namespace tut
{
struct processor
{
};
typedef test_group<processor> processor_t;
typedef processor_t::object processor_object_t;
tut::processor_t tut_processor("processor");
template<> template<>
void processor_object_t::test<1>()
{
set_test_name("LLProcessorInfo regression test");
LLProcessorInfo pi;
F64 freq = pi.getCPUFrequency();
//bool sse = pi.hasSSE();
//bool sse2 = pi.hasSSE2();
//bool alitvec = pi.hasAltivec();
std::string family = pi.getCPUFamilyName();
std::string brand = pi.getCPUBrandName();
//std::string steam = pi.getCPUFeatureDescription();
ensure_not_equals("Unknown Brand name", brand, "Unknown");
ensure_not_equals("Unknown Family name", family, "Unknown");
ensure("Reasonable CPU Frequency > 100 && < 10000", freq > 100 && freq < 10000);
}
}

View File

@ -352,7 +352,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
mAccordionTabs.push_back(accordion_tab);
accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) );
arrange();
}
void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
@ -541,6 +541,8 @@ void LLAccordionCtrl::arrange()
S32 panel_height = getRect().getHeight() - 2*BORDER_MARGIN;
if (accordion_tab->getFitParent())
panel_height = accordion_tab->getRect().getHeight();
ctrlSetLeftTopAndSize(accordion_tab,panel_rect.mLeft,panel_top,panel_width,panel_height);
show_hide_scrollbar(getRect().getWidth(),getRect().getHeight());

View File

@ -190,6 +190,7 @@ public:
void showAndFocusHeader();
void setFitPanel( bool fit ) { mFitPanel = true; }
bool getFitParent() const { return mFitPanel; }
protected:
void adjustContainerPanel (const LLRect& child_rect);

View File

@ -377,7 +377,10 @@ void LLLineEditor::setText(const LLStringExplicit &new_text)
setCursor(llmin((S32)mText.length(), getCursor()));
// Set current history line to end of history.
mCurrentHistoryLine = mLineHistory.end() - 1;
if(mLineHistory.end() != mLineHistory.begin())
{
mCurrentHistoryLine = mLineHistory.end() - 1;
}
mPrevText = mText;
}

View File

@ -11428,5 +11428,16 @@
<key>Value</key>
<integer>180</integer>
</map>
<key>HeightUnits</key>
<map>
<key>Comment</key>
<string>Determines which metric units are used: 1(TRUE) for meter and 0(FALSE) for foot.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>

View File

@ -2006,6 +2006,8 @@ bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool clos
// static
void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, const LLUUID& parent_id)
{
if (type == LLWearableType::WT_INVALID || type == LLWearableType::WT_NONE) return;
LLWearable* wearable = LLWearableList::instance().createNewWearable(type);
LLAssetType::EType asset_type = wearable->getAssetType();
LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE;

View File

@ -331,10 +331,6 @@ const char *VFS_INDEX_FILE_BASE = "index.db2.x.";
static std::string gWindowTitle;
std::string gLoginPage;
std::vector<std::string> gLoginURIs;
static std::string gHelperURI;
LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
void idle_afk_check()

View File

@ -656,6 +656,8 @@ void LLAvatarActions::shareWithAvatars()
LLFloaterAvatarPicker* picker =
LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE);
picker->setOkBtnEnableCb(boost::bind(is_give_inventory_acceptable));
picker->openFriendsTab();
LLNotificationsUtil::add("ShareNotification");
}
// static

View File

@ -58,13 +58,19 @@ static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR;
class CofContextMenu : public LLListContextMenu
{
protected:
static void updateCreateWearableLabel(LLMenuGL* menu, const LLUUID& item_id)
CofContextMenu(LLCOFWearables* cof_wearables)
: mCOFWearables(cof_wearables)
{
llassert(mCOFWearables);
}
void updateCreateWearableLabel(LLMenuGL* menu, const LLUUID& item_id)
{
LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new");
LLWearableType::EType w_type = getWearableType(item_id);
// Hide the "Create new <WEARABLE_TYPE>" if it's irrelevant.
LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
if (!item || !item->isWearableType())
if (w_type == LLWearableType::WT_NONE)
{
menu_item->setVisible(FALSE);
return;
@ -72,25 +78,67 @@ protected:
// Set proper label for the "Create new <WEARABLE_TYPE>" menu item.
LLStringUtil::format_map_t args;
LLWearableType::EType w_type = item->getWearableType();
args["[WEARABLE_TYPE]"] = LLWearableType::getTypeDefaultNewName(w_type);
std::string new_label = LLTrans::getString("CreateNewWearable", args);
menu_item->setLabel(new_label);
}
static void createNew(const LLUUID& item_id)
void createNew(const LLUUID& item_id)
{
LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
if (!item || !item->isWearableType()) return;
LLAgentWearables::createWearable(item->getWearableType(), true);
LLAgentWearables::createWearable(getWearableType(item_id), true);
}
// Get wearable type of the given item.
//
// There is a special case: so-called "dummy items"
// (i.e. the ones that are there just to indicate that you're not wearing
// any wearables of the corresponding type. They are currently grayed out
// and suffixed with "not worn").
// Those items don't have an UUID, but they do have an associated wearable type.
// If the user has invoked context menu for such item,
// we ignore the passed item_id and retrieve wearable type from the item.
LLWearableType::EType getWearableType(const LLUUID& item_id)
{
if (!isDummyItem(item_id))
{
LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
if (item && item->isWearableType())
{
return item->getWearableType();
}
}
else if (mCOFWearables) // dummy item selected
{
LLPanelDummyClothingListItem* item;
item = dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem());
if (item)
{
return item->getWearableType();
}
}
return LLWearableType::WT_NONE;
}
static bool isDummyItem(const LLUUID& item_id)
{
return item_id.isNull();
}
LLCOFWearables* mCOFWearables;
};
//////////////////////////////////////////////////////////////////////////
class CofAttachmentContextMenu : public LLListContextMenu
class CofAttachmentContextMenu : public CofContextMenu
{
public:
CofAttachmentContextMenu(LLCOFWearables* cof_wearables)
: CofContextMenu(cof_wearables)
{
}
protected:
/*virtual*/ LLContextMenu* createMenu()
@ -108,8 +156,13 @@ protected:
class CofClothingContextMenu : public CofContextMenu
{
protected:
public:
CofClothingContextMenu(LLCOFWearables* cof_wearables)
: CofContextMenu(cof_wearables)
{
}
protected:
/*virtual*/ LLContextMenu* createMenu()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@ -121,7 +174,7 @@ protected:
registrar.add("Clothing.MoveUp", boost::bind(moveWearable, selected_id, false));
registrar.add("Clothing.MoveDown", boost::bind(moveWearable, selected_id, true));
registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
registrar.add("Clothing.Create", boost::bind(createNew, selected_id));
registrar.add("Clothing.Create", boost::bind(&CofClothingContextMenu::createNew, this, selected_id));
enable_registrar.add("Clothing.OnEnable", boost::bind(&CofClothingContextMenu::onEnable, this, _2));
@ -171,8 +224,13 @@ protected:
class CofBodyPartContextMenu : public CofContextMenu
{
protected:
public:
CofBodyPartContextMenu(LLCOFWearables* cof_wearables)
: CofContextMenu(cof_wearables)
{
}
protected:
/*virtual*/ LLContextMenu* createMenu()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
@ -184,7 +242,7 @@ protected:
LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked, panel_oe, selected_id));
registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
registrar.add("BodyPart.Create", boost::bind(createNew, selected_id));
registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id));
enable_registrar.add("BodyPart.OnEnable", boost::bind(&CofBodyPartContextMenu::onEnable, this, _2));
@ -219,9 +277,9 @@ LLCOFWearables::LLCOFWearables() : LLPanel(),
mBodyParts(NULL),
mLastSelectedList(NULL)
{
mClothingMenu = new CofClothingContextMenu();
mAttachmentMenu = new CofAttachmentContextMenu();
mBodyPartMenu = new CofBodyPartContextMenu();
mClothingMenu = new CofClothingContextMenu(this);
mAttachmentMenu = new CofAttachmentContextMenu(this);
mBodyPartMenu = new CofBodyPartContextMenu(this);
};
LLCOFWearables::~LLCOFWearables()

View File

@ -446,6 +446,19 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
return TRUE;
}
void LLFloaterAvatarPicker::openFriendsTab()
{
LLTabContainer* tab_container = getChild<LLTabContainer>("ResidentChooserTabs");
if (tab_container == NULL)
{
llassert(tab_container != NULL);
return;
}
tab_container->selectTabByName("FriendsPanel");
}
// static
void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void**)
{

View File

@ -66,6 +66,8 @@ public:
void *cargo_data, EAcceptance *accept,
std::string& tooltip_msg);
void openFriendsTab();
private:
void editKeystroke(class LLLineEditor* caller, void* user_data);

View File

@ -54,7 +54,10 @@
// Constants
//
const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f;
const S32 MAP_PADDING_LEFT = 0;
const S32 MAP_PADDING_TOP = 2;
const S32 MAP_PADDING_RIGHT = 2;
const S32 MAP_PADDING_BOTTOM = 0;
//
// Member functions
//
@ -106,7 +109,8 @@ BOOL LLFloaterMap::postBuild()
mPopupMenu->setItemEnabled ("Stop Tracking", false);
}
stretchMiniMap(getRect().getWidth(),getRect().getHeight());
stretchMiniMap(getRect().getWidth() - MAP_PADDING_LEFT - MAP_PADDING_RIGHT
,getRect().getHeight() - MAP_PADDING_TOP - MAP_PADDING_BOTTOM);
updateMinorDirections();
@ -238,7 +242,7 @@ void LLFloaterMap::stretchMiniMap(S32 width,S32 height)
if(mMap)
{
LLRect map_rect;
map_rect.setLeftTopAndSize( 0, getRect().getHeight(), width, height);
map_rect.setLeftTopAndSize( MAP_PADDING_LEFT, getRect().getHeight() - MAP_PADDING_TOP, width, height);
mMap->reshape( width, height, 1);
mMap->setRect(map_rect);
}
@ -248,7 +252,8 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLFloater::reshape(width, height, called_from_parent);
stretchMiniMap(width, height);
stretchMiniMap(width - MAP_PADDING_LEFT - MAP_PADDING_RIGHT
,height - MAP_PADDING_TOP - MAP_PADDING_BOTTOM);
updateMinorDirections();
}

View File

@ -2209,13 +2209,7 @@ void LLFolderBridge::determineFolderType()
BOOL LLFolderBridge::isItemRenameable() const
{
LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)getCategory();
if(cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType())
&& (cat->getOwnerID() == gAgent.getID()))
{
return TRUE;
}
return FALSE;
return get_is_category_renameable(getInventoryModel(), mUUID);
}
void LLFolderBridge::restoreItem()

View File

@ -309,6 +309,11 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
{
if (!model)
{
return FALSE;
}
LLViewerInventoryCategory* cat = model->getCategory(id);
if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&

View File

@ -49,7 +49,6 @@
#include "llchannelmanager.h"
#include "llagent.h" // gAgent
#include "llfloaterscriptdebug.h"
#include "llchathistory.h"
#include "llstylemap.h"
@ -163,25 +162,6 @@ std::string appendTime()
void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
{
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
{
if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
return;
if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat"))
{
LLColor4 txt_color;
LLViewerChat::getChatColor(chat,txt_color);
LLFloaterScriptDebug::addScriptLine(chat.mText,
chat.mFromName,
txt_color,
chat.mFromID);
return;
}
}
LLChat& tmp_chat = const_cast<LLChat&>(chat);
if(tmp_chat.mTimeStr.empty())

View File

@ -36,6 +36,7 @@
#include "llbottomtray.h"
#include "llchatitemscontainerctrl.h"
#include "llfloaterscriptdebug.h"
#include "llnearbychat.h"
#include "llrecentpeople.h"
@ -287,7 +288,7 @@ void LLNearbyChatScreenChannel::showToastsBottom()
toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight());
toast->setRect(toast_rect);
bottom += toast_rect.getHeight() + margin;
bottom += toast_rect.getHeight() - toast->getTopPad() + margin;
}
// use reverse order to provide correct z-order and avoid toast blinking
@ -358,6 +359,29 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
//if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null)
// tmp_chat.mFromName = tmp_chat.mFromID.asString();
}
// don't show toast and add message to chat history on receive debug message
// with disabled setting showing script errors or enabled setting to show script
// errors in separate window.
if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG)
{
if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
return;
if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat"))
{
LLColor4 txt_color;
LLViewerChat::getChatColor(chat_msg,txt_color);
LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
chat_msg.mFromName,
txt_color,
chat_msg.mFromID);
return;
}
}
nearby_chat->addMessage(chat_msg, true, args);
if( nearby_chat->getVisible()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT

View File

@ -61,6 +61,9 @@
#include "llagentcamera.h"
#include "llmorphview.h"
#include "llcommandhandler.h"
#include "lltextutil.h"
// register panel with appropriate XML
static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable");
@ -608,6 +611,36 @@ LLPanelEditWearable::~LLPanelEditWearable()
}
bool LLPanelEditWearable::changeHeightUnits(const LLSD& new_value)
{
updateMetricLayout( new_value.asBoolean() );
updateTypeSpecificControls(LLWearableType::WT_SHAPE);
return true;
}
void LLPanelEditWearable::updateMetricLayout(BOOL new_value)
{
LLUIString current_metric, replacment_metric;
current_metric = new_value ? mMeters : mFeet;
replacment_metric = new_value ? mFeet : mMeters;
mHeigthValue.setArg( "[METRIC1]", current_metric.getString() );
mReplacementMetricUrl.setArg( "[URL_METRIC2]", std::string("[secondlife:///app/metricsystem ") + replacment_metric.getString() + std::string("]"));
}
void LLPanelEditWearable::updateAvatarHeightLabel()
{
mTxtAvatarHeight->setText(LLStringUtil::null);
LLStyle::Params param;
param.color = mAvatarHeigthLabelColor;
mTxtAvatarHeight->appendText(mHeigth, false, param);
param.color = mAvatarHeigthValueLabelColor;
mTxtAvatarHeight->appendText(mHeigthValue, false, param);
param.color = mAvatarHeigthLabelColor; // using mAvatarHeigthLabelColor for '/' separator
mTxtAvatarHeight->appendText(" / ", false, param);
mTxtAvatarHeight->appendText(this->mReplacementMetricUrl, false, param);
}
// virtual
BOOL LLPanelEditWearable::postBuild()
{
@ -700,6 +733,20 @@ BOOL LLPanelEditWearable::postBuild()
for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2));
}
// init all strings
mMeters = mPanelShape->getString("meters");
mFeet = mPanelShape->getString("feet");
mHeigth = mPanelShape->getString("height") + " ";
mHeigthValue = "[HEIGHT] [METRIC1]";
mReplacementMetricUrl = "[URL_METRIC2]";
std::string color = mPanelShape->getString("heigth_label_color");
mAvatarHeigthLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green);
color = mPanelShape->getString("heigth_value_label_color");
mAvatarHeigthValueLabelColor = LLUIColorTable::instance().getColor(color, LLColor4::green);
gSavedSettings.getControl("HeightUnits")->getSignal()->connect(boost::bind(&LLPanelEditWearable::changeHeightUnits, this, _2));
updateMetricLayout(gSavedSettings.getBOOL("HeightUnits"));
return TRUE;
}
@ -1107,12 +1154,22 @@ void LLPanelEditWearable::toggleTypeSpecificControls(LLWearableType::EType type)
void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type)
{
const F32 ONE_METER = 1.0;
const F32 ONE_FOOT = 0.3048 * ONE_METER; // in meters
// Update controls specific to shape editing panel.
if (type == LLWearableType::WT_SHAPE)
{
// Update avatar height
std::string avatar_height_str = llformat("%.2f", gAgentAvatarp->mBodySize.mV[VZ]);
mTxtAvatarHeight->setTextArg("[HEIGHT]", avatar_height_str);
F32 new_size = gAgentAvatarp->mBodySize.mV[VZ];
if (gSavedSettings.getBOOL("HeightUnits") == FALSE)
{
// convert meters to feet
new_size = new_size / ONE_FOOT;
}
std::string avatar_height_str = llformat("%.2f", new_size);
mHeigthValue.setArg("[HEIGHT]", avatar_height_str);
updateAvatarHeightLabel();
}
if (LLWearableType::WT_ALPHA == type)
@ -1381,4 +1438,21 @@ void LLPanelEditWearable::initPreviousAlphaTextureEntry(LLVOAvatarDefines::EText
}
}
// handle secondlife:///app/metricsystem
class LLMetricSystemHandler : public LLCommandHandler
{
public:
LLMetricSystemHandler() : LLCommandHandler("metricsystem", UNTRUSTED_THROTTLE) { }
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
{
// change height units TRUE for meters and FALSE for feet
BOOL new_value = (gSavedSettings.getBOOL("HeightUnits") == FALSE) ? TRUE : FALSE;
gSavedSettings.setBOOL("HeightUnits", new_value);
return true;
}
};
LLMetricSystemHandler gMetricSystemHandler;
// EOF

View File

@ -104,6 +104,15 @@ private:
void initPreviousAlphaTextures();
void initPreviousAlphaTextureEntry(LLVOAvatarDefines::ETextureIndex te);
// callback for HeightUnits parameter.
bool changeHeightUnits(const LLSD& new_value);
// updates current metric and replacemet metric label text
void updateMetricLayout(BOOL new_value);
// updates avatar height label
void updateAvatarHeightLabel();
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
LLWearable *mWearablePtr;
LLViewerInventoryItem* mWearableItem;
@ -117,6 +126,18 @@ private:
LLTextBox *mTxtAvatarHeight;
// localized and parametrized strings that used to build avatar_height_label
std::string mMeters;
std::string mFeet;
std::string mHeigth;
LLUIString mHeigthValue;
LLUIString mReplacementMetricUrl;
// color for mHeigth string
LLUIColor mAvatarHeigthLabelColor;
// color for mHeigthValue string
LLUIColor mAvatarHeigthValueLabelColor;
// This text editor reference will change each time we edit a new wearable -
// it will be grabbed from the currently visible panel
LLTextEditor *mTextEditor;

View File

@ -334,7 +334,7 @@ void LLLandmarksPanel::updateVerbs()
bool landmark_selected = isLandmarkSelected();
mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport"));
mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info"));
mShowOnMapBtn->setEnabled(true);
mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map"));
// TODO: mantipov: Uncomment when mShareBtn is supported
// Share button should be enabled when neither a folder nor a landmark is selected

View File

@ -189,7 +189,8 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
mInitialized(false),
mAddWearablesPanel(NULL),
mWearableListMaskCollector(NULL),
mWearableListTypeCollector(NULL)
mWearableListTypeCollector(NULL),
mFilterComboBox(NULL)
{
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
@ -235,12 +236,13 @@ BOOL LLPanelOutfitEdit::postBuild()
mListViewBtn = getChild<LLButton>("list_view_btn");
childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL);
childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredFolderWearablesPanel, this), NULL);
childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL);
childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesFolderView, this), NULL);
childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showWearablesListView, this), NULL);
childSetCommitCallback("wearables_gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL);
childSetCommitCallback("gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL);
mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list");
mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this));
mCOFWearables->getCOFCallbacks().mAddWearable = boost::bind(&LLPanelOutfitEdit::onAddWearableClicked, this);
mCOFWearables->getCOFCallbacks().mEditWearable = boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this);
@ -258,19 +260,20 @@ BOOL LLPanelOutfitEdit::postBuild()
mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel());
LLComboBox* type_filter = getChild<LLComboBox>("filter_wearables_combobox");
type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1));
type_filter->removeall();
mFilterComboBox = getChild<LLComboBox>("filter_wearables_combobox");
mFilterComboBox->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1));
mFilterComboBox->removeall();
for (U32 i = 0; i < mLookItemTypes.size(); ++i)
{
type_filter->add(mLookItemTypes[i].displayName);
mFilterComboBox->add(mLookItemTypes[i].displayName);
}
type_filter->setCurrentByIndex(LIT_ALL);
mFilterComboBox->setCurrentByIndex(LIT_ALL);
mSearchFilter = getChild<LLFilterEditor>("look_item_filter");
mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2));
childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this));
childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::onAddMoreButtonClicked, this));
childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this));
mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");
@ -353,7 +356,7 @@ void LLPanelOutfitEdit::showWearablesFilter()
}
}
void LLPanelOutfitEdit::showFilteredWearablesPanel()
void LLPanelOutfitEdit::showWearablesListView()
{
if(switchPanels(mInventoryItemsPanel, mWearableItemsPanel))
{
@ -364,7 +367,7 @@ void LLPanelOutfitEdit::showFilteredWearablesPanel()
mListViewBtn->setToggleState(TRUE);
}
void LLPanelOutfitEdit::showFilteredFolderWearablesPanel()
void LLPanelOutfitEdit::showWearablesFolderView()
{
if(switchPanels(mWearableItemsPanel, mInventoryItemsPanel))
{
@ -377,17 +380,12 @@ void LLPanelOutfitEdit::showFilteredFolderWearablesPanel()
void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl)
{
LLComboBox* type_filter = dynamic_cast<LLComboBox*>(ctrl);
llassert(type_filter);
if (type_filter)
{
U32 curr_filter_type = type_filter->getCurrentIndex();
mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask);
U32 curr_filter_type = mFilterComboBox->getCurrentIndex();
mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask);
mWearableListMaskCollector->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask);
mWearableListManager->setFilterCollector(mWearableListMaskCollector);
mWearableListMaskCollector->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask);
mWearableListManager->setFilterCollector(mWearableListMaskCollector);
}
mSavedFolderState->setApply(TRUE);
mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
@ -471,7 +469,7 @@ void LLPanelOutfitEdit::onAddWearableClicked(void)
if(item)
{
showFilteredWearableItemsList(item->getWearableType());
showFilteredWearablesListView(item->getWearableType());
}
}
@ -481,7 +479,7 @@ void LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id
if (item && item->getType() == LLAssetType::AT_BODYPART)
{
showFilteredWearableItemsList(item->getWearableType());
showFilteredWearablesListView(item->getWearableType());
}
}
@ -538,24 +536,81 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView
current_item->addChild(mAddToLookBtn); */
}
void LLPanelOutfitEdit::onOutfitItemSelectionChange(void)
{
LLUUID item_id = mCOFWearables->getSelectedUUID();
//*TODO show Edit Wearable Button
LLViewerInventoryItem* item_to_remove = gInventory.getItem(item_id);
if (!item_to_remove) return;
switch (item_to_remove->getType())
{
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_OBJECT:
default:
break;
}
void LLPanelOutfitEdit::applyFilter(e_look_item_type type)
{
mFilterComboBox->setCurrentByIndex(type);
mFilterComboBox->onCommit();
}
void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
{
if (!mAddWearablesPanel->getVisible()) return;
uuid_vec_t ids;
mCOFWearables->getSelectedUUIDs(ids);
bool nothing_selected = ids.empty();
bool one_selected = ids.size() == 1;
bool more_than_one_selected = ids.size() > 1;
bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem()));
//resetting selection if no item is selected or than one item is selected
if (nothing_selected || more_than_one_selected)
{
if (nothing_selected)
{
showWearablesFolderView();
}
if (more_than_one_selected)
{
showWearablesListView();
}
applyFilter(LIT_ALL);
return;
}
//filter wearables by a type represented by a dummy item
if (one_selected && is_dummy_item)
{
onAddWearableClicked();
return;
}
LLViewerInventoryItem* item = gInventory.getItem(ids[0]);
if (!item && ids[0].notNull())
{
//Inventory misses an item with non-zero id
showWearablesListView();
applyFilter(LIT_ALL);
return;
}
if (one_selected && !is_dummy_item)
{
if (item->isWearableType())
{
//single clothing or bodypart item is selected
showFilteredWearablesListView(item->getWearableType());
mFilterComboBox->setLabel(getString("Filter.Custom"));
return;
}
else
{
//attachment is selected
showWearablesListView();
applyFilter(LIT_ATTACHMENT);
return;
}
}
}
void LLPanelOutfitEdit::update()
{
mCOFWearables->refresh();
@ -676,12 +731,21 @@ void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button)
LLMenuGL::showPopup(clicked_button, mGearMenu, 0, menu_y);
}
void LLPanelOutfitEdit::showFilteredWearableItemsList(LLWearableType::EType type)
void LLPanelOutfitEdit::onAddMoreButtonClicked()
{
toggleAddWearablesPanel();
filterWearablesBySelectedItem();
}
void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type)
{
mFilterComboBox->setLabel(getString("Filter.Custom"));
mWearableListTypeCollector->setType(type);
mWearableListManager->setFilterCollector(mWearableListTypeCollector);
showAddWearablesPanel(true);
showFilteredWearablesPanel();
showWearablesListView();
}
// EOF

View File

@ -47,6 +47,7 @@
class LLButton;
class LLCOFWearables;
class LLComboBox;
class LLTextBox;
class LLInventoryCategory;
class LLOutfitObserver;
@ -94,15 +95,27 @@ public:
void toggleAddWearablesPanel();
void showAddWearablesPanel(bool show__add_wearables);
//following methods operate with "add wearables" panel
void showWearablesFilter();
void showFilteredWearablesPanel();
void showFilteredFolderWearablesPanel();
void showWearablesListView();
void showWearablesFolderView();
void onTypeFilterChanged(LLUICtrl* ctrl);
void onSearchEdit(const std::string& string);
void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
void onAddToOutfitClicked(void);
void onOutfitItemSelectionChange(void);
void applyFilter(e_look_item_type type);
/**
* Filter items in views of Add Wearables Panel and show appropriate view depending on currently selected COF item(s)
* No COF items selected - shows the folder view, reset filter
* 1 COF item selected - shows the list view and filters wearables there by a wearable type of the selected item
* More than 1 COF item selected - shows the list view and filters it by a type of the selected item (attachment or clothing)
*/
void filterWearablesBySelectedItem(void);
void onRemoveFromOutfitClicked(void);
void onEditWearableClicked(void);
void onAddWearableClicked(void);
@ -132,7 +145,8 @@ public:
private:
void onGearButtonClick(LLUICtrl* clicked_button);
void showFilteredWearableItemsList(LLWearableType::EType type);
void onAddMoreButtonClicked();
void showFilteredWearablesListView(LLWearableType::EType type);
LLTextBox* mCurrentOutfitName;
@ -145,6 +159,7 @@ private:
LLButton* mFolderViewBtn;
LLButton* mListViewBtn;
LLPanel* mAddWearablesPanel;
LLComboBox* mFilterComboBox;
LLFindNonLinksByMask* mWearableListMaskCollector;
LLFindWearablesOfType* mWearableListTypeCollector;
@ -162,6 +177,8 @@ private:
bool mInitialized;
std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
};
#endif // LL_LLPANELOUTFITEDIT_H

View File

@ -564,6 +564,7 @@ void LLTeleportHistoryPanel::updateVerbs()
{
mTeleportBtn->setEnabled(false);
mShowProfile->setEnabled(false);
mShowOnMapBtn->setEnabled(false);
return;
}
@ -571,7 +572,7 @@ void LLTeleportHistoryPanel::updateVerbs()
mTeleportBtn->setEnabled(NULL != itemp);
mShowProfile->setEnabled(NULL != itemp);
mShowOnMapBtn->setEnabled(true);
mShowOnMapBtn->setEnabled(NULL != itemp);
}
void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date)

View File

@ -172,6 +172,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
params.tab_stop(false);
params.wrap(true);
params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
params.allow_scroll(true);
LLTextBox * msg_box = LLUICtrlFactory::create<LLTextBox> (params);
// Compute max allowable height for the dialog text, so we can allocate
@ -180,9 +181,16 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
gFloaterView->getRect().getHeight()
- LINE_HEIGHT // title bar
- 3*VPAD - BTN_HEIGHT;
// reshape to calculate real text width and height
msg_box->reshape( MAX_ALLOWED_MSG_WIDTH, max_allowed_msg_height );
msg_box->setValue(msg);
msg_box->reshapeToFitText();
S32 pixel_width = msg_box->getTextPixelWidth();
S32 pixel_height = msg_box->getTextPixelHeight();
// We should use some space to prevent set textbox's scroller visible when it is unnecessary.
msg_box->reshape( llmin(MAX_ALLOWED_MSG_WIDTH,pixel_width + 2 * msg_box->getHPad() + HPAD),
llmin(max_allowed_msg_height,pixel_height + 2 * msg_box->getVPad()) ) ;
const LLRect& text_rect = msg_box->getRect();
S32 dialog_width = llmax( btn_total_width, text_rect.getWidth() ) + 2 * HPAD;

View File

@ -170,7 +170,7 @@
<menu_item_separator />
<menu_item_call
label="Rename"
label="Rename Outfit"
layout="topleft"
name="rename">
<on_click

View File

@ -6207,7 +6207,7 @@ The button will be shown when there is enough space for it.
icon="notifytip.tga"
name="ShareNotification"
type="notifytip">
Drag items from inventory onto a person in the resident picker
Select residents to share with.
</notification>
<notification
icon="notifytip.tga"

View File

@ -8,19 +8,22 @@
name="edit_shape_panel"
top_pad="10"
width="333" >
<text
follows="top|left|right"
font="SansSerifSmallBold"
halign="right"
height="12"
layout="topleft"
left="0"
name="avatar_height"
text_color="EmphasisColor"
top="0"
width="310">
[HEIGHT] Meters tall
</text>
<string name="meters">Meters</string>
<string name="feet">Feet</string>
<string name="height">Height:</string>
<string name="heigth_label_color" translate="false">White_50</string>
<string name="heigth_value_label_color" translate="false">White</string>
<text
follows="top|left|right"
font="SansSerifSmallBold"
halign="right"
height="12"
layout="topleft"
left="0"
name="avatar_height"
top="0"
width="310">
</text>
<panel
border="false"
bg_alpha_color="DkGray2"

View File

@ -51,6 +51,7 @@
<string name="Filter.All" value="All"/>
<string name="Filter.Clothes/Body" value="Clothes/Body"/>
<string name="Filter.Objects" value="Objects"/>
<string name="Filter.Custom" value="Custom filter"/>
<button

View File

@ -3181,7 +3181,7 @@ Abuse Report</string>
<!-- language specific white-space characters, delimiters, spacers, item separation symbols -->
<string name="sentences_separator" value=" "></string>
<string name="words_separator">, </string>
<string name="words_separator" value=", "/>
<string name="server_is_down">
Despite our best efforts, something unexpected has gone wrong.