summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lldrawable.cpp16
-rw-r--r--indra/newview/lldrawpoolalpha.cpp1
-rw-r--r--indra/newview/llfloaterpreference.cpp132
-rw-r--r--indra/newview/llfloaterpreference.h3
-rw-r--r--indra/newview/llfolderviewitem.cpp8
-rw-r--r--indra/newview/llinventorybridge.cpp13
-rw-r--r--indra/newview/skins/default/xui/en/floater_postcard.xml14
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml65
-rw-r--r--indra/newview/skins/default/xui/ja/panel_preferences_general.xml2
9 files changed, 61 insertions, 193 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index d60330024a..9fbc3408d7 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1049,9 +1049,13 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat
llassert(mDrawable);
llassert(mDrawable->getRegion());
- llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType));
+ LLSpatialPartition *part = mDrawable->getRegion()->getSpatialPartition(mPartitionType);
+ llassert(part);
- mDrawable->getRegion()->getSpatialPartition(mPartitionType)->put(this);
+ if (part)
+ {
+ part->put(this);
+ }
}
LLSpatialBridge::~LLSpatialBridge()
@@ -1367,10 +1371,14 @@ BOOL LLSpatialBridge::updateMove()
{
llassert(mDrawable);
llassert(mDrawable->getRegion());
- llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType));
+ LLSpatialPartition* part = mDrawable->getRegion()->getSpatialPartition(mPartitionType);
+ llassert(part);
mOctree->balance();
- mDrawable->getRegion()->getSpatialPartition(mPartitionType)->move(this, getSpatialGroup(), TRUE);
+ if (part)
+ {
+ part->move(this, getSpatialGroup(), TRUE);
+ }
return TRUE;
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 6d77361414..7be6e82251 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -180,6 +180,7 @@ void LLDrawPoolAlpha::render(S32 pass)
if (LLPipeline::sFastAlpha && !deferred_render)
{
+ LLGLDisable blend_disable(GL_BLEND);
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.33f);
if (mVertexShaderLevel > 0)
{
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 3c9f7492a2..43111d76f7 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -110,8 +110,6 @@
const F32 MAX_USER_FAR_CLIP = 512.f;
const F32 MIN_USER_FAR_CLIP = 64.f;
-const S32 ASPECT_RATIO_STR_LEN = 100;
-
class LLVoiceSetKeyDialog : public LLModalDialog
{
public:
@@ -283,7 +281,6 @@ void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator)
}
// static
std::string LLFloaterPreference::sSkin = "";
-F32 LLFloaterPreference::sAspectRatio = 0.0;
//////////////////////////////////////////////
// LLFloaterPreference
@@ -324,11 +321,9 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this));
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));
- mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
mCommitCallbackRegistrar.add("Pref.ParcelMediaAutoPlayEnable", boost::bind(&LLFloaterPreference::onCommitParcelMediaAutoPlayEnable, this));
mCommitCallbackRegistrar.add("Pref.MediaEnabled", boost::bind(&LLFloaterPreference::onCommitMediaEnabled, this));
mCommitCallbackRegistrar.add("Pref.MusicEnabled", boost::bind(&LLFloaterPreference::onCommitMusicEnabled, this));
- mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
@@ -359,12 +354,7 @@ BOOL LLFloaterPreference::postBuild()
LLFloaterPreference::~LLFloaterPreference()
{
// clean up user data
- LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
LLComboBox* ctrl_window_size = getChild<LLComboBox>("windowsize combo");
- for (S32 i = 0; i < ctrl_aspect_ratio->getItemCount(); i++)
- {
- ctrl_aspect_ratio->setCurrentByIndex(i);
- }
for (S32 i = 0; i < ctrl_window_size->getItemCount(); i++)
{
ctrl_window_size->setCurrentByIndex(i);
@@ -514,8 +504,6 @@ void LLFloaterPreference::cancel()
LLFloaterReg::hideInstance("pref_voicedevicesettings");
- gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio);
-
}
void LLFloaterPreference::onOpen(const LLSD& key)
@@ -968,37 +956,6 @@ void LLFloaterPreference::disableUnavailableSettings()
}
}
-void LLFloaterPreference::onCommitAutoDetectAspect()
-{
- BOOL auto_detect = getChild<LLCheckBoxCtrl>("aspect_auto_detect")->get();
- F32 ratio;
-
- if (auto_detect)
- {
- S32 numerator = 0;
- S32 denominator = 0;
-
- // clear any aspect ratio override
- gViewerWindow->mWindow->setNativeAspectRatio(0.f);
- fractionFromDecimal(gViewerWindow->mWindow->getNativeAspectRatio(), numerator, denominator);
-
- std::string aspect;
- if (numerator != 0)
- {
- aspect = llformat("%d:%d", numerator, denominator);
- }
- else
- {
- aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
- }
-
- getChild<LLComboBox>( "aspect_ratio")->setLabel(aspect);
-
- ratio = gViewerWindow->mWindow->getNativeAspectRatio();
- gSavedSettings.setF32("FullScreenAspectRatio", ratio);
- }
-}
-
void LLFloaterPreference::onCommitParcelMediaAutoPlayEnable()
{
BOOL autoplay = getChild<LLCheckBoxCtrl>("autoplay_enabled")->get();
@@ -1266,56 +1223,9 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b
}
}
-void LLFloaterPreference::onKeystrokeAspectRatio()
-{
- getChild<LLCheckBoxCtrl>("aspect_auto_detect")->set(FALSE);
-}
-
void LLFloaterPreference::applyResolution()
{
- LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
gGL.flush();
- char aspect_ratio_text[ASPECT_RATIO_STR_LEN]; /*Flawfinder: ignore*/
- if (ctrl_aspect_ratio->getCurrentIndex() == -1)
- {
- // *Can't pass const char* from c_str() into strtok
- strncpy(aspect_ratio_text, ctrl_aspect_ratio->getSimple().c_str(), sizeof(aspect_ratio_text) -1); /*Flawfinder: ignore*/
- aspect_ratio_text[sizeof(aspect_ratio_text) -1] = '\0';
- char *element = strtok(aspect_ratio_text, ":/\\");
- if (!element)
- {
- sAspectRatio = 0.f; // will be clamped later
- }
- else
- {
- LLLocale locale(LLLocale::USER_LOCALE);
- sAspectRatio = (F32)atof(element);
- }
-
- // look for denominator
- element = strtok(NULL, ":/\\");
- if (element)
- {
- LLLocale locale(LLLocale::USER_LOCALE);
-
- F32 denominator = (F32)atof(element);
- if (denominator != 0.f)
- {
- sAspectRatio /= denominator;
- }
- }
- }
- else
- {
- sAspectRatio = (F32)ctrl_aspect_ratio->getValue().asReal();
- }
-
- // presumably, user entered a non-numeric value if aspect_ratio == 0.f
- if (sAspectRatio != 0.f)
- {
- sAspectRatio = llclamp(sAspectRatio, 0.2f, 5.f);
- gSavedSettings.setF32("FullScreenAspectRatio", sAspectRatio);
- }
// Screen resolution
S32 num_resolutions;
@@ -1393,48 +1303,6 @@ BOOL LLPanelPreference::postBuild()
childSetText("email_address",getString("log_in_to_change") );
// childSetText("busy_response", getString("log_in_to_change"));
}
-
-
- if(hasChild("aspect_ratio"))
- {
- // We used to set up fullscreen resolution and window size
- // controls here, see LLFloaterWindowSize::initWindowSizeControls()
-
- if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio"))
- {
- LLFloaterPreference::sAspectRatio = gViewerWindow->getDisplayAspectRatio();
- }
- else
- {
- LLFloaterPreference::sAspectRatio = gSavedSettings.getF32("FullScreenAspectRatio");
- }
-
- getChild<LLComboBox>("aspect_ratio")->setTextEntryCallback(boost::bind(&LLPanelPreference::setControlFalse, this, LLSD("FullScreenAutoDetectAspectRatio") ));
-
-
- S32 numerator = 0;
- S32 denominator = 0;
- fractionFromDecimal(LLFloaterPreference::sAspectRatio, numerator, denominator);
-
- LLUIString aspect_ratio_text = getString("aspect_ratio_text");
- if (numerator != 0)
- {
- aspect_ratio_text.setArg("[NUM]", llformat("%d", numerator));
- aspect_ratio_text.setArg("[DEN]", llformat("%d", denominator));
- }
- else
- {
- aspect_ratio_text = llformat("%.3f", LLFloaterPreference::sAspectRatio);
- }
-
- LLComboBox* ctrl_aspect_ratio = getChild<LLComboBox>( "aspect_ratio");
- //mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio, this);
- // add default aspect ratios
- ctrl_aspect_ratio->add(aspect_ratio_text, &LLFloaterPreference::sAspectRatio, ADD_TOP);
- ctrl_aspect_ratio->setCurrentByIndex(0);
-
- refresh();
- }
//////////////////////PanelPrivacy ///////////////////
if (hasChild("media_enabled"))
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 0827c7c2b2..93b39d72bc 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -128,10 +128,8 @@ public:
void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box);
void onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name);
- void onKeystrokeAspectRatio();
// void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
- void onCommitAutoDetectAspect();
void onCommitParcelMediaAutoPlayEnable();
void onCommitMediaEnabled();
void onCommitMusicEnabled();
@@ -142,7 +140,6 @@ public:
void buildPopupLists();
static void refreshSkin(void* data);
static void cleanupBadSetting();
- static F32 sAspectRatio;
private:
static std::string sSkin;
bool mGotPersonalInfo;
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 20cb2d3604..3946224c0c 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -2544,8 +2544,12 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde
{
// *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem
// or to LLInvFVBridge
- S32 a_sort = (static_cast<const LLItemBridge*>(a->getListener()))->getItem()->getSortField();
- S32 b_sort = (static_cast<const LLItemBridge*>(b->getListener()))->getItem()->getSortField();
+ LLViewerInventoryItem* aitem = (static_cast<const LLItemBridge*>(a->getListener()))->getItem();
+ LLViewerInventoryItem* bitem = (static_cast<const LLItemBridge*>(b->getListener()))->getItem();
+ if (!aitem || !bitem)
+ return false;
+ S32 a_sort = aitem->getSortField();
+ S32 b_sort = bitem->getSortField();
return a_sort < b_sort;
}
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 9cfd5fc3ab..da95eaefca 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2232,7 +2232,10 @@ void LLFolderBridge::determineFolderType()
{
LLInventoryModel* model = getInventoryModel();
LLViewerInventoryCategory* category = model->getCategory(mUUID);
- category->determineFolderType();
+ if (category)
+ {
+ category->determineFolderType();
+ }
}
}
@@ -2503,11 +2506,13 @@ void LLFolderBridge::folderOptionsMenu()
if(!model) return;
const LLInventoryCategory* category = model->getCategory(mUUID);
+ if(!category) return;
+
LLFolderType::EType type = category->getPreferredType();
- const bool is_system_folder = category && LLFolderType::lookupIsProtectedType(type);
+ const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
// BAP change once we're no longer treating regular categories as ensembles.
- const bool is_ensemble = category && (type == LLFolderType::FT_NONE ||
- LLFolderType::lookupIsEnsembleType(type));
+ const bool is_ensemble = (type == LLFolderType::FT_NONE ||
+ LLFolderType::lookupIsEnsembleType(type));
// calling card related functionality for folders.
diff --git a/indra/newview/skins/default/xui/en/floater_postcard.xml b/indra/newview/skins/default/xui/en/floater_postcard.xml
index 3a7b6cc832..6f78363b25 100644
--- a/indra/newview/skins/default/xui/en/floater_postcard.xml
+++ b/indra/newview/skins/default/xui/en/floater_postcard.xml
@@ -128,19 +128,9 @@
width="420">
Type your message here.
</text_editor>
- <text
- type="string"
- length="1"
- bottom_delta="37"
- follows="left|bottom"
- layout="topleft"
- left="12"
- name="fine_print">
- If your recipient joins SL, you&apos;ll get a referral bonus.
- </text>
<button
follows="right|bottom"
- height="20"
+ height="23"
label="Cancel"
layout="topleft"
name="cancel_btn"
@@ -149,7 +139,7 @@
width="100" />
<button
follows="right|bottom"
- height="20"
+ height="23"
label="Send"
layout="topleft"
left_delta="-106"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 5630dfbe8f..23203d227e 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -67,80 +67,75 @@
</floater.string>
<button
follows="left|top"
- height="20"
- image_disabled="Tool_Zoom"
- image_disabled_selected="Tool_Zoom"
- image_selected="Tool_Zoom_Selected"
- image_unselected="Tool_Zoom"
+ height="25"
+ image_bottom_pad="1"
+ image_overlay="Tool_Zoom"
+ image_selected="PushButton_Selected_Press"
layout="topleft"
left="10"
name="button focus"
tool_tip="Focus"
- width="20">
+ width="35">
<button.commit_callback
function="BuildTool.setTool"
parameter="Focus" />
</button>
<button
follows="left|top"
- height="20"
- image_disabled="Tool_Grab"
- image_disabled_selected="Tool_Grab"
- image_selected="Tool_Grab_Selected"
- image_unselected="Tool_Grab"
+ height="25"
+ image_bottom_pad="1"
+ image_overlay="Tool_Grab"
+ image_selected="PushButton_Selected_Press"
layout="topleft"
- left_pad="20"
+ left_pad="10"
name="button move"
tool_tip="Move"
- width="20">
+ width="35">
<button.commit_callback
function="BuildTool.setTool"
parameter="Move" />
</button>
<button
follows="left|top"
- height="20"
- image_disabled="Tool_Face"
- image_disabled_selected="Tool_Face"
- image_selected="Tool_Face_Selected"
- image_unselected="Tool_Face"
+ height="25"
+ image_bottom_pad="1"
+ image_overlay="Tool_Face"
+ image_selected="PushButton_Selected_Press"
layout="topleft"
- left_pad="20"
+ left_pad="10"
name="button edit"
tool_tip="Edit"
- width="20">
+ width="35">
<button.commit_callback
function="BuildTool.setTool"
parameter="Edit" />
</button>
<button
follows="left|top"
- height="20"
- image_disabled="Tool_Create"
- image_disabled_selected="Tool_Create"
- image_selected="Tool_Create_Selected"
- image_unselected="Tool_Create"
+ height="25"
+ image_bottom_pad="1"
+ image_overlay="Tool_Create"
+ image_selected="PushButton_Selected_Press"
layout="topleft"
- left_pad="20"
+ left_pad="10"
name="button create"
tool_tip="Create"
- width="20">
+ width="35">
<button.commit_callback
function="BuildTool.setTool"
parameter="Create" />
</button>
<button
follows="left|top"
- height="20"
- image_disabled="Tool_Dozer"
- image_disabled_selected="Tool_Dozer"
- image_selected="Tool_Dozer_Selected"
- image_unselected="Tool_Dozer"
+ height="25"
+ image_bottom_pad="1"
+ image_overlay="Tool_Dozer"
+ image_selected="PushButton_Selected_Press"
layout="topleft"
- left_pad="20"
+ left_pad="10"
name="button land"
tool_tip="Land"
- width="20">
+ width="35">
<button.commit_callback
function="BuildTool.setTool"
parameter="Land" />
@@ -1043,7 +1038,7 @@ even though the user gets a free copy.
<check_box
height="15"
width="110"
- top_pad="3"
+ top_pad="5"
label="Show in search"
layout="topleft"
left="100"
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
index e5be3d7b46..f216c3acbc 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml
@@ -33,7 +33,7 @@
</text>
<combo_box name="start_location_combo">
<combo_box.item label="最後にログアウトした場所" name="MyLastLocation" tool_tip="常に最後にいた場所にログイン"/>
- <combo_box.item label="自宅(ホーム)" name="MyHome" tool_tip="常に自宅(ホーム)にログイン"/>
+ <combo_box.item label="ホーム" name="MyHome" tool_tip="常にホーム(自宅)にログイン"/>
</combo_box>
<check_box initial_value="true" label="ログイン画面に表示する" name="show_location_checkbox"/>
<text name="name_tags_textbox">