summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/Boost.cmake6
-rw-r--r--indra/cmake/PulseAudio.cmake28
-rw-r--r--indra/llmath/llvolume.cpp201
-rw-r--r--indra/llmath/llvolume.h4
-rw-r--r--indra/llrender/llfontgl.cpp30
-rw-r--r--indra/llrender/llrender.cpp131
-rw-r--r--indra/llrender/llrender.h23
-rw-r--r--indra/llui/llaccordionctrl.cpp14
-rw-r--r--indra/llui/lldockablefloater.cpp8
-rw-r--r--indra/llui/lldockablefloater.h2
-rw-r--r--indra/llui/llscrolllistctrl.cpp26
-rw-r--r--indra/llui/llscrolllistctrl.h33
-rw-r--r--indra/llui/lltabcontainer.cpp35
-rw-r--r--indra/llui/llui.cpp113
-rw-r--r--indra/llui/llurlentry.cpp2
-rw-r--r--indra/llui/llviewborder.cpp58
-rw-r--r--indra/llui/llviewborder.h3
-rw-r--r--indra/media_plugins/webkit/CMakeLists.txt14
-rw-r--r--indra/media_plugins/webkit/linux_volume_catcher.cpp488
-rw-r--r--indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc21
-rw-r--r--indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc6
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp34
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/gpu_table.txt18
-rw-r--r--indra/newview/linux_tools/client-readme.txt9
-rw-r--r--indra/newview/llagent.cpp3
-rw-r--r--indra/newview/llagentwearables.cpp31
-rw-r--r--indra/newview/llappearancemgr.cpp406
-rw-r--r--indra/newview/llappearancemgr.h12
-rw-r--r--indra/newview/llappviewer.cpp8
-rw-r--r--indra/newview/llavataractions.cpp15
-rw-r--r--indra/newview/llavataractions.h5
-rw-r--r--indra/newview/llavatarlist.cpp2
-rw-r--r--indra/newview/llavatarlist.h3
-rw-r--r--indra/newview/llavatarlistitem.cpp4
-rw-r--r--indra/newview/llavatarlistitem.h2
-rw-r--r--indra/newview/llchathistory.cpp76
-rw-r--r--indra/newview/lldrawable.cpp3
-rw-r--r--indra/newview/lldrawpool.cpp4
-rw-r--r--indra/newview/lldrawpoolalpha.cpp8
-rw-r--r--indra/newview/lldrawpoolbump.cpp8
-rw-r--r--indra/newview/lldrawpooltree.cpp4
-rw-r--r--indra/newview/llface.cpp25
-rw-r--r--indra/newview/llflexibleobject.cpp15
-rw-r--r--indra/newview/llfloaterimagepreview.cpp5
-rw-r--r--indra/newview/llglsandbox.cpp24
-rw-r--r--indra/newview/llgroupmgr.cpp3
-rw-r--r--indra/newview/llhudrender.cpp12
-rw-r--r--indra/newview/llhudtext.cpp2
-rw-r--r--indra/newview/llimfloater.cpp4
-rw-r--r--indra/newview/llinventorybridge.cpp6
-rw-r--r--indra/newview/lllocationinputctrl.cpp26
-rw-r--r--indra/newview/lllogchat.cpp10
-rw-r--r--indra/newview/llmediactrl.cpp8
-rw-r--r--indra/newview/llnearbychathandler.cpp5
-rw-r--r--indra/newview/llnetmap.cpp15
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp8
-rw-r--r--indra/newview/lloutputmonitorctrl.h10
-rw-r--r--indra/newview/llpanelavatar.cpp22
-rw-r--r--indra/newview/llpanelavatar.h2
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp16
-rw-r--r--indra/newview/llpanelgroupgeneral.h2
-rw-r--r--indra/newview/llpanellandmarks.cpp250
-rw-r--r--indra/newview/llpanellandmarks.h10
-rw-r--r--indra/newview/llpanelnearbymedia.cpp85
-rw-r--r--indra/newview/llpanelnearbymedia.h2
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp10
-rw-r--r--indra/newview/llparticipantlist.cpp2
-rw-r--r--indra/newview/llscriptfloater.cpp4
-rw-r--r--indra/newview/llselectmgr.cpp19
-rw-r--r--indra/newview/llslurl.cpp16
-rw-r--r--indra/newview/llslurl.h5
-rw-r--r--indra/newview/llspatialpartition.cpp3
-rw-r--r--indra/newview/llspatialpartition.h1
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp47
-rw-r--r--indra/newview/llspeakingindicatormanager.h24
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/llstatusbar.cpp16
-rw-r--r--indra/newview/lltoolmorph.cpp12
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewerjointmesh.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp16
-rw-r--r--indra/newview/llviewermenu.cpp38
-rw-r--r--indra/newview/llviewerobject.cpp3
-rw-r--r--indra/newview/llviewerobjectlist.cpp171
-rw-r--r--indra/newview/llviewerobjectlist.h31
-rw-r--r--indra/newview/llviewerwindow.cpp27
-rw-r--r--indra/newview/llvoavatarself.cpp2
-rw-r--r--indra/newview/llvoclouds.cpp4
-rw-r--r--indra/newview/llvotextbubble.cpp3
-rw-r--r--indra/newview/llvotree.cpp6
-rw-r--r--indra/newview/llvovolume.cpp33
-rw-r--r--indra/newview/llvowlsky.cpp2
-rw-r--r--indra/newview/llworld.cpp3
-rw-r--r--indra/newview/pipeline.cpp79
-rw-r--r--indra/newview/pipeline.h9
-rw-r--r--indra/newview/skins/default/xui/de/floater_beacons.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_god_tools.xml4
-rw-r--r--indra/newview/skins/default/xui/de/floater_report_abuse.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_sell_land.xml4
-rw-r--r--indra/newview/skins/default/xui/de/floater_telehub.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_texture_ctrl.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_nearby_media.xml3
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences.xml1
-rw-r--r--indra/newview/skins/default/xui/en/inspector_info_ctrl.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_object.xml28
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_folder.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml30
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_media.xml37
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/menu_viewer.xml17
-rw-r--r--indra/newview/skins/default/xui/fr/panel_nearby_media.xml3
-rw-r--r--indra/newview/skins/default/xui/ja/floater_about_land.xml44
-rw-r--r--indra/newview/skins/default/xui/ja/floater_buy_contents.xml12
-rw-r--r--indra/newview/skins/default/xui/ja/floater_buy_object.xml8
-rw-r--r--indra/newview/skins/default/xui/ja/floater_customize.xml14
-rw-r--r--indra/newview/skins/default/xui/ja/floater_pay.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/menu_inventory.xml10
-rw-r--r--indra/newview/skins/default/xui/ja/menu_viewer.xml43
-rw-r--r--indra/newview/skins/default/xui/ja/panel_nearby_media.xml3
129 files changed, 2466 insertions, 932 deletions
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 3652508b6a..7ce57a5572 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -38,9 +38,9 @@ else (STANDALONE)
debug libboost_signals-vc80-mt-gd-${BOOST_VERSION})
endif (MSVC71)
elseif (DARWIN)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
- set(BOOST_REGEX_LIBRARY boost_regex-mt)
- set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
+ set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-xgcc40-mt)
+ set(BOOST_REGEX_LIBRARY boost_regex-xgcc40-mt)
+ set(BOOST_SIGNALS_LIBRARY boost_signals-xgcc40-mt)
elseif (LINUX)
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-gcc41-mt)
set(BOOST_REGEX_LIBRARY boost_regex-gcc41-mt)
diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake
new file mode 100644
index 0000000000..f8087a8083
--- /dev/null
+++ b/indra/cmake/PulseAudio.cmake
@@ -0,0 +1,28 @@
+# -*- cmake -*-
+include(Prebuilt)
+
+if (STANDALONE)
+ include(FindPkgConfig)
+
+ pkg_check_modules(PULSEAUDIO REQUIRED libpulse-mainloop-glib)
+
+elseif (LINUX)
+ use_prebuilt_binary(pulseaudio)
+ set(PULSEAUDIO_FOUND ON FORCE BOOL)
+ set(PULSEAUDIO_INCLUDE_DIRS
+ ${LIBS_PREBUILT_DIR}/include
+ )
+ # We don't need to explicitly link against pulseaudio itself, because
+ # the viewer probes for the system's copy at runtime.
+ set(PULSEAUDIO_LIBRARIES
+ # none needed!
+ )
+endif (STANDALONE)
+
+if (PULSEAUDIO_FOUND)
+ set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.")
+endif (PULSEAUDIO_FOUND)
+
+if (PULSEAUDIO)
+ add_definitions(-DLL_PULSEAUDIO_ENABLED=1)
+endif (PULSEAUDIO)
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 192c6157a8..34348230b6 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -4521,15 +4521,65 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
if (!partial_build)
{
- int idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0};
- for(int gx = 0;gx<grid_size;gx++){
- for(int gy = 0;gy<grid_size;gy++){
- if (mTypeMask & TOP_MASK){
- for(int i=5;i>=0;i--)mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]);
- }else{
- for(int i=0;i<6;i++)mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]);
+ mTriStrip.clear();
+ S32 idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0};
+ for(S32 gx = 0;gx<grid_size;gx++)
+ {
+
+ for(S32 gy = 0;gy<grid_size;gy++)
+ {
+ if (mTypeMask & TOP_MASK)
+ {
+ for(S32 i=5;i>=0;i--)
+ {
+ mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]);
+ }
+
+ if (gy == 0)
+ {
+ mTriStrip.push_back((gx+1)*(grid_size+1));
+ mTriStrip.push_back((gx+1)*(grid_size+1));
+ mTriStrip.push_back(gx*(grid_size+1));
+ }
+
+ mTriStrip.push_back(gy+1+(gx+1)*(grid_size+1));
+ mTriStrip.push_back(gy+1+gx*(grid_size+1));
+
+
+ if (gy == grid_size-1)
+ {
+ mTriStrip.push_back(gy+1+gx*(grid_size+1));
+ }
+ }
+ else
+ {
+ for(S32 i=0;i<6;i++)
+ {
+ mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]);
+ }
+
+ if (gy == 0)
+ {
+ mTriStrip.push_back(gx*(grid_size+1));
+ mTriStrip.push_back(gx*(grid_size+1));
+ mTriStrip.push_back((gx+1)*(grid_size+1));
+ }
+
+ mTriStrip.push_back(gy+1+gx*(grid_size+1));
+ mTriStrip.push_back(gy+1+(gx+1)*(grid_size+1));
+
+ if (gy == grid_size-1)
+ {
+ mTriStrip.push_back(gy+1+(gx+1)*(grid_size+1));
+ }
}
}
+
+ }
+
+ if (mTriStrip.size()%2 == 1)
+ {
+ mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]);
}
}
@@ -4771,6 +4821,8 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
pt2--;
}
}
+
+ makeTriStrip();
}
else
{
@@ -4875,67 +4927,108 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
pt2--;
}
}
+
+ makeTriStrip();
}
}
else
{
// Not hollow, generate the triangle fan.
+ U16 v1 = 2;
+ U16 v2 = 1;
+
if (mTypeMask & TOP_MASK)
{
- if (mTypeMask & OPEN_MASK)
- {
- // SOLID OPEN TOP
- // Generate indices
- // This is a tri-fan, so we reuse the same first point for all triangles.
- for (S32 i = 0; i < (num_vertices - 2); i++)
- {
- mIndices[3*i] = num_vertices - 1;
- mIndices[3*i+1] = i;
- mIndices[3*i+2] = i + 1;
- }
- }
- else
- {
- // SOLID CLOSED TOP
- for (S32 i = 0; i < (num_vertices - 2); i++)
- {
- //MSMSM fix these caps but only for the un-cut case
- mIndices[3*i] = num_vertices - 1;
- mIndices[3*i+1] = i;
- mIndices[3*i+2] = i + 1;
- }
- }
+ v1 = 1;
+ v2 = 2;
+ }
+
+ for (S32 i = 0; i < (num_vertices - 2); i++)
+ {
+ mIndices[3*i] = num_vertices - 1;
+ mIndices[3*i+v1] = i;
+ mIndices[3*i+v2] = i + 1;
+ }
+
+ //make tri strip
+ if (mTypeMask & OPEN_MASK)
+ {
+ makeTriStrip();
}
else
{
- if (mTypeMask & OPEN_MASK)
+ S32 j = num_vertices-2;
+ if (mTypeMask & TOP_MASK)
{
- // SOLID OPEN BOTTOM
- // Generate indices
- // This is a tri-fan, so we reuse the same first point for all triangles.
- for (S32 i = 0; i < (num_vertices - 2); i++)
+ mTriStrip.push_back(0);
+ for (S32 i = 0; i <= j; ++i)
{
- mIndices[3*i] = num_vertices - 1;
- mIndices[3*i+1] = i + 1;
- mIndices[3*i+2] = i;
+ mTriStrip.push_back(i);
+ if (i != j)
+ {
+ mTriStrip.push_back(j);
+ }
+ --j;
}
}
else
{
- // SOLID CLOSED BOTTOM
- for (S32 i = 0; i < (num_vertices - 2); i++)
+ mTriStrip.push_back(j);
+ for (S32 i = 0; i <= j; ++i)
{
- //MSMSM fix these caps but only for the un-cut case
- mIndices[3*i] = num_vertices - 1;
- mIndices[3*i+1] = i + 1;
- mIndices[3*i+2] = i;
+ if (i != j)
+ {
+ mTriStrip.push_back(j);
+ }
+ mTriStrip.push_back(i);
+ --j;
}
}
+
+ mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]);
+
+ if (mTriStrip.size()%2 == 1)
+ {
+ mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]);
+ }
}
}
+
return TRUE;
}
+void LLVolumeFace::makeTriStrip()
+{
+ for (U32 i = 0; i < mIndices.size(); i+=3)
+ {
+ U16 i0 = mIndices[i];
+ U16 i1 = mIndices[i+1];
+ U16 i2 = mIndices[i+2];
+
+ if ((i/3)%2 == 1)
+ {
+ mTriStrip.push_back(i0);
+ mTriStrip.push_back(i0);
+ mTriStrip.push_back(i1);
+ mTriStrip.push_back(i2);
+ mTriStrip.push_back(i2);
+ }
+ else
+ {
+ mTriStrip.push_back(i2);
+ mTriStrip.push_back(i2);
+ mTriStrip.push_back(i1);
+ mTriStrip.push_back(i0);
+ mTriStrip.push_back(i0);
+ }
+ }
+
+ if (mTriStrip.size()%2 == 1)
+ {
+ mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]);
+ }
+}
+
void LLVolumeFace::createBinormals()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
@@ -5136,9 +5229,14 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
if (!partial_build)
{
+ mTriStrip.clear();
+
// Now we generate the indices.
for (t = 0; t < (mNumT-1); t++)
{
+ //prepend terminating index to strip
+ mTriStrip.push_back(mNumS*t);
+
for (s = 0; s < (mNumS-1); s++)
{
mIndices[cur_index++] = s + mNumS*t; //bottom left
@@ -5148,6 +5246,14 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
mIndices[cur_index++] = s+1 + mNumS*t; //bottom right
mIndices[cur_index++] = s+1 + mNumS*(t+1); //top right
+ if (s == 0)
+ {
+ mTriStrip.push_back(s+mNumS*t);
+ mTriStrip.push_back(s+mNumS*(t+1));
+ }
+ mTriStrip.push_back(s+1+mNumS*t);
+ mTriStrip.push_back(s+1+mNumS*(t+1));
+
mEdge[cur_edge++] = (mNumS-1)*2*t+s*2+1; //bottom left/top right neighbor face
if (t < mNumT-2) { //top right/top left neighbor face
mEdge[cur_edge++] = (mNumS-1)*2*(t+1)+s*2+1;
@@ -5188,6 +5294,13 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
}
mEdge[cur_edge++] = (mNumS-1)*2*t+s*2; //top right/bottom left neighbor face
}
+ //append terminating vertex to strip
+ mTriStrip.push_back(mNumS-1+mNumS*(t+1));
+ }
+
+ if (mTriStrip.size()%2 == 1)
+ {
+ mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]);
}
}
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 871b334452..d9f80f0e30 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -798,7 +798,8 @@ public:
BOOL create(LLVolume* volume, BOOL partial_build = FALSE);
void createBinormals();
-
+ void makeTriStrip();
+
class VertexData
{
public:
@@ -839,6 +840,7 @@ public:
std::vector<VertexData> mVertices;
std::vector<U16> mIndices;
+ std::vector<U16> mTriStrip;
std::vector<S32> mEdge;
private:
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index f1f86fd638..768f042e69 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -151,14 +151,16 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
}
}
- gGL.pushMatrix();
- glLoadIdentity();
- gGL.translatef(floorf(sCurOrigin.mX*sScaleX), floorf(sCurOrigin.mY*sScaleY), sCurOrigin.mZ);
+ gGL.pushUIMatrix();
+
+ gGL.loadUIIdentity();
+
+ gGL.translateUI(floorf(sCurOrigin.mX*sScaleX), floorf(sCurOrigin.mY*sScaleY), sCurOrigin.mZ);
// this code snaps the text origin to a pixel grid to start with
F32 pixel_offset_x = llround((F32)sCurOrigin.mX) - (sCurOrigin.mX);
F32 pixel_offset_y = llround((F32)sCurOrigin.mY) - (sCurOrigin.mY);
- gGL.translatef(-pixel_offset_x, -pixel_offset_y, 0.f);
+ gGL.translateUI(-pixel_offset_x, -pixel_offset_y, 0.f);
LLFastTimer t(FTM_RENDER_FONTS);
@@ -246,9 +248,6 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
}
- // Remember last-used texture to avoid unnecesssary bind calls.
- LLImageGL *last_bound_texture = NULL;
-
const LLFontGlyphInfo* next_glyph = NULL;
for (i = begin_offset; i < begin_offset + length; i++)
@@ -268,12 +267,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
}
// Per-glyph bitmap texture.
LLImageGL *image_gl = mFontFreetype->getFontBitmapCache()->getImageGL(fgi->mBitmapNum);
- if (last_bound_texture != image_gl)
- {
- gGL.getTexUnit(0)->bind(image_gl);
- last_bound_texture = image_gl;
- }
-
+ gGL.getTexUnit(0)->bind(image_gl);
+
if ((start_x + scaled_max_pixels) < (cur_x + fgi->mXBearing + fgi->mWidth))
{
// Not enough room for this character.
@@ -338,10 +333,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
// recursively render ellipses at end of string
// we've already reserved enough room
- gGL.pushMatrix();
- //glLoadIdentity();
- //gGL.translatef(sCurOrigin.mX, sCurOrigin.mY, 0.0f);
- //glScalef(sScaleX, sScaleY, 1.f);
+ gGL.pushUIMatrix();
renderUTF8(std::string("..."),
0,
cur_x / sScaleX, (F32)y,
@@ -352,10 +344,10 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
S32_MAX, max_pixels,
right_x,
FALSE);
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
- gGL.popMatrix();
+ gGL.popUIMatrix();
return chars_drawn;
}
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 595b8577ff..656f690db5 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -49,6 +49,9 @@ F64 gGLLastProjection[16];
F64 gGLProjection[16];
S32 gGLViewport[4];
+U32 LLRender::sUICalls = 0;
+U32 LLRender::sUIVerts = 0;
+
static const U32 LL_NUM_TEXTURE_LAYERS = 16;
static GLenum sGLTextureType[] =
@@ -90,7 +93,9 @@ static GLenum sGLBlendFactor[] =
GL_DST_ALPHA,
GL_SRC_ALPHA,
GL_ONE_MINUS_DST_ALPHA,
- GL_ONE_MINUS_SRC_ALPHA
+ GL_ONE_MINUS_SRC_ALPHA,
+
+ GL_ZERO // 'BF_UNDEF'
};
LLTexUnit::LLTexUnit(S32 index)
@@ -255,10 +260,9 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind)
return false ;
}
- gGL.flush();
-
if ((mCurrTexture != texture->getTexName()) || forceBind)
{
+ gGL.flush();
activate();
enable(texture->getTarget());
mCurrTexture = texture->getTexName();
@@ -445,6 +449,8 @@ void LLTexUnit::setTextureBlendType(eTextureBlendType type)
return;
}
+ gGL.flush();
+
activate();
mCurrBlendType = type;
S32 scale_amount = 1;
@@ -759,6 +765,8 @@ LLRender::LLRender()
mCurrAlphaFunc = CF_DEFAULT;
mCurrAlphaFuncVal = 0.01f;
+ mCurrBlendSFactor = BF_UNDEF;
+ mCurrBlendDFactor = BF_UNDEF;
}
LLRender::~LLRender()
@@ -821,6 +829,80 @@ void LLRender::popMatrix()
glPopMatrix();
}
+void LLRender::translateUI(F32 x, F32 y, F32 z)
+{
+ if (mUIOffset.empty())
+ {
+ llerrs << "Need to push a UI translation frame before offsetting" << llendl;
+ }
+
+ mUIOffset.front().mV[0] += x;
+ mUIOffset.front().mV[1] += y;
+ mUIOffset.front().mV[2] += z;
+}
+
+void LLRender::scaleUI(F32 x, F32 y, F32 z)
+{
+ if (mUIScale.empty())
+ {
+ llerrs << "Need to push a UI transformation frame before scaling." << llendl;
+ }
+
+ mUIScale.front().scaleVec(LLVector3(x,y,z));
+}
+
+void LLRender::pushUIMatrix()
+{
+ mUIOffset.push_front(mUIOffset.front());
+ if (mUIScale.empty())
+ {
+ mUIScale.push_front(LLVector3(1,1,1));
+ }
+ else
+ {
+ mUIScale.push_front(mUIScale.front());
+ }
+}
+
+void LLRender::popUIMatrix()
+{
+ if (mUIOffset.empty())
+ {
+ llerrs << "UI offset stack blown." << llendl;
+ }
+ mUIOffset.pop_front();
+ mUIScale.pop_front();
+}
+
+LLVector3 LLRender::getUITranslation()
+{
+ if (mUIOffset.empty())
+ {
+ llerrs << "UI offset stack empty." << llendl;
+ }
+ return mUIOffset.front();
+}
+
+LLVector3 LLRender::getUIScale()
+{
+ if (mUIScale.empty())
+ {
+ llerrs << "UI scale stack empty." << llendl;
+ }
+ return mUIScale.front();
+}
+
+
+void LLRender::loadUIIdentity()
+{
+ if (mUIOffset.empty())
+ {
+ llerrs << "Need to push UI translation frame before clearing offset." << llendl;
+ }
+ mUIOffset.front().setVec(0,0,0);
+ mUIScale.front().setVec(1,1,1);
+}
+
void LLRender::setColorMask(bool writeColor, bool writeAlpha)
{
setColorMask(writeColor, writeColor, writeColor, writeAlpha);
@@ -843,29 +925,28 @@ void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB
void LLRender::setSceneBlendType(eBlendType type)
{
- flush();
switch (type)
{
case BT_ALPHA:
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ blendFunc(BF_SOURCE_ALPHA, BF_ONE_MINUS_SOURCE_ALPHA);
break;
case BT_ADD:
- glBlendFunc(GL_ONE, GL_ONE);
+ blendFunc(BF_ONE, BF_ONE);
break;
case BT_ADD_WITH_ALPHA:
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+ blendFunc(BF_SOURCE_ALPHA, BF_ONE);
break;
case BT_MULT:
- glBlendFunc(GL_DST_COLOR, GL_ZERO);
+ blendFunc(BF_DEST_COLOR, BF_ZERO);
break;
case BT_MULT_ALPHA:
- glBlendFunc(GL_DST_ALPHA, GL_ZERO);
+ blendFunc(BF_DEST_ALPHA, BF_ZERO);
break;
case BT_MULT_X2:
- glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR);
+ blendFunc(BF_DEST_COLOR, BF_SOURCE_COLOR);
break;
case BT_REPLACE:
- glBlendFunc(GL_ONE, GL_ZERO);
+ blendFunc(BF_ONE, BF_ZERO);
break;
default:
llerrs << "Unknown Scene Blend Type: " << type << llendl;
@@ -891,8 +972,15 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
void LLRender::blendFunc(eBlendFactor sfactor, eBlendFactor dfactor)
{
- flush();
- glBlendFunc(sGLBlendFactor[sfactor], sGLBlendFactor[dfactor]);
+ llassert(sfactor < BF_UNDEF);
+ llassert(dfactor < BF_UNDEF);
+ if (mCurrBlendSFactor != sfactor || mCurrBlendDFactor != dfactor)
+ {
+ mCurrBlendSFactor = sfactor;
+ mCurrBlendDFactor = dfactor;
+ flush();
+ glBlendFunc(sGLBlendFactor[sfactor], sGLBlendFactor[dfactor]);
+ }
}
LLTexUnit* LLRender::getTexUnit(U32 index)
@@ -1012,6 +1100,12 @@ void LLRender::flush()
}
#endif
+ if (!mUIOffset.empty())
+ {
+ sUICalls++;
+ sUIVerts += mCount;
+ }
+
mBuffer->setBuffer(immediate_mask);
mBuffer->drawArrays(mMode, 0, mCount);
@@ -1031,7 +1125,16 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
return;
}
- mVerticesp[mCount] = LLVector3(x,y,z);
+ if (mUIOffset.empty())
+ {
+ mVerticesp[mCount] = LLVector3(x,y,z);
+ }
+ else
+ {
+ LLVector3 vert = (LLVector3(x,y,z)+mUIOffset.front()).scaledVec(mUIScale.front());
+ mVerticesp[mCount] = vert;
+ }
+
mCount++;
if (mCount < 4096)
{
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 0121a190ee..a90fbd4a5c 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -270,7 +270,9 @@ public:
BF_DEST_ALPHA,
BF_SOURCE_ALPHA,
BF_ONE_MINUS_DEST_ALPHA,
- BF_ONE_MINUS_SOURCE_ALPHA
+ BF_ONE_MINUS_SOURCE_ALPHA,
+
+ BF_UNDEF
} eBlendFactor;
LLRender();
@@ -286,6 +288,14 @@ public:
void pushMatrix();
void popMatrix();
+ void translateUI(F32 x, F32 y, F32 z);
+ void scaleUI(F32 x, F32 y, F32 z);
+ void pushUIMatrix();
+ void popUIMatrix();
+ void loadUIIdentity();
+ LLVector3 getUITranslation();
+ LLVector3 getUIScale();
+
void flush();
void begin(const GLuint& mode);
@@ -333,7 +343,9 @@ public:
};
public:
-
+ static U32 sUICalls;
+ static U32 sUIVerts;
+
private:
bool mDirty;
U32 mCount;
@@ -350,7 +362,14 @@ private:
std::vector<LLTexUnit*> mTexUnits;
LLTexUnit* mDummyTexUnit;
+ eBlendFactor mCurrBlendSFactor;
+ eBlendFactor mCurrBlendDFactor;
+
F32 mMaxAnisotropy;
+
+ std::list<LLVector3> mUIOffset;
+ std::list<LLVector3> mUIScale;
+
};
extern F64 gGLModelView[16];
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index ae218c28c4..aa69dfe0cc 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -103,13 +103,13 @@ void LLAccordionCtrl::draw()
LLLocalClipRect clip(local_rect);
LLPanel::draw();
- /*
- S32 width = getRect().getWidth();
- S32 height = getRect().getHeight();
-
- gl_rect_2d(0, 0 , width - 1 ,height - 1,LLColor4::green,true);
- gl_line_2d(0, 0 , width - 1 ,height - 1,LLColor4::black);
- */
+ /*
+ S32 width = getRect().getWidth();
+ S32 height = getRect().getHeight();
+
+ gl_rect_2d(0, 0 , width - 1 ,height - 1,LLColor4::green,true);
+ gl_line_2d(0, 0 , width - 1 ,height - 1,LLColor4::black);
+ */
}
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 0492ab0f25..3d8670fef2 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -202,10 +202,6 @@ void LLDockableFloater::setDocked(bool docked, bool pop_on_undock)
translate(0, UNDOCK_LEAP_HEIGHT);
}
}
- else
- {
- docked = false;
- }
LLFloater::setDocked(docked, pop_on_undock);
}
@@ -223,10 +219,10 @@ void LLDockableFloater::draw()
LLFloater::draw();
}
-void LLDockableFloater::setDockControl(LLDockControl* dockControl, bool docked /* = true */)
+void LLDockableFloater::setDockControl(LLDockControl* dockControl)
{
mDockControl.reset(dockControl);
- setDocked(docked && mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
+ setDocked(isDocked());
}
const LLUIImagePtr& LLDockableFloater::getDockTongue()
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 4d747390af..2b1ce99ae2 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -127,7 +127,7 @@ private:
void resetInstance();
protected:
- void setDockControl(LLDockControl* dockControl, bool docked = true);
+ void setDockControl(LLDockControl* dockControl);
const LLUIImagePtr& getDockTongue();
private:
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index ac4811210b..77caaaa425 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -71,8 +71,9 @@ static LLDefaultChildRegistry::Register<LLScrollListCtrl> r("scroll_list");
// local structures & classes.
struct SortScrollListItem
{
- SortScrollListItem(const std::vector<std::pair<S32, BOOL> >& sort_orders)
+ SortScrollListItem(const std::vector<std::pair<S32, BOOL> >& sort_orders,const LLScrollListCtrl::sort_signal_t* sort_signal)
: mSortOrders(sort_orders)
+ , mSortSignal(sort_signal)
{}
bool operator()(const LLScrollListItem* i1, const LLScrollListItem* i2)
@@ -85,12 +86,20 @@ struct SortScrollListItem
S32 col_idx = it->first;
BOOL sort_ascending = it->second;
+ S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column?
+
const LLScrollListCell *cell1 = i1->getColumn(col_idx);
const LLScrollListCell *cell2 = i2->getColumn(col_idx);
- S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column?
if (cell1 && cell2)
{
- sort_result = order * LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString());
+ if(mSortSignal)
+ {
+ sort_result = order * (*mSortSignal)(col_idx,i1, i2);
+ }
+ else
+ {
+ sort_result = order * LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString());
+ }
if (sort_result != 0)
{
break; // we have a sort order!
@@ -100,8 +109,10 @@ struct SortScrollListItem
return sort_result < 0;
}
+
typedef std::vector<std::pair<S32, BOOL> > sort_order_t;
+ const LLScrollListCtrl::sort_signal_t* mSortSignal;
const sort_order_t& mSortOrders;
};
@@ -169,6 +180,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
mOnSortChangedCallback( NULL ),
mHighlightedItem(-1),
mBorder(NULL),
+ mSortCallback(NULL),
mPopupMenu(NULL),
mNumDynamicWidthColumns(0),
mTotalStaticColumnWidth(0),
@@ -309,6 +321,8 @@ bool LLScrollListCtrl::preProcessChildNode(LLXMLNodePtr child)
LLScrollListCtrl::~LLScrollListCtrl()
{
+ delete mSortCallback;
+
std::for_each(mItemList.begin(), mItemList.end(), DeletePointer());
if( gEditMenuHandler == this )
@@ -540,7 +554,7 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
std::stable_sort(
mItemList.begin(),
mItemList.end(),
- SortScrollListItem(single_sort_column));
+ SortScrollListItem(single_sort_column,mSortCallback));
// ADD_SORTED just sorts by first column...
// this might not match user sort criteria, so flag list as being in unsorted state
@@ -2395,7 +2409,7 @@ void LLScrollListCtrl::updateSort() const
std::stable_sort(
mItemList.begin(),
mItemList.end(),
- SortScrollListItem(mSortColumns));
+ SortScrollListItem(mSortColumns,mSortCallback));
mSorted = true;
}
@@ -2411,7 +2425,7 @@ void LLScrollListCtrl::sortOnce(S32 column, BOOL ascending)
std::stable_sort(
mItemList.begin(),
mItemList.end(),
- SortScrollListItem(sort_column));
+ SortScrollListItem(sort_column,mSortCallback));
}
void LLScrollListCtrl::dirtyColumns()
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index d2d2379328..e819c5fdea 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -73,6 +73,30 @@ public:
// *TODO: Add callbacks to Params
typedef boost::function<void (void)> callback_t;
+
+ template<typename T> struct maximum
+ {
+ typedef T result_type;
+
+ template<typename InputIterator>
+ T operator()(InputIterator first, InputIterator last) const
+ {
+ // If there are no slots to call, just return the
+ // default-constructed value
+ if(first == last ) return T();
+ T max_value = *first++;
+ while (first != last) {
+ if (max_value < *first)
+ max_value = *first;
+ ++first;
+ }
+
+ return max_value;
+ }
+ };
+
+
+ typedef boost::signals2::signal<S32 (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32> > sort_signal_t;
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
@@ -362,6 +386,13 @@ public:
void setNeedsSort(bool val = true) { mSorted = !val; }
void dirtyColumns(); // some operation has potentially affected column layout or ordering
+ boost::signals2::connection setSortCallback(sort_signal_t::slot_type cb )
+ {
+ if (!mSortCallback) mSortCallback = new sort_signal_t();
+ return mSortCallback->connect(cb);
+ }
+
+
protected:
// "Full" interface: use this when you're creating a list that has one or more of the following:
// * contains icons
@@ -474,6 +505,8 @@ private:
typedef std::pair<S32, BOOL> sort_column_t;
std::vector<sort_column_t> mSortColumns;
+
+ sort_signal_t* mSortCallback;
}; // end class LLScrollListCtrl
#endif // LL_SCROLLLISTCTRL_H
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 07e4cc22e0..85ae13a889 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -172,6 +172,10 @@ public:
}
}
+ LLIconCtrl* getIconCtrl() const
+ {
+ return mIcon;
+ }
private:
LLIconCtrl* mIcon;
@@ -493,15 +497,15 @@ void LLTabContainer::draw()
if( mIsVertical && has_scroll_arrows )
{
// Redraw the arrows so that they appears on top.
- gGL.pushMatrix();
- gGL.translatef((F32)mPrevArrowBtn->getRect().mLeft, (F32)mPrevArrowBtn->getRect().mBottom, 0.f);
+ gGL.pushUIMatrix();
+ gGL.translateUI((F32)mPrevArrowBtn->getRect().mLeft, (F32)mPrevArrowBtn->getRect().mBottom, 0.f);
mPrevArrowBtn->draw();
- gGL.popMatrix();
+ gGL.popUIMatrix();
- gGL.pushMatrix();
- gGL.translatef((F32)mNextArrowBtn->getRect().mLeft, (F32)mNextArrowBtn->getRect().mBottom, 0.f);
+ gGL.pushUIMatrix();
+ gGL.translateUI((F32)mNextArrowBtn->getRect().mLeft, (F32)mNextArrowBtn->getRect().mBottom, 0.f);
mNextArrowBtn->draw();
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
}
@@ -951,7 +955,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
LLRect tab_panel_rect;
if (!getTabsHidden() && mIsVertical)
{
- tab_panel_rect = LLRect(mMinTabWidth + (LLPANEL_BORDER_WIDTH * 2) + tabcntrv_pad,
+ tab_panel_rect = LLRect(mMinTabWidth + mRightTabBtnOffset + (LLPANEL_BORDER_WIDTH * 2) + tabcntrv_pad,
getRect().getHeight() - LLPANEL_BORDER_WIDTH,
getRect().getWidth() - LLPANEL_BORDER_WIDTH,
LLPANEL_BORDER_WIDTH);
@@ -1629,6 +1633,7 @@ void LLTabContainer::setTabImage(LLPanel* child, LLIconCtrl* icon)
if(button)
{
button->setIcon(icon);
+ reshapeTuple(tuple);
}
}
}
@@ -1639,12 +1644,22 @@ void LLTabContainer::reshapeTuple(LLTabTuple* tuple)
if (!mIsVertical)
{
+ S32 image_overlay_width = 0;
+
+ if(mCustomIconCtrlUsed)
+ {
+ LLCustomButtonIconCtrl* button = dynamic_cast<LLCustomButtonIconCtrl*>(tuple->mButton);
+ LLIconCtrl* icon_ctrl = button->getIconCtrl();
+ image_overlay_width = icon_ctrl ? icon_ctrl->getRect().getWidth() : 0;
+ }
+ else
+ {
+ image_overlay_width = tuple->mButton->getImageOverlay().notNull() ?
+ tuple->mButton->getImageOverlay()->getImage()->getWidth(0) : 0;
+ }
// remove current width from total tab strip width
mTotalTabWidth -= tuple->mButton->getRect().getWidth();
- S32 image_overlay_width = tuple->mButton->getImageOverlay().notNull() ?
- tuple->mButton->getImageOverlay()->getImage()->getWidth(0) : 0;
-
tuple->mPadding = image_overlay_width;
tuple->mButton->reshape(llclamp(mFont->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth),
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index caf04339c2..b348ec2d29 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -39,6 +39,7 @@
// Linden library includes
#include "v2math.h"
+#include "m3math.h"
#include "v4color.h"
#include "llrender.h"
#include "llrect.h"
@@ -180,19 +181,19 @@ void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LL
void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset, BOOL filled)
{
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
left += LLFontGL::sCurOrigin.mX;
right += LLFontGL::sCurOrigin.mX;
bottom += LLFontGL::sCurOrigin.mY;
top += LLFontGL::sCurOrigin.mY;
- glLoadIdentity();
+ gGL.loadUIIdentity();
gl_rect_2d(llfloor((F32)left * LLUI::sGLScaleFactor.mV[VX]) - pixel_offset,
llfloor((F32)top * LLUI::sGLScaleFactor.mV[VY]) + pixel_offset,
llfloor((F32)right * LLUI::sGLScaleFactor.mV[VX]) + pixel_offset,
llfloor((F32)bottom * LLUI::sGLScaleFactor.mV[VY]) - pixel_offset,
filled);
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
@@ -508,9 +509,9 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
}
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
{
- gGL.translatef((F32)x, (F32)y, 0.f);
+ gGL.translateUI((F32)x, (F32)y, 0.f);
gGL.getTexUnit(0)->bind(image);
@@ -637,7 +638,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
}
gGL.end();
}
- gGL.popMatrix();
+ gGL.popUIMatrix();
if (solid_color)
{
@@ -660,39 +661,72 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
LLGLSUIDefault gls_ui;
- gGL.pushMatrix();
+
+ gGL.getTexUnit(0)->bind(image);
+
+ gGL.color4fv(color.mV);
+
+ if (degrees == 0.f)
{
- gGL.translatef((F32)x, (F32)y, 0.f);
- if( degrees )
+ gGL.pushUIMatrix();
+ gGL.translateUI((F32)x, (F32)y, 0.f);
+
+ gGL.begin(LLRender::QUADS);
{
- F32 offset_x = F32(width/2);
- F32 offset_y = F32(height/2);
- gGL.translatef( offset_x, offset_y, 0.f);
- glRotatef( degrees, 0.f, 0.f, 1.f );
- gGL.translatef( -offset_x, -offset_y, 0.f );
+ gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
+ gGL.vertex2i(width, height );
+
+ gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop);
+ gGL.vertex2i(0, height );
+
+ gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
+ gGL.vertex2i(0, 0);
+
+ gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom);
+ gGL.vertex2i(width, 0);
}
+ gGL.end();
+ gGL.popUIMatrix();
+ }
+ else
+ {
+ gGL.pushUIMatrix();
+ gGL.translateUI((F32)x, (F32)y, 0.f);
+
+ F32 offset_x = F32(width/2);
+ F32 offset_y = F32(height/2);
+
+ gGL.translateUI(offset_x, offset_y, 0.f);
+ LLMatrix3 quat(0.f, 0.f, degrees*DEG_TO_RAD);
+
gGL.getTexUnit(0)->bind(image);
gGL.color4fv(color.mV);
gGL.begin(LLRender::QUADS);
{
+ LLVector3 v;
+
+ v = LLVector3(offset_x, offset_y, 0.f) * quat;
gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
- gGL.vertex2i(width, height );
+ gGL.vertex2f(v.mV[0], v.mV[1] );
+ v = LLVector3(-offset_x, offset_y, 0.f) * quat;
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop);
- gGL.vertex2i(0, height );
+ gGL.vertex2f(v.mV[0], v.mV[1] );
+ v = LLVector3(-offset_x, -offset_y, 0.f) * quat;
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
- gGL.vertex2i(0, 0);
+ gGL.vertex2f(v.mV[0], v.mV[1] );
+ v = LLVector3(offset_x, -offset_y, 0.f) * quat;
gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom);
- gGL.vertex2i(width, 0);
+ gGL.vertex2f(v.mV[0], v.mV[1] );
}
gGL.end();
+ gGL.popUIMatrix();
}
- gGL.popMatrix();
}
@@ -747,9 +781,9 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F
end_angle += F_TWO_PI;
}
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
{
- gGL.translatef(center_x, center_y, 0.f);
+ gGL.translateUI(center_x, center_y, 0.f);
// Inexact, but reasonably fast.
F32 delta = (end_angle - start_angle) / steps;
@@ -780,15 +814,15 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F
}
gGL.end();
}
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled)
{
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.translatef(center_x, center_y, 0.f);
+ gGL.translateUI(center_x, center_y, 0.f);
// Inexact, but reasonably fast.
F32 delta = F_TWO_PI / steps;
@@ -819,7 +853,7 @@ void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled
}
gGL.end();
}
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
// Renders a ring with sides (tube shape)
@@ -846,9 +880,9 @@ void gl_deep_circle( F32 radius, F32 depth, S32 steps )
void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, BOOL render_center )
{
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
{
- gGL.translatef(0.f, 0.f, -width / 2);
+ gGL.translateUI(0.f, 0.f, -width / 2);
if( render_center )
{
gGL.color4fv(center_color.mV);
@@ -857,11 +891,11 @@ void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor
else
{
gl_washer_2d(radius, radius - width, steps, side_color, side_color);
- gGL.translatef(0.f, 0.f, width);
+ gGL.translateUI(0.f, 0.f, width);
gl_washer_2d(radius - width, radius, steps, side_color, side_color);
}
}
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
// Draw gray and white checkerboard with black border
@@ -1050,9 +1084,9 @@ void gl_segmented_rect_2d_tex(const S32 left,
S32 width = llabs(right - left);
S32 height = llabs(top - bottom);
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
- gGL.translatef((F32)left, (F32)bottom, 0.f);
+ gGL.translateUI((F32)left, (F32)bottom, 0.f);
LLVector2 border_uv_scale((F32)border_size / (F32)texture_width, (F32)border_size / (F32)texture_height);
if (border_uv_scale.mV[VX] > 0.5f)
@@ -1193,7 +1227,7 @@ void gl_segmented_rect_2d_tex(const S32 left,
}
gGL.end();
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
void gl_segmented_rect_2d_fragment_tex(const S32 left,
@@ -1210,9 +1244,9 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left,
S32 width = llabs(right - left);
S32 height = llabs(top - bottom);
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
- gGL.translatef((F32)left, (F32)bottom, 0.f);
+ gGL.translateUI((F32)left, (F32)bottom, 0.f);
LLVector2 border_uv_scale((F32)border_size / (F32)texture_width, (F32)border_size / (F32)texture_height);
if (border_uv_scale.mV[VX] > 0.5f)
@@ -1383,7 +1417,7 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left,
}
gGL.end();
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& border_width,
@@ -1591,7 +1625,7 @@ void LLUI::dirtyRect(LLRect rect)
//static
void LLUI::translate(F32 x, F32 y, F32 z)
{
- gGL.translatef(x,y,z);
+ gGL.translateUI(x,y,z);
LLFontGL::sCurOrigin.mX += (S32) x;
LLFontGL::sCurOrigin.mY += (S32) y;
LLFontGL::sCurOrigin.mZ += z;
@@ -1600,14 +1634,14 @@ void LLUI::translate(F32 x, F32 y, F32 z)
//static
void LLUI::pushMatrix()
{
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
LLFontGL::sOriginStack.push_back(LLFontGL::sCurOrigin);
}
//static
void LLUI::popMatrix()
{
- gGL.popMatrix();
+ gGL.popUIMatrix();
LLFontGL::sCurOrigin = *LLFontGL::sOriginStack.rbegin();
LLFontGL::sOriginStack.pop_back();
}
@@ -1615,7 +1649,7 @@ void LLUI::popMatrix()
//static
void LLUI::loadIdentity()
{
- glLoadIdentity();
+ gGL.loadUIIdentity();
LLFontGL::sCurOrigin.mX = 0;
LLFontGL::sCurOrigin.mY = 0;
LLFontGL::sCurOrigin.mZ = 0;
@@ -1943,6 +1977,7 @@ namespace LLInitParam
{
setBlockFromValue();
addSynonym(name, "");
+ setBlockFromValue();
}
void TypedParam<const LLFontGL*>::setValueFromBlock() const
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 3c73ae9b0c..20c939874b 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -232,7 +232,7 @@ std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const
LLUrlEntrySLURL::LLUrlEntrySLURL()
{
// see http://slurl.com/about.php for details on the SLURL format
- mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/\\S+/?(\\d+)?/?(\\d+)?/?(\\d+)?/?\\S*",
+ mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");
diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp
index 30717f87de..bd9c43c97f 100644
--- a/indra/llui/llviewborder.cpp
+++ b/indra/llui/llviewborder.cpp
@@ -125,14 +125,6 @@ void LLViewBorder::draw()
llassert( FALSE ); // not implemented
}
}
- else
- if( STYLE_TEXTURE == mStyle )
- {
- if( mTexture )
- {
- drawTextures();
- }
- }
LLView::draw();
}
@@ -255,56 +247,6 @@ void LLViewBorder::drawTwoPixelLines()
gl_line_2d(left+1, bottom+1, right-1, bottom+1);
}
-void LLViewBorder::drawTextures()
-{
- //LLGLSUIDefault gls_ui;
-
- //llassert( FALSE ); // TODO: finish implementing
-
- //gGL.color4fv(UI_VERTEX_COLOR.mV);
-
- //gGL.getTexUnit(0)->bind(mTexture);
- //gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_WRAP);
-
- //drawTextureTrapezoid( 0.f, mBorderWidth, getRect().getWidth(), 0, 0 );
- //drawTextureTrapezoid( 90.f, mBorderWidth, getRect().getHeight(), (F32)getRect().getWidth(),0 );
- //drawTextureTrapezoid( 180.f, mBorderWidth, getRect().getWidth(), (F32)getRect().getWidth(),(F32)getRect().getHeight() );
- //drawTextureTrapezoid( 270.f, mBorderWidth, getRect().getHeight(), 0, (F32)getRect().getHeight() );
-}
-
-
-void LLViewBorder::drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y )
-{
- gGL.pushMatrix();
- {
- gGL.translatef(start_x, start_y, 0.f);
- glRotatef( degrees, 0, 0, 1 );
-
- gGL.begin(LLRender::QUADS);
- {
- // width, width /---------\ length-width, width //
- // / \ //
- // / \ //
- // /---------------\ //
- // 0,0 length, 0 //
-
- gGL.texCoord2f( 0, 0 );
- gGL.vertex2i( 0, 0 );
-
- gGL.texCoord2f( (GLfloat)length, 0 );
- gGL.vertex2i( length, 0 );
-
- gGL.texCoord2f( (GLfloat)(length - width), (GLfloat)width );
- gGL.vertex2i( length - width, width );
-
- gGL.texCoord2f( (GLfloat)width, (GLfloat)width );
- gGL.vertex2i( width, width );
- }
- gGL.end();
- }
- gGL.popMatrix();
-}
-
BOOL LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style)
{
if (node->hasAttribute("bevel_style"))
diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h
index 92fd569325..342e84fd93 100644
--- a/indra/llui/llviewborder.h
+++ b/indra/llui/llviewborder.h
@@ -99,8 +99,7 @@ private:
void drawOnePixelLines();
void drawTwoPixelLines();
void drawTextures();
- void drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y );
-
+
EBevel mBevel;
EStyle mStyle;
LLUIColor mHighlightLight;
diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index 4512c22b5d..9f66a77c64 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -14,10 +14,12 @@ include(Linking)
include(PluginAPI)
include(MediaPluginBase)
include(FindOpenGL)
+include(PulseAudio)
include(WebKitLibPlugin)
include_directories(
+ ${PULSEAUDIO_INCLUDE_DIRS}
${LLPLUGIN_INCLUDE_DIRS}
${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
@@ -34,25 +36,27 @@ set(media_plugin_webkit_SOURCE_FILES
media_plugin_webkit.cpp
)
-add_library(media_plugin_webkit
- SHARED
- ${media_plugin_webkit_SOURCE_FILES}
-)
-
set(media_plugin_webkit_LINK_LIBRARIES
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
${WEBKIT_PLUGIN_LIBRARIES}
${PLUGIN_API_WINDOWS_LIBRARIES}
+ ${PULSEAUDIO_LIBRARIES}
)
if (LINUX)
+ list(APPEND media_plugin_webkit_SOURCE_FILES linux_volume_catcher.cpp)
list(APPEND media_plugin_webkit_LINK_LIBRARIES
${UI_LIBRARIES} # for glib/GTK
)
endif (LINUX)
+add_library(media_plugin_webkit
+ SHARED
+ ${media_plugin_webkit_SOURCE_FILES}
+)
+
target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES})
add_dependencies(media_plugin_webkit
diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp
new file mode 100644
index 0000000000..52ab766f7f
--- /dev/null
+++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp
@@ -0,0 +1,488 @@
+/**
+ * @file linux_volume_catcher.cpp
+ * @brief A Linux-specific, PulseAudio-specific hack to detect and volume-adjust new audio sources
+ *
+ * @cond
+ * $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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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$
+ * @endcond
+ */
+
+/*
+ The high-level design is as follows:
+ 1) Connect to the PulseAudio daemon
+ 2) Watch for the creation of new audio players connecting to the daemon (this includes ALSA clients running on the PulseAudio emulation layer, such as Flash plugins)
+ 3) Examine any new audio player's PID to see if it belongs to our own process
+ 4) If so, tell PA to adjust the volume of that audio player ('sink input' in PA parlance)
+ 5) Keep a list of all living audio players that we care about, adjust the volumes of all of them when we get a new setVolume() call
+ */
+
+#include "linden_common.h"
+
+#include "linux_volume_catcher.h"
+
+
+#if LL_PULSEAUDIO_ENABLED
+
+extern "C" {
+#include <glib.h>
+
+#include <pulse/introspect.h>
+#include <pulse/context.h>
+#include <pulse/subscribe.h>
+#include <pulse/glib-mainloop.h> // There's no special reason why we want the *glib* PA mainloop, but the generic polling implementation seems broken.
+
+#include "apr_pools.h"
+#include "apr_dso.h"
+}
+
+////////////////////////////////////////////////////
+
+#define DEBUGMSG(...) do {} while(0)
+#define INFOMSG(...) do {} while(0)
+#define WARNMSG(...) do {} while(0)
+
+#define LL_PA_SYM(REQUIRED, PASYM, RTN, ...) RTN (*ll##PASYM)(__VA_ARGS__) = NULL
+#include "linux_volume_catcher_pa_syms.inc"
+#include "linux_volume_catcher_paglib_syms.inc"
+#undef LL_PA_SYM
+
+static bool sSymsGrabbed = false;
+static apr_pool_t *sSymPADSOMemoryPool = NULL;
+static apr_dso_handle_t *sSymPADSOHandleG = NULL;
+
+bool grab_pa_syms(std::string pulse_dso_name)
+{
+ if (sSymsGrabbed)
+ {
+ // already have grabbed good syms
+ return true;
+ }
+
+ bool sym_error = false;
+ bool rtn = false;
+ apr_status_t rv;
+ apr_dso_handle_t *sSymPADSOHandle = NULL;
+
+#define LL_PA_SYM(REQUIRED, PASYM, RTN, ...) do{rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll##PASYM, sSymPADSOHandle, #PASYM); if (rv != APR_SUCCESS) {INFOMSG("Failed to grab symbol: %s", #PASYM); if (REQUIRED) sym_error = true;} else DEBUGMSG("grabbed symbol: %s from %p", #PASYM, (void*)ll##PASYM);}while(0)
+
+ //attempt to load the shared library
+ apr_pool_create(&sSymPADSOMemoryPool, NULL);
+
+ if ( APR_SUCCESS == (rv = apr_dso_load(&sSymPADSOHandle,
+ pulse_dso_name.c_str(),
+ sSymPADSOMemoryPool) ))
+ {
+ INFOMSG("Found DSO: %s", pulse_dso_name.c_str());
+
+#include "linux_volume_catcher_pa_syms.inc"
+#include "linux_volume_catcher_paglib_syms.inc"
+
+ if ( sSymPADSOHandle )
+ {
+ sSymPADSOHandleG = sSymPADSOHandle;
+ sSymPADSOHandle = NULL;
+ }
+
+ rtn = !sym_error;
+ }
+ else
+ {
+ INFOMSG("Couldn't load DSO: %s", pulse_dso_name.c_str());
+ rtn = false; // failure
+ }
+
+ if (sym_error)
+ {
+ WARNMSG("Failed to find necessary symbols in PulseAudio libraries.");
+ }
+#undef LL_PA_SYM
+
+ sSymsGrabbed = rtn;
+ return rtn;
+}
+
+
+void ungrab_pa_syms()
+{
+ // should be safe to call regardless of whether we've
+ // actually grabbed syms.
+
+ if ( sSymPADSOHandleG )
+ {
+ apr_dso_unload(sSymPADSOHandleG);
+ sSymPADSOHandleG = NULL;
+ }
+
+ if ( sSymPADSOMemoryPool )
+ {
+ apr_pool_destroy(sSymPADSOMemoryPool);
+ sSymPADSOMemoryPool = NULL;
+ }
+
+ // NULL-out all of the symbols we'd grabbed
+#define LL_PA_SYM(REQUIRED, PASYM, RTN, ...) do{ll##PASYM = NULL;}while(0)
+#include "linux_volume_catcher_pa_syms.inc"
+#include "linux_volume_catcher_paglib_syms.inc"
+#undef LL_PA_SYM
+
+ sSymsGrabbed = false;
+}
+////////////////////////////////////////////////////
+
+// PulseAudio requires a chain of callbacks with C linkage
+extern "C" {
+ void callback_discovered_sinkinput(pa_context *context, const pa_sink_input_info *i, int eol, void *userdata);
+ void callback_subscription_alert(pa_context *context, pa_subscription_event_type_t t, uint32_t index, void *userdata);
+ void callback_context_state(pa_context *context, void *userdata);
+}
+
+
+class LinuxVolumeCatcherImpl
+{
+public:
+ LinuxVolumeCatcherImpl();
+ ~LinuxVolumeCatcherImpl();
+
+ void setVolume(F32 volume);
+ void pump(void);
+
+ // for internal use - can't be private because used from our C callbacks
+
+ bool loadsyms(std::string pulse_dso_name);
+ void init();
+ void cleanup();
+
+ void update_all_volumes(F32 volume);
+ void update_index_volume(U32 index, F32 volume);
+ void connected_okay();
+
+ std::set<U32> mSinkInputIndices;
+ std::map<U32,U32> mSinkInputNumChannels;
+ F32 mDesiredVolume;
+ pa_glib_mainloop *mMainloop;
+ pa_context *mPAContext;
+ bool mConnected;
+ bool mGotSyms;
+};
+
+LinuxVolumeCatcherImpl::LinuxVolumeCatcherImpl()
+ : mDesiredVolume(0.0f),
+ mMainloop(NULL),
+ mPAContext(NULL),
+ mConnected(false),
+ mGotSyms(false)
+{
+ init();
+}
+
+LinuxVolumeCatcherImpl::~LinuxVolumeCatcherImpl()
+{
+ cleanup();
+}
+
+bool LinuxVolumeCatcherImpl::loadsyms(std::string pulse_dso_name)
+{
+ return grab_pa_syms(pulse_dso_name);
+}
+
+void LinuxVolumeCatcherImpl::init()
+{
+ // try to be as defensive as possible because PA's interface is a
+ // bit fragile and (for our purposes) we'd rather simply not function
+ // than crash
+
+ // we cheat and rely upon libpulse-mainloop-glib.so.0 to pull-in
+ // libpulse.so.0 - this isn't a great assumption, and the two DSOs should
+ // probably be loaded separately. Our Linux DSO framework needs refactoring,
+ // we do this sort of thing a lot with practically identical logic...
+ mGotSyms = loadsyms("libpulse-mainloop-glib.so.0");
+ if (!mGotSyms) return;
+
+ mMainloop = llpa_glib_mainloop_new(g_main_context_default());
+ if (mMainloop)
+ {
+ pa_mainloop_api *api = llpa_glib_mainloop_get_api(mMainloop);
+ if (api)
+ {
+ pa_proplist *proplist = llpa_proplist_new();
+ if (proplist)
+ {
+ llpa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "multimedia-player");
+ llpa_proplist_sets(proplist, PA_PROP_APPLICATION_ID, "com.secondlife.viewer.mediaplugvoladjust");
+ llpa_proplist_sets(proplist, PA_PROP_APPLICATION_NAME, "SL Plugin Volume Adjuster");
+ llpa_proplist_sets(proplist, PA_PROP_APPLICATION_VERSION, "1");
+
+ // plain old pa_context_new() is broken!
+ mPAContext = llpa_context_new_with_proplist(api, NULL, proplist);
+ llpa_proplist_free(proplist);
+ }
+ }
+ }
+
+ // Now we've set up a PA context and mainloop, try connecting the
+ // PA context to a PA daemon.
+ if (mPAContext)
+ {
+ llpa_context_set_state_callback(mPAContext, callback_context_state, this);
+ pa_context_flags_t cflags = (pa_context_flags)0; // maybe add PA_CONTEXT_NOAUTOSPAWN?
+ if (llpa_context_connect(mPAContext, NULL, cflags, NULL) >= 0)
+ {
+ // Okay! We haven't definitely connected, but we
+ // haven't definitely failed yet.
+ }
+ else
+ {
+ // Failed to connect to PA manager... we'll leave
+ // things like that. Perhaps we should try again later.
+ }
+ }
+}
+
+void LinuxVolumeCatcherImpl::cleanup()
+{
+ mConnected = false;
+
+ if (mGotSyms && mPAContext)
+ {
+ llpa_context_disconnect(mPAContext);
+ llpa_context_unref(mPAContext);
+ }
+ mPAContext = NULL;
+
+ if (mGotSyms && mMainloop)
+ {
+ llpa_glib_mainloop_free(mMainloop);
+ }
+ mMainloop = NULL;
+}
+
+void LinuxVolumeCatcherImpl::setVolume(F32 volume)
+{
+ mDesiredVolume = volume;
+
+ if (!mGotSyms) return;
+
+ if (mConnected && mPAContext)
+ {
+ update_all_volumes(mDesiredVolume);
+ }
+
+ pump();
+}
+
+void LinuxVolumeCatcherImpl::pump()
+{
+ gboolean may_block = FALSE;
+ g_main_context_iteration(g_main_context_default(), may_block);
+}
+
+void LinuxVolumeCatcherImpl::connected_okay()
+{
+ pa_operation *op;
+
+ // fetch global list of existing sinkinputs
+ if ((op = llpa_context_get_sink_input_info_list(mPAContext,
+ callback_discovered_sinkinput,
+ this)))
+ {
+ llpa_operation_unref(op);
+ }
+
+ // subscribe to future global sinkinput changes
+ llpa_context_set_subscribe_callback(mPAContext,
+ callback_subscription_alert,
+ this);
+ if ((op = llpa_context_subscribe(mPAContext, (pa_subscription_mask_t)
+ (PA_SUBSCRIPTION_MASK_SINK_INPUT),
+ NULL, NULL)))
+ {
+ llpa_operation_unref(op);
+ }
+}
+
+void LinuxVolumeCatcherImpl::update_all_volumes(F32 volume)
+{
+ for (std::set<U32>::iterator it = mSinkInputIndices.begin();
+ it != mSinkInputIndices.end(); ++it)
+ {
+ update_index_volume(*it, volume);
+ }
+}
+
+void LinuxVolumeCatcherImpl::update_index_volume(U32 index, F32 volume)
+{
+ static pa_cvolume cvol;
+ llpa_cvolume_set(&cvol, mSinkInputNumChannels[index],
+ llpa_sw_volume_from_linear(volume));
+
+ pa_context *c = mPAContext;
+ uint32_t idx = index;
+ const pa_cvolume *cvolumep = &cvol;
+ pa_context_success_cb_t cb = NULL; // okay as null
+ void *userdata = NULL; // okay as null
+
+ pa_operation *op;
+ if ((op = llpa_context_set_sink_input_volume(c, idx, cvolumep, cb, userdata)))
+ {
+ llpa_operation_unref(op);
+ }
+}
+
+
+void callback_discovered_sinkinput(pa_context *context, const pa_sink_input_info *sii, int eol, void *userdata)
+{
+ LinuxVolumeCatcherImpl *impl = dynamic_cast<LinuxVolumeCatcherImpl*>((LinuxVolumeCatcherImpl*)userdata);
+ llassert(impl);
+
+ if (0 == eol)
+ {
+ pa_proplist *proplist = sii->proplist;
+ pid_t sinkpid = atoll(llpa_proplist_gets(proplist, PA_PROP_APPLICATION_PROCESS_ID));
+
+ if (sinkpid == getpid()) // does the discovered sinkinput belong to this process?
+ {
+ bool is_new = (impl->mSinkInputIndices.find(sii->index) ==
+ impl->mSinkInputIndices.end());
+
+ impl->mSinkInputIndices.insert(sii->index);
+ impl->mSinkInputNumChannels[sii->index] = sii->channel_map.channels;
+
+ if (is_new)
+ {
+ // new!
+ impl->update_index_volume(sii->index, impl->mDesiredVolume);
+ }
+ else
+ {
+ // seen it already, do nothing.
+ }
+ }
+ }
+}
+
+void callback_subscription_alert(pa_context *context, pa_subscription_event_type_t t, uint32_t index, void *userdata)
+{
+ LinuxVolumeCatcherImpl *impl = dynamic_cast<LinuxVolumeCatcherImpl*>((LinuxVolumeCatcherImpl*)userdata);
+ llassert(impl);
+
+ switch (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) {
+ case PA_SUBSCRIPTION_EVENT_SINK_INPUT:
+ if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) ==
+ PA_SUBSCRIPTION_EVENT_REMOVE)
+ {
+ // forget this sinkinput, if we were caring about it
+ impl->mSinkInputIndices.erase(index);
+ impl->mSinkInputNumChannels.erase(index);
+ }
+ else if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) ==
+ PA_SUBSCRIPTION_EVENT_NEW)
+ {
+ // ask for more info about this new sinkinput
+ pa_operation *op;
+ if ((op = llpa_context_get_sink_input_info(impl->mPAContext, index, callback_discovered_sinkinput, impl)))
+ {
+ llpa_operation_unref(op);
+ }
+ }
+ else
+ {
+ // property change on this sinkinput - we don't care.
+ }
+ break;
+
+ default:;
+ }
+}
+
+void callback_context_state(pa_context *context, void *userdata)
+{
+ LinuxVolumeCatcherImpl *impl = dynamic_cast<LinuxVolumeCatcherImpl*>((LinuxVolumeCatcherImpl*)userdata);
+ llassert(impl);
+
+ switch (llpa_context_get_state(context))
+ {
+ case PA_CONTEXT_READY:
+ impl->mConnected = true;
+ impl->connected_okay();
+ break;
+ case PA_CONTEXT_TERMINATED:
+ impl->mConnected = false;
+ break;
+ case PA_CONTEXT_FAILED:
+ impl->mConnected = false;
+ break;
+ default:;
+ }
+}
+
+/////////////////////////////////////////////////////
+
+LinuxVolumeCatcher::LinuxVolumeCatcher()
+{
+ pimpl = new LinuxVolumeCatcherImpl();
+}
+
+LinuxVolumeCatcher::~LinuxVolumeCatcher()
+{
+ delete pimpl;
+ pimpl = NULL;
+}
+
+void LinuxVolumeCatcher::setVolume(F32 volume)
+{
+ llassert(pimpl);
+ pimpl->setVolume(volume);
+}
+
+void LinuxVolumeCatcher::pump()
+{
+ llassert(pimpl);
+ pimpl->pump();
+}
+
+#else // !LL_PULSEAUDIO_ENABLED
+
+// stub.
+
+LinuxVolumeCatcher::LinuxVolumeCatcher()
+{
+ pimpl = NULL;
+}
+
+LinuxVolumeCatcher::~LinuxVolumeCatcher()
+{
+}
+
+void LinuxVolumeCatcher::setVolume(F32 volume)
+{
+}
+
+void LinuxVolumeCatcher::pump()
+{
+}
+
+#endif // LL_PULSEAUDIO_ENABLED
diff --git a/indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc b/indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc
new file mode 100644
index 0000000000..d806b48428
--- /dev/null
+++ b/indra/media_plugins/webkit/linux_volume_catcher_pa_syms.inc
@@ -0,0 +1,21 @@
+// required symbols to grab
+LL_PA_SYM(true, pa_context_connect, int, pa_context *c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api);
+LL_PA_SYM(true, pa_context_disconnect, void, pa_context *c);
+LL_PA_SYM(true, pa_context_get_sink_input_info, pa_operation*, pa_context *c, uint32_t idx, pa_sink_input_info_cb_t cb, void *userdata);
+LL_PA_SYM(true, pa_context_get_sink_input_info_list, pa_operation*, pa_context *c, pa_sink_input_info_cb_t cb, void *userdata);
+LL_PA_SYM(true, pa_context_get_state, pa_context_state_t, pa_context *c);
+LL_PA_SYM(true, pa_context_new_with_proplist, pa_context*, pa_mainloop_api *mainloop, const char *name, pa_proplist *proplist);
+LL_PA_SYM(true, pa_context_set_sink_input_volume, pa_operation*, pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata);
+LL_PA_SYM(true, pa_context_set_state_callback, void, pa_context *c, pa_context_notify_cb_t cb, void *userdata);
+LL_PA_SYM(true, pa_context_set_subscribe_callback, void, pa_context *c, pa_context_subscribe_cb_t cb, void *userdata);
+LL_PA_SYM(true, pa_context_subscribe, pa_operation*, pa_context *c, pa_subscription_mask_t m, pa_context_success_cb_t cb, void *userdata);
+LL_PA_SYM(true, pa_context_unref, void, pa_context *c);
+LL_PA_SYM(true, pa_cvolume_set, pa_cvolume*, pa_cvolume *a, unsigned channels, pa_volume_t v);
+LL_PA_SYM(true, pa_operation_unref, void, pa_operation *o);
+LL_PA_SYM(true, pa_proplist_free, void, pa_proplist* p);
+LL_PA_SYM(true, pa_proplist_gets, const char*, pa_proplist *p, const char *key);
+LL_PA_SYM(true, pa_proplist_new, pa_proplist*, void);
+LL_PA_SYM(true, pa_proplist_sets, int, pa_proplist *p, const char *key, const char *value);
+LL_PA_SYM(true, pa_sw_volume_from_linear, pa_volume_t, double v);
+
+// optional symbols to grab
diff --git a/indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc b/indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc
new file mode 100644
index 0000000000..abf628c96c
--- /dev/null
+++ b/indra/media_plugins/webkit/linux_volume_catcher_paglib_syms.inc
@@ -0,0 +1,6 @@
+// required symbols to grab
+LL_PA_SYM(true, pa_glib_mainloop_free, void, pa_glib_mainloop* g);
+LL_PA_SYM(true, pa_glib_mainloop_get_api, pa_mainloop_api*, pa_glib_mainloop* g);
+LL_PA_SYM(true, pa_glib_mainloop_new, pa_glib_mainloop *, GMainContext *c);
+
+// optional symbols to grab
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 688d3bcd3d..c7aba04492 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -43,11 +43,15 @@
#include "llpluginmessageclasses.h"
#include "media_plugin_base.h"
+#if LL_LINUX
+# include "linux_volume_catcher.h"
+#endif // LL_LINUX
+
#if LL_WINDOWS
-#include <direct.h>
+# include <direct.h>
#else
-#include <unistd.h>
-#include <stdlib.h>
+# include <unistd.h>
+# include <stdlib.h>
#endif
#if LL_WINDOWS
@@ -102,6 +106,10 @@ private:
F32 mBackgroundG;
F32 mBackgroundB;
+#if LL_LINUX
+ LinuxVolumeCatcher mLinuxVolumeCatcher;
+#endif // LL_LINUX
+
void setInitState(int state)
{
// std::cerr << "changing init state to " << state << std::endl;
@@ -114,6 +122,10 @@ private:
{
LLQtWebKit::getInstance()->pump( milliseconds );
+#if LL_LINUX
+ mLinuxVolumeCatcher.pump();
+#endif // LL_LINUX
+
checkEditState();
if(mInitState == INIT_STATE_NAVIGATE_COMPLETE)
@@ -281,6 +293,7 @@ private:
return false;
};
+ void setVolume(F32 vol);
////////////////////////////////////////////////////////////////////////////////
// virtual
@@ -732,6 +745,14 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
// std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
}
}
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
+ {
+ if(message_name == "set_volume")
+ {
+ F32 volume = message_in.getValueReal("volume");
+ setVolume(volume);
+ }
+ }
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
if(message_name == "size_change")
@@ -998,6 +1019,13 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
}
}
+void MediaPluginWebKit::setVolume(F32 volume)
+{
+#if LL_LINUX
+ mLinuxVolumeCatcher.setVolume(volume);
+#endif // LL_LINUX
+}
+
int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data)
{
MediaPluginWebKit *self = new MediaPluginWebKit(host_send_func, host_user_data);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 73c08c4867..4210760223 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7443,6 +7443,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>RenderUseTriStrips</key>
+ <map>
+ <key>Comment</key>
+ <string>Use triangle strips for rendering prims.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderUseFarClip</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 887dab66d1..aa0e21ea8f 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -47,8 +47,10 @@ ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1
ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1
ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 3 1
ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1
+ATI ASUS EAH45xx .*ATI.*ASUS.*EAH45.* 1 1
ATI ASUS EAH48xx .*ATI.*ASUS.*EAH48.* 3 1
-ATI Radeon X1xxx .*ATI.*ASUS.*X1.* 2 1
+ATI ASUS EAH57xx .*ATI.*ASUS.*EAH57.* 3 1
+ATI Radeon X1xxx .*ATI.*ASUS.*X1.* 3 1
ATI Radeon X7xx .*ATI.*ASUS.*X7.* 1 1
ATI Radeon X500 .*ATI.*Diamond X5.* 1 1
ATI Radeon X13xx .*ATI.*Diamond X13.* 1 1
@@ -95,10 +97,16 @@ ATI Radeon HD 3300 .*ATI.*Radeon HD.*33.* 1 1
ATI Radeon HD 3400 .*ATI.*Radeon HD.*34.* 1 1
ATI Radeon HD 3600 .*ATI.*Radeon HD.*36.* 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD.*38.* 3 1
+ATI Radeon HD 4200 .*ATI.*Radeon HD 42.* 1 1
ATI Radeon HD 4300 .*ATI.*Radeon HD 43.* 1 1
-ATI Radeon HD 4500 .*ATI.*Radeon HD 45.* 2 1
-ATI Radeon HD 4600 .*ATI.*Radeon HD 46.* 3 1
+ATI Radeon HD 4500 .*ATI.*Radeon HD 45.* 3 1
+ATI Radeon HD 4600 .*ATI.*Radeon HD.*46.* 3 1
+ATI Radeon HD 4700 .*ATI.*Radeon HD 47.* 3 1
ATI Radeon HD 4800 .*ATI.*Radeon.*HD.*48.* 3 1
+ATI Radeon HD 5600 .*ATI.*Radeon.*HD.*56.* 3 1
+ATI Radeon HD 5700 .*ATI.*Radeon.*HD.*57.* 3 1
+ATI Radeon HD 5800 .*ATI.*Radeon.*HD.*58.* 3 1
+ATI Radeon HD 5900 .*ATI.*Radeon.*HD.*59.* 3 1
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0
ATI Radeon 2100 .*ATI.*Radeon 21.* 0 1
ATI Radeon 3100 .*ATI.*Radeon 31.* 1 1
@@ -152,13 +160,17 @@ Intel 945G .*Intel.*945G.* 0 1
Intel 950 .*Intel.*950.* 0 1
Intel 965 .*Intel.*965.* 0 1
Intel G33 .*Intel.*G33.* 0 0
+Intel G41 .*Intel.*G41.* 0 1
Intel G45 .*Intel.*G45.* 0 1
Intel Bear Lake .*Intel.*Bear Lake.* 0 0
Intel Broadwater .*Intel.*Broadwater.* 0 0
Intel Brookdale .*Intel.*Brookdale.* 0 0
Intel Cantiga .*Intel.*Cantiga.* 0 0
Intel Eaglelake .*Intel.*Eaglelake.* 0 1
+Intel Mobile 4 Series .*Intel.*Mobile.*4 Series.* 0 1
+Intel Media Graphics HD .*Intel.*Media.*Graphics.*HD.* 0 1
Intel Montara .*Intel.*Montara.* 0 0
+Intel Pineview .*Intel.*Pineview.* 0 1
Intel Springdale .*Intel.*Springdale.* 0 0
Matrox .*Matrox.* 0 0
Mesa .*Mesa.* 0 0
diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt
index 92d321d8c0..e01b9e4bc6 100644
--- a/indra/newview/linux_tools/client-readme.txt
+++ b/indra/newview/linux_tools/client-readme.txt
@@ -15,7 +15,7 @@ Life itself - please see <http://www.secondlife.com/whatis/>.
5.3. Blank window after minimizing it
5.4. Audio
5.5. 'Alt' key for camera controls doesn't work
- 5.6. In-world streaming movie/music playback
+ 5.6. In-world streaming movie, music and Flash playback
6. Advanced Troubleshooting
6.1. Audio
6.2. OpenGL
@@ -169,12 +169,15 @@ SOLUTION:- Some window managers eat the Alt key for their own purposes; you
example, the 'Windows' key!) which will allow the Alt key to function
properly with mouse actions in Second Life and other applications.
-PROBLEM 6:- In-world movie and/or music playback doesn't work for me.
+PROBLEM 6:- In-world movie, music, or Flash playback doesn't work for me.
SOLUTION:- You need to have a working installation of GStreamer 0.10; this
is usually an optional package for most versions of Linux. If you have
installed GStreamer 0.10 and you can play some music/movies but not others
then you need to install a wider selection of GStreamer plugins, either
- from your vendor or an appropriate third party.
+ from your vendor (i.e. the 'Ugly' plugins) or an appropriate third party.
+ For Flash playback, you need to have Flash 10 installed for your normal
+ web browser (for example, Firefox). PulseAudio is required for Flash
+ volume control / muting to fully function inside Second Life.
6. ADVANCED TROUBLESHOOTING
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3675be16e9..afd9d7b3f9 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3018,6 +3018,9 @@ void LLAgent::endAnimationUpdateUI()
//-----------------------------------------------------------------------------
void LLAgent::updateCamera()
{
+ static LLFastTimer::DeclareTimer ftm("Camera");
+ LLFastTimer t(ftm);
+
//Ventrella - changed camera_skyward to the new global "mCameraUpVector"
mCameraUpVector = LLVector3::z_axis;
//LLVector3 camera_skyward(0.f, 0.f, 1.f);
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index f4bc35002b..08cd101b01 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -286,6 +286,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i
}
if (mTodo & CALL_RECOVERDONE)
{
+ LLAppearanceManager::instance().addCOFItemLink(inv_item,false);
gAgentWearables.recoverMissingWearableDone();
}
/*
@@ -1038,7 +1039,7 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void*
{
return;
}
-
+
if (wearable)
{
llassert(type == wearable->getType());
@@ -1057,6 +1058,7 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void*
// Somehow the asset doesn't exist in the database.
gAgentWearables.recoverMissingWearable(type,index);
}
+
gInventory.notifyObservers();
@@ -1576,7 +1578,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
const LLDynamicArray< LLWearable* >& wearables,
BOOL remove)
{
- lldebugs << "setWearableOutfit() start" << llendl;
+ llinfos << "setWearableOutfit() start" << llendl;
BOOL wearables_to_remove[WT_COUNT];
wearables_to_remove[WT_SHAPE] = FALSE;
@@ -2485,7 +2487,7 @@ class LLFetchAndLinkObserver: public LLInventoryFetchObserver
public:
LLFetchAndLinkObserver(LLInventoryFetchObserver::item_ref_t& ids):
m_ids(ids),
- LLInventoryFetchObserver(true)
+ LLInventoryFetchObserver(true) // retry for missing items
{
}
~LLFetchAndLinkObserver()
@@ -2494,7 +2496,9 @@ public:
virtual void done()
{
gInventory.removeObserver(this);
+
// Link to all fetched items in COF.
+ LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
for (LLInventoryFetchObserver::item_ref_t::iterator it = m_ids.begin();
it != m_ids.end();
++it)
@@ -2506,8 +2510,13 @@ public:
llwarns << "fetch failed!" << llendl;
continue;
}
- link_inventory_item(gAgent.getID(), item->getLinkedUUID(), LLAppearanceManager::instance().getCOF(), item->getName(),
- LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
+
+ link_inventory_item(gAgent.getID(),
+ item->getLinkedUUID(),
+ LLAppearanceManager::instance().getCOF(),
+ item->getName(),
+ LLAssetType::AT_LINK,
+ link_waiter);
}
}
private:
@@ -2530,11 +2539,13 @@ void LLInitialWearablesFetch::processWearablesMessage()
#ifdef USE_CURRENT_OUTFIT_FOLDER
ids.push_back(wearable_data->mItemID);
#endif
- // Fetch the wearables
- LLWearableList::instance().getAsset(wearable_data->mAssetID,
- LLStringUtil::null,
- LLWearableDictionary::getAssetType(wearable_data->mType),
- LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data));
+#if 0
+// // Fetch the wearables
+// LLWearableList::instance().getAsset(wearable_data->mAssetID,
+// LLStringUtil::null,
+// LLWearableDictionary::getAssetType(wearable_data->mType),
+// LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data));
+#endif
}
else
{
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index eb4a47664b..c9da08701d 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -301,50 +301,52 @@ void LLOutfitFetch::done()
delete this;
}
-class LLUpdateAppearanceOnDestroy: public LLInventoryCallback
+LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy():
+ mFireCount(0)
{
-public:
- LLUpdateAppearanceOnDestroy():
- mFireCount(0)
- {
- }
+}
- virtual ~LLUpdateAppearanceOnDestroy()
+LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
+{
+ llinfos << "done update appearance on destroy" << llendl;
+
+ if (!LLApp::isExiting())
{
- llinfos << "done update appearance on destroy" << llendl;
-
- if (!LLApp::isExiting())
- {
- LLAppearanceManager::instance().updateAppearanceFromCOF();
- }
+ LLAppearanceManager::instance().updateAppearanceFromCOF();
}
+}
- /* virtual */ void fire(const LLUUID& inv_item)
- {
- llinfos << "callback fired" << llendl;
- mFireCount++;
- }
-private:
- U32 mFireCount;
-};
+void LLUpdateAppearanceOnDestroy::fire(const LLUUID& inv_item)
+{
+ llinfos << "callback fired" << llendl;
+ mFireCount++;
+}
struct LLFoundData
{
- LLFoundData() : mAssetType(LLAssetType::AT_NONE), mWearable(NULL) {}
+ LLFoundData() :
+ mAssetType(LLAssetType::AT_NONE),
+ mWearableType(WT_INVALID),
+ mWearable(NULL) {}
+
LLFoundData(const LLUUID& item_id,
- const LLUUID& asset_id,
- const std::string& name,
- LLAssetType::EType asset_type) :
+ const LLUUID& asset_id,
+ const std::string& name,
+ const LLAssetType::EType& asset_type,
+ const EWearableType& wearable_type
+ ) :
mItemID(item_id),
mAssetID(asset_id),
mName(name),
mAssetType(asset_type),
+ mWearableType(wearable_type),
mWearable( NULL ) {}
LLUUID mItemID;
LLUUID mAssetID;
std::string mName;
LLAssetType::EType mAssetType;
+ EWearableType mWearableType;
LLWearable* mWearable;
};
@@ -355,14 +357,26 @@ public:
LLWearableHoldingPattern();
~LLWearableHoldingPattern();
- bool pollCompletion();
+ bool pollFetchCompletion();
+ void onFetchCompletion();
bool isFetchCompleted();
bool isTimedOut();
+
+ void checkMissingWearables();
+ bool pollMissingWearables();
+ bool isMissingCompleted();
+ void recoverMissingWearable(EWearableType type);
+ void clearCOFLinksForMissingWearables();
+
+ void onAllComplete();
typedef std::list<LLFoundData> found_list_t;
found_list_t mFoundList;
LLInventoryModel::item_array_t mObjItems;
LLInventoryModel::item_array_t mGestItems;
+ typedef std::set<S32> type_set_t;
+ type_set_t mTypesToRecover;
+ type_set_t mTypesToLink;
S32 mResolved;
LLTimer mWaitTime;
bool mFired;
@@ -389,13 +403,99 @@ bool LLWearableHoldingPattern::isTimedOut()
return mWaitTime.getElapsedTimeF32() > max_wait_time;
}
-bool LLWearableHoldingPattern::pollCompletion()
+void LLWearableHoldingPattern::checkMissingWearables()
+{
+ std::vector<S32> found_by_type(WT_COUNT,0);
+ std::vector<S32> requested_by_type(WT_COUNT,0);
+ for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it)
+ {
+ LLFoundData &data = *it;
+ if (data.mWearableType < WT_COUNT)
+ requested_by_type[data.mWearableType]++;
+ if (data.mWearable)
+ found_by_type[data.mWearableType]++;
+ }
+
+ for (S32 type = 0; type < WT_COUNT; ++type)
+ {
+ llinfos << "type " << type << " requested " << requested_by_type[type] << " found " << found_by_type[type] << llendl;
+ if (found_by_type[type] > 0)
+ continue;
+ if (
+ // Need to recover if at least one wearable of that type
+ // was requested but none was found (prevent missing
+ // pants)
+ (requested_by_type[type] > 0) ||
+ // or if type is a body part and no wearables were found.
+ ((type == WT_SHAPE) || (type == WT_SKIN) || (type == WT_HAIR) || (type == WT_EYES)))
+ {
+ mTypesToRecover.insert(type);
+ mTypesToLink.insert(type);
+ recoverMissingWearable((EWearableType)type);
+ llwarns << "need to replace " << type << llendl;
+ }
+ }
+
+ if (!pollMissingWearables())
+ {
+ mWaitTime.reset();
+ doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollMissingWearables,this));
+ }
+}
+
+void LLWearableHoldingPattern::onAllComplete()
+{
+ // Activate all gestures in this folder
+ if (mGestItems.count() > 0)
+ {
+ llinfos << "Activating " << mGestItems.count() << " gestures" << llendl;
+
+ LLGestureManager::instance().activateGestures(mGestItems);
+
+ // Update the inventory item labels to reflect the fact
+ // they are active.
+ LLViewerInventoryCategory* catp =
+ gInventory.getCategory(LLAppearanceManager::instance().getCOF());
+
+ if (catp)
+ {
+ gInventory.updateCategory(catp);
+ gInventory.notifyObservers();
+ }
+ }
+
+ // Update wearables.
+ llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl;
+ LLAppearanceManager::instance().updateAgentWearables(this, false);
+
+ // Update attachments to match those requested.
+ LLVOAvatar* avatar = gAgent.getAvatarObject();
+ if( avatar )
+ {
+ llinfos << "Updating " << mObjItems.count() << " attachments" << llendl;
+ LLAgentWearables::userUpdateAttachments(mObjItems);
+ }
+
+ if (isFetchCompleted() && isMissingCompleted())
+ {
+ // Only safe to delete if all wearable callbacks and all missing wearables completed.
+ delete this;
+ }
+}
+
+void LLWearableHoldingPattern::onFetchCompletion()
+{
+ checkMissingWearables();
+}
+
+// Runs as an idle callback until all wearables are fetched (or we time out).
+bool LLWearableHoldingPattern::pollFetchCompletion()
{
bool completed = isFetchCompleted();
bool timed_out = isTimedOut();
bool done = completed || timed_out;
- llinfos << "polling, done status: " << completed << " timed out? " << timed_out << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl;
+ llinfos << "polling, done status: " << completed << " timed out " << timed_out << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl;
if (done)
{
@@ -406,46 +506,184 @@ bool LLWearableHoldingPattern::pollCompletion()
llwarns << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << llendl;
}
- // Activate all gestures in this folder
- if (mGestItems.count() > 0)
- {
- llinfos << "Activating " << mGestItems.count() << " gestures" << llendl;
-
- LLGestureManager::instance().activateGestures(mGestItems);
-
- // Update the inventory item labels to reflect the fact
- // they are active.
- LLViewerInventoryCategory* catp =
- gInventory.getCategory(LLAppearanceManager::instance().getCOF());
+ onFetchCompletion();
+ }
+ return done;
+}
- if (catp)
- {
- gInventory.updateCategory(catp);
- gInventory.notifyObservers();
- }
- }
+class RecoveredItemLinkCB: public LLInventoryCallback
+{
+public:
+ RecoveredItemLinkCB(EWearableType type, LLWearable *wearable, LLWearableHoldingPattern* holder):
+ mHolder(holder),
+ mWearable(wearable),
+ mType(type)
+ {
+ }
+ void fire(const LLUUID& item_id)
+ {
+ llinfos << "Recovered item link for type " << mType << llendl;
+ mHolder->mTypesToLink.erase(mType);
+ // Add wearable to FoundData for actual wearing
+ LLViewerInventoryItem *item = gInventory.getItem(item_id);
+ LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL;
- // Update wearables.
- llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl;
- LLAppearanceManager::instance().updateAgentWearables(this, false);
-
- // Update attachments to match those requested.
- LLVOAvatar* avatar = gAgent.getAvatarObject();
- if( avatar )
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, linked_item->getUUID());
+
+ if (item && linked_item)
{
- llinfos << "Updating " << mObjItems.count() << " attachments" << llendl;
- LLAgentWearables::userUpdateAttachments(mObjItems);
+ LLFoundData found(linked_item->getUUID(),
+ linked_item->getAssetUUID(),
+ linked_item->getName(),
+ linked_item->getType(),
+ linked_item->isWearableType() ? linked_item->getWearableType() : WT_INVALID
+ );
+ found.mWearable = mWearable;
+ mHolder->mFoundList.push_front(found);
}
+ else
+ {
+ llwarns << "inventory item or link not found for recovered wearable" << llendl;
+ }
+ }
+private:
+ LLWearableHoldingPattern* mHolder;
+ LLWearable *mWearable;
+ EWearableType mType;
+};
- if (completed)
+class RecoveredItemCB: public LLInventoryCallback
+{
+public:
+ RecoveredItemCB(EWearableType type, LLWearable *wearable, LLWearableHoldingPattern* holder):
+ mHolder(holder),
+ mWearable(wearable),
+ mType(type)
+ {
+ }
+ void fire(const LLUUID& item_id)
+ {
+ llinfos << "Recovered item for type " << mType << llendl;
+ LLViewerInventoryItem *itemp = gInventory.getItem(item_id);
+ LLPointer<LLInventoryCallback> cb = new RecoveredItemLinkCB(mType,mWearable,mHolder);
+ mHolder->mTypesToRecover.erase(mType);
+ link_inventory_item( gAgent.getID(),
+ item_id,
+ LLAppearanceManager::instance().getCOF(),
+ itemp->getName(),
+ LLAssetType::AT_LINK,
+ cb);
+ }
+private:
+ LLWearableHoldingPattern* mHolder;
+ LLWearable *mWearable;
+ EWearableType mType;
+};
+
+void LLWearableHoldingPattern::recoverMissingWearable(EWearableType type)
+{
+ // Try to recover by replacing missing wearable with a new one.
+ LLNotificationsUtil::add("ReplacedMissingWearable");
+ lldebugs << "Wearable " << LLWearableDictionary::getTypeLabel(type)
+ << " could not be downloaded. Replaced inventory item with default wearable." << llendl;
+ LLWearable* wearable = LLWearableList::instance().createNewWearable(type);
+
+ // Add a new one in the lost and found folder.
+ const LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
+ LLPointer<LLInventoryCallback> cb = new RecoveredItemCB(type,wearable,this);
+
+ create_inventory_item(gAgent.getID(),
+ gAgent.getSessionID(),
+ lost_and_found_id,
+ wearable->getTransactionID(),
+ wearable->getName(),
+ wearable->getDescription(),
+ wearable->getAssetType(),
+ LLInventoryType::IT_WEARABLE,
+ wearable->getType(),
+ wearable->getPermissions().getMaskNextOwner(),
+ cb);
+}
+
+bool LLWearableHoldingPattern::isMissingCompleted()
+{
+ return mTypesToLink.size()==0 && mTypesToRecover.size()==0;
+}
+
+void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
+{
+ for (found_list_t::iterator it = mFoundList.begin(); it != mFoundList.end(); ++it)
+ {
+ LLFoundData &data = *it;
+ if ((data.mWearableType < WT_COUNT) && (!data.mWearable))
{
- // Only safe to delete if all wearable callbacks completed.
- delete this;
+ // Wearable link that was never resolved; remove links to it from COF
+ llinfos << "removing link for unresolved item " << data.mItemID.asString() << llendl;
+ LLAppearanceManager::instance().removeCOFItemLinks(data.mItemID,false);
}
}
+}
+
+bool LLWearableHoldingPattern::pollMissingWearables()
+{
+ bool timed_out = isTimedOut();
+ bool missing_completed = isMissingCompleted();
+ bool done = timed_out || missing_completed;
+
+ llinfos << "polling missing wearables, waiting for items " << mTypesToRecover.size()
+ << " links " << mTypesToLink.size()
+ << " wearables, timed out " << timed_out
+ << " elapsed " << mWaitTime.getElapsedTimeF32()
+ << " done " << done << llendl;
+
+ if (done)
+ {
+ clearCOFLinksForMissingWearables();
+ onAllComplete();
+ }
return done;
}
+static void onWearableAssetFetch(LLWearable* wearable, void* data)
+{
+ LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data;
+ holder->mResolved += 1; // just counting callbacks, not successes.
+ llinfos << "onWearableAssetFetch, resolved count " << holder->mResolved << " of requested " << holder->mFoundList.size() << llendl;
+ if (wearable)
+ {
+ llinfos << "wearable found, type " << wearable->getType() << " asset " << wearable->getAssetID() << llendl;
+ }
+ else
+ {
+ llwarns << "no wearable found" << llendl;
+ }
+
+ if (holder->mFired)
+ {
+ llwarns << "called after holder fired" << llendl;
+ return;
+ }
+
+ if (!wearable)
+ {
+ return;
+ }
+
+ for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin();
+ iter != holder->mFoundList.end(); ++iter)
+ {
+ LLFoundData& data = *iter;
+ if(wearable->getAssetID() == data.mAssetID)
+ {
+ data.mWearable = wearable;
+ // Failing this means inventory or asset server are corrupted in a way we don't handle.
+ llassert((data.mWearableType < WT_COUNT) && (wearable->getType() == data.mWearableType));
+ break;
+ }
+ }
+}
+
+
static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
{
LLInventoryModel::item_array_t new_items;
@@ -473,30 +711,6 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
items = new_items;
}
-static void onWearableAssetFetch(LLWearable* wearable, void* data)
-{
- LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data;
- if (holder->mFired)
- {
- llwarns << "called after holder fired" << llendl;
- }
-
- if(wearable)
- {
- for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin();
- iter != holder->mFoundList.end(); ++iter)
- {
- LLFoundData& data = *iter;
- if(wearable->getAssetID() == data.mAssetID)
- {
- data.mWearable = wearable;
- break;
- }
- }
- }
- holder->mResolved += 1;
-}
-
const LLUUID LLAppearanceManager::getCOF() const
{
return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
@@ -718,7 +932,8 @@ void LLAppearanceManager::linkAll(const LLUUID& category,
void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
{
- llinfos << "starting" << llendl;
+ LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
+ llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
const LLUUID cof = getCOF();
@@ -893,6 +1108,9 @@ void LLAppearanceManager::updateAppearanceFromCOF()
// wearables can be resolved immediately, then the
// callback will be called (and this object deleted)
// before the final getNextData().
+
+ // BAP future cleanup - no point having found_container when
+ // mFoundList already has all the info.
LLDynamicArray<LLFoundData> found_container;
for(S32 i = 0; i < wear_items.count(); ++i)
{
@@ -903,7 +1121,21 @@ void LLAppearanceManager::updateAppearanceFromCOF()
LLFoundData found(linked_item->getUUID(),
linked_item->getAssetUUID(),
linked_item->getName(),
- linked_item->getType());
+ linked_item->getType(),
+ linked_item->isWearableType() ? linked_item->getWearableType() : WT_INVALID
+ );
+
+#if 0
+ // Fault injection: uncomment this block to test asset
+ // fetch failures (should be replaced by new defaults in
+ // lost&found).
+ if (found.mWearableType == WT_SHAPE || found.mWearableType == WT_JACKET)
+ {
+ found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB
+
+ }
+#endif
+
holder->mFoundList.push_front(found);
found_container.put(found);
}
@@ -923,7 +1155,9 @@ void LLAppearanceManager::updateAppearanceFromCOF()
for(S32 i = 0; i < found_container.count(); ++i)
{
LLFoundData& found = found_container.get(i);
-
+
+ llinfos << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl;
+
// Fetch the wearables about to be worn.
LLWearableList::instance().getAsset(found.mAssetID,
found.mName,
@@ -933,9 +1167,9 @@ void LLAppearanceManager::updateAppearanceFromCOF()
}
- if (!holder->pollCompletion())
+ if (!holder->pollFetchCompletion())
{
- doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollCompletion,holder));
+ doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollFetchCompletion,holder));
}
}
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 28b51ee0f6..e7e2f33520 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -151,6 +151,18 @@ public:
BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const;
};
+class LLUpdateAppearanceOnDestroy: public LLInventoryCallback
+{
+public:
+ LLUpdateAppearanceOnDestroy();
+ virtual ~LLUpdateAppearanceOnDestroy();
+ /* virtual */ void fire(const LLUUID& inv_item);
+
+private:
+ U32 mFireCount;
+};
+
+
#define SUPPORT_ENSEMBLES 0
LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 00a9e4d745..948d38befb 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3593,13 +3593,15 @@ void LLAppViewer::idle()
{
// Handle pending gesture processing
+ static LLFastTimer::DeclareTimer ftm("Agent Position");
+ LLFastTimer t(ftm);
LLGestureManager::instance().update();
gAgent.updateAgentPosition(gFrameDTClamped, yaw, current_mouse.mX, current_mouse.mY);
}
{
- LLFastTimer t(FTM_OBJECTLIST_UPDATE); // Actually "object update"
+ LLFastTimer t(FTM_OBJECTLIST_UPDATE);
if (!(logoutRequestSent() && hasSavedFinalSnapshot()))
{
@@ -3633,6 +3635,8 @@ void LLAppViewer::idle()
//
{
+ static LLFastTimer::DeclareTimer ftm("HUD Effects");
+ LLFastTimer t(ftm);
LLSelectMgr::getInstance()->updateEffects();
LLHUDManager::getInstance()->cleanupEffects();
LLHUDManager::getInstance()->sendEffects();
@@ -3889,7 +3893,7 @@ void LLAppViewer::sendLogoutRequest()
static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME;
#endif
-static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Network");
+static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Idle Network");
void LLAppViewer::idleNetwork()
{
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 1d75374930..e6666c7f83 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -50,6 +50,7 @@
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llfloaterpay.h"
+#include "llfloaterworldmap.h"
#include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType
#include "llimview.h" // for gIMMgr
#include "llmutelist.h"
@@ -317,6 +318,20 @@ void LLAvatarActions::showProfile(const LLUUID& id)
}
// static
+void LLAvatarActions::showOnMap(const LLUUID& id)
+{
+ std::string name;
+ if (!gCacheName->getFullName(id, name))
+ {
+ gCacheName->get(id, FALSE, boost::bind(&LLAvatarActions::showOnMap, id));
+ return;
+ }
+
+ gFloaterWorldMap->trackAvatar(id, name);
+ LLFloaterReg::showInstance("world_map");
+}
+
+// static
void LLAvatarActions::pay(const LLUUID& id)
{
LLNotification::Params params("BusyModePay");
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 16a58718a2..a7f3acad4f 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -99,6 +99,11 @@ public:
static void showProfile(const LLUUID& id);
/**
+ * Show avatar on world map.
+ */
+ static void showOnMap(const LLUUID& id);
+
+ /**
* Give money to the avatar.
*/
static void pay(const LLUUID& id);
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 6784e6693b..50d8672083 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -329,7 +329,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
{
LLAvatarListItem* item = new LLAvatarListItem();
item->setName(name);
- item->setAvatarId(id, mIgnoreOnlineStatus);
+ item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus);
item->setOnline(mIgnoreOnlineStatus ? true : is_online);
item->showLastInteractionTime(mShowLastInteractionTime);
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index aeed4fee08..0e4215e91a 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -78,6 +78,8 @@ public:
bool contains(const LLUUID& id);
void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; }
+ void setSessionID(const LLUUID& session_id) { mSessionID = session_id; }
+ const LLUUID& getSessionID() { return mSessionID; }
void toggleIcons();
void setSpeakingIndicatorsVisible(bool visible);
@@ -119,6 +121,7 @@ private:
std::string mIconParamName;
std::string mNameFilter;
uuid_vector_t mIDs;
+ LLUUID mSessionID;
LLAvatarListItem::ContextMenu* mContextMenu;
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 5011b191f4..9645e75e60 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -211,14 +211,14 @@ void LLAvatarListItem::setState(EItemState item_style)
mAvatarIcon->setColor(item_icon_color_map[item_style]);
}
-void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes)
+void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes)
{
if (mAvatarId.notNull())
LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this);
mAvatarId = id;
mAvatarIcon->setValue(id);
- mSpeakingIndicator->setSpeakerId(id);
+ mSpeakingIndicator->setSpeakerId(id, session_id);
// We'll be notified on avatar online status changes
if (!ignore_status_changes && mAvatarId.notNull())
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index 426d80e0a8..cecb64add7 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -100,7 +100,7 @@ public:
void setName(const std::string& name);
void setHighlight(const std::string& highlight);
void setState(EItemState item_style);
- void setAvatarId(const LLUUID& id, bool ignore_status_changes = false);
+ void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false);
void setLastInteractionTime(U32 secs_since);
//Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly
void setShowProfileBtn(bool show);
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 6180b880b5..5e8d5a63d0 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -116,34 +116,6 @@ public:
return LLPanel::handleMouseUp(x,y,mask);
}
- //*TODO remake it using mouse enter/leave and static LLHandle<LLIconCtrl> to add/remove as a child
- BOOL handleToolTip(S32 x, S32 y, MASK mask)
- {
- LLTextBase* name = getChild<LLTextBase>("user_name");
- if (name && name->parentPointInView(x, y) && mAvatarID.notNull() && mFrom.size() && SYSTEM_FROM != mFrom)
- {
-
- // Spawn at right side of the name textbox.
- LLRect sticky_rect = name->calcScreenRect();
- S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3);
-
- LLToolTip::Params params;
- params.background_visible(false);
- params.click_callback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, 0, 0, 0));
- params.delay_time(0.0f); // spawn instantly on hover
- params.image(LLUI::getUIImage("Info_Small"));
- params.message("");
- params.padding(0);
- params.pos(LLCoordGL(icon_x, sticky_rect.mTop - 2));
- params.sticky_rect(sticky_rect);
-
- LLToolTipMgr::getInstance()->show(params);
- return TRUE;
- }
-
- return LLPanel::handleToolTip(x, y, mask);
- }
-
void onObjectIconContextMenuItemClicked(const LLSD& userdata)
{
std::string level = userdata.asString();
@@ -198,7 +170,10 @@ public:
menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleObject = menu->getHandle();
- setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4));
+ setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this));
+
+ setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this));
+ setMouseLeaveCallback(boost::bind(&LLChatHistoryHeader::hideInfoCtrl, this));
return LLPanel::postBuild();
}
@@ -232,7 +207,7 @@ public:
return LLPanel::handleRightMouseDown(x,y,mask);
}
- void onHeaderPanelClick(S32 x, S32 y, MASK mask)
+ void showInspector()
{
if (mSourceType == CHAT_SOURCE_OBJECT)
{
@@ -245,6 +220,17 @@ public:
//if chat source is system, you may add "else" here to define behaviour.
}
+ static void onClickInfoCtrl(LLUICtrl* info_ctrl)
+ {
+ if (!info_ctrl) return;
+
+ LLChatHistoryHeader* header = dynamic_cast<LLChatHistoryHeader*>(info_ctrl->getParent());
+ if (!header) return;
+
+ header->showInspector();
+ }
+
+
const LLUUID& getAvatarId () const { return mAvatarID;}
void setup(const LLChat& chat,const LLStyle::Params& style_params)
@@ -385,6 +371,33 @@ protected:
}
}
+ void showInfoCtrl()
+ {
+ if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
+
+ if (!sInfoCtrl)
+ {
+ sInfoCtrl = LLUICtrlFactory::createFromFile<LLUICtrl>("inspector_info_ctrl.xml", NULL, LLPanel::child_registry_t::instance());
+ sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl));
+ }
+
+ LLTextBase* name = getChild<LLTextBase>("user_name");
+ LLRect sticky_rect = name->getRect();
+ S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3);
+ sInfoCtrl->setOrigin(icon_x, sticky_rect.getCenterY() - sInfoCtrl->getRect().getHeight() / 2 ) ;
+ addChild(sInfoCtrl);
+ }
+
+ void hideInfoCtrl()
+ {
+ if (!sInfoCtrl) return;
+
+ if (sInfoCtrl->getParent() == this)
+ {
+ removeChild(sInfoCtrl);
+ }
+ }
+
private:
void setTimeField(const LLChat& chat)
{
@@ -413,6 +426,8 @@ protected:
LLHandle<LLView> mPopupMenuHandleAvatar;
LLHandle<LLView> mPopupMenuHandleObject;
+ static LLUICtrl* sInfoCtrl;
+
LLUUID mAvatarID;
EChatSourceType mSourceType;
std::string mFrom;
@@ -421,6 +436,7 @@ protected:
S32 mMinUserNameWidth;
};
+LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL;
LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)
: LLUICtrl(p),
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 9fbc3408d7..38eda5bd2e 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -386,8 +386,6 @@ void LLDrawable::makeActive()
mParent->makeActive();
}
- gPipeline.setActive(this, TRUE);
-
//all child objects must also be active
llassert_always(mVObjp);
@@ -434,7 +432,6 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
if (isState(ACTIVE))
{
clearState(ACTIVE);
- gPipeline.setActive(this, FALSE);
if (mParent.notNull() && mParent->isActive() && warning_enabled)
{
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 95ddacb722..ef946ac49e 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -496,8 +496,8 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
params.mGroup->rebuildMesh();
}
params.mVertexBuffer->setBuffer(mask);
- params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
- gPipeline.addTrianglesDrawn(params.mCount/3);
+ params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
}
if (params.mTextureMatrix && texture && params.mTexture.notNull())
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 7be6e82251..875c9ac6a9 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -251,8 +251,8 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
params.mGroup->rebuildMesh();
}
params.mVertexBuffer->setBuffer(mask);
- params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
- gPipeline.addTrianglesDrawn(params.mCount/3);
+ params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
}
}
}
@@ -381,8 +381,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
}
params.mVertexBuffer->setBuffer(mask);
- params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
- gPipeline.addTrianglesDrawn(params.mCount/3);
+ params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
if (params.mTextureMatrix && params.mTexture.notNull())
{
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 03a8b108e2..d09d4a412f 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -560,8 +560,8 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL
params.mGroup->rebuildMesh();
}
params.mVertexBuffer->setBuffer(mask);
- params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
- gPipeline.addTrianglesDrawn(params.mCount/3);
+ params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
}
}
@@ -1231,8 +1231,8 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
params.mGroup->rebuildMesh();
}
params.mVertexBuffer->setBuffer(mask);
- params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
- gPipeline.addTrianglesDrawn(params.mCount/3);
+ params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
if (params.mTextureMatrix)
{
if (mShiny)
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 5521fb05a8..1a5d55d793 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -115,7 +115,7 @@ void LLDrawPoolTree::render(S32 pass)
LLFace *face = *iter;
face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0);
- gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()/3);
+ gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices());
}
}
}
@@ -237,7 +237,7 @@ void LLDrawPoolTree::renderForSelect()
face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0);
- gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()/3);
+ gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices());
}
}
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 80acc71a41..9de69a8173 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -870,7 +870,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
llpushcallstacks ;
const LLVolumeFace &vf = volume.getVolumeFace(f);
S32 num_vertices = (S32)vf.mVertices.size();
- S32 num_indices = (S32)vf.mIndices.size();
+ S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size();
if (mVertexBuffer.notNull())
{
@@ -1063,9 +1063,19 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (full_rebuild)
{
mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex);
- for (U16 i = 0; i < num_indices; i++)
+ if (LLPipeline::sUseTriStrips)
{
- *indicesp++ = vf.mIndices[i] + index_offset;
+ for (U32 i = 0; i < (U32) num_indices; i++)
+ {
+ *indicesp++ = vf.mTriStrip[i] + index_offset;
+ }
+ }
+ else
+ {
+ for (U32 i = 0; i < (U32) num_indices; i++)
+ {
+ *indicesp++ = vf.mIndices[i] + index_offset;
+ }
}
}
@@ -1617,8 +1627,13 @@ S32 LLFace::pushVertices(const U16* index_array) const
{
if (mIndicesCount)
{
- mVertexBuffer->drawRange(LLRender::TRIANGLES, mGeomIndex, mGeomIndex+mGeomCount-1, mIndicesCount, mIndicesIndex);
- gPipeline.addTrianglesDrawn(mIndicesCount/3);
+ U32 render_type = LLRender::TRIANGLES;
+ if (mDrawInfo)
+ {
+ render_type = mDrawInfo->mDrawMode;
+ }
+ mVertexBuffer->drawRange(render_type, mGeomIndex, mGeomIndex+mGeomCount-1, mIndicesCount, mIndicesIndex);
+ gPipeline.addTrianglesDrawn(mIndicesCount, render_type);
}
return mIndicesCount;
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index aea2de8e92..561965d021 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -51,6 +51,9 @@
/*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
+static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild");
+static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update");
+
// LLFlexibleObjectData::pack/unpack now in llprimitive.cpp
//-----------------------------------------------
@@ -194,7 +197,6 @@ void LLVolumeImplFlexible::remapSections(LLFlexibleObjectSection *source, S32 so
}
}
-
//-----------------------------------------------------------------------------
void LLVolumeImplFlexible::setAttributesOfAllSections(LLVector3* inScale)
{
@@ -363,6 +365,7 @@ inline S32 log2(S32 x)
void LLVolumeImplFlexible::doFlexibleUpdate()
{
+ LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE);
LLVolume* volume = mVO->getVolume();
LLPath *path = &volume->getPath();
if (mSimulateRes == 0)
@@ -693,7 +696,10 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
}
volume->updateRelativeXform();
- doFlexibleUpdate();
+ {
+ LLFastTimer t(FTM_DO_FLEXIBLE_UPDATE);
+ doFlexibleUpdate();
+ }
// Object may have been rotated, which means it needs a rebuild. See SL-47220
BOOL rotated = FALSE;
@@ -710,7 +716,10 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->regenFaces();
volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME);
volume->dirtySpatialGroup();
- doFlexibleRebuild();
+ {
+ LLFastTimer t(FTM_FLEXIBLE_REBUILD);
+ doFlexibleRebuild();
+ }
volume->genBBoxes(isVolumeGlobal());
}
else if (!mUpdated || rotated)
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 61568df12e..9917593c91 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -688,6 +688,9 @@ BOOL LLImagePreviewAvatar::render()
mNeedsUpdate = FALSE;
LLVOAvatar* avatarp = mDummyAvatar;
+ gGL.pushUIMatrix();
+ gGL.loadUIIdentity();
+
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
@@ -696,6 +699,7 @@ BOOL LLImagePreviewAvatar::render()
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
glLoadIdentity();
+
LLGLSUIDefault def;
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
@@ -741,6 +745,7 @@ BOOL LLImagePreviewAvatar::render()
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
}
+ gGL.popUIMatrix();
gGL.color4f(1,1,1,1);
return TRUE;
}
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 750a9d478f..8569e208eb 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -897,19 +897,21 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- for (S32 i = 0; i < mDebugBeacons.count(); i++)
+ BOOL flush = FALSE;
+ for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
- const LLDebugBeacon &debug_beacon = mDebugBeacons[i];
+ const LLDebugBeacon &debug_beacon = *iter;
LLColor4 color = debug_beacon.mColor;
color.mV[3] *= 0.25f;
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (i > 0)
+ if (flush)
{
gGL.end();
- gGL.flush();
}
+ flush = TRUE;
+ gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
gGL.begin(LLRender::LINES);
@@ -936,18 +938,20 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- for (S32 i = 0; i < mDebugBeacons.count(); i++)
+ BOOL flush = FALSE;
+ for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
- const LLDebugBeacon &debug_beacon = mDebugBeacons[i];
+ const LLDebugBeacon &debug_beacon = *iter;
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (i > 0)
+ if (flush)
{
gGL.end();
- gGL.flush();
}
+ flush = TRUE;
+ gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
gGL.begin(LLRender::LINES);
@@ -969,9 +973,9 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.flush();
glLineWidth(1.f);
- for (S32 i = 0; i < mDebugBeacons.count(); i++)
+ for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
- LLDebugBeacon &debug_beacon = mDebugBeacons[i];
+ LLDebugBeacon &debug_beacon = *iter;
if (debug_beacon.mString == "")
{
continue;
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 6e7321f739..ea5462a3e3 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -838,7 +838,8 @@ static void formatDateString(std::string &date_string)
std::string day = result[2];
// ISO 8601 date format
- date_string = llformat("%02s/%02s/%04s", month.c_str(), day.c_str(), year.c_str());
+ //date_string = llformat("%02s/%02s/%04s", month.c_str(), day.c_str(), year.c_str());
+ date_string = llformat("%04s/%02s/%04s", year.c_str(), month.c_str(), day.c_str());
}
}
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index a02dc3355b..325c9c260c 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -121,24 +121,24 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
-
+ gGL.pushMatrix();
LLUI::pushMatrix();
gl_state_for_2d(world_view_rect.getWidth(), world_view_rect.getHeight());
gViewerWindow->setup3DViewport();
- //gViewerWindow->setup2DRender();
-
+
winX -= world_view_rect.mLeft;
winY -= world_view_rect.mBottom;
LLUI::loadIdentity();
+ glLoadIdentity();
LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f));
- //glRotatef(angle * RAD_TO_DEG, axis.mV[VX], axis.mV[VY], axis.mV[VZ]);
- //glScalef(right_scale, up_scale, 1.f);
F32 right_x;
font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x);
+
LLUI::popMatrix();
-
+ gGL.popMatrix();
+
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 8ad94b957d..8d1d27444b 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -555,7 +555,7 @@ void LLHUDText::renderText(BOOL for_select)
}
}
/// Reset the default color to white. The renderer expects this to be the default.
- glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
if (for_select)
{
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 9c0e7a158d..8cdc50eb70 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -112,6 +112,8 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id)
setOverlapsScreenChannel(true);
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
+
+ setDocked(true);
}
void LLIMFloater::onFocusLost()
@@ -442,7 +444,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
void LLIMFloater::getAllowedRect(LLRect& rect)
{
- rect = gViewerWindow->getWorldViewRectRaw();
+ rect = gViewerWindow->getWorldViewRectScaled();
static S32 right_padding = 0;
if (right_padding == 0)
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5b59f52fa5..d0513c35ce 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1925,7 +1925,7 @@ bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat,
// - links to attachments
// - links to gestures
// - links to ensemble folders
- LLViewerInventoryItem *linked_item = ((LLViewerInventoryItem*)item)->getLinkedItem(); // BAP - safe?
+ LLViewerInventoryItem *linked_item = ((LLViewerInventoryItem*)item)->getLinkedItem();
if (linked_item)
{
LLAssetType::EType type = linked_item->getType();
@@ -1936,7 +1936,7 @@ bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat,
}
else
{
- LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); // BAP - safe?
+ LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory();
// BAP remove AT_NONE support after ensembles are fully working?
return (linked_category &&
((linked_category->getPreferredType() == LLFolderType::FT_NONE) ||
@@ -2962,8 +2962,6 @@ void LLFolderBridge::modifyOutfit(BOOL append)
LLViewerInventoryCategory* cat = getCategory();
if(!cat) return;
- // BAP - was:
- // wear_inventory_category_on_avatar( cat, append );
LLAppearanceManager::instance().wearInventoryCategory( cat, FALSE, append );
}
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 04c684b240..bdd4426636 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -779,15 +779,19 @@ void LLLocationInputCtrl::refreshParcelIcons()
// Our "cursor" moving right to left
S32 x = mAddLandmarkBtn->getRect().mLeft;
- if (gSavedSettings.getBOOL("NavBarShowParcelProperties"))
- {
- LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance();
+ LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance();
+
+ LLViewerRegion* agent_region = gAgent.getRegion();
+ LLParcel* agent_parcel = vpm->getAgentParcel();
+ if (!agent_region || !agent_parcel)
+ return;
+
+ mForSaleBtn->setVisible(vpm->canAgentBuyParcel(agent_parcel, false));
- LLViewerRegion* agent_region = gAgent.getRegion();
- LLParcel* agent_parcel = vpm->getAgentParcel();
- if (!agent_region || !agent_parcel)
- return;
+ x = layout_widget(mForSaleBtn, x);
+ if (gSavedSettings.getBOOL("NavBarShowParcelProperties"))
+ {
LLParcel* current_parcel;
LLViewerRegion* selection_region = vpm->getSelectionRegion();
LLParcel* selected_parcel = vpm->getParcelSelection()->getParcel();
@@ -807,7 +811,6 @@ void LLLocationInputCtrl::refreshParcelIcons()
current_parcel = agent_parcel;
}
- bool allow_buy = vpm->canAgentBuyParcel(current_parcel, false);
bool allow_voice = vpm->allowAgentVoice(agent_region, current_parcel);
bool allow_fly = vpm->allowAgentFly(agent_region, current_parcel);
bool allow_push = vpm->allowAgentPush(agent_region, current_parcel);
@@ -816,7 +819,6 @@ void LLLocationInputCtrl::refreshParcelIcons()
bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel);
// Most icons are "block this ability"
- mForSaleBtn->setVisible(allow_buy);
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
mParcelIcon[FLY_ICON]->setVisible( !allow_fly );
mParcelIcon[PUSH_ICON]->setVisible( !allow_push );
@@ -824,11 +826,10 @@ void LLLocationInputCtrl::refreshParcelIcons()
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
mDamageText->setVisible(allow_damage);
-
- x = layout_widget(mForSaleBtn, x);
+
// Padding goes to left of both landmark star and for sale btn
x -= mAddLandmarkHPad;
-
+
// Slide the parcel icons rect from right to left, adjusting rectangles
for (S32 i = 0; i < ICON_COUNT; ++i)
{
@@ -840,7 +841,6 @@ void LLLocationInputCtrl::refreshParcelIcons()
}
else
{
- mForSaleBtn->setVisible(false);
for (S32 i = 0; i < ICON_COUNT; ++i)
{
mParcelIcon[i]->setVisible(false);
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 16b13d9218..be8b2363ad 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -46,7 +46,17 @@
#include <boost/regex.hpp>
#include <boost/regex/v4/match_results.hpp>
+#if LL_MSVC
+// disable warning about boost::lexical_cast unreachable code
+// when it fails to parse the string
+#pragma warning (disable:4702)
+#endif
+
#include <boost/date_time/gregorian/gregorian.hpp>
+#if LL_MSVC
+#pragma warning(pop) // Restore all warnings to the previous state
+#endif
+
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/local_time_adjustor.hpp>
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 501a137b42..bf33d8527e 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -724,14 +724,14 @@ void LLMediaCtrl::draw()
LLGLSUIDefault gls_ui;
LLGLDisable gls_alphaTest( GL_ALPHA_TEST );
- gGL.pushMatrix();
+ gGL.pushUIMatrix();
{
if (mIgnoreUIScale)
{
- glLoadIdentity();
+ gGL.loadUIIdentity();
// font system stores true screen origin, need to scale this by UI scale factor
// to get render origin for this view (with unit scale)
- gGL.translatef(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
+ gGL.translateUI(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]),
LLFontGL::sCurOrigin.mZ);
}
@@ -825,7 +825,7 @@ void LLMediaCtrl::draw()
gGL.end();
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
- gGL.popMatrix();
+ gGL.popUIMatrix();
}
else
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 3c390c0281..a211adc79d 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -34,6 +34,7 @@
#include "llnearbychathandler.h"
+#include "llbottomtray.h"
#include "llchatitemscontainerctrl.h"
#include "llnearbychat.h"
#include "llrecentpeople.h"
@@ -319,9 +320,9 @@ LLNearbyChatHandler::~LLNearbyChatHandler()
void LLNearbyChatHandler::initChannel()
{
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLView* chat_box = LLBottomTray::getInstance()->getChildView("chat_box");
S32 channel_right_bound = nearby_chat->getRect().mRight;
- S32 channel_width = nearby_chat->getRect().mRight;
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel->init(chat_box->getRect().mLeft, channel_right_bound);
}
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 234fe13217..05623198ab 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -153,6 +153,18 @@ void LLNetMap::draw()
// Prepare a scissor region
F32 rotation = 0;
+ gGL.pushMatrix();
+ gGL.pushUIMatrix();
+
+ LLVector3 offset = gGL.getUITranslation();
+ LLVector3 scale = gGL.getUIScale();
+
+ glLoadIdentity();
+ gGL.loadUIIdentity();
+
+ glScalef(scale.mV[0], scale.mV[1], scale.mV[2]);
+ gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
+
{
LLLocalClipRect clip(getLocalRect());
{
@@ -435,6 +447,9 @@ void LLNetMap::draw()
}
}
+ gGL.popMatrix();
+ gGL.popUIMatrix();
+
LLUICtrl::draw();
}
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 9857e37bc3..d6d48a4ead 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -247,7 +247,7 @@ void LLOutputMonitorCtrl::draw()
gl_rect_2d(0, monh, monw, 0, sColorBound, FALSE);
}
-void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id)
+void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/)
{
if (speaker_id.isNull() && mSpeakerId.notNull())
{
@@ -263,7 +263,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id)
}
mSpeakerId = speaker_id;
- LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this);
+ LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this, session_id);
//mute management
if (mAutoUpdate)
@@ -303,7 +303,7 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
}
// otherwise remember necessary state and mark itself as dirty.
- // State will be applied i next draw when parents chain became visible.
+ // State will be applied in next draw when parents chain becomes visible.
else
{
LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL;
@@ -317,7 +317,7 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
//////////////////////////////////////////////////////////////////////////
void LLOutputMonitorCtrl::notifyParentVisibilityChanged()
{
- LL_DEBUGS("SpeakingIndicator") << "Notify parent that visibility was changed: " << mSpeakerId << " ,new_visibility: " << getVisible() << LL_ENDL;
+ LL_DEBUGS("SpeakingIndicator") << "Notify parent that visibility was changed: " << mSpeakerId << ", new_visibility: " << getVisible() << LL_ENDL;
LLSD params = LLSD().with("visibility_changed", getVisible());
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
index 2bbfa251e9..b7454a5066 100644
--- a/indra/newview/lloutputmonitorctrl.h
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -86,7 +86,15 @@ public:
void setIsTalking(bool val) { mIsTalking = val; }
- void setSpeakerId(const LLUUID& speaker_id);
+ /**
+ * Sets avatar UUID to interact with voice channel.
+ *
+ * @param speaker_id LLUUID of an avatar whose voice level is displayed.
+ * @param session_id session UUID for which indicator should be shown only. Passed to LLSpeakingIndicatorManager
+ * If this parameter is set registered indicator will be shown only in voice channel
+ * which has the same session id (EXT-5562).
+ */
+ void setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id = LLUUID::null);
//called by mute list
virtual void onChange();
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 6b07409676..57b478ffef 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -47,8 +47,6 @@
#include "lltooldraganddrop.h"
#include "llscrollcontainer.h"
#include "llavatariconctrl.h"
-#include "llweb.h"
-#include "llfloaterworldmap.h"
#include "llfloaterreg.h"
#include "llnotificationsutil.h"
#include "llvoiceclient.h"
@@ -449,10 +447,7 @@ void LLPanelProfileTab::scrollToTop()
void LLPanelProfileTab::onMapButtonClick()
{
- std::string name;
- gCacheName->getFullName(getAvatarId(), name);
- gFloaterWorldMap->trackAvatar(getAvatarId(), name);
- LLFloaterReg::showInstance("world_map");
+ LLAvatarActions::showOnMap(getAvatarId());
}
void LLPanelProfileTab::updateButtons()
@@ -490,7 +485,6 @@ LLPanelAvatarProfile::LLPanelAvatarProfile()
BOOL LLPanelAvatarProfile::postBuild()
{
- childSetActionTextbox("homepage_edit", boost::bind(&LLPanelAvatarProfile::onHomepageTextboxClicked, this));
childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL);
childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL);
childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL);
@@ -736,20 +730,6 @@ void LLPanelAvatarProfile::csr()
LLAvatarActions::csr(getAvatarId(), name);
}
-void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url)
-{
- LLWeb::loadURL(url);
-}
-
-void LLPanelAvatarProfile::onHomepageTextboxClicked()
-{
- std::string url = childGetValue("homepage_edit").asString();
- if(!url.empty())
- {
- onUrlTextboxClicked(url);
- }
-}
-
void LLPanelAvatarProfile::onAddFriendButtonClick()
{
LLAvatarActions::requestFriendshipDialog(getAvatarId());
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index babbe534b4..2bd23b6e9c 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -207,8 +207,6 @@ protected:
bool enableGod();
- void onUrlTextboxClicked(const std::string& url);
- void onHomepageTextboxClicked();
void onAddFriendButtonClick();
void onIMButtonClick();
void onCallButtonClick();
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 555e277ce5..517204b232 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -111,6 +111,8 @@ BOOL LLPanelGroupGeneral::postBuild()
{
mListVisibleMembers->setDoubleClickCallback(openProfile, this);
mListVisibleMembers->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
+
+ mListVisibleMembers->setSortCallback(boost::bind(&LLPanelGroupGeneral::sortMembersList,this,_1,_2,_3));
}
// Options
@@ -944,4 +946,18 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
activate();
}
+S32 LLPanelGroupGeneral::sortMembersList(S32 col_idx,const LLScrollListItem* i1,const LLScrollListItem* i2)
+{
+ const LLScrollListCell *cell1 = i1->getColumn(col_idx);
+ const LLScrollListCell *cell2 = i2->getColumn(col_idx);
+
+ if(col_idx == 2)
+ {
+ if(LLStringUtil::compareDict(cell1->getValue().asString(),"Online") == 0 )
+ return 1;
+ if(LLStringUtil::compareDict(cell2->getValue().asString(),"Online") == 0 )
+ return -1;
+ }
+ return LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString());
+}
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index 7e90e43cf9..6245018871 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -83,6 +83,8 @@ private:
static void onReceiveNotices(LLUICtrl* ctrl, void* data);
static void openProfile(void* data);
+ S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*);
+
static bool joinDlgCB(const LLSD& notification, const LLSD& response);
void updateMembers();
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 40ea75ea7a..45a8dc4cbe 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -69,6 +69,10 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn";
// helper functions
static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::string& string);
static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list);
+static void collapse_all_folders(LLFolderView* root_folder);
+static void expand_all_folders(LLFolderView* root_folder);
+static bool has_expanded_folders(LLFolderView* root_folder);
+static bool has_collapsed_folders(LLFolderView* root_folder);
/**
* Functor counting expanded and collapsed folders in folder view tree to know
@@ -683,31 +687,29 @@ void LLLandmarksPanel::updateListCommands()
// keep Options & Add Landmark buttons always enabled
mListCommands->childSetEnabled(ADD_FOLDER_BUTTON_NAME, add_folder_enabled);
mListCommands->childSetEnabled(TRASH_BUTTON_NAME, trash_enabled);
- mListCommands->childSetEnabled(OPTIONS_BUTTON_NAME,getCurSelectedItem() != NULL);
}
void LLLandmarksPanel::onActionsButtonClick()
{
+ LLMenuGL* menu = mGearFolderMenu;
+
LLFolderViewItem* cur_item = NULL;
if(mCurrentSelectedList)
- cur_item = mCurrentSelectedList->getRootFolder()->getCurSelectedItem();
-
- if(!cur_item)
- return;
-
- LLFolderViewEventListener* listenerp = cur_item->getListener();
-
- LLMenuGL* menu =NULL;
- if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
- {
- menu = mGearLandmarkMenu;
- }
- else if (listenerp->getInventoryType() == LLInventoryType::IT_CATEGORY)
{
- mGearFolderMenu->getChild<LLMenuItemCallGL>("expand")->setVisible(!cur_item->isOpen());
- mGearFolderMenu->getChild<LLMenuItemCallGL>("collapse")->setVisible(cur_item->isOpen());
- menu = mGearFolderMenu;
+ cur_item = mCurrentSelectedList->getRootFolder()->getCurSelectedItem();
+ if(!cur_item)
+ return;
+
+ LLFolderViewEventListener* listenerp = cur_item->getListener();
+ if(!listenerp)
+ return;
+
+ if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
+ {
+ menu = mGearLandmarkMenu;
+ }
}
+
showActionMenu(menu,OPTIONS_BUTTON_NAME);
}
@@ -805,26 +807,33 @@ void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const
void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
{
- if(!mCurrentSelectedList) return;
-
- LLFolderView* root_folder = mCurrentSelectedList->getRootFolder();
std::string command_name = userdata.asString();
if ("expand_all" == command_name)
{
- root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
- root_folder->arrangeAll();
+ expand_all_folders(mFavoritesInventoryPanel->getRootFolder());
+ expand_all_folders(mLandmarksInventoryPanel->getRootFolder());
+ expand_all_folders(mMyInventoryPanel->getRootFolder());
+ expand_all_folders(mLibraryInventoryPanel->getRootFolder());
+
+ for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
+ {
+ (*iter)->changeOpenClose(false);
+ }
}
else if ("collapse_all" == command_name)
{
- root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
+ collapse_all_folders(mFavoritesInventoryPanel->getRootFolder());
+ collapse_all_folders(mLandmarksInventoryPanel->getRootFolder());
+ collapse_all_folders(mMyInventoryPanel->getRootFolder());
+ collapse_all_folders(mLibraryInventoryPanel->getRootFolder());
- // The top level folder is invisible, it must be open to
- // display its sub-folders.
- root_folder->openTopLevelFolders();
- root_folder->arrangeAll();
+ for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
+ {
+ (*iter)->changeOpenClose(true);
+ }
}
- else if ( "sort_by_date" == command_name)
+ else if ("sort_by_date" == command_name)
{
mSortByDate = !mSortByDate;
updateSortOrder(mLandmarksInventoryPanel, mSortByDate);
@@ -833,7 +842,10 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
}
else
{
- root_folder->doToSelected(&gInventory, userdata);
+ if(mCurrentSelectedList)
+ {
+ mCurrentSelectedList->getRootFolder()->doToSelected(&gInventory, userdata);
+ }
}
}
@@ -853,53 +865,87 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
{
std::string command_name = userdata.asString();
-
- LLPlacesFolderView* rootFolderView = mCurrentSelectedList ?
+ LLPlacesFolderView* root_folder_view = mCurrentSelectedList ?
static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()) : NULL;
- if (NULL == rootFolderView) return false;
-
- // disable some commands for multi-selection. EXT-1757
- if (rootFolderView->getSelectedCount() > 1)
+ if ("collapse_all" == command_name)
{
- if ( "teleport" == command_name
- || "more_info" == command_name
- || "rename" == command_name
- || "show_on_map" == command_name
- || "copy_slurl" == command_name
- )
+ bool disable_collapse_all = !has_expanded_folders(mFavoritesInventoryPanel->getRootFolder())
+ && !has_expanded_folders(mLandmarksInventoryPanel->getRootFolder())
+ && !has_expanded_folders(mMyInventoryPanel->getRootFolder())
+ && !has_expanded_folders(mLibraryInventoryPanel->getRootFolder());
+ if (disable_collapse_all)
{
- return false;
+ for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
+ {
+ if ((*iter)->isExpanded())
+ {
+ disable_collapse_all = false;
+ break;
+ }
+ }
}
+ return !disable_collapse_all;
}
+ else if ("expand_all" == command_name)
+ {
+ bool disable_expand_all = !has_collapsed_folders(mFavoritesInventoryPanel->getRootFolder())
+ && !has_collapsed_folders(mLandmarksInventoryPanel->getRootFolder())
+ && !has_collapsed_folders(mMyInventoryPanel->getRootFolder())
+ && !has_collapsed_folders(mLibraryInventoryPanel->getRootFolder());
+ if (disable_expand_all)
+ {
+ for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
+ {
+ if (!(*iter)->isExpanded())
+ {
+ disable_expand_all = false;
+ break;
+ }
+ }
+ }
- // disable some commands for Favorites accordion. EXT-1758
- if (mCurrentSelectedList == mFavoritesInventoryPanel)
+ return !disable_expand_all;
+ }
+ else if ("sort_by_date" == command_name)
{
- if ( "expand_all" == command_name
- || "collapse_all" == command_name
- || "sort_by_date" == command_name
- )
+ // disable "sort_by_date" for Favorites accordion because
+ // it has its own items order. EXT-1758
+ if (mCurrentSelectedList == mFavoritesInventoryPanel)
+ {
return false;
+ }
}
-
- LLCheckFolderState checker;
- rootFolderView->applyFunctorRecursively(checker);
-
- // We assume that the root folder is always expanded so we enable "collapse_all"
- // command when we have at least one more expanded folder.
- if (checker.getExpandedFolders() < 2 && "collapse_all" == command_name)
+ else if (!root_folder_view)
{
return false;
}
-
- if (checker.getCollapsedFolders() < 1 && "expand_all" == command_name)
+ else if ( "paste" == command_name
+ || "rename" == command_name
+ || "cut" == command_name
+ || "copy" == command_name
+ || "delete" == command_name
+ || "collapse" == command_name
+ || "expand" == command_name
+ )
{
- return false;
+ return canSelectedBeModified(command_name);
}
-
- if("category" == command_name)
+ else if ( "teleport" == command_name
+ || "more_info" == command_name
+ || "rename" == command_name
+ || "show_on_map" == command_name
+ || "copy_slurl" == command_name
+ )
+ {
+ // disable some commands for multi-selection. EXT-1757
+ if (root_folder_view->getSelectedCount() > 1)
+ {
+ return false;
+ }
+ }
+ else if("category" == command_name)
{
// we can add folder only in Landmarks Accordion
if (mCurrentSelectedList == mLandmarksInventoryPanel)
@@ -909,10 +955,6 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
}
else return false;
}
- else if("paste" == command_name || "rename" == command_name || "cut" == command_name || "delete" == command_name)
- {
- return canSelectedBeModified(command_name);
- }
else if("create_pick" == command_name)
{
std::set<LLUUID> selection;
@@ -970,6 +1012,9 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co
{
// validate own rules first
+ LLFolderViewItem* selected = getCurSelectedItem();
+ if (!selected) return false;
+
// nothing can be modified in Library
if (mLibraryInventoryPanel == mCurrentSelectedList) return false;
@@ -996,24 +1041,41 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co
}
// then ask LLFolderView permissions
+
+ LLFolderView* root_folder = mCurrentSelectedList->getRootFolder();
+
+ if ("copy" == command_name)
+ {
+ return root_folder->canCopy();
+ }
+ else if ("collapse" == command_name)
+ {
+ return selected->isOpen();
+ }
+ else if ("expand" == command_name)
+ {
+ return !selected->isOpen();
+ }
+
if (can_be_modified)
{
- LLFolderViewItem* selected = getCurSelectedItem();
+ LLFolderViewEventListener* listenerp = selected->getListener();
+
if ("cut" == command_name)
{
- can_be_modified = mCurrentSelectedList->getRootFolder()->canCut();
+ can_be_modified = root_folder->canCut();
}
else if ("rename" == command_name)
{
- can_be_modified = selected ? selected->getListener()->isItemRenameable() : false;
+ can_be_modified = listenerp ? listenerp->isItemRenameable() : false;
}
else if ("delete" == command_name)
{
- can_be_modified = selected ? selected->getListener()->isItemRemovable(): false;
+ can_be_modified = listenerp ? listenerp->isItemRemovable() : false;
}
else if("paste" == command_name)
{
- return mCurrentSelectedList->getRootFolder()->canPaste();
+ can_be_modified = root_folder->canPaste();
}
else
{
@@ -1197,4 +1259,54 @@ static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list)
return false;
}
+
+static void collapse_all_folders(LLFolderView* root_folder)
+{
+ if (!root_folder)
+ return;
+
+ root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
+
+ // The top level folder is invisible, it must be open to
+ // display its sub-folders.
+ root_folder->openTopLevelFolders();
+ root_folder->arrangeAll();
+}
+
+static void expand_all_folders(LLFolderView* root_folder)
+{
+ if (!root_folder)
+ return;
+
+ root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
+ root_folder->arrangeAll();
+}
+
+static bool has_expanded_folders(LLFolderView* root_folder)
+{
+ LLCheckFolderState checker;
+ root_folder->applyFunctorRecursively(checker);
+
+ // We assume that the root folder is always expanded so we enable "collapse_all"
+ // command when we have at least one more expanded folder.
+ if (checker.getExpandedFolders() < 2)
+ {
+ return false;
+ }
+
+ return true;
+}
+
+static bool has_collapsed_folders(LLFolderView* root_folder)
+{
+ LLCheckFolderState checker;
+ root_folder->applyFunctorRecursively(checker);
+
+ if (checker.getCollapsedFolders() < 1)
+ {
+ return false;
+ }
+
+ return true;
+}
// EOF
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 6358bd6f23..f1ce1a18b5 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -155,14 +155,14 @@ private:
void doCreatePick(LLLandmark* landmark);
private:
- LLPlacesInventoryPanel* mFavoritesInventoryPanel;
- LLPlacesInventoryPanel* mLandmarksInventoryPanel;
- LLPlacesInventoryPanel* mMyInventoryPanel;
- LLPlacesInventoryPanel* mLibraryInventoryPanel;
+ LLPlacesInventoryPanel* mFavoritesInventoryPanel;
+ LLPlacesInventoryPanel* mLandmarksInventoryPanel;
+ LLPlacesInventoryPanel* mMyInventoryPanel;
+ LLPlacesInventoryPanel* mLibraryInventoryPanel;
LLMenuGL* mGearLandmarkMenu;
LLMenuGL* mGearFolderMenu;
LLMenuGL* mMenuAdd;
- LLPlacesInventoryPanel* mCurrentSelectedList;
+ LLPlacesInventoryPanel* mCurrentSelectedList;
LLInventoryObserver* mInventoryObserver;
LLPanel* mListCommands;
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 8ad5389566..75b25b6a40 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -135,7 +135,6 @@ BOOL LLPanelNearByMedia::postBuild()
mMediaList = getChild<LLScrollListCtrl>("media_list");
mEnableAllCtrl = getChild<LLUICtrl>("all_nearby_media_enable_btn");
mDisableAllCtrl = getChild<LLUICtrl>("all_nearby_media_disable_btn");
- mItemCountText = getChild<LLTextBox>("media_item_count");
mShowCtrl = getChild<LLComboBox>("show_combo");
// Dynamic (selection-dependent) controls
@@ -232,6 +231,7 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent)
const F32 AUTO_CLOSE_FADE_TIME_START= 4.0f;
const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f;
+/*virtual*/
void LLPanelNearByMedia::draw()
{
//LLUICtrl* new_top = gFocusMgr.getTopCtrl();
@@ -250,8 +250,6 @@ void LLPanelNearByMedia::draw()
setShape(new_rect);
}
- mItemCountText->setValue(llformat(getString("media_item_count_format").c_str(), mMediaList->getItemCount()));
-
refreshList();
updateControls();
@@ -268,6 +266,21 @@ void LLPanelNearByMedia::draw()
}
}
+/*virtual*/
+BOOL LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask)
+{
+ LLPanel::handleHover(x, y, mask);
+
+ // If we are hovering over this panel, make sure to clear any hovered media
+ // ID. Note that the more general solution would be to clear this ID when
+ // the mouse leaves the in-scene view, but that proved to be problematic.
+ // See EXT-5517
+ LLViewerMediaFocus::getInstance()->clearHover();
+
+ // Always handle
+ return true;
+}
+
bool LLPanelNearByMedia::getParcelAudioAutoStart()
{
return mParcelAudioAutoStart;
@@ -535,7 +548,9 @@ void LLPanelNearByMedia::refreshParcelItems()
const LLSD &choice_llsd = mShowCtrl->getSelectedValue();
MediaClass choice = (MediaClass)choice_llsd.asInteger();
// Only show "special parcel items" if "All" or "Within" filter
- bool should_include = choice == MEDIA_CLASS_ALL || choice == MEDIA_CLASS_WITHIN_PARCEL;
+ // (and if media is "enabled")
+ bool should_include = gSavedSettings.getBOOL("AudioStreamingMedia") &&
+ (choice == MEDIA_CLASS_ALL || choice == MEDIA_CLASS_WITHIN_PARCEL);
// First Parcel Media: add or remove it as necessary
if (should_include && LLViewerMedia::hasParcelMedia())
@@ -579,8 +594,8 @@ void LLPanelNearByMedia::refreshParcelItems()
"parcel media");
}
- // Next Parcel Audio: add or remove it as necessary
- if (should_include && LLViewerMedia::hasParcelAudio())
+ // Next Parcel Audio: add or remove it as necessary (don't show if disabled in prefs)
+ if (should_include && LLViewerMedia::hasParcelAudio() && gSavedSettings.getBOOL("AudioStreamingMusic"))
{
// Yes, there is parcel audio.
if (NULL == mParcelAudioItem)
@@ -601,11 +616,12 @@ void LLPanelNearByMedia::refreshParcelItems()
if (NULL != mParcelAudioItem)
{
bool is_playing = LLViewerMedia::isParcelAudioPlaying();
+
updateListItem(mParcelAudioItem,
mParcelAudioName,
LLViewerMedia::getParcelAudioURL(),
-1, // Proximity after Parcel Media, but closer than anything else
- !is_playing,
+ (!is_playing),
is_playing,
is_playing,
MEDIA_CLASS_ALL,
@@ -692,14 +708,16 @@ void LLPanelNearByMedia::refreshList()
}
}
}
- mDisableAllCtrl->setEnabled(LLViewerMedia::isAnyMediaShowing() ||
- LLViewerMedia::isParcelMediaPlaying() ||
- LLViewerMedia::isParcelAudioPlaying());
- mEnableAllCtrl->setEnabled(disabled_count > 0 ||
- // parcel media (if we have it, and it isn't playing, enable "start")
- (LLViewerMedia::hasParcelMedia() && ! LLViewerMedia::isParcelMediaPlaying()) ||
- // parcel audio (if we have it, and it isn't playing, enable "start")
- (LLViewerMedia::hasParcelAudio() && ! LLViewerMedia::isParcelAudioPlaying()));
+ mDisableAllCtrl->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") &&
+ (LLViewerMedia::isAnyMediaShowing() ||
+ LLViewerMedia::isParcelMediaPlaying() ||
+ LLViewerMedia::isParcelAudioPlaying()));
+ mEnableAllCtrl->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") &&
+ (disabled_count > 0 ||
+ // parcel media (if we have it, and it isn't playing, enable "start")
+ (LLViewerMedia::hasParcelMedia() && ! LLViewerMedia::isParcelMediaPlaying()) ||
+ // parcel audio (if we have it, and it isn't playing, enable "start")
+ (LLViewerMedia::hasParcelAudio() && ! LLViewerMedia::isParcelAudioPlaying())));
// Iterate over the rows in the control, updating ones whose impl exists, and deleting ones whose impl has gone away.
std::vector<LLScrollListItem*> items = mMediaList->getAllData();
@@ -847,7 +865,7 @@ void LLPanelNearByMedia::onClickParcelAudioStart()
// User *explicitly* started the internet stream, so keep the stream
// playing and updated as they cross to other parcels etc.
mParcelAudioAutoStart = true;
-
+
if (!gAudiop)
return;
@@ -953,15 +971,29 @@ void LLPanelNearByMedia::onMoreLess()
void LLPanelNearByMedia::updateControls()
{
+ if (! gSavedSettings.getBOOL("AudioStreamingMedia"))
+ {
+ // Just show disabled controls
+ showDisabledControls();
+ return;
+ }
+
LLUUID selected_media_id = mMediaList->getValue().asUUID();
if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
- showTimeBasedControls(LLViewerMedia::isParcelAudioPlaying(),
+ if (!LLViewerMedia::hasParcelAudio() || !gSavedSettings.getBOOL("AudioStreamingMusic"))
+ {
+ // Shouldn't happen, but do this anyway
+ showDisabledControls();
+ }
+ else {
+ showTimeBasedControls(LLViewerMedia::isParcelAudioPlaying(),
false, // include_zoom
false, // is_zoomed
gSavedSettings.getBOOL("MuteMusic"),
gSavedSettings.getF32("AudioLevelMusic") );
+ }
}
else if (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID)
{
@@ -1075,15 +1107,18 @@ void LLPanelNearByMedia::onClickSelectedMediaPlay()
{
LLViewerMediaImpl *impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
- if (NULL != impl && impl->isMediaTimeBased() && impl->isMediaPaused())
- {
- // Aha! It's really time-based media that's paused, so unpause
- impl->play();
- return;
- }
- else if (impl->isParcelMedia())
+ if (NULL != impl)
{
- LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
+ if (impl->isMediaTimeBased() && impl->isMediaPaused())
+ {
+ // Aha! It's really time-based media that's paused, so unpause
+ impl->play();
+ return;
+ }
+ else if (impl->isParcelMedia())
+ {
+ LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
+ }
}
}
}
diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h
index 6fe724266b..4f864519f5 100644
--- a/indra/newview/llpanelnearbymedia.h
+++ b/indra/newview/llpanelnearbymedia.h
@@ -56,6 +56,7 @@ public:
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
/*virtual*/ void onTopLost ();
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
+ /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
// this is part of the nearby media *dialog* so we can track whether
// the user *implicitly* wants audio on or off via their *explicit*
@@ -149,7 +150,6 @@ private:
void onClickSelectedMediaUnzoom();
LLUICtrl* mNearbyMediaPanel;
- LLTextBox* mItemCountText;
LLScrollListCtrl* mMediaList;
LLUICtrl* mEnableAllCtrl;
LLUICtrl* mDisableAllCtrl;
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 900d28adca..854651cd01 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -39,6 +39,7 @@
#include "llpanelpeoplemenus.h"
// newview
+#include "llagent.h"
#include "llagentdata.h" // for gAgentID
#include "llavataractions.h"
#include "llviewermenu.h" // for gMenuHolder
@@ -125,7 +126,7 @@ LLContextMenu* NearbyMenu::createMenu()
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id));
registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
- registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented
+ registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::showOnMap, id));
registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id));
registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id));
registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id));
@@ -218,6 +219,13 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
{
return LLAvatarActions::canCall();
}
+ else if (item == std::string("can_show_on_map"))
+ {
+ const LLUUID& id = mUUIDs.front();
+
+ return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id))
+ || gAgent.isGodlike();
+ }
return false;
}
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 1c4004c37a..2748daaffa 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -70,6 +70,8 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mSpeakerMgr->addListener(mSpeakerModeratorListener, "update_moderator");
mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData"));
+ LL_DEBUGS("SpeakingIndicator") << "Set session for speaking indicators: " << mSpeakerMgr->getSessionID() << LL_ENDL;
+ mAvatarList->setSessionID(mSpeakerMgr->getSessionID());
mAvatarListDoubleClickConnection = mAvatarList->setItemDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, _1));
mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2));
// Set onAvatarListDoubleClicked as default on_return action.
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index a88a242fbe..32fd42aded 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -283,7 +283,9 @@ void LLScriptFloater::dockToChiclet(bool dock)
setSavePosition(false);
setDockControl(new LLDockControl(chiclet, this, getDockTongue(),
- LLDockControl::TOP, boost::bind(&LLScriptFloater::getAllowedRect, this, _1)), dock);
+ LLDockControl::TOP, boost::bind(&LLScriptFloater::getAllowedRect, this, _1)));
+
+ setDocked(dock);
// Restore saving
setSavePosition(save);
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 9540894646..d733574a9d 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -4919,13 +4919,15 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
// set up transform to encompass bounding box of HUD
glMatrixMode(GL_PROJECTION);
- glPushMatrix();
+ gGL.pushMatrix();
glLoadIdentity();
F32 depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
glOrtho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, depth);
glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.pushMatrix();
+ gGL.pushUIMatrix();
+ gGL.loadUIIdentity();
glLoadIdentity();
glLoadMatrixf(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame
glTranslatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f);
@@ -5022,10 +5024,11 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
if (for_hud && avatar)
{
glMatrixMode(GL_PROJECTION);
- glPopMatrix();
+ gGL.popMatrix();
glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.popMatrix();
+ gGL.popUIMatrix();
stop_glerror();
}
@@ -5374,7 +5377,10 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
}
glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.pushMatrix();
+ gGL.pushUIMatrix();
+ gGL.loadUIIdentity();
+
if (!is_hud_object)
{
glLoadIdentity();
@@ -5493,7 +5499,8 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
gGL.end();
gGL.flush();
}
- glPopMatrix();
+ gGL.popMatrix();
+ gGL.popUIMatrix();
}
//
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index e4773f99c5..5d20e280b5 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -36,6 +36,8 @@
#include "llweb.h"
+#include "llurlregistry.h"
+
const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app.";
const std::string LLSLURL::PREFIX_SL = "sl://";
const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://";
@@ -95,6 +97,20 @@ bool LLSLURL::isSLURL(const std::string& url)
return false;
}
+bool LLSLURL::isValidSLURL(const std::string& url)
+{
+ std::string temp_url(url);
+ //"www." may appear in DnD- see description of PREFIX_SLURL_WWW.
+ // If it is found, we remove it because it isn't expected in regexp.
+ if (matchPrefix(url, PREFIX_SLURL_WWW))
+ {
+ size_t position = url.find("www.");
+ temp_url.erase(position,4);
+ }
+
+ return LLUrlRegistry::getInstance()->isUrl(temp_url);
+}
+
// static
bool LLSLURL::isSLURLCommand(const std::string& url)
{
diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h
index 6a695e84f3..a79a8fc97c 100644
--- a/indra/newview/llslurl.h
+++ b/indra/newview/llslurl.h
@@ -61,6 +61,11 @@ public:
static bool isSLURL(const std::string& url);
/**
+ * Returns true if url is proven valid by regexp check from LLUrlRegistry
+ */
+ static bool isValidSLURL(const std::string& url);
+
+ /**
* Is this a special secondlife://app/ URL?
*/
static bool isSLURLCommand(const std::string& url);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 2a57d48f16..d6e9256fee 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -3380,7 +3380,8 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
mVSize(0.f),
mGroup(NULL),
mFace(NULL),
- mDistance(0.f)
+ mDistance(0.f),
+ mDrawMode(LLRender::TRIANGLES)
{
mDebugColor = (rand() << 16) + rand();
if (mStart >= mVertexBuffer->getRequestedVerts() ||
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 64c2a9acbc..7896488379 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -93,6 +93,7 @@ public:
LLFace* mFace; //associated face
F32 mDistance;
LLVector3 mExtents[2];
+ U32 mDrawMode;
struct CompareTexture
{
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index d33c050ee4..cc06179481 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -65,8 +65,12 @@ public:
*
* @param speaker_id LLUUID of an avatar whose speaking indicator is registered.
* @param speaking_indicator instance of the speaking indicator to be registered.
+ * @param session_id session UUID for which indicator should be shown only.
+ * If this parameter is set registered indicator will be shown only in voice channel
+ * which has the same session id (EXT-5562).
*/
- void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator);
+ void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator,
+ const LLUUID& session_id = LLUUID::null);
/**
* Removes passed speaking indicator from observing.
@@ -138,15 +142,18 @@ private:
//////////////////////////////////////////////////////////////////////////
// PUBLIC SECTION
//////////////////////////////////////////////////////////////////////////
-void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator)
+void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator,
+ const LLUUID& session_id)
{
// do not exclude agent's indicators. They should be processed in the same way as others. See EXT-3889.
- LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << "|"<< speaking_indicator << LL_ENDL;
+ LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << "|"<< speaking_indicator << ", session: " << session_id << LL_ENDL;
ensureInstanceDoesNotExist(speaking_indicator);
+ speaking_indicator->setTargetSessionID(session_id);
+
speaking_indicator_value_t value_type(speaker_id, speaking_indicator);
mSpeakingIndicators.insert(value_type);
@@ -217,6 +224,13 @@ void SpeakingIndicatorManager::onChange()
void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on)
{
+ LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel();
+ LLUUID session_id;
+ if (voice_channel)
+ {
+ session_id = voice_channel->getSessionID();
+ }
+
speaker_ids_t::const_iterator it_uuid = speakers_uuids.begin();
for (; it_uuid != speakers_uuids.end(); ++it_uuid)
{
@@ -224,18 +238,36 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
indicator_range_t it_range = mSpeakingIndicators.equal_range(*it_uuid);
indicator_const_iterator it_indicator = it_range.first;
bool was_found = false;
+ bool was_switched_on = false;
for (; it_indicator != it_range.second; ++it_indicator)
{
was_found = true;
LLSpeakingIndicator* indicator = (*it_indicator).second;
- indicator->switchIndicator(switch_on);
+
+ BOOL switch_current_on = switch_on;
+
+ // we should show indicator for specified voice session only if this is current channel. EXT-5562.
+ if (switch_current_on && indicator->getTargetSessionID().notNull())
+ {
+ switch_current_on = indicator->getTargetSessionID() == session_id;
+ LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL;
+ }
+ was_switched_on = was_switched_on || switch_current_on;
+
+ indicator->switchIndicator(switch_current_on);
+
}
if (was_found)
{
LL_DEBUGS("SpeakingIndicator") << mSpeakingIndicators.count(*it_uuid) << " indicators where found" << LL_ENDL;
- if (switch_on)
+ if (switch_on && !was_switched_on)
+ {
+ LL_DEBUGS("SpeakingIndicator") << "but non of them where switched on" << LL_ENDL;
+ }
+
+ if (was_switched_on)
{
// store switched on indicator to be able switch it off
mSwitchedIndicatorsOn.insert(*it_uuid);
@@ -274,9 +306,10 @@ void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* c
/* LLSpeakingIndicatorManager namespace implementation */
/************************************************************************/
-void LLSpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator)
+void LLSpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator,
+ const LLUUID& session_id)
{
- SpeakingIndicatorManager::instance().registerSpeakingIndicator(speaker_id, speaking_indicator);
+ SpeakingIndicatorManager::instance().registerSpeakingIndicator(speaker_id, speaking_indicator, session_id);
}
void LLSpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator)
diff --git a/indra/newview/llspeakingindicatormanager.h b/indra/newview/llspeakingindicatormanager.h
index ce0158f7d8..8d7aba1d6c 100644
--- a/indra/newview/llspeakingindicatormanager.h
+++ b/indra/newview/llspeakingindicatormanager.h
@@ -35,10 +35,28 @@
#ifndef LL_LLSPEAKINGINDICATORMANAGER_H
#define LL_LLSPEAKINGINDICATORMANAGER_H
+class SpeakingIndicatorManager;
+
class LLSpeakingIndicator
{
public:
+ virtual ~LLSpeakingIndicator(){}
virtual void switchIndicator(bool switch_on) = 0;
+
+private:
+ friend class SpeakingIndicatorManager;
+ // Accessors for target voice session UUID.
+ // They are intended to be used only from SpeakingIndicatorManager to ensure target session is
+ // the same indicator was registered with.
+ void setTargetSessionID(const LLUUID& session_id) { mTargetSessionID = session_id; }
+ const LLUUID& getTargetSessionID() { return mTargetSessionID; }
+
+ /**
+ * session UUID for which indicator should be shown only.
+ * If it is set, registered indicator will be shown only in voice channel
+ * which has the same session id (EXT-5562).
+ */
+ LLUUID mTargetSessionID;
};
// See EXT-3976.
@@ -52,8 +70,12 @@ namespace LLSpeakingIndicatorManager
*
* @param speaker_id LLUUID of an avatar whose speaker indicator is registered.
* @param speaking_indicator instance of the speaker indicator to be registered.
+ * @param session_id session UUID for which indicator should be shown only.
+ * If this parameter is set registered indicator will be shown only in voice channel
+ * which has the same session id (EXT-5562).
*/
- void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator);
+ void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator,
+ const LLUUID& session_id);
/**
* Removes passed speaking indicator from observing.
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 83f773fadc..025dd6029a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -121,7 +121,6 @@
#include "lllogininstance.h" // Host the login module.
#include "llpanellogin.h"
#include "llmutelist.h"
-#include "llpanelavatar.h"
#include "llavatarpropertiesprocessor.h"
#include "llfloaterevent.h"
#include "llpanelclassified.h"
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index e83c882866..732c23982b 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -358,8 +358,10 @@ void LLStatusBar::refresh()
bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute();
mBtnVolume->setToggleState(mute_audio);
- // Don't show media toggle if there's no media, parcel media, and no parcel audio
- mMediaToggle->setVisible(LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio());
+ // Disable media toggle if there's no media, parcel media, and no parcel audio
+ // (or if media is disabled)
+ mMediaToggle->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") &&
+ (LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio()));
// Note the "sense" of the toggle is opposite whether media is playing or not
mMediaToggle->setValue(! (LLViewerMedia::isAnyMediaShowing() ||
LLViewerMedia::isParcelMediaPlaying() ||
@@ -547,13 +549,13 @@ void LLStatusBar::onMouseEnterNearbyMedia()
LLButton* nearby_media_btn = getChild<LLButton>( "media_toggle_btn" );
LLRect nearby_media_btn_rect = nearby_media_btn->calcScreenRect();
nearby_media_rect.setLeftTopAndSize(nearby_media_btn_rect.mLeft -
- (nearby_media_rect.getWidth() - nearby_media_btn_rect.getWidth())/2,
- nearby_media_btn_rect.mBottom,
- nearby_media_rect.getWidth(),
- nearby_media_rect.getHeight());
+ (nearby_media_rect.getWidth() - nearby_media_btn_rect.getWidth())/2,
+ nearby_media_btn_rect.mBottom,
+ nearby_media_rect.getWidth(),
+ nearby_media_rect.getHeight());
// force onscreen
nearby_media_rect.translate(popup_holder->getRect().getWidth() - nearby_media_rect.mRight, 0);
-
+
// show the master volume pull-down
mPanelNearByMedia->setShape(nearby_media_rect);
mPanelNearByMedia->setVisible(TRUE);
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 4fb75f7a49..5f825b461e 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -167,13 +167,16 @@ BOOL LLVisualParamHint::render()
LLVisualParamReset::sDirty = TRUE;
LLVOAvatar* avatarp = gAgent.getAvatarObject();
+ gGL.pushUIMatrix();
+ gGL.loadUIIdentity();
+
glMatrixMode(GL_PROJECTION);
- glPushMatrix();
+ gGL.pushMatrix();
glLoadIdentity();
glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gGL.pushMatrix();
glLoadIdentity();
LLGLSUIDefault gls_ui;
@@ -181,10 +184,10 @@ BOOL LLVisualParamHint::render()
mBackgroundp->draw(0, 0, mFullWidth, mFullHeight);
glMatrixMode(GL_PROJECTION);
- glPopMatrix();
+ gGL.popMatrix();
glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gGL.popMatrix();
mNeedsUpdate = FALSE;
mIsVisible = TRUE;
@@ -247,6 +250,7 @@ BOOL LLVisualParamHint::render()
mVisualParam->setWeight(mLastParamWeight, FALSE);
gGL.color4f(1,1,1,1);
mGLTexturep->setGLTextureCreated(true);
+ gGL.popUIMatrix();
return TRUE;
}
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 64eabe65cf..5daea96123 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -510,6 +510,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _2));
gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _2));
gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _2));
+ gSavedSettings.getControl("RenderUseTriStrips")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 1a67fc0966..7225aa1523 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -626,7 +626,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
mFace->mVertexBuffer->drawRange(LLRender::TRIANGLES, start, end, count, offset);
glPopMatrix();
}
- gPipeline.addTrianglesDrawn(count/3);
+ gPipeline.addTrianglesDrawn(count);
triangle_count += count;
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 395467dffb..86336e353c 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -722,6 +722,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
std::vector<LLViewerMediaImpl*> proximity_order;
bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
+ bool inworld_audio_enabled = gSavedSettings.getBOOL("AudioStreamingMusic");
U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal");
U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal");
U32 max_low = gSavedSettings.getU32("PluginInstancesLow");
@@ -849,7 +850,14 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
}
}
-
+ // update the audio stream here as well
+ if(!inworld_media_enabled || !inworld_audio_enabled)
+ {
+ if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ {
+ gAudiop->stopInternetStream();
+ }
+ }
pimpl->setPriority(new_priority);
if(pimpl->getUsedInUI())
@@ -944,7 +952,10 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
}
- if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ if (gSavedSettings.getBOOL("AudioStreamingMusic") &&
+ !LLViewerMedia::isParcelAudioPlaying() &&
+ gAudiop &&
+ LLViewerMedia::hasParcelAudio())
{
gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
}
@@ -972,7 +983,6 @@ bool LLViewerMedia::isParcelAudioPlaying()
bool LLViewerMedia::hasInWorldMedia()
{
- if (! gSavedSettings.getBOOL("AudioStreamingMedia")) return false;
if (sInWorldMediaDisabled) return false;
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 02bde51fb6..15c72fdef1 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4422,35 +4422,22 @@ bool visible_take_object()
return !is_selection_buy_not_take() && enable_take();
}
+bool tools_visible_buy_object()
+{
+ return is_selection_buy_not_take();
+}
+
+bool tools_visible_take_object()
+{
+ return !is_selection_buy_not_take();
+}
+
class LLToolsEnableBuyOrTake : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
bool is_buy = is_selection_buy_not_take();
bool new_value = is_buy ? enable_buy_object() : enable_take();
-
- // Update label
- std::string label;
- std::string buy_text;
- std::string take_text;
- std::string param = userdata.asString();
- std::string::size_type offset = param.find(",");
- if (offset != param.npos)
- {
- buy_text = param.substr(0, offset);
- take_text = param.substr(offset+1);
- }
- if (is_buy)
- {
- label = buy_text;
- }
- else
- {
- label = take_text;
- }
- gMenuHolder->childSetText("Pie Object Take", label);
- gMenuHolder->childSetText("Menu Object Take", label);
-
return new_value;
}
};
@@ -7802,12 +7789,11 @@ void initialize_menus()
view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink");
view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake");
enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy));
+ enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object));
+ enable.add("Tools.VisibleTakeObject", boost::bind(&tools_visible_take_object));
view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory");
view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
- /*view_listener_t::addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject");
- view_listener_t::addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/
-
// Help menu
// most items use the ShowFloater method
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d0afa9d9de..b5642d07a5 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2001,6 +2001,9 @@ BOOL LLViewerObject::isActive() const
BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
+ static LLFastTimer::DeclareTimer ftm("Viewer Object");
+ LLFastTimer t(ftm);
+
if (mDead)
{
// It's dead. Don't update it.
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 96828ee1b6..6347090f71 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -93,7 +93,7 @@ extern LLPipeline gPipeline;
// Statics for object lookup tables.
U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
-LLMap<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
+std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID;
LLViewerObjectList::LLViewerObjectList()
@@ -571,10 +571,9 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
void LLViewerObjectList::dirtyAllObjectInventory()
{
- S32 count = mObjects.count();
- for(S32 i = 0; i < count; ++i)
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
- mObjects[i]->dirtyInventory();
+ (*iter)->dirtyInventory();
}
}
@@ -587,14 +586,14 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
S32 num_updates, max_value;
if (NUM_BINS - 1 == mCurBin)
{
- num_updates = mObjects.count() - mCurLazyUpdateIndex;
- max_value = mObjects.count();
+ num_updates = (S32) mObjects.size() - mCurLazyUpdateIndex;
+ max_value = (S32) mObjects.size();
gTextureList.setUpdateStats(TRUE);
}
else
{
- num_updates = (mObjects.count() / NUM_BINS) + 1;
- max_value = llmin(mObjects.count(), mCurLazyUpdateIndex + num_updates);
+ num_updates = ((S32) mObjects.size() / NUM_BINS) + 1;
+ max_value = llmin((S32) mObjects.size(), mCurLazyUpdateIndex + num_updates);
}
@@ -647,7 +646,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
}
mCurLazyUpdateIndex = max_value;
- if (mCurLazyUpdateIndex == mObjects.count())
+ if (mCurLazyUpdateIndex == mObjects.size())
{
mCurLazyUpdateIndex = 0;
}
@@ -694,20 +693,26 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
// Make a copy of the list in case something in idleUpdate() messes with it
std::vector<LLViewerObject*> idle_list;
- idle_list.reserve( mActiveObjects.size() );
+
+ static LLFastTimer::DeclareTimer idle_copy("Idle Copy");
- for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
- active_iter != mActiveObjects.end(); active_iter++)
{
- objectp = *active_iter;
- if (objectp)
+ LLFastTimer t(idle_copy);
+ idle_list.reserve( mActiveObjects.size() );
+
+ for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
+ active_iter != mActiveObjects.end(); active_iter++)
{
- idle_list.push_back( objectp );
- }
- else
- { // There shouldn't be any NULL pointers in the list, but they have caused
- // crashes before. This may be idleUpdate() messing with the list.
- llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl;
+ objectp = *active_iter;
+ if (objectp)
+ {
+ idle_list.push_back( objectp );
+ }
+ else
+ { // There shouldn't be any NULL pointers in the list, but they have caused
+ // crashes before. This may be idleUpdate() messing with the list.
+ llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl;
+ }
}
}
@@ -807,7 +812,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
}
*/
- LLViewerStats::getInstance()->mNumObjectsStat.addValue(mObjects.count());
+ LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size());
LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(num_active_objects);
LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled);
LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled);
@@ -815,9 +820,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
void LLViewerObjectList::clearDebugText()
{
- for (S32 i = 0; i < mObjects.count(); i++)
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
- mObjects[i]->setDebugText("");
+ (*iter)->setDebugText("");
}
}
@@ -856,7 +861,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
if (objectp->isOnMap())
{
- mMapObjects.removeObj(objectp);
+ removeFromMap(objectp);
}
// Don't clean up mObject references, these will be cleaned up more efficiently later!
@@ -913,10 +918,10 @@ void LLViewerObjectList::killObjects(LLViewerRegion *regionp)
{
LLViewerObject *objectp;
- S32 i;
- for (i = 0; i < mObjects.count(); i++)
+
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
- objectp = mObjects[i];
+ objectp = *iter;
if (objectp->mRegionp == regionp)
{
@@ -933,10 +938,9 @@ void LLViewerObjectList::killAllObjects()
// Used only on global destruction.
LLViewerObject *objectp;
- for (S32 i = 0; i < mObjects.count(); i++)
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
- objectp = mObjects[i];
-
+ objectp = *iter;
killObject(objectp);
llassert(objectp->isDead());
}
@@ -945,7 +949,7 @@ void LLViewerObjectList::killAllObjects()
if(!mObjects.empty())
{
- llwarns << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.count() << llendl;
+ llwarns << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << llendl;
mObjects.clear();
}
@@ -970,16 +974,15 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer)
return;
}
- S32 i = 0;
S32 num_removed = 0;
LLViewerObject *objectp;
- while (i < mObjects.count())
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); )
{
// Scan for all of the dead objects and remove any "global" references to them.
- objectp = mObjects[i];
+ objectp = *iter;
if (objectp->isDead())
{
- mObjects.remove(i);
+ iter = mObjects.erase(iter);
num_removed++;
if (num_removed == mNumDeadObjects)
@@ -990,8 +993,7 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer)
}
else
{
- // iterate, this isn't a dead object.
- i++;
+ ++iter;
}
}
@@ -1041,12 +1043,11 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
}
LLViewerObject *objectp;
- S32 i;
- for (i = 0; i < mObjects.count(); i++)
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
- objectp = getObject(i);
+ objectp = *iter;
// There could be dead objects on the object list, so don't update stuff if the object is dead.
- if (objectp)
+ if (!objectp->isDead())
{
objectp->updatePositionCaches();
@@ -1076,9 +1077,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
- for (S32 i = 0; i < mMapObjects.count(); i++)
+ for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter)
{
- LLViewerObject* objectp = mMapObjects[i];
+ LLViewerObject* objectp = *iter;
if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment())
{
continue;
@@ -1144,21 +1145,14 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 &center)
{
}
-void LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent)
-{
- generatePickList(camera);
- renderPickList(screen_rect, pick_parcel_wall, render_transparent);
-}
-
void LLViewerObjectList::generatePickList(LLCamera &camera)
{
LLViewerObject *objectp;
S32 i;
// Reset all of the GL names to zero.
- for (i = 0; i < mObjects.count(); i++)
+ for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
- objectp = mObjects[i];
- objectp->mGLName = 0;
+ (*iter)->mGLName = 0;
}
mSelectPickList.clear();
@@ -1321,17 +1315,19 @@ void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent,
const LLColor4 &text_color,
S32 line_width)
{
- LLDebugBeacon *beaconp = mDebugBeacons.reserve_block(1);
- beaconp->mPositionAgent = pos_agent;
- beaconp->mString = string;
- beaconp->mColor = color;
- beaconp->mTextColor = text_color;
- beaconp->mLineWidth = line_width;
+ LLDebugBeacon beacon;
+ beacon.mPositionAgent = pos_agent;
+ beacon.mString = string;
+ beacon.mColor = color;
+ beacon.mTextColor = text_color;
+ beacon.mLineWidth = line_width;
+
+ mDebugBeacons.push_back(beacon);
}
void LLViewerObjectList::resetObjectBeacons()
{
- mDebugBeacons.reset();
+ mDebugBeacons.clear();
}
LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp)
@@ -1349,7 +1345,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi
mUUIDObjectMap[fullid] = objectp;
- mObjects.put(objectp);
+ mObjects.push_back(objectp);
updateActive(objectp);
@@ -1388,7 +1384,7 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
gMessageSystem->getSenderIP(),
gMessageSystem->getSenderPort());
- mObjects.put(objectp);
+ mObjects.push_back(objectp);
updateActive(objectp);
@@ -1411,11 +1407,11 @@ LLViewerObject *LLViewerObjectList::replaceObject(const LLUUID &id, const LLPCod
S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const
{
LLViewerObject *objectp;
- S32 i;
S32 num_refs = 0;
- for (i = 0; i < mObjects.count(); i++)
+
+ for (vobj_list_t::const_iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
- objectp = mObjects[i];
+ objectp = *iter;
if (objectp->mDrawable.notNull())
{
num_refs += objectp->mDrawable->findReferences(drawablep);
@@ -1460,15 +1456,15 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip
// Unknown parent, add to orpaned child list
U64 parent_info = getIndex(parent_id, ip, port);
- if (-1 == mOrphanParents.find(parent_info))
+ if (std::find(mOrphanParents.begin(), mOrphanParents.end(), parent_info) == mOrphanParents.end())
{
- mOrphanParents.put(parent_info);
+ mOrphanParents.push_back(parent_info);
}
LLViewerObjectList::OrphanInfo oi(parent_info, childp->mID);
- if (-1 == mOrphanChildren.find(oi))
+ if (std::find(mOrphanChildren.begin(), mOrphanChildren.end(), oi) == mOrphanChildren.end())
{
- mOrphanChildren.put(oi);
+ mOrphanChildren.push_back(oi);
mNumOrphans++;
}
}
@@ -1491,28 +1487,29 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
// See if we are a parent of an orphan.
// Note: This code is fairly inefficient but it should happen very rarely.
// It can be sped up if this is somehow a performance issue...
- if (0 == mOrphanParents.count())
+ if (mOrphanParents.empty())
{
// no known orphan parents
return;
}
- if (-1 == mOrphanParents.find(getIndex(objectp->mLocalID, ip, port)))
+ if (std::find(mOrphanParents.begin(), mOrphanParents.end(), getIndex(objectp->mLocalID, ip, port)) == mOrphanParents.end())
{
// did not find objectp in OrphanParent list
return;
}
- S32 i;
U64 parent_info = getIndex(objectp->mLocalID, ip, port);
BOOL orphans_found = FALSE;
// Iterate through the orphan list, and set parents of matching children.
- for (i = 0; i < mOrphanChildren.count(); i++)
- {
- if (mOrphanChildren[i].mParentInfo != parent_info)
+
+ for (std::vector<OrphanInfo>::iterator iter = mOrphanChildren.begin(); iter != mOrphanChildren.end(); )
+ {
+ if (iter->mParentInfo != parent_info)
{
+ ++iter;
continue;
}
- LLViewerObject *childp = findObject(mOrphanChildren[i].mChildInfo);
+ LLViewerObject *childp = findObject(iter->mChildInfo);
if (childp)
{
if (childp == objectp)
@@ -1546,29 +1543,35 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
objectp->addChild(childp);
orphans_found = TRUE;
+ ++iter;
}
else
{
llinfos << "Missing orphan child, removing from list" << llendl;
- mOrphanChildren.remove(i);
- i--;
+
+ iter = mOrphanChildren.erase(iter);
}
}
// Remove orphan parent and children from lists now that they've been found
- mOrphanParents.remove(mOrphanParents.find(parent_info));
-
- i = 0;
- while (i < mOrphanChildren.count())
{
- if (mOrphanChildren[i].mParentInfo == parent_info)
+ std::vector<U64>::iterator iter = std::find(mOrphanParents.begin(), mOrphanParents.end(), parent_info);
+ if (iter != mOrphanParents.end())
+ {
+ mOrphanParents.erase(iter);
+ }
+ }
+
+ for (std::vector<OrphanInfo>::iterator iter = mOrphanChildren.begin(); iter != mOrphanChildren.end(); )
+ {
+ if (iter->mParentInfo == parent_info)
{
- mOrphanChildren.remove(i);
+ iter = mOrphanChildren.erase(iter);
mNumOrphans--;
}
else
{
- i++;
+ ++iter;
}
}
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 2858081dc9..706966deae 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -38,8 +38,6 @@
// common includes
#include "llstat.h"
-#include "lldarrayptr.h"
-#include "llmap.h" // *TODO: switch to std::map
#include "llstring.h"
// project includes
@@ -50,7 +48,7 @@ class LLNetMap;
class LLDebugBeacon;
const U32 CLOSE_BIN_SIZE = 10;
-const U32 NUM_BINS = 16;
+const U32 NUM_BINS = 128;
// GL name = position in object list + GL_NAME_INDEX_OFFSET so that
// we can have special numbers like zero.
@@ -111,13 +109,12 @@ public:
void updateAvatarVisibility();
// Selection related stuff
- void renderObjectsForSelect(LLCamera &camera, const LLRect& screen_rect, BOOL pick_parcel_wall = FALSE, BOOL render_transparent = TRUE);
void generatePickList(LLCamera &camera);
void renderPickList(const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent);
LLViewerObject *getSelectedObject(const U32 object_id);
- inline S32 getNumObjects() { return mObjects.count(); }
+ inline S32 getNumObjects() { return (S32) mObjects.size(); }
void addToMap(LLViewerObject *objectp);
void removeFromMap(LLViewerObject *objectp);
@@ -131,7 +128,7 @@ public:
S32 findReferences(LLDrawable *drawablep) const; // Find references to drawable in all objects, and return value.
- S32 getOrphanParentCount() const { return mOrphanParents.count(); }
+ S32 getOrphanParentCount() const { return (S32) mOrphanParents.size(); }
S32 getOrphanCount() const { return mNumOrphans; }
void orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port);
void findOrphans(LLViewerObject* objectp, U32 ip, U32 port);
@@ -179,26 +176,28 @@ public:
S32 mNumUnknownKills;
S32 mNumDeadObjects;
protected:
- LLDynamicArray<U64> mOrphanParents; // LocalID/ip,port of orphaned objects
- LLDynamicArray<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
+ std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects
+ std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
S32 mNumOrphans;
- LLDynamicArrayPtr<LLPointer<LLViewerObject>, 256> mObjects;
+ typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
+
+ vobj_list_t mObjects;
std::set<LLPointer<LLViewerObject> > mActiveObjects;
- LLDynamicArrayPtr<LLPointer<LLViewerObject> > mMapObjects;
+ vobj_list_t mMapObjects;
typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map;
vo_map mDeadObjects; // Need to keep multiple entries per UUID
std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
- LLDynamicArray<LLDebugBeacon> mDebugBeacons;
+ std::vector<LLDebugBeacon> mDebugBeacons;
S32 mCurLazyUpdateIndex;
static U32 sSimulatorMachineIndex;
- static LLMap<U64, U32> sIPAndPortToIndex;
+ static std::map<U64, U32> sIPAndPortToIndex;
static std::map<U64, LLUUID> sIndexAndLocalIDToUUID;
@@ -264,12 +263,16 @@ inline LLViewerObject *LLViewerObjectList::getObject(const S32 index)
inline void LLViewerObjectList::addToMap(LLViewerObject *objectp)
{
- mMapObjects.put(objectp);
+ mMapObjects.push_back(objectp);
}
inline void LLViewerObjectList::removeFromMap(LLViewerObject *objectp)
{
- mMapObjects.removeObj(objectp);
+ std::vector<LLPointer<LLViewerObject> >::iterator iter = std::find(mMapObjects.begin(), mMapObjects.end(), objectp);
+ if (iter != mMapObjects.end())
+ {
+ mMapObjects.erase(iter);
+ }
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 1669ce6312..f1ec489a20 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -486,6 +486,10 @@ public:
}
ypos += y_inc;
+ addText(xpos, ypos, llformat("UI Verts/Calls: %d/%d", LLRender::sUIVerts, LLRender::sUICalls));
+ LLRender::sUICalls = LLRender::sUIVerts = 0;
+ ypos += y_inc;
+
addText(xpos,ypos, llformat("%d/%d Nodes visible", gPipeline.mNumVisibleNodes, LLSpatialGroup::sNodeCount));
ypos += y_inc;
@@ -826,8 +830,10 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (slurl_dnd_enabled)
{
+
// special case SLURLs
- if ( LLSLURL::isSLURL( data ) )
+ // isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964)
+ if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) )
{
if (drop)
{
@@ -2004,12 +2010,15 @@ void LLViewerWindow::drawDebugText()
{
gGL.color4f(1,1,1,1);
gGL.pushMatrix();
+ gGL.pushUIMatrix();
{
// scale view by UI global scale factor and aspect ratio correction factor
- glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
+ gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
mDebugText->draw();
}
+ gGL.popUIMatrix();
gGL.popMatrix();
+
gGL.flush();
}
@@ -2057,9 +2066,11 @@ void LLViewerWindow::draw()
// No translation needed, this view is glued to 0,0
gGL.pushMatrix();
+ LLUI::pushMatrix();
{
+
// scale view by UI global scale factor and aspect ratio correction factor
- glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
+ gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
LLVector2 old_scale_factor = LLUI::sGLScaleFactor;
// apply camera zoom transform (for high res screenshots)
@@ -2125,6 +2136,7 @@ void LLViewerWindow::draw()
LLUI::sGLScaleFactor = old_scale_factor;
}
+ LLUI::popMatrix();
gGL.popMatrix();
#if LL_DEBUG
@@ -2477,6 +2489,9 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
// event processing.
void LLViewerWindow::updateUI()
{
+ static LLFastTimer::DeclareTimer ftm("Update UI");
+ LLFastTimer t(ftm);
+
static std::string last_handle_msg;
LLConsole::updateClass();
@@ -3008,17 +3023,16 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
if (mWorldViewRectRaw != new_world_rect)
{
- LLRect old_world_rect = mWorldViewRectRaw;
mWorldViewRectRaw = new_world_rect;
gResizeScreenTexture = TRUE;
LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
+ LLRect old_world_rect_scaled = mWorldViewRectScaled;
mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale);
// sending a signal with a new WorldView rect
- old_world_rect = calcScaledRect(old_world_rect, mDisplayScale);
- mOnWorldViewRectUpdated(old_world_rect, mWorldViewRectScaled);
+ mOnWorldViewRectUpdated(old_world_rect_scaled, mWorldViewRectScaled);
}
}
@@ -3058,7 +3072,6 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point)
// Must be called after displayObjects is called, which sets the mGLName parameter
// NOTE: This function gets called 3 times:
// render_ui_3d: FALSE, FALSE, TRUE
-// renderObjectsForSelect: TRUE, pick_parcel_wall, FALSE
// render_hud_elements: FALSE, FALSE, FALSE
void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud )
{
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 00998b300a..4347dec805 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -211,6 +211,8 @@ BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info)
LLVector3 scale(1.f, aspect, 1.f);
mScreenp->setScale(scale);
mScreenp->setWorldPosition(LLVector3::zero);
+ // need to update screen agressively when sidebar opens/closes, for example
+ mScreenp->mUpdateXform = TRUE;
return TRUE;
}
diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp
index 177cb16c50..5153cef709 100644
--- a/indra/newview/llvoclouds.cpp
+++ b/indra/newview/llvoclouds.cpp
@@ -77,9 +77,11 @@ BOOL LLVOClouds::isActive() const
return TRUE;
}
-
BOOL LLVOClouds::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
+ static LLFastTimer::DeclareTimer ftm("Idle Clouds");
+ LLFastTimer t(ftm);
+
if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS)))
{
return TRUE;
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp
index 75beab519e..428ef20006 100644
--- a/indra/newview/llvotextbubble.cpp
+++ b/indra/newview/llvotextbubble.cpp
@@ -84,6 +84,9 @@ BOOL LLVOTextBubble::isActive() const
BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
+ static LLFastTimer::DeclareTimer ftm("Text Bubble");
+ LLFastTimer t(ftm);
+
F32 dt = mUpdateTimer.getElapsedTimeF32();
// Die after a few seconds.
if (dt > 1.5f)
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 24f1c4bd24..55e2c58a52 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -1141,7 +1141,7 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD
glLoadMatrixf((F32*) scale_mat.mMatrix);
glDrawElements(GL_TRIANGLES, sLODIndexCount[trunk_LOD], GL_UNSIGNED_SHORT, indicesp + sLODIndexOffset[trunk_LOD]);
- gPipeline.addTrianglesDrawn(LEAF_INDICES/3);
+ gPipeline.addTrianglesDrawn(LEAF_INDICES);
stop_glerror();
ret += sLODIndexCount[trunk_LOD];
}
@@ -1191,7 +1191,7 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD
glLoadMatrixf((F32*) scale_mat.mMatrix);
glDrawElements(GL_TRIANGLES, LEAF_INDICES, GL_UNSIGNED_SHORT, indicesp);
- gPipeline.addTrianglesDrawn(LEAF_INDICES/3);
+ gPipeline.addTrianglesDrawn(LEAF_INDICES);
stop_glerror();
ret += LEAF_INDICES;
}
@@ -1216,7 +1216,7 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD
glLoadMatrixf((F32*) scale_mat.mMatrix);
glDrawElements(GL_TRIANGLES, LEAF_INDICES, GL_UNSIGNED_SHORT, indicesp);
- gPipeline.addTrianglesDrawn(LEAF_INDICES/3);
+ gPipeline.addTrianglesDrawn(LEAF_INDICES);
stop_glerror();
ret += LEAF_INDICES;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 14bedaa49c..f1b27fb4df 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -603,6 +603,9 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
LLViewerObject::idleUpdate(agent, world, time);
+ static LLFastTimer::DeclareTimer ftm("Volume");
+ LLFastTimer t(ftm);
+
if (mDead || mDrawable.isNull())
{
return TRUE;
@@ -624,6 +627,18 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
mVolumeImpl->doIdleUpdate(agent, world, time);
}
+ const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40;
+
+ if (mDrawable->isActive())
+ {
+ if (mDrawable->isRoot() &&
+ mDrawable->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES &&
+ (!mDrawable->getParent() || !mDrawable->getParent()->isActive()))
+ {
+ mDrawable->makeStatic();
+ }
+ }
+
return TRUE;
}
@@ -1073,7 +1088,7 @@ BOOL LLVOVolume::calcLOD()
S32 cur_detail = 0;
F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
- F32 distance = llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE);
+ F32 distance = mDrawable->mDistanceWRTCamera; //llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE);
distance *= sDistanceFactor;
F32 rampDist = LLVOVolume::sLODFactor * 2;
@@ -1500,7 +1515,14 @@ void LLVOVolume::updateFaceSize(S32 idx)
else
{
const LLVolumeFace& vol_face = getVolume()->getVolumeFace(idx);
- facep->setSize(vol_face.mVertices.size(), vol_face.mIndices.size());
+ if (LLPipeline::sUseTriStrips)
+ {
+ facep->setSize(vol_face.mVertices.size(), vol_face.mTriStrip.size());
+ }
+ else
+ {
+ facep->setSize(vol_face.mVertices.size(), vol_face.mIndices.size());
+ }
}
}
@@ -3250,6 +3272,11 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_info->mExtents[0] = facep->mExtents[0];
draw_info->mExtents[1] = facep->mExtents[1];
validate_draw_info(*draw_info);
+
+ if (LLPipeline::sUseTriStrips)
+ {
+ draw_info->mDrawMode = LLRender::TRIANGLE_STRIP;
+ }
}
}
@@ -3334,7 +3361,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
drawablep->updateFaceSize(i);
LLFace* facep = drawablep->getFace(i);
- if (cur_total > max_total)
+ if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0)
{
facep->mVertexBuffer = NULL;
facep->mLastVertexBuffer = NULL;
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index 0272a2ab34..1749ccef94 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -519,7 +519,7 @@ void LLVOWLSky::drawDome(void)
LLRender::TRIANGLE_STRIP,
0, strips_segment->getRequestedVerts()-1, strips_segment->getRequestedIndices(),
0);
- gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices() - 2);
+ gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices(), LLRender::TRIANGLE_STRIP);
}
#else
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 118d7f8d08..d7e5b464a6 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -657,6 +657,9 @@ void LLWorld::updateParticles()
void LLWorld::updateClouds(const F32 dt)
{
+ static LLFastTimer::DeclareTimer ftm("World Clouds");
+ LLFastTimer t(ftm);
+
if (gSavedSettings.getBOOL("FreezeTime") ||
!gSavedSettings.getBOOL("SkyUseClassicClouds"))
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 57e75ddf30..259ca21e93 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -116,7 +116,6 @@ const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f;
-const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40;
const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10;
const U32 REFLECTION_MAP_RES = 128;
@@ -271,6 +270,7 @@ BOOL LLPipeline::sDelayVBUpdate = TRUE;
BOOL LLPipeline::sFastAlpha = TRUE;
BOOL LLPipeline::sDisableShaders = FALSE;
BOOL LLPipeline::sRenderBump = TRUE;
+BOOL LLPipeline::sUseTriStrips = TRUE;
BOOL LLPipeline::sUseFarClip = TRUE;
BOOL LLPipeline::sShadowRender = FALSE;
BOOL LLPipeline::sWaterReflections = FALSE;
@@ -359,6 +359,7 @@ void LLPipeline::init()
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
+ sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
@@ -1410,38 +1411,26 @@ void LLPipeline::updateMove()
assertInitialized();
- for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin();
- iter != mRetexturedList.end(); ++iter)
{
- LLDrawable* drawablep = *iter;
- if (drawablep && !drawablep->isDead())
- {
- drawablep->updateTexture();
- }
- }
- mRetexturedList.clear();
-
- updateMovedList(mMovedList);
+ static LLFastTimer::DeclareTimer ftm("Retexture");
+ LLFastTimer t(ftm);
- for (LLDrawable::drawable_set_t::iterator iter = mActiveQ.begin();
- iter != mActiveQ.end(); )
- {
- LLDrawable::drawable_set_t::iterator curiter = iter++;
- LLDrawable* drawablep = *curiter;
- if (drawablep && !drawablep->isDead())
+ for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin();
+ iter != mRetexturedList.end(); ++iter)
{
- if (drawablep->isRoot() &&
- drawablep->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES &&
- (!drawablep->getParent() || !drawablep->getParent()->isActive()))
+ LLDrawable* drawablep = *iter;
+ if (drawablep && !drawablep->isDead())
{
- drawablep->makeStatic(); // removes drawable and its children from mActiveQ
- iter = mActiveQ.upper_bound(drawablep); // next valid entry
+ drawablep->updateTexture();
}
}
- else
- {
- mActiveQ.erase(curiter);
- }
+ mRetexturedList.clear();
+ }
+
+ {
+ static LLFastTimer::DeclareTimer ftm("Moved List");
+ LLFastTimer t(ftm);
+ updateMovedList(mMovedList);
}
//balance octrees
@@ -3055,12 +3044,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
}
}
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING))
- {
- LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect");
- gObjectList.renderObjectsForSelect(camera, gViewerWindow->getWindowRectScaled());
- }
- else
{
LLFastTimer t(FTM_POOLS);
@@ -3509,9 +3492,19 @@ void LLPipeline::renderGeomShadow(LLCamera& camera)
}
-void LLPipeline::addTrianglesDrawn(S32 count)
+void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type)
{
assertInitialized();
+ S32 count = 0;
+ if (render_type == LLRender::TRIANGLE_STRIP)
+ {
+ count = index_count-2;
+ }
+ else
+ {
+ count = index_count/3;
+ }
+
mTrianglesDrawn += count;
mBatchCount++;
mMaxBatchSize = llmax(mMaxBatchSize, count);
@@ -4792,10 +4785,6 @@ void LLPipeline::findReferences(LLDrawable *drawablep)
llinfos << "In mRetexturedList" << llendl;
}
- if (mActiveQ.find(drawablep) != mActiveQ.end())
- {
- llinfos << "In mActiveQ" << llendl;
- }
if (std::find(mBuildQ1.begin(), mBuildQ1.end(), drawablep) != mBuildQ1.end())
{
llinfos << "In mBuildQ1" << llendl;
@@ -4952,19 +4941,6 @@ void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light)
}
}
-void LLPipeline::setActive(LLDrawable *drawablep, BOOL active)
-{
- assertInitialized();
- if (active)
- {
- mActiveQ.insert(drawablep);
- }
- else
- {
- mActiveQ.erase(drawablep);
- }
-}
-
//static
void LLPipeline::toggleRenderType(U32 type)
{
@@ -5380,6 +5356,7 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
void LLPipeline::resetVertexBuffers()
{
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
+ sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 711d40b138..6aecc23aac 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -270,15 +270,14 @@ public:
void shiftObjects(const LLVector3 &offset);
void setLight(LLDrawable *drawablep, BOOL is_light);
- void setActive(LLDrawable *drawablep, BOOL active);
-
+
BOOL hasRenderBatches(const U32 type) const;
LLCullResult::drawinfo_list_t::iterator beginRenderMap(U32 type);
LLCullResult::drawinfo_list_t::iterator endRenderMap(U32 type);
LLCullResult::sg_list_t::iterator beginAlphaGroups();
LLCullResult::sg_list_t::iterator endAlphaGroups();
- void addTrianglesDrawn(S32 count);
+ void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES);
BOOL hasRenderType(const U32 type) const { return (type && (mRenderTypeMask & (1<<type))) ? TRUE : FALSE; }
BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; }
BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; }
@@ -448,7 +447,7 @@ public:
static BOOL sFastAlpha;
static BOOL sDisableShaders; // if TRUE, rendering will be done without shaders
static BOOL sRenderBump;
- static BOOL sUseFBO;
+ static BOOL sUseTriStrips;
static BOOL sUseFarClip;
static BOOL sShadowRender;
static BOOL sWaterReflections;
@@ -589,8 +588,6 @@ protected:
LLViewerObject::vobj_list_t mCreateQ;
- LLDrawable::drawable_set_t mActiveQ;
-
LLDrawable::drawable_set_t mRetexturedList;
class HighlightItem
diff --git a/indra/newview/skins/default/xui/de/floater_beacons.xml b/indra/newview/skins/default/xui/de/floater_beacons.xml
index 50a4555ae0..6e83e0419b 100644
--- a/indra/newview/skins/default/xui/de/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/de/floater_beacons.xml
@@ -5,7 +5,7 @@
Anzeigen:
</text>
<check_box label="Strahlen" name="beacons"/>
- <check_box label="Glanzlichter" name="highlights"/>
+ <check_box label="Hervorhebung" name="highlights"/>
<text name="beacon_width_label" tool_tip="Strahlbreite">
Breite:
</text>
diff --git a/indra/newview/skins/default/xui/de/floater_god_tools.xml b/indra/newview/skins/default/xui/de/floater_god_tools.xml
index 30b151ca58..2bb123ad51 100644
--- a/indra/newview/skins/default/xui/de/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_god_tools.xml
@@ -7,7 +7,7 @@
</panel>
<panel label="Region" name="region">
<text name="Sim Name:" width="55">
- Sim-Name:
+ Sim:
</text>
<check_box label="Startbereich Einleitung" name="check prelude" tool_tip="Diese Region zu einem Startbereich machen."/>
<check_box label="Sonne fest" name="check fixed sun" tool_tip="Fixiert den Sonnenstand (wie in „Region/Grundstück“ &gt; „Terrain“."/>
@@ -41,7 +41,7 @@
Abrechnungsfaktor:
</text>
<text name="land cost text">
- L$ pro qm:
+ L$ pro m²:
</text>
<button label="Aktualisieren" label_selected="Aktualisieren" name="Refresh" tool_tip="Klicken Sie hier, um die obigen Informationen zu aktualisieren."/>
<button label="Übernehmen" label_selected="Übernehmen" name="Apply" tool_tip="Klicken Sie hier, um die obigen Änderungen zu übernehmen."/>
diff --git a/indra/newview/skins/default/xui/de/floater_report_abuse.xml b/indra/newview/skins/default/xui/de/floater_report_abuse.xml
index 02be3b3ed9..49e6d031d6 100644
--- a/indra/newview/skins/default/xui/de/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/de/floater_report_abuse.xml
@@ -23,7 +23,7 @@
{128.1, 128.1, 15.4}
</text>
<text bottom_delta="-38" height="32" name="select_object_label">
- Klicken Sie auf die Schaltfläche, dann auf das entsprechende
+ Klicken Sie die Schaltfläche, dann das entsprechende
Objekt:
</text>
<button label="" label_selected="" name="pick_btn" tool_tip="Objektauswahl – Wählen Sie ein Objekt als Thema dieses Berichts aus"/>
diff --git a/indra/newview/skins/default/xui/de/floater_sell_land.xml b/indra/newview/skins/default/xui/de/floater_sell_land.xml
index 09eae40477..8f67fae464 100644
--- a/indra/newview/skins/default/xui/de/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/de/floater_sell_land.xml
@@ -21,7 +21,7 @@
1. Preis festlegen:
</text>
<text name="price_text" >
- Prei angeben
+ Preis eingeben
</text>
<text name="price_ld">
L$
@@ -58,7 +58,7 @@
<text name="nag_message_label">
ACHTUNG: Verkäufe sind endgültig.
</text>
- <button label="Land zum Verkauf freigeben" name="sell_btn" width="180"/>
+ <button label="Zum Verkauf freigeben" name="sell_btn" width="180"/>
<button label="Abbrechen" name="cancel_btn"/>
</panel>
</scroll_container>
diff --git a/indra/newview/skins/default/xui/de/floater_telehub.xml b/indra/newview/skins/default/xui/de/floater_telehub.xml
index 4d3c96bc87..83d37b2ce4 100644
--- a/indra/newview/skins/default/xui/de/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/de/floater_telehub.xml
@@ -21,7 +21,7 @@
<button label="Spawn hinzufügen" name="add_spawn_point_btn"/>
<button label="Spawn entfernen" name="remove_spawn_point_btn"/>
<text name="spawn_point_help">
- Wählen Sie ein Objekt und klicken zur Positionsangabe auf Spawn hinzufügen.
+ Wählen Sie ein Objekt und klicken Sie zur Positionsangabe auf Spawn hinzufügen.
Anschließend können Sie das Objekt verschieben oder löschen.
Positionsangaben sind relativ zum Telehub-Mittelpunkt.
Wählen Sie ein Objekt aus der Liste aus, um dieses inworld zu markieren.
diff --git a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml
index 4e2d8a9274..d20ab8d1c3 100644
--- a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml
@@ -4,7 +4,7 @@
Zum Auswählen eines Bildes hier klicken
</string>
<text name="Multiple">
- Mehrer Texturen
+ Mehrere Texturen
</text>
<text name="unknown">
Größe: [DIMENSIONS]
diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml
index b5c02cce0b..34f97af04f 100644
--- a/indra/newview/skins/default/xui/de/floater_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_tools.xml
@@ -64,7 +64,7 @@
<radio_item label="Fläche auswählen" name="radio select face"/>
</radio_group>
<check_box label="Verknüpfte Teile bearbeiten" name="checkbox edit linked parts"/>
- <text name="RenderingCost" tool_tip="Zeigt die errechneten Wiedergabekosten für diesen Objekt">
+ <text name="RenderingCost" tool_tip="Zeigt die errechneten Wiedergabekosten für dieses Objekt">
þ: [COUNT]
</text>
<check_box label="Beide Seiten dehnen" name="checkbox uniform"/>
diff --git a/indra/newview/skins/default/xui/de/panel_nearby_media.xml b/indra/newview/skins/default/xui/de/panel_nearby_media.xml
index ec2ad42fa1..2d97a25fa9 100644
--- a/indra/newview/skins/default/xui/de/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/de/panel_nearby_media.xml
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="nearby_media">
- <string name="media_item_count_format">
- (%ls Medien-Objekte)
- </string>
<string name="empty_item_text">
&lt;leer&gt;
</string>
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 2bd8420925..1b8bbe42d2 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -12,6 +12,7 @@
help_topic="camera_floater"
save_rect="true"
save_visibility="true"
+ save_dock_state="true"
single_instance="true"
width="150">
<floater.string
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 964713adbf..65a05f3ec5 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -24,7 +24,7 @@
tab_height="16"
use_custom_icon_ctrl="true"
tab_icon_ctrl_pad="2"
- font_halign="left"
+ halign="left"
use_ellipses="true"
top="0"
width="390" />
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index 851a689d42..0a5820ce73 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -12,6 +12,7 @@
help_topic="move_floater"
save_rect="true"
save_visibility="true"
+ save_dock_state="true"
width="115">
<string
name="walk_forward_tooltip">
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index 7aa8e23e76..d7a7daf30c 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -46,6 +46,7 @@
tab_group="1"
tab_position="left"
tab_width="115"
+ tab_padding_right="5"
top="21"
width="620">
<panel
diff --git a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml
new file mode 100644
index 0000000000..39fb54d513
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml
@@ -0,0 +1,9 @@
+<button
+ chrome="true"
+ image_selected="Info_Small"
+ image_unselected="Info_Small"
+ image_pressed="Info_Small"
+ height="12"
+ name="inspector_info_ctrl"
+ width="12" />
+ \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index d66818e91a..9436b2cd73 100644
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -124,16 +124,28 @@
</menu_item_call>
</context_menu>
<menu_item_separator layout="topleft" />
- <menu_item_call
- enabled="false"
+ <menu_item_call
+ label="Buy"
+ layout="topleft"
+ name="Pie Object Bye">
+ <menu_item_call.on_click
+ function="Tools.BuyOrTake"/>
+ <menu_item_call.on_visible
+ function="Tools.VisibleBuyObject"/>
+ <menu_item_call.on_enable
+ function="Tools.EnableBuyOrTake"/>
+ </menu_item_call>
+ <menu_item_call
label="Take"
+ layout="topleft"
name="Pie Object Take">
- <menu_item_call.on_click
- function="Tools.BuyOrTake" />
- <menu_item_call.on_enable
- function="Tools.EnableBuyOrTake"
- parameter="Buy,Take" />
- </menu_item_call>
+ <menu_item_call.on_click
+ function="Tools.BuyOrTake"/>
+ <menu_item_call.on_visible
+ function="Tools.VisibleTakeObject"/>
+ <menu_item_call.on_enable
+ function="Tools.EnableBuyOrTake"/>
+ </menu_item_call>
<menu_item_call
enabled="false"
label="Take Copy"
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
index 9d2ccba4da..014a52bb4f 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
@@ -47,6 +47,16 @@
parameter="can_call" />
</menu_item_call>
<menu_item_call
+ label="Map"
+ layout="topleft"
+ name="Map">
+ <menu_item_call.on_click
+ function="Avatar.ShowOnMap" />
+ <menu_item_call.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_show_on_map" />
+ </menu_item_call>
+ <menu_item_call
label="Share"
layout="topleft"
name="Share">
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
index 9b3948b29b..3e38503e43 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
@@ -45,6 +45,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="copy" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="copy" />
</menu_item_call>
<menu_item_call
label="Paste"
@@ -88,6 +91,9 @@
<on_click
function="Places.LandmarksGear.Folding.Action"
parameter="expand" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="expand" />
</menu_item_call>
<menu_item_call
label="Collapse"
@@ -96,6 +102,9 @@
<on_click
function="Places.LandmarksGear.Folding.Action"
parameter="collapse" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="collapse" />
</menu_item_call>
<menu_item_call
label="Expand all folders"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 4c4867b862..158e764eae 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -719,16 +719,26 @@
name="Object"
tear_off="true">
<menu_item_call
- label="Buy"
- layout="topleft"
- name="Menu Object Take"
- visible="true">
- <menu_item_call.on_click
- function="Tools.BuyOrTake" />
- <menu_item_call.on_enable
- function="Tools.EnableBuyOrTake"
- name="EnableBuyOrTake"
- parameter="Buy,Take" />
+ label="Buy"
+ layout="topleft"
+ name="Menu Object Buy">
+ <menu_item_call.on_click
+ function="Tools.BuyOrTake"/>
+ <menu_item_call.on_visible
+ function="Tools.VisibleBuyObject"/>
+ <menu_item_call.on_enable
+ function="Tools.EnableBuyOrTake"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Take"
+ layout="topleft"
+ name="Menu Object Take">
+ <menu_item_call.on_click
+ function="Tools.BuyOrTake"/>
+ <menu_item_call.on_visible
+ function="Tools.VisibleTakeObject"/>
+ <menu_item_call.on_enable
+ function="Tools.EnableBuyOrTake"/>
</menu_item_call>
<menu_item_call
label="Take Copy"
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index d484564e0d..a314cedc21 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -151,7 +151,6 @@
width="590">
<label
follows="left|top"
- font.style="BOLD"
height="15"
layout="topleft"
left="10"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
index 0f911f789e..7c0ce9e62e 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
@@ -2,23 +2,23 @@
<panel
can_resize="true"
can_close="false"
- bg_opaque_image="Volume_Background"
- bg_alpha_image="Volume_Background"
- background_opaque="true"
+ mouse_opaque="true"
+ bg_opaque_image="Volume_Background"
+ bg_alpha_image="Volume_Background"
+ background_opaque="true"
background_visible="true"
layout="topleft"
width="270"
height="235"
name="nearby_media"
help_topic="nearby_media">
- <string name="media_item_count_format">(%ld media items)</string>
<string name="empty_item_text">&lt;empty&gt;</string>
<string name="parcel_media_name">Parcel Streaming Media</string>
<string name="parcel_audio_name">Parcel Streaming Audio</string>
<string name="playing_suffix">(playing)</string>
<panel
bevel_style="in"
- background_visible="false"
+ background_visible="false"
follows="left|right|top"
top="0"
height="30"
@@ -98,20 +98,6 @@
width="100">
Nearby Media
</text>
- <!-- nix for now
- <text
- bottom_delta="1"
- type="string"
- follows="top|left|right"
- font="SansSerif"
- font.style="ITALIC"
- font.size="Small"
- name="media_item_count"
- left="115"
- right="-10">
- (?? media items)
- </text>
- -->
<text
type="string"
length="1"
@@ -147,6 +133,7 @@
ame="OnOthers" />
</combo_box>
<scroll_list
+ name="media_list"
follows="left|top|bottom|right"
column_padding="0"
height="105"
@@ -155,8 +142,7 @@
bg_stripe_color="0.25 0.25 0.25 0.25"
top_pad="8"
left="10"
- right="-10"
- name="media_list">
+ right="-10">
<scroll_list.columns
type="checkbox"
width="-1"
@@ -204,11 +190,9 @@
left="10"
right="-10"
border_size="0"
- mouse_opaque="false"
orientation="horizontal">
<layout_panel
name="stop"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -236,7 +220,6 @@
</layout_panel>
<layout_panel
name="play"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -264,7 +247,6 @@
</layout_panel>
<layout_panel
name="pause"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -291,7 +273,6 @@
</layout_panel>
<layout_panel
name="volume_slider_ctrl"
- mouse_opaque="false"
auto_resize="true"
user_resize="false"
follows="left|right"
@@ -316,7 +297,6 @@
</layout_panel>
<layout_panel
name="mute"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -345,7 +325,6 @@
</layout_panel>
<layout_panel
name="zoom"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -373,7 +352,6 @@
</layout_panel>
<layout_panel
name="unzoom"
- mouse_opaque="false"
auto_resize="false"
user_resize="false"
layout="topleft"
@@ -402,7 +380,6 @@
<layout_panel
name="right_bookend"
width="0"
- mouse_opaque="false"
user_resize="false" />
</layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index 57535649de..ff5d89470c 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -129,7 +129,8 @@ background_visible="true"
label="Close"
layout="topleft"
name="close_btn"
- left_pad="3"
+ right="-10"
+ top="1"
width="60" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index c9752cf913..a7cdd241c5 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -17,7 +17,7 @@
increment="0.05"
initial_value="0.5"
label="Master volume"
- label_width="120"
+ label_width="120"
layout="topleft"
left="0"
name="System Volume"
@@ -38,7 +38,7 @@
image_unselected="Audio_Off"
is_toggle="true"
layout="topleft"
- left_pad="5"
+ left_pad="5"
name="mute_audio"
tab_stop="false"
width="16" />
@@ -49,7 +49,7 @@
label="Mute when minimized"
layout="topleft"
name="mute_when_minimized"
- top_delta="3"
+ top_delta="3"
left_pad="5"
width="215" />
<slider
@@ -177,14 +177,14 @@
</slider>
<button
control_name="MuteMusic"
- disabled_control="MuteAudio"
+ disabled_control="MuteAudio"
follows="top|left"
height="16"
image_selected="AudioMute_Off"
image_unselected="Audio_Off"
is_toggle="true"
layout="topleft"
- left_pad="5"
+ left_pad="5"
name="mute_audio"
tab_stop="false"
width="16" />
@@ -326,8 +326,8 @@
length="1"
follows="left|top"
layout="topleft"
- left="80"
- top_delta="16"
+ left="80"
+ top_delta="16"
name="Listen from"
width="80">
Listen from:
@@ -521,7 +521,7 @@
visible="true"
width="22" />
<text
- font.style="BOLD"
+ font.style="BOLD"
type="string"
length="1"
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 96c61b69f5..4167401338 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -102,7 +102,7 @@
left_pad="15"
top="2"
name="media_toggle_btn"
- tool_tip="Click to toggle media"
+ tool_tip="Start/Stop All Media (Music, Video, Web pages)"
width="16" >
</button>
<button
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 21f39682ba..1b360b3007 100644
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -9,8 +9,8 @@
<menu_item_call label="Mon profil" name="Profile"/>
<menu_item_call label="Mon apparence" name="Appearance"/>
<menu_item_check label="Mon inventaire" name="Inventory"/>
- <menu_item_call label="Mon inventaire" name="ShowSidetrayInventory"/>
- <menu_item_call label="Mes gestes" name="Gestures"/>
+ <menu_item_check label="Mon inventaire" name="ShowSidetrayInventory"/>
+ <menu_item_check label="Mes gestes" name="Gestures"/>
<menu label="Mon statut" name="Status">
<menu_item_call label="Absent" name="Set Away"/>
<menu_item_call label="Occupé" name="Set Busy"/>
@@ -24,7 +24,6 @@
<menu_item_call label="Mes groupes" name="My Groups"/>
<menu_item_check label="Chat près de vous" name="Nearby Chat"/>
<menu_item_call label="Personnes près de vous" name="Active Speakers"/>
- <menu_item_check label="Média près de vous" name="Nearby Media"/>
</menu>
<menu label="Monde" name="World">
<menu_item_check label="Mini-carte" name="Mini-Map"/>
@@ -39,7 +38,11 @@
<menu_item_call label="Mes terrains" name="My Land"/>
<menu label="Afficher" name="LandShow">
<menu_item_check label="Contrôles de mouvement" name="Movement Controls"/>
- <menu_item_check label="Contrôles d&apos;affichage" name="Camera Controls"/>
+ <menu_item_check label="Contrôles d’affichage" name="Camera Controls"/>
+ <menu_item_check label="Lignes d&apos;interdiction" name="Ban Lines"/>
+ <menu_item_check label="Balises" name="beacons"/>
+ <menu_item_check label="Limites du terrain" name="Property Lines"/>
+ <menu_item_check label="Propriétaires de terrains" name="Land Owners"/>
</menu>
<menu_item_call label="Me téléporter chez moi" name="Teleport Home"/>
<menu_item_call label="Définir le domicile ici" name="Set Home to Here"/>
@@ -100,7 +103,7 @@
<menu_item_check label="Afficher le rayon lumineux pour la sélection" name="Show Light Radius for Selection"/>
<menu_item_check label="Afficher le faisceau de sélection lumineux" name="Show Selection Beam"/>
<menu_item_check label="Fixer sur la grille" name="Snap to Grid"/>
- <menu_item_call label="Fixer les coordonnées XY de l’objet sur la grille" name="Snap Object XY to Grid"/>
+ <menu_item_call label="Fixer les coordonnées XY de l&apos;objet sur la grille" name="Snap Object XY to Grid"/>
<menu_item_call label="Utiliser la sélection pour la grille" name="Use Selection for Grid"/>
<menu_item_call label="Options de la grille" name="Grid Options"/>
</menu>
@@ -121,7 +124,7 @@
<menu_item_call label="Arrêter mon animation" name="Stop Animating My Avatar"/>
<menu_item_call label="Refixer les textures" name="Rebake Texture"/>
<menu_item_call label="Taille de l&apos;interface par défaut" name="Set UI Size to Default"/>
- <menu_item_call label="Définir la taille de la fenêtre..." name="Set Window Size..."/>
+ <menu_item_call label="Définir la taille de la fenêtre…" name="Set Window Size..."/>
<menu_item_check label="Limiter la distance de sélection" name="Limit Select Distance"/>
<menu_item_check label="Désactiver les contraintes de la caméra" name="Disable Camera Distance"/>
<menu_item_check label="Photo haute résolution" name="HighResSnapshot"/>
@@ -170,7 +173,7 @@
<menu_item_call label="Effacer le cache du groupe" name="ClearGroupCache"/>
<menu_item_check label="Effet de lissage de la souris" name="Mouse Smoothing"/>
<menu label="Raccourcis" name="Shortcuts">
- <menu_item_call label="Image ([COST] L$)..." name="Upload Image"/>
+ <menu_item_call label="Image ([COST] L$)..." name="Upload Image"/>
<menu_item_check label="Rechercher" name="Search"/>
<menu_item_call label="Relâcher les touches" name="Release Keys"/>
<menu_item_call label="Taille de l&apos;interface par défaut" name="Set UI Size to Default"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
index 53b9bc6f82..71e65232aa 100644
--- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="nearby_media">
- <string name="media_item_count_format">
- (%ld articles de média)
- </string>
<string name="empty_item_text">
&lt;vide&gt;
</string>
diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml
index d57a81c770..f363c2d85d 100644
--- a/indra/newview/skins/default/xui/ja/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml
@@ -73,7 +73,7 @@
Adult
</text>
<text name="Owner:">
- オーナー:
+ 所有者:
</text>
<text name="OwnerText">
Leyla Linden
@@ -86,8 +86,8 @@
</text>
<button label="設定" label_selected="設定..." name="Set..."/>
<check_box label="グループへの譲渡を許可" name="check deed" tool_tip="グループのオフィサーはこの土地をグループに譲渡できます。そうするとグループの土地割り当てによってサポートされます。"/>
- <button label="譲渡" label_selected="譲渡..." name="Deed..." tool_tip="選択されたグループのオフィサーであるときのみ、土地を譲渡できます。"/>
- <check_box label="オーナーが譲渡と共に寄付" name="check contrib" tool_tip="土地がグループに譲渡されるとき、前の所有者は譲渡が成立するよう、十分な土地を寄付します。"/>
+ <button label="譲渡" label_selected="譲渡..." name="Deed..." tool_tip="選択したグループのオフィサーであるときのみ、土地を譲渡できます。"/>
+ <check_box label="所有者が譲渡と共に寄付" name="check contrib" tool_tip="土地がグループに譲渡されるとき、前の所有者は譲渡が成立するよう、十分な土地を寄付します。"/>
<text name="For Sale:">
販売の有無:
</text>
@@ -136,16 +136,16 @@
</panel>
<panel label="約款" name="land_covenant_panel">
<panel.string name="can_resell">
- この地域で購入した土地は、再販できます。
+ このリージョン(地域)で購入した土地は、再販できます。
</panel.string>
<panel.string name="can_not_resell">
- この地域で購入した土地は、再販できないことがあります。
+ このリージョン(地域)で購入した土地は、再販できないことがあります。
</panel.string>
<panel.string name="can_change">
- この地域で購入した土地は、統合または再分割できます。
+ このリージョン(地域)で購入した土地は、統合または再分割できます。
</panel.string>
<panel.string name="can_not_change">
- この地域で購入した土地は、統合/再分割できないことが
+ このリージョン(地域)で購入した土地は、統合・再分割できないことがあります。
あります。
</panel.string>
<text font="SansSerifLarge" name="estate_section_lbl">
@@ -194,7 +194,7 @@
再分割:
</text>
<text name="changeable_clause">
- この地域(リージョン)にある土地は統合または分割ができ
+ このリージョン(地域)にある土地は統合または分割ができないことがあります。
ません。
</text>
</panel>
@@ -233,7 +233,7 @@
[COUNT]
</text>
<button label="表示" label_selected="表示" name="ShowOwner" right="-145"/>
- <button label="返却" label_selected="返却..." name="ReturnOwner..." right="-15" tool_tip="オブジェクトをオーナーに返却します"/>
+ <button label="返却" label_selected="返却..." name="ReturnOwner..." right="-15" tool_tip="オブジェクトを所有者に返却します"/>
<text name="Set to group:">
グループに設定:
</text>
@@ -241,7 +241,7 @@
[COUNT]
</text>
<button label="表示" label_selected="表示" name="ShowGroup" right="-145"/>
- <button label="返却" label_selected="返却..." name="ReturnGroup..." right="-15" tool_tip="オブジェクトをオーナーに返却します"/>
+ <button label="返却" label_selected="返却..." name="ReturnGroup..." right="-15" tool_tip="オブジェクトを所有者に返却します"/>
<text name="Owned by others:">
他人の所有物:
</text>
@@ -249,7 +249,7 @@
[COUNT]
</text>
<button label="表示" label_selected="表示" name="ShowOther" right="-145"/>
- <button label="返却" label_selected="返却..." name="ReturnOther..." right="-15" tool_tip="オブジェクトをオーナーに返却します"/>
+ <button label="返却" label_selected="返却..." name="ReturnOther..." right="-15" tool_tip="オブジェクトを所有者に返却します"/>
<text name="Selected / sat upon:">
選択済み・決定済み:
</text>
@@ -269,7 +269,7 @@
<name_list.columns label="タイプ" name="type"/>
<name_list.columns name="online_status"/>
<name_list.columns label="名前" name="name"/>
- <name_list.columns label="カウント" name="count"/>
+ <name_list.columns label="数" name="count"/>
<name_list.columns label="最新" name="mostrecent"/>
</name_list>
</panel>
@@ -288,13 +288,13 @@
控えめコンテンツ
</panel.string>
<panel.string name="mature_check_adult">
- Adultコンテンツ
+ アダルトコンテンツ
</panel.string>
<panel.string name="mature_check_mature_tooltip">
- あなたの区画情報及びコンテンツは控えめとされています。
+ あなたの区画情報及びコンテンツは「控えめ」とされています。
</panel.string>
<panel.string name="mature_check_adult_tooltip">
- あなたの区画情報及びコンテンツはAdultとされています。
+ あなたの区画情報及びコンテンツは「アダルト」とされています。
</panel.string>
<panel.string name="landing_point_none">
(なし)
@@ -303,7 +303,7 @@
プッシングを制限
</panel.string>
<panel.string name="push_restrict_region_text">
- プッシングを制限 (地域優先)
+ プッシングを制限 (地域設定優先)
</panel.string>
<text name="allow_label">
他の住人への許可:
@@ -383,7 +383,7 @@
<text name="with media:">
種類:
</text>
- <combo_box name="media type" tool_tip="URL が動画、Webページ、その他のメディアの場合に指定します"/>
+ <combo_box name="media type" tool_tip="URL が動画、Web ページ、その他のメディアかを指定します"/>
<text name="at URL:">
ホームページ:
</text>
@@ -391,7 +391,7 @@
<text name="CurrentURL:">
現在のページ:
</text>
- <button label="リセット..." label_selected="リセット..." name="reset_media_url" tool_tip="URLを更新"/>
+ <button label="リセット..." label_selected="リセット..." name="reset_media_url" tool_tip="URL を更新"/>
<check_box label="URL を非表示" name="hide_media_url" tool_tip="このオプションをオンにすると、許可なしでこの区画情報にアクセスしているユーザーにはメディア URL が表示されません。 これは HTML タイプには使用できませんのでご注意ください。"/>
<text name="Description:">
説明:
@@ -404,12 +404,12 @@
<text name="replace_texture_help" width="290">
このテクスチャを使用するオブジェクトの「再生」をクリックすると、動画や Web ページを表示します。 テクスチャを変更するにはサムネイルを選択してください。
</text>
- <check_box label="スケールを自動設定" name="media_auto_scale" tool_tip="このオプションをチェックすると、この区画のコンテンツのスケールが自動的に設定されます。 動作速度と画質が少し低下することがありますが、他のテクスチャーのスケーリングや整列が必要になることはありません。"/>
- <text name="media_size" tool_tip="レンダリングするWebメディアのサイズです。デフォルトの 0 のままにします。">
+ <check_box label="スケールを自動設定" name="media_auto_scale" tool_tip="このオプションをチェックすると、この区画のコンテンツのスケールが自動的に設定されます。 動作速度と画質が少し低下することがありますが、他のテクスチャのスケーリングや整列が必要になることはありません。"/>
+ <text name="media_size" tool_tip="レンダリングする Web メディアのサイズです。デフォルトの 0 のままにします。">
サイズ:
</text>
- <spinner name="media_size_width" tool_tip="レンダリングするWebメディアのサイズです。デフォルトの 0 のままにします。"/>
- <spinner name="media_size_height" tool_tip="レンダリングするWebメディアのサイズです。デフォルトの 0 のままにします。"/>
+ <spinner name="media_size_width" tool_tip="レンダリングする Web メディアのサイズです。デフォルトの 0 のままにします。"/>
+ <spinner name="media_size_height" tool_tip="レンダリングする Web メディアのサイズです。デフォルトの 0 のままにします。"/>
<text name="pixels">
ピクセル
</text>
diff --git a/indra/newview/skins/default/xui/ja/floater_buy_contents.xml b/indra/newview/skins/default/xui/ja/floater_buy_contents.xml
index 69d4faf5b8..eda71c3575 100644
--- a/indra/newview/skins/default/xui/ja/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/ja/floater_buy_contents.xml
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater min_width="340" name="floater_buy_contents" title="中身の購入" width="340">
<text name="contains_text" width="320">
- [NAME]の中身:
+ [NAME] の中身:
</text>
<scroll_list name="item_list" width="310"/>
<text name="buy_text" width="320">
- 中身を[NAME]からL$[AMOUNT]で購入しますか?
+ 中身を[NAME] から L$[AMOUNT] で購入しますか?
</text>
<button label="取り消し" label_selected="取り消し" name="cancel_btn" width="73"/>
<button label="購入" label_selected="購入" left_delta="-77" name="buy_btn" width="73"/>
- <check_box label="今すぐ服を着る" left_delta="-125" name="wear_check"/>
+ <check_box label="今すぐ着る" left_delta="-125" name="wear_check"/>
<text name="no_copy_text">
- (コピー不可)
+ (コピー不可)
</text>
<text name="no_modify_text">
- (修正不可)
+ (修正不可)
</text>
<text name="no_transfer_text">
- (再販・プレゼント不可)
+ (再販・プレゼント不可)
</text>
</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_buy_object.xml b/indra/newview/skins/default/xui/ja/floater_buy_object.xml
index 7a5b7dc140..ddec8c2e69 100644
--- a/indra/newview/skins/default/xui/ja/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/ja/floater_buy_object.xml
@@ -4,7 +4,7 @@
中身:
</text>
<text name="buy_text">
- [NAME]からL$[AMOUNT]で購入しますか?
+ [NAME]から L$[AMOUNT] で購入しますか?
</text>
<button label="取消" label_selected="取消" name="cancel_btn"/>
<button label="購入" label_selected="購入" name="buy_btn"/>
@@ -15,12 +15,12 @@
次のものを購入
</string>
<text name="no_copy_text">
- (コピー不可)
+ (コピー不可)
</text>
<text name="no_modify_text">
- (修正不可)
+ (修正不可)
</text>
<text name="no_transfer_text">
- (再販・プレゼント不可)
+ (再販・プレゼント不可)
</text>
</floater>
diff --git a/indra/newview/skins/default/xui/ja/floater_customize.xml b/indra/newview/skins/default/xui/ja/floater_customize.xml
index 4d8b91ff99..bd8535353d 100644
--- a/indra/newview/skins/default/xui/ja/floater_customize.xml
+++ b/indra/newview/skins/default/xui/ja/floater_customize.xml
@@ -35,7 +35,7 @@
[PATH] に所在
</text>
<text name="not worn instructions">
- 持ち物からあなたのアバターに1つドラッグして、新しいシェイプをつけます。 代わりに、はじめから新しく作成して着用することもできます。
+ 持ち物からあなたのアバターに 1 つドラッグして、新しいシェイプをつけます。 代わりに、はじめから新しく作成して着用することもできます。
</text>
<text name="no modify instructions">
あなたはこの服の修正を許されていません。
@@ -68,7 +68,7 @@
[PATH] に所在
</text>
<text name="not worn instructions">
- 持ち物からあなたのアバターに1つドラッグして、新しいスキンをつけます。 代わりに、はじめから新しく作成して着用することもできます。
+ 持ち物からあなたのアバターに 1 つドラッグして、新しいスキンをつけます。 代わりに、はじめから新しく作成して着用することもできます。
</text>
<text name="no modify instructions">
あなたはこの服の修正を許されていません。
@@ -105,7 +105,7 @@
[PATH] に所在
</text>
<text name="not worn instructions">
- 持ち物からあなたのアバターに1つドラッグして、新しい髪をつけます。 代わりに、はじめから新しく作成して着用することもできます。
+ 持ち物からあなたのアバターに 1 つドラッグして、新しい髪をつけます。 代わりに、はじめから新しく作成して着用することもできます。
</text>
<text name="no modify instructions">
あなたはこの服の修正を許されていません。
@@ -113,7 +113,7 @@
<text name="Item Action Label">
髪型:
</text>
- <texture_picker label="テクスチャー" name="Texture" tool_tip="写真をクリックして選択"/>
+ <texture_picker label="テクスチャ" name="Texture" tool_tip="写真をクリックして選択"/>
<button label="新しい髪を作成" label_selected="新しい髪を作成" name="Create New"/>
<button label="保存" label_selected="保存" name="Save"/>
<button label="別名で保存..." label_selected="別名で保存..." name="Save As"/>
@@ -177,7 +177,7 @@
[PATH] に所在
</text>
<text name="not worn instructions">
- 持ち物からあなたのアバターに1つドラッグして、新しいシャツを着ます。 代わりに、はじめから新しく作成して着用することもできます。
+ 持ち物からあなたのアバターに 1 つドラッグして、新しいシャツを着ます。 代わりに、はじめから新しく作成して着用することもできます。
</text>
<text name="no modify instructions">
あなたはこの服の修正を許されていません。
@@ -302,7 +302,7 @@
[PATH] に所在
</text>
<text name="not worn instructions">
- 持ち物からあなたのアバターに1つドラッグして、新しいジャケットを着ます。 代わりに、はじめから新しく作成して着用することもできます。
+ 持ち物からあなたのアバターに 1 つドラッグして、新しいジャケットを着ます。 代わりに、はじめから新しく作成して着用することもできます。
</text>
<button label="新しい上着を作成" label_selected="新しい上着を作成" name="Create New"/>
<text name="no modify instructions">
@@ -435,7 +435,7 @@
[PATH] に所在
</text>
<text name="not worn instructions">
- 持ち物からあなたのアバターに1つドラッグして、新しいスカートを履きます。 代わりに、はじめから新しく作成して着用することもできます。
+ 持ち物からあなたのアバターに 1 つドラッグして、新しいスカートを履きます。 代わりに、はじめから新しく作成して着用することもできます。
</text>
<button label="スカートを作成" label_selected="スカートを作成" name="Create New"/>
<text name="no modify instructions">
diff --git a/indra/newview/skins/default/xui/ja/floater_pay.xml b/indra/newview/skins/default/xui/ja/floater_pay.xml
index 4564354899..aa67c78aea 100644
--- a/indra/newview/skins/default/xui/ja/floater_pay.xml
+++ b/indra/newview/skins/default/xui/ja/floater_pay.xml
@@ -7,7 +7,7 @@
住人に支払う
</string>
<text name="payee_label">
- 支払い:
+ 支払う:
</text>
<icon name="icon_person" tool_tip="住人"/>
<text name="payee_name">
diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml
index 24bb5b614c..e154f5af83 100644
--- a/indra/newview/skins/default/xui/ja/floater_tools.xml
+++ b/indra/newview/skins/default/xui/ja/floater_tools.xml
@@ -386,7 +386,7 @@
<panel.string name="string repeats per face">
面ごとに繰り返す
</panel.string>
- <texture_picker label="テクスチャー" name="texture control" tool_tip="写真をクリックして選択"/>
+ <texture_picker label="テクスチャ" name="texture control" tool_tip="写真をクリックして選択"/>
<color_swatch label="色" name="colorswatch" tool_tip="クリックしてカラーピッカーを開きます"/>
<text name="color trans">
透過度 %
diff --git a/indra/newview/skins/default/xui/ja/menu_inventory.xml b/indra/newview/skins/default/xui/ja/menu_inventory.xml
index a2dbc34270..17b059c5d6 100644
--- a/indra/newview/skins/default/xui/ja/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/ja/menu_inventory.xml
@@ -6,8 +6,8 @@
<menu_item_call label="プロパティ" name="Task Properties"/>
<menu_item_call label="名前の変更" name="Task Rename"/>
<menu_item_call label="削除" name="Task Remove"/>
- <menu_item_call label="ゴミ箱を空にする" name="Empty Trash"/>
- <menu_item_call label="遺失物フォルダを空にする" name="Empty Lost And Found"/>
+ <menu_item_call label="ごみ箱を空にする" name="Empty Trash"/>
+ <menu_item_call label="紛失物フォルダを空にする" name="Empty Lost And Found"/>
<menu_item_call label="新しいフォルダ" name="New Folder"/>
<menu_item_call label="新しいスクリプト" name="New Script"/>
<menu_item_call label="新しいノートカード" name="New Note"/>
@@ -55,7 +55,7 @@
<menu_item_call label="開く" name="Open"/>
<menu_item_call label="プロパティ" name="Properties"/>
<menu_item_call label="名前の変更" name="Rename"/>
- <menu_item_call label="UUIDをコピー" name="Copy Asset UUID"/>
+ <menu_item_call label="UUID をコピー" name="Copy Asset UUID"/>
<menu_item_call label="コピー" name="Copy"/>
<menu_item_call label="貼り付け" name="Paste"/>
<menu_item_call label="リンクの貼り付け" name="Paste As Link"/>
@@ -69,14 +69,14 @@
<menu_item_call label="ローカル再生" name="Animation Audition"/>
<menu_item_call label="インスタントメッセージを送信" name="Send Instant Message"/>
<menu_item_call label="テレポートを送る..." name="Offer Teleport..."/>
- <menu_item_call label="会議チャット開始" name="Conference Chat"/>
+ <menu_item_call label="コンファレンスチャットを開始" name="Conference Chat"/>
<menu_item_call label="アクティブ" name="Activate"/>
<menu_item_call label="非アクティブ" name="Deactivate"/>
<menu_item_call label="別名で保存" name="Save As"/>
<menu_item_call label="自分から取り外す" name="Detach From Yourself"/>
<menu_item_call label="装着" name="Object Wear"/>
<menu label="装着先" name="Attach To"/>
- <menu label="HUD装着先" name="Attach To HUD"/>
+ <menu label="HUD 装着先" name="Attach To HUD"/>
<menu_item_call label="編集" name="Wearable Edit"/>
<menu_item_call label="装着" name="Wearable Wear"/>
<menu_item_call label="取り外す" name="Take Off"/>
diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml
index 85fb23d5b7..a9af96ab0c 100644
--- a/indra/newview/skins/default/xui/ja/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml
@@ -9,8 +9,8 @@
<menu_item_call label="マイ プロフィール" name="Profile"/>
<menu_item_call label="マイ 容姿" name="Appearance"/>
<menu_item_check label="マイ 持ち物" name="Inventory"/>
- <menu_item_call label="持ち物をサイドトレイに表示" name="ShowSidetrayInventory"/>
- <menu_item_call label="マイ ジェスチャー" name="Gestures"/>
+ <menu_item_check label="持ち物" name="ShowSidetrayInventory"/>
+ <menu_item_check label="マイ ジェスチャー" name="Gestures"/>
<menu label="マイ ログイン状態" name="Status">
<menu_item_call label="一時退席中" name="Set Away"/>
<menu_item_call label="取り込み中" name="Set Busy"/>
@@ -24,7 +24,6 @@
<menu_item_call label="所属グループ" name="My Groups"/>
<menu_item_check label="近くのチャット" name="Nearby Chat"/>
<menu_item_call label="近くにいる人" name="Active Speakers"/>
- <menu_item_check label="近くのメディア" name="Nearby Media"/>
</menu>
<menu label="世界" name="World">
<menu_item_check label="ミニマップ" name="Mini-Map"/>
@@ -40,6 +39,10 @@
<menu label="表示" name="LandShow">
<menu_item_check label="移動コントロール" name="Movement Controls"/>
<menu_item_check label="コントロールを表示" name="Camera Controls"/>
+ <menu_item_check label="立入禁止ライン" name="Ban Lines"/>
+ <menu_item_check label="ビーコン(標識)" name="beacons"/>
+ <menu_item_check label="プロパティ境界線" name="Property Lines"/>
+ <menu_item_check label="土地所有者" name="Land Owners"/>
</menu>
<menu_item_call label="ホームにテレポート" name="Teleport Home"/>
<menu_item_call label="現在地をホームに設定" name="Set Home to Here"/>
@@ -58,7 +61,7 @@
<menu_item_call label="フォーカスツール" name="Focus"/>
<menu_item_call label="移動ツール" name="Move"/>
<menu_item_call label="編集ツール" name="Edit"/>
- <menu_item_call label="クリエーションツール" name="Create"/>
+ <menu_item_call label="作成ツール" name="Create"/>
<menu_item_call label="土地ツール" name="Land"/>
</menu>
<menu label="編集" name="Edit">
@@ -94,21 +97,21 @@
<menu_item_call label="デフォルトのアップロード権限を設定" name="perm prefs"/>
<menu_item_check label="権限の詳細を表示" name="DebugPermissions"/>
<menu_item_check label="私のオブジェクトだけを選択" name="Select Only My Objects"/>
- <menu_item_check label="動的オブジェクトのみ選択" name="Select Only Movable Objects"/>
- <menu_item_check label="環境で選択" name="Select By Surrounding"/>
- <menu_item_check label="非表示の選択を表示" name="Show Hidden Selection"/>
+ <menu_item_check label="動的オブジェクトだけを選択" name="Select Only Movable Objects"/>
+ <menu_item_check label="範囲内を選択" name="Select By Surrounding"/>
+ <menu_item_check label="隠れた位置の選択も表示" name="Show Hidden Selection"/>
<menu_item_check label="選択した光の半径範囲を表示" name="Show Light Radius for Selection"/>
- <menu_item_check label="選択したビームを表示" name="Show Selection Beam"/>
+ <menu_item_check label="選択ビームを表示" name="Show Selection Beam"/>
<menu_item_check label="グリッドポイントにスナップ" name="Snap to Grid"/>
- <menu_item_call label="オブジェクトのXY軸をグリッドにスナップ" name="Snap Object XY to Grid"/>
+ <menu_item_call label="オブジェクトの XY 軸をグリッドにスナップ" name="Snap Object XY to Grid"/>
<menu_item_call label="選択をグリッドに使用" name="Use Selection for Grid"/>
<menu_item_call label="グリッドオプション" name="Grid Options"/>
</menu>
<menu label="リンクした部分を選択" name="Select Linked Parts">
- <menu_item_call label="次の部位を選択" name="Select Next Part"/>
- <menu_item_call label="前回の部位を選択" name="Select Previous Part"/>
- <menu_item_call label="次の部位を含める" name="Include Next Part"/>
- <menu_item_call label="前回の部位を含める" name="Include Previous Part"/>
+ <menu_item_call label="次の部分を選択" name="Select Next Part"/>
+ <menu_item_call label="前回の部分を選択" name="Select Previous Part"/>
+ <menu_item_call label="次の部分を含める" name="Include Next Part"/>
+ <menu_item_call label="前回の部分を含める" name="Include Previous Part"/>
</menu>
</menu>
<menu label="ヘルプ" name="Help">
@@ -180,7 +183,7 @@
<menu_item_call label="全てのウィンドウを閉じる" name="Close All Windows"/>
<menu_item_call label="スナップショットをディスクに保存" name="Snapshot to Disk"/>
<menu_item_call label="一人称視点" name="Mouselook"/>
- <menu_item_check label="ジョイスティック・フライカム" name="Joystick Flycam"/>
+ <menu_item_check label="ジョイスティックフライカム" name="Joystick Flycam"/>
<menu_item_call label="表示をリセット" name="Reset View"/>
<menu_item_call label="最後の発言者を見る" name="Look at Last Chatter"/>
<menu label="制作ツールを選択" name="Select Tool">
@@ -191,12 +194,12 @@
<menu_item_call label="土地ツール" name="Land"/>
</menu>
<menu_item_call label="ズームイン" name="Zoom In"/>
- <menu_item_call label="ズーム・デフォルト" name="Zoom Default"/>
+ <menu_item_call label="ズーム(デフォルト)" name="Zoom Default"/>
<menu_item_call label="ズームアウト" name="Zoom Out"/>
<menu_item_call label="全画面表示" name="Toggle Fullscreen"/>
</menu>
<menu_item_call label="デバッグ設定を表示する" name="Debug Settings"/>
- <menu_item_check label="開発メニューを表示" name="Debug Mode"/>
+ <menu_item_check label="開発メニューを表示する" name="Debug Mode"/>
</menu>
<menu label="開発" name="Develop">
<menu label="コンソール" name="Consoles">
@@ -204,7 +207,7 @@
<menu_item_check label="デバッグコンソール" name="Debug Console"/>
<menu_item_call label="通知コンソール" name="Notifications"/>
<menu_item_check label="テクスチャサイズのコンソール" name="Texture Size"/>
- <menu_item_check label="テクスチャカテゴリ・コンソール" name="Texture Category"/>
+ <menu_item_check label="テクスチャカテゴリのコンソール" name="Texture Category"/>
<menu_item_check label="ファーストタイマー" name="Fast Timers"/>
<menu_item_check label="メモリ" name="Memory"/>
<menu_item_call label="リージョン情報をデバッグコンソールへ" name="Region Info to Debug Console"/>
@@ -247,10 +250,10 @@
<menu_item_check label="アニメーション部分をテクスチャで表示" name="Texture Anim"/>
<menu_item_check label="テクスチャ優先度" name="Texture Priority"/>
<menu_item_check label="テクスチャの範囲" name="Texture Area"/>
- <menu_item_check label="Face Area" name="Face Area"/>
+ <menu_item_check label="側面" name="Face Area"/>
<menu_item_check label="光" name="Lights"/>
<menu_item_check label="骨組みの衝突判定" name="Collision Skeleton"/>
- <menu_item_check label="Raycast" name="Raycast"/>
+ <menu_item_check label="レイキャスト" name="Raycast"/>
</menu>
<menu label="レンダリング" name="Rendering">
<menu_item_check label="軸" name="Axes"/>
@@ -261,7 +264,7 @@
<menu_item_check label="フレームバッファ・オブジェクト" name="Framebuffer Objects"/>
<menu_item_check label="遅延レンダリング" name="Deferred Rendering"/>
<menu_item_check label="グローバルイルミネーション" name="Global Illumination"/>
- <menu_item_check label="GLデバッグ" name="Debug GL"/>
+ <menu_item_check label="GL デバッグ" name="Debug GL"/>
<menu_item_check label="経路をデバッグ" name="Debug Pipeline"/>
<menu_item_check label="ファーストアルファ" name="Fast Alpha"/>
<menu_item_check label="アニメーションテクスチャ" name="Animation Textures"/>
diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml
index ca93d46e4d..a670975dda 100644
--- a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="nearby_media">
- <string name="media_item_count_format">
- (メディアアイテム %ld )
- </string>
<string name="empty_item_text">
&lt;空&gt;
</string>