summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappearancemgr.cpp19
-rw-r--r--indra/newview/llviewermediafocus.cpp54
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml10
4 files changed, 59 insertions, 28 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index bcaba34921..be840cc348 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -55,6 +55,25 @@
char ORDER_NUMBER_SEPARATOR('@');
+// support for secondlife:///app/appearance SLapps
+class LLAppearanceHandler : public LLCommandHandler
+{
+public:
+ // requests will be throttled from a non-trusted browser
+ LLAppearanceHandler() : LLCommandHandler("appearance", UNTRUSTED_THROTTLE) {}
+
+ bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+ {
+ // support secondlife:///app/appearance/show, but for now we just
+ // make all secondlife:///app/appearance SLapps behave this way
+ LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD());
+ return true;
+ }
+};
+
+LLAppearanceHandler gAppearanceHandler;
+
+
LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name)
{
LLInventoryModel::cat_array_t cat_array;
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index c1e851350b..02e450b223 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -215,6 +215,8 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal,
// We need the aspect ratio, and the 3 components of the bbox as height, width, and depth.
F32 aspect_ratio = getBBoxAspectRatio(bbox, normal, &height, &width, &depth);
F32 camera_aspect = LLViewerCamera::getInstance()->getAspect();
+
+ lldebugs << "normal = " << normal << ", aspect_ratio = " << aspect_ratio << ", camera_aspect = " << camera_aspect << llendl;
// We will normally use the side of the volume aligned with the short side of the screen (i.e. the height for
// a screen in a landscape aspect ratio), however there is an edge case where the aspect ratio of the object is
@@ -231,11 +233,15 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal,
{
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect());
distance = width * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+
+ lldebugs << "using width (" << width << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl;
}
else
{
angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getView());
distance = height * 0.5 * padding_factor / tan(angle_of_view * 0.5f );
+
+ lldebugs << "using height (" << height << "), angle_of_view = " << angle_of_view << ", distance = " << distance << llendl;
}
distance += depth * 0.5;
@@ -440,40 +446,38 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3&
LLVector3 bbox_max = bbox.getExtentLocal();
F32 dot1 = 0.f;
F32 dot2 = 0.f;
+
+ lldebugs << "bounding box local size = " << bbox_max << ", local_normal = " << local_normal << llendl;
// The largest component of the localized normal vector is the depth component
// meaning that the other two are the legs of the rectangle.
local_normal.abs();
- if(local_normal.mV[VX] > local_normal.mV[VY])
+
+ // Using temporary variables for these makes the logic a bit more readable.
+ bool XgtY = (local_normal.mV[VX] > local_normal.mV[VY]);
+ bool XgtZ = (local_normal.mV[VX] > local_normal.mV[VZ]);
+ bool YgtZ = (local_normal.mV[VY] > local_normal.mV[VZ]);
+
+ if(XgtY && XgtZ)
{
- if(local_normal.mV[VX] > local_normal.mV[VZ])
- {
- // Use the y and z comps
- comp1.mV[VY] = bbox_max.mV[VY];
- comp2.mV[VZ] = bbox_max.mV[VZ];
- *depth = bbox_max.mV[VX];
- }
- else
- {
- // Use the x and y comps
- comp1.mV[VY] = bbox_max.mV[VY];
- comp2.mV[VZ] = bbox_max.mV[VZ];
- *depth = bbox_max.mV[VZ];
- }
+ lldebugs << "x component of normal is longest, using y and z" << llendl;
+ comp1.mV[VY] = bbox_max.mV[VY];
+ comp2.mV[VZ] = bbox_max.mV[VZ];
+ *depth = bbox_max.mV[VX];
}
- else if(local_normal.mV[VY] > local_normal.mV[VZ])
+ else if(!XgtY && YgtZ)
{
- // Use the x and z comps
+ lldebugs << "y component of normal is longest, using x and z" << llendl;
comp1.mV[VX] = bbox_max.mV[VX];
comp2.mV[VZ] = bbox_max.mV[VZ];
*depth = bbox_max.mV[VY];
}
else
{
- // Use the x and y comps
- comp1.mV[VY] = bbox_max.mV[VY];
- comp2.mV[VZ] = bbox_max.mV[VZ];
- *depth = bbox_max.mV[VX];
+ lldebugs << "z component of normal is longest, using x and y" << llendl;
+ comp1.mV[VX] = bbox_max.mV[VX];
+ comp2.mV[VY] = bbox_max.mV[VY];
+ *depth = bbox_max.mV[VZ];
}
// The height is the vector closest to vertical in the bbox coordinate space (highest dot product value)
@@ -483,12 +487,20 @@ F32 LLViewerMediaFocus::getBBoxAspectRatio(const LLBBox& bbox, const LLVector3&
{
*height = comp1.length();
*width = comp2.length();
+
+ lldebugs << "comp1 = " << comp1 << ", height = " << *height << llendl;
+ lldebugs << "comp2 = " << comp2 << ", width = " << *width << llendl;
}
else
{
*height = comp2.length();
*width = comp1.length();
+
+ lldebugs << "comp2 = " << comp2 << ", height = " << *height << llendl;
+ lldebugs << "comp1 = " << comp1 << ", width = " << *width << llendl;
}
+
+ lldebugs << "returning " << (*width / *height) << llendl;
// Return the aspect ratio.
return *width / *height;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index cde1e47747..a2acb8100f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3451,7 +3451,7 @@ You are not allowed in that region due to your maturity Rating.
type="alertmodal">
You are not allowed in that Region due to your maturity Rating preference.
-You can click &apos;Change Preference&apos; to raise your maturity Rating preference now and allow you to enter. You will be able to search and access [REGIONMATURITY] content from now on. If you later want to change this setting back, go to Me &gt; Preferences &gt; General.
+Click &apos;Change Preference&apos; to raise your maturity Rating preference for immediate entry. Doing so will allow you to search for and access [REGIONMATURITY] content. If you wish to change this setting later, you may do so from Me &gt; Preferences &gt; General.
<form name="form">
<button
index="0"
@@ -3470,7 +3470,7 @@ You can click &apos;Change Preference&apos; to raise your maturity Rating prefer
icon="notifytip.tga"
name="PreferredMaturityChanged"
type="notifytip">
-Your maturity rating preference is now [RATING].
+Your maturity Rating preference is now [RATING].
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index 560465f808..261c49931e 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -1630,25 +1630,25 @@
が渡しました
</string>
<string name="InvOfferYouDecline">
- You decline
+ 拒否:
</string>
<string name="InvOfferFrom">
- from
+ 送信元:
</string>
<string name="GroupMoneyTotal">
合計
</string>
<string name="GroupMoneyBought">
- は購入しました
+ 購入:
</string>
<string name="GroupMoneyPaidYou">
- があなたに支払いました
+ あなたに支払い:
</string>
<string name="GroupMoneyPaidInto">
paid into
</string>
<string name="GroupMoneyBoughtPassTo">
- bought pass to
+ 入場許可を購入:
</string>
<string name="GroupMoneyPaidFeeForEvent">
がイベント用の費用を支払いました