diff options
Diffstat (limited to 'indra/newview')
209 files changed, 2883 insertions, 1679 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6197856512..b780a27ce2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -166,7 +166,7 @@ set(viewer_SOURCE_FILES llfirstuse.cpp llflexibleobject.cpp llfloaterabout.cpp - llfloateranimpreview.cpp + llfloaterbvhpreview.cpp llfloaterauction.cpp llfloateravatar.cpp llfloateravatarpicker.cpp @@ -723,7 +723,7 @@ set(viewer_HEADER_FILES llfirstuse.h llflexibleobject.h llfloaterabout.h - llfloateranimpreview.h + llfloaterbvhpreview.h llfloaterauction.h llfloateravatar.h llfloateravatarpicker.h @@ -1347,7 +1347,9 @@ if (WINDOWS) DXGUID_LIBRARY ) +# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs) set(viewer_LIBRARIES + opengl32 ${WINDOWS_LIBRARIES} comdlg32 ${DINPUT_LIBRARY} @@ -1357,7 +1359,6 @@ if (WINDOWS) odbccp32 ole32 oleaut32 - opengl32 shell32 Vfw32 winspool diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 1d1d39c786..73df064ab2 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -37,6 +37,8 @@ tooltip_ref="Command_Build_Tooltip" execute_function="Build.Toggle" execute_parameters="build" + is_enabled_function="Build.Enabled" + is_enabled_parameters="build" is_running_function="Floater.IsOpen" is_running_parameters="build" /> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0e26013152..ee8c15752b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4282,6 +4282,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>InventoryInboxToggleState</key> + <map> + <key>Comment</key> + <string>Stores the open/closed state of inventory Received items panel</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>InventoryLinking</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl index 40b0cf47ac..eada38eaaa 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl @@ -55,6 +55,12 @@ uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight) { //get light vector diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 8c96d55342..5c36118a50 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -64,6 +64,12 @@ uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight) { //get light vector diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl index c0edddc40a..d6149fcc32 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl @@ -59,6 +59,12 @@ uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight) { //get light vector diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl index 64e094e3c5..17f425475c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -50,18 +50,18 @@ uniform vec4 sunlight_color; uniform vec4 ambient; uniform vec4 blue_horizon; uniform vec4 blue_density; -uniform vec4 haze_horizon; -uniform vec4 haze_density; +uniform float haze_horizon; +uniform float haze_density; -uniform vec4 cloud_shadow; -uniform vec4 density_multiplier; -uniform vec4 max_y; +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float max_y; uniform vec4 glow; uniform vec4 cloud_color; -uniform vec4 cloud_scale; +uniform float cloud_scale; void main() { @@ -77,7 +77,7 @@ void main() // Set altitude if (P.y > 0.) { - P *= (max_y.x / P.y); + P *= (max_y / P.y); } else { @@ -99,12 +99,12 @@ void main() // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes - light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); // Calculate relative weights - temp1 = blue_density + haze_density.x; + temp1 = blue_density + haze_density; blue_weight = blue_density / temp1; - haze_weight = haze_density.x / temp1; + haze_weight = haze_density / temp1; // Compute sunlight from P & lightnorm (for long rays like sky) temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y ); @@ -112,7 +112,7 @@ void main() sunlight *= exp( - light_atten * temp2.y); // Distance - temp2.z = Plen * density_multiplier.x; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati @@ -136,14 +136,14 @@ void main() // Increase ambient when there are more clouds vec4 tmpAmbient = ambient; - tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5; + tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; // Dim sunlight by cloud shadow percentage - sunlight *= (1. - cloud_shadow.x); + sunlight *= (1. - cloud_shadow); // Haze color below cloud vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient) - + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient) + + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient) ); // CLOUDS @@ -164,13 +164,13 @@ void main() vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1); // Make a nice cloud density based on the cloud_shadow value that was passed in. - vary_CloudDensity = 2. * (cloud_shadow.x - 0.25); + vary_CloudDensity = 2. * (cloud_shadow - 0.25); // Texture coords vary_texcoord0 = texcoord0; vary_texcoord0.xy -= 0.5; - vary_texcoord0.xy /= cloud_scale.x; + vary_texcoord0.xy /= cloud_scale; vary_texcoord0.xy += 0.5; vary_texcoord1 = vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index 721de18e0b..cb7603f4fd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl @@ -44,19 +44,17 @@ uniform vec4 sunlight_color; uniform vec4 ambient; uniform vec4 blue_horizon; uniform vec4 blue_density; -uniform vec4 haze_horizon; -uniform vec4 haze_density; +uniform float haze_horizon; +uniform float haze_density; -uniform vec4 cloud_shadow; -uniform vec4 density_multiplier; -uniform vec4 max_y; +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float max_y; uniform vec4 glow; uniform vec4 cloud_color; -uniform vec4 cloud_scale; - void main() { @@ -71,7 +69,7 @@ void main() // Set altitude if (P.y > 0.) { - P *= (max_y.x / P.y); + P *= (max_y / P.y); } else { @@ -93,12 +91,12 @@ void main() // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes - light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); // Calculate relative weights - temp1 = blue_density + haze_density.x; + temp1 = blue_density + haze_density; blue_weight = blue_density / temp1; - haze_weight = haze_density.x / temp1; + haze_weight = haze_density / temp1; // Compute sunlight from P & lightnorm (for long rays like sky) temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y ); @@ -106,7 +104,7 @@ void main() sunlight *= exp( - light_atten * temp2.y); // Distance - temp2.z = Plen * density_multiplier.x; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati @@ -131,20 +129,20 @@ void main() // Haze color above cloud vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient) - + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + ambient) + + (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient) ); // Increase ambient when there are more clouds vec4 tmpAmbient = ambient; - tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5; + tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; // Dim sunlight by cloud shadow percentage - sunlight *= (1. - cloud_shadow.x); + sunlight *= (1. - cloud_shadow); // Haze color below cloud vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient) - + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient) + + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient) ); // Final atmosphere additive diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 51110ae4df..0c53a4ffa5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -51,12 +51,12 @@ uniform vec4 sunlight_color; uniform vec4 ambient; uniform vec4 blue_horizon; uniform vec4 blue_density; -uniform vec4 haze_horizon; -uniform vec4 haze_density; -uniform vec4 cloud_shadow; -uniform vec4 density_multiplier; -uniform vec4 distance_multiplier; -uniform vec4 max_y; +uniform float haze_horizon; +uniform float haze_density; +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float distance_multiplier; +uniform float max_y; uniform vec4 glow; uniform float scene_light_strength; uniform mat3 env_mat; @@ -159,13 +159,13 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { //sunlight attenuation effect (hue and brightness) due to atmosphere //this is used later for sunlight modulation at various altitudes - light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); //I had thought blue_density and haze_density should have equal weighting, //but attenuation due to haze_density tends to seem too strong - temp1 = blue_density + vec4(haze_density.r); + temp1 = blue_density + vec4(haze_density); blue_weight = blue_density / temp1; - haze_weight = vec4(haze_density.r) / temp1; + haze_weight = vec4(haze_density) / temp1; //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain) temp2.y = max(0.0, tmpLightnorm.y); @@ -173,12 +173,12 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { sunlight *= exp( - light_atten * temp2.y); // main atmospheric scattering line integral - temp2.z = Plen * density_multiplier.x; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) - // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati + // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati // compiler gets confused. - temp1 = exp(-temp1 * temp2.z * distance_multiplier.x); + temp1 = exp(-temp1 * temp2.z * distance_multiplier); //final atmosphere attenuation factor setAtmosAttenuation(temp1.rgb); @@ -199,7 +199,7 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { temp2.x += .25; //increase ambient when there are more clouds - vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5; + vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5; /* decrease value and saturation (that in HSV, not HSL) for occluded areas * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html @@ -213,8 +213,8 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { //haze color setAdditiveColor( - vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient) - + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x + vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient) + + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x + tmpAmbient))); //brightness of surface both sunlight and ambient diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl index 83815b1786..9629cfe824 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl @@ -61,6 +61,12 @@ uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight) { //get light vector diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl index 1660f9687e..1586aab0f2 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl @@ -63,6 +63,12 @@ uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight) { //get light vector diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl index 84c27edb26..44aaa98b97 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl @@ -60,6 +60,12 @@ uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight) { //get light vector diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index 97f3063a9e..27ea77b5a2 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -51,12 +51,12 @@ uniform vec4 sunlight_color; uniform vec4 ambient; uniform vec4 blue_horizon; uniform vec4 blue_density; -uniform vec4 haze_horizon; -uniform vec4 haze_density; -uniform vec4 cloud_shadow; -uniform vec4 density_multiplier; -uniform vec4 distance_multiplier; -uniform vec4 max_y; +uniform float haze_horizon; +uniform float haze_density; +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float distance_multiplier; +uniform float max_y; uniform vec4 glow; uniform float scene_light_strength; uniform mat3 env_mat; @@ -161,13 +161,13 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { //sunlight attenuation effect (hue and brightness) due to atmosphere //this is used later for sunlight modulation at various altitudes - light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); //I had thought blue_density and haze_density should have equal weighting, //but attenuation due to haze_density tends to seem too strong - temp1 = blue_density + vec4(haze_density.r); + temp1 = blue_density + vec4(haze_density); blue_weight = blue_density / temp1; - haze_weight = vec4(haze_density.r) / temp1; + haze_weight = vec4(haze_density) / temp1; //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain) temp2.y = max(0.0, tmpLightnorm.y); @@ -175,12 +175,12 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { sunlight *= exp( - light_atten * temp2.y); // main atmospheric scattering line integral - temp2.z = Plen * density_multiplier.x; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) - // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati + // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati // compiler gets confused. - temp1 = exp(-temp1 * temp2.z * distance_multiplier.x); + temp1 = exp(-temp1 * temp2.z * distance_multiplier); //final atmosphere attenuation factor setAtmosAttenuation(temp1.rgb); @@ -201,7 +201,7 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { temp2.x += .25; //increase ambient when there are more clouds - vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5; + vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5; /* decrease value and saturation (that in HSV, not HSL) for occluded areas * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html @@ -215,8 +215,8 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { //haze color setAdditiveColor( - vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient) - + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x + vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient) + + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x + tmpAmbient))); //brightness of surface both sunlight and ambient diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl index 6a83be1426..da3d922017 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl @@ -47,12 +47,12 @@ uniform vec4 sunlight_color; uniform vec4 ambient; uniform vec4 blue_horizon; uniform vec4 blue_density; -uniform vec4 haze_horizon; -uniform vec4 haze_density; -uniform vec4 cloud_shadow; -uniform vec4 density_multiplier; -uniform vec4 distance_multiplier; -uniform vec4 max_y; +uniform float haze_horizon; +uniform float haze_density; +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float distance_multiplier; +uniform float max_y; uniform vec4 glow; void calcAtmospherics(vec3 inPositionEye) { @@ -61,8 +61,8 @@ void calcAtmospherics(vec3 inPositionEye) { setPositionEye(P); //(TERRAIN) limit altitude - if (P.y > max_y.x) P *= (max_y.x / P.y); - if (P.y < -max_y.x) P *= (-max_y.x / P.y); + if (P.y > max_y) P *= (max_y / P.y); + if (P.y < -max_y) P *= (-max_y / P.y); vec3 tmpLightnorm = lightnorm.xyz; @@ -78,13 +78,13 @@ void calcAtmospherics(vec3 inPositionEye) { //sunlight attenuation effect (hue and brightness) due to atmosphere //this is used later for sunlight modulation at various altitudes - light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); //I had thought blue_density and haze_density should have equal weighting, //but attenuation due to haze_density tends to seem too strong - temp1 = blue_density + vec4(haze_density.r); + temp1 = blue_density + vec4(haze_density); blue_weight = blue_density / temp1; - haze_weight = vec4(haze_density.r) / temp1; + haze_weight = vec4(haze_density) / temp1; //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain) temp2.y = max(0.0, tmpLightnorm.y); @@ -92,12 +92,12 @@ void calcAtmospherics(vec3 inPositionEye) { sunlight *= exp( - light_atten * temp2.y); // main atmospheric scattering line integral - temp2.z = Plen * density_multiplier.x; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) - // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati + // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier in a variable because the ati // compiler gets confused. - temp1 = exp(-temp1 * temp2.z * distance_multiplier.x); + temp1 = exp(-temp1 * temp2.z * distance_multiplier); //final atmosphere attenuation factor setAtmosAttenuation(temp1.rgb); @@ -122,12 +122,12 @@ void calcAtmospherics(vec3 inPositionEye) { //increase ambient when there are more clouds - vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5; + vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow * 0.5; //haze color setAdditiveColor( - vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient) - + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x + vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow) + tmpAmbient) + + (haze_horizon * haze_weight) * (sunlight*(1.-cloud_shadow) * temp2.x + tmpAmbient))); //brightness of surface both sunlight and ambient diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index c5bb52169c..c1dd45cd67 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -49,18 +49,18 @@ uniform vec4 sunlight_color; uniform vec4 ambient; uniform vec4 blue_horizon; uniform vec4 blue_density; -uniform vec4 haze_horizon; -uniform vec4 haze_density; +uniform float haze_horizon; +uniform float haze_density; -uniform vec4 cloud_shadow; -uniform vec4 density_multiplier; -uniform vec4 max_y; +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float max_y; uniform vec4 glow; uniform vec4 cloud_color; -uniform vec4 cloud_scale; +uniform float cloud_scale; void main() { @@ -76,7 +76,7 @@ void main() // Set altitude if (P.y > 0.) { - P *= (max_y.x / P.y); + P *= (max_y / P.y); } else { @@ -98,12 +98,12 @@ void main() // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes - light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); // Calculate relative weights - temp1 = blue_density + haze_density.x; + temp1 = blue_density + haze_density; blue_weight = blue_density / temp1; - haze_weight = haze_density.x / temp1; + haze_weight = haze_density / temp1; // Compute sunlight from P & lightnorm (for long rays like sky) temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y ); @@ -111,7 +111,7 @@ void main() sunlight *= exp( - light_atten * temp2.y); // Distance - temp2.z = Plen * density_multiplier.x; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati @@ -135,14 +135,14 @@ void main() // Increase ambient when there are more clouds vec4 tmpAmbient = ambient; - tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5; + tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; // Dim sunlight by cloud shadow percentage - sunlight *= (1. - cloud_shadow.x); + sunlight *= (1. - cloud_shadow); // Haze color below cloud vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient) - + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient) + + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient) ); // CLOUDS @@ -163,13 +163,13 @@ void main() vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1); // Make a nice cloud density based on the cloud_shadow value that was passed in. - vary_CloudDensity = 2. * (cloud_shadow.x - 0.25); + vary_CloudDensity = 2. * (cloud_shadow - 0.25); // Texture coords vary_texcoord0 = texcoord0; vary_texcoord0.xy -= 0.5; - vary_texcoord0.xy /= cloud_scale.x; + vary_texcoord0.xy /= cloud_scale; vary_texcoord0.xy += 0.5; vary_texcoord1 = vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl index 46773cf89f..3788ddaf2d 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl @@ -42,19 +42,17 @@ uniform vec4 sunlight_color; uniform vec4 ambient; uniform vec4 blue_horizon; uniform vec4 blue_density; -uniform vec4 haze_horizon; -uniform vec4 haze_density; +uniform float haze_horizon; +uniform float haze_density; -uniform vec4 cloud_shadow; -uniform vec4 density_multiplier; -uniform vec4 max_y; +uniform float cloud_shadow; +uniform float density_multiplier; +uniform float max_y; uniform vec4 glow; uniform vec4 cloud_color; -uniform vec4 cloud_scale; - void main() { @@ -68,7 +66,7 @@ void main() // Set altitude if (P.y > 0.) { - P *= (max_y.x / P.y); + P *= (max_y / P.y); } else { @@ -87,15 +85,14 @@ void main() vec4 sunlight = sunlight_color; vec4 light_atten; - // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes - light_atten = (blue_density * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x); + light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); // Calculate relative weights - temp1 = blue_density + haze_density.x; + temp1 = blue_density + haze_density; blue_weight = blue_density / temp1; - haze_weight = haze_density.x / temp1; + haze_weight = haze_density / temp1; // Compute sunlight from P & lightnorm (for long rays like sky) temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y ); @@ -103,7 +100,7 @@ void main() sunlight *= exp( - light_atten * temp2.y); // Distance - temp2.z = Plen * density_multiplier.x; + temp2.z = Plen * density_multiplier; // Transparency (-> temp1) // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati @@ -128,20 +125,20 @@ void main() // Haze color above cloud vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient) - + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + ambient) + + (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient) ); // Increase ambient when there are more clouds vec4 tmpAmbient = ambient; - tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5; + tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; // Dim sunlight by cloud shadow percentage - sunlight *= (1. - cloud_shadow.x); + sunlight *= (1. - cloud_shadow); // Haze color below cloud vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient) - + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient) + + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient) ); // Final atmosphere additive diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 0f33d40ac3..76bb2b0976 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -42,7 +42,6 @@ RenderGamma 1 0 RenderGlowResolutionPow 1 9 RenderGround 1 1 RenderMaxPartCount 1 8192 -RenderNightBrightness 1 1.0 RenderObjectBump 1 1 RenderLocalLights 1 1 RenderReflectionDetail 1 4 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 8142311a55..5e217e000a 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -43,7 +43,6 @@ RenderGlowResolutionPow 1 9 RenderGround 1 1 RenderLocalLights 1 1 RenderMaxPartCount 1 8192 -RenderNightBrightness 1 1.0 RenderObjectBump 1 1 RenderReflectionDetail 1 4 RenderTerrainDetail 1 1 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 942c043081..915a012a39 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -43,7 +43,6 @@ RenderGlowResolutionPow 1 9 RenderGround 1 1 RenderLocalLights 1 1 RenderMaxPartCount 1 8192 -RenderNightBrightness 1 1.0 RenderObjectBump 1 1 RenderReflectionDetail 1 4 RenderTerrainDetail 1 1 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index 278d601860..ae2cf910f2 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -43,7 +43,6 @@ RenderGlowResolutionPow 1 9 RenderGround 1 1 RenderLocalLights 1 1 RenderMaxPartCount 1 8192 -RenderNightBrightness 1 1.0 RenderObjectBump 1 1 RenderReflectionDetail 1 4 RenderTerrainDetail 1 1 diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ab9b5ff436..3870a3be2e 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -169,11 +169,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) const std::string& param = sdname.asString(); - if (param == "build") - { - retval = gAgent.canEditParcel(); - } - else if (param == "speak") + if (param == "speak") { if ( gAgent.isVoiceConnected() && LLViewerParcelMgr::getInstance()->allowAgentVoice() && diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 09305a5b4d..dd02a74a38 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -817,7 +817,10 @@ void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index) if (wearable) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); + if (isAgentAvatarValid()) + { gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); + } wearable->setLabelUpdated(); } } diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 647ace7ee3..6931b55c4c 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -30,7 +30,8 @@ #include "llmemtype.h" -#include "llwindowwin32.cpp" // *FIX: for setting gIconResource. +#include "llwindowwin32.h" // *FIX: for setting gIconResource. +#include "llgl.h" #include "res/resource.h" // *FIX: for setting gIconResource. #include <fcntl.h> //_O_APPEND diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index e3217668c5..f2375bfa4f 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -188,7 +188,7 @@ void LLCallFloater::draw() // Need to resort the participant list if it's in sort by recent speaker order. if (mParticipants) - mParticipants->updateRecentSpeakersOrder(); + mParticipants->update(); LLFloater::draw(); } @@ -333,6 +333,7 @@ void LLCallFloater::refreshParticipantList() if (!non_avatar_caller) { + llassert(mParticipants == NULL); // check for possible memory leak mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false); mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1)); const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder"); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index b4c70b6edb..17181edffc 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1110,8 +1110,8 @@ LLChicletPanel::~LLChicletPanel() } } -void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ - +void LLChicletPanel::onMessageCountChanged(const LLSD& data) +{ LLUUID session_id = data["session_id"].asUUID(); S32 unread = data["participant_unread"].asInteger(); @@ -1136,7 +1136,7 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ } } -void object_chiclet_callback(const LLSD& data) +void LLChicletPanel::objectChicletCallback(const LLSD& data) { LLUUID notification_id = data["notification_id"]; bool new_message = data["new_message"]; @@ -1160,10 +1160,10 @@ void object_chiclet_callback(const LLSD& data) BOOL LLChicletPanel::postBuild() { LLPanel::postBuild(); - LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1)); - LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1)); - LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(object_chiclet_callback, _1)); - LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(object_chiclet_callback, _1)); + LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1)); + LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1)); + LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1)); + LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(&LLChicletPanel::objectChicletCallback, this, _1)); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1)); LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1)); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 4236c3f359..3973b6547a 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -1177,6 +1177,10 @@ protected: */ void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param); + void onMessageCountChanged(const LLSD& data); + + void objectChicletCallback(const LLSD& data); + typedef std::vector<LLChiclet*> chiclet_list_t; /** diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 2abfbf37ca..935dcb74b0 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -55,7 +55,7 @@ public: else { width = mEditor.getDocumentView()->getRect().getWidth() - mEditor.getHPad(); - height = llceil(mStyle->getFont()->getLineHeight()); + height = mStyle->getFont()->getLineHeight(); } return true; } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index cd33a19a2a..cfb4147e71 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1838,7 +1838,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } } - if (rebuild_color) + if (rebuild_color && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_COLOR) ) { LLFastTimer t(FTM_FACE_GEOM_COLOR); mVertexBuffer->getColorStrider(colors, mGeomIndex, mGeomCount, map_range); diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 233038daba..9664aa7dbe 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -149,7 +149,7 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y) { - S32 idx = (getRect().getHeight() - y) / ((S32) LLFontGL::getFontMonospace()->getLineHeight()+2) - 5; + S32 idx = (getRect().getHeight() - y) / (LLFontGL::getFontMonospace()->getLineHeight()+2) - 5; if (idx >= 0 && idx < (S32)ft_display_idx.size()) { @@ -552,7 +552,7 @@ void LLFastTimerView::draw() // update rectangle that includes timer bars mBarRect.mLeft = xleft; mBarRect.mRight = getRect().getWidth(); - mBarRect.mTop = ytop - ((S32)LLFontGL::getFontMonospace()->getLineHeight() + 4); + mBarRect.mTop = ytop - (LLFontGL::getFontMonospace()->getLineHeight() + 4); mBarRect.mBottom = margin + LINE_GRAPH_HEIGHT; y = ytop; @@ -846,7 +846,7 @@ void LLFastTimerView::draw() tdesc = llformat("%4.2f ms", ms); x = mGraphRect.mRight - LLFontGL::getFontMonospace()->getWidth(tdesc)-5; - y = mGraphRect.mTop - ((S32)LLFontGL::getFontMonospace()->getLineHeight()); + y = mGraphRect.mTop - LLFontGL::getFontMonospace()->getLineHeight(); LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 8024755e86..8986a694f9 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -49,7 +49,7 @@ LLFilePicker LLFilePicker::sInstance; #if LL_WINDOWS #define SOUND_FILTER L"Sounds (*.wav)\0*.wav\0" #define IMAGE_FILTER L"Images (*.tga; *.bmp; *.jpg; *.jpeg; *.png)\0*.tga;*.bmp;*.jpg;*.jpeg;*.png\0" -#define ANIM_FILTER L"Animations (*.bvh)\0*.bvh\0" +#define ANIM_FILTER L"Animations (*.bvh; *.anim)\0*.bvh;*.anim\0" #define COLLADA_FILTER L"Scene (*.dae)\0*.dae\0" #ifdef _CORY_TESTING #define GEOMETRY_FILTER L"SL Geometry (*.slg)\0*.slg\0" @@ -593,8 +593,10 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB } else if (filter == FFLOAD_ANIM) { - if (fileInfo.filetype != 'BVH ' && - (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) + if (fileInfo.filetype != 'BVH ' && + fileInfo.filetype != 'ANIM' && + (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("bvh"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) && + fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("anim"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) ) { result = false; @@ -1073,8 +1075,11 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer } // set the default path for this usage context. - picker->mContextToPathMap[picker->mCurContextName] = - gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget)); + const char* cur_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget)); + if (cur_folder != NULL) + { + picker->mContextToPathMap[picker->mCurContextName] = cur_folder; + } gtk_widget_destroy(widget); gtk_main_quit(); @@ -1196,10 +1201,14 @@ static std::string add_wav_filter_to_gtkchooser(GtkWindow *picker) LLTrans::getString("sound_files") + " (*.wav)"); } -static std::string add_bvh_filter_to_gtkchooser(GtkWindow *picker) +static std::string add_anim_filter_to_gtkchooser(GtkWindow *picker) { - return add_simple_pattern_filter_to_gtkchooser(picker, "*.bvh", - LLTrans::getString("animation_files") + " (*.bvh)"); + GtkFileFilter *gfilter = gtk_file_filter_new(); + gtk_file_filter_add_pattern(gfilter, "*.bvh"); + gtk_file_filter_add_pattern(gfilter, "*.anim"); + std::string filtername = LLTrans::getString("animation_files") + " (*.bvh; *.anim)"; + add_common_filters_to_gtkchooser(gfilter, picker, filtername); + return filtername; } static std::string add_collada_filter_to_gtkchooser(GtkWindow *picker) @@ -1351,7 +1360,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) filtername = add_wav_filter_to_gtkchooser(picker); break; case FFLOAD_ANIM: - filtername = add_bvh_filter_to_gtkchooser(picker); + filtername = add_anim_filter_to_gtkchooser(picker); break; case FFLOAD_COLLADA: filtername = add_collada_filter_to_gtkchooser(picker); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index aa66fcf9b8..0290e7cdf0 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -63,6 +63,11 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, // *TODO: Use a key to allow this not to be an effective singleton LLFloaterAvatarPicker* floater = LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker"); + if (!floater) + { + llwarns << "Cannot instantiate avatar picker" << llendl; + return NULL; + } floater->mSelectionCallback = callback; floater->setAllowMultiple(allow_multiple); diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp index 86c1bf0534..1b65d8d683 100644 --- a/indra/newview/llfloaterbuildoptions.cpp +++ b/indra/newview/llfloaterbuildoptions.cpp @@ -41,13 +41,9 @@ // Methods // -void commit_grid_mode(LLUICtrl *); - LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key) - : LLFloater(key), - mComboGridMode(NULL) + : LLFloater(key) { - mCommitCallbackRegistrar.add("GridOptions.gridMode", boost::bind(&commit_grid_mode,_1)); } LLFloaterBuildOptions::~LLFloaterBuildOptions() @@ -55,45 +51,9 @@ LLFloaterBuildOptions::~LLFloaterBuildOptions() BOOL LLFloaterBuildOptions::postBuild() { - mComboGridMode = getChild<LLComboBox>("combobox grid mode"); - return TRUE; } -void LLFloaterBuildOptions::setGridMode(EGridMode mode) -{ - mComboGridMode->setCurrentByIndex((S32)mode); -} - -void LLFloaterBuildOptions::updateGridMode() -{ - if (mComboGridMode) - { - S32 index = mComboGridMode->getCurrentIndex(); - mComboGridMode->removeall(); - - switch (mObjectSelection->getSelectType()) - { - case SELECT_TYPE_HUD: - mComboGridMode->add(getString("grid_screen_text")); - mComboGridMode->add(getString("grid_local_text")); - break; - case SELECT_TYPE_WORLD: - mComboGridMode->add(getString("grid_world_text")); - mComboGridMode->add(getString("grid_local_text")); - mComboGridMode->add(getString("grid_reference_text")); - break; - case SELECT_TYPE_ATTACHMENT: - mComboGridMode->add(getString("grid_attachment_text")); - mComboGridMode->add(getString("grid_local_text")); - mComboGridMode->add(getString("grid_reference_text")); - break; - } - - mComboGridMode->setCurrentByIndex(index); - } -} - // virtual void LLFloaterBuildOptions::onOpen(const LLSD& key) { @@ -105,10 +65,3 @@ void LLFloaterBuildOptions::onClose(bool app_quitting) { mObjectSelection = NULL; } - -void commit_grid_mode(LLUICtrl *ctrl) -{ - LLComboBox* combo = (LLComboBox*)ctrl; - - LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex()); -} diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h index 7f3811bf1c..02c56cb6a9 100644 --- a/indra/newview/llfloaterbuildoptions.h +++ b/indra/newview/llfloaterbuildoptions.h @@ -35,7 +35,6 @@ #include "llfloater.h" #include "llselectmgr.h" -class LLComboBox; class LLObjectSelection; typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle; @@ -44,23 +43,17 @@ class LLFloaterBuildOptions : public LLFloater { public: - virtual BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - void setGridMode(EGridMode mode); - void updateGridMode(); - private: - friend class LLFloaterReg; LLFloaterBuildOptions(const LLSD& key); ~LLFloaterBuildOptions(); - LLComboBox* mComboGridMode; LLObjectSelectionHandle mObjectSelection; }; #endif diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index ee8487b160..087b0007e1 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -239,8 +239,9 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, // Compute icon for this item BOOL item_is_multi = FALSE; - if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED + if (( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) + && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK)) { item_is_multi = TRUE; } diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 2a3512e21a..b050a638dc 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -1,6 +1,6 @@ /** - * @file llfloateranimpreview.cpp - * @brief LLFloaterAnimPreview class implementation + * @file llfloaterbvhpreview.cpp + * @brief LLFloaterBvhPreview class implementation * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ * Second Life Viewer Source Code @@ -26,7 +26,7 @@ #include "llviewerprecompiledheaders.h" -#include "llfloateranimpreview.h" +#include "llfloaterbvhpreview.h" #include "llbvhloader.h" #include "lldatapacker.h" @@ -115,9 +115,9 @@ std::string STATUS[] = }; //----------------------------------------------------------------------------- -// LLFloaterAnimPreview() +// LLFloaterBvhPreview() //----------------------------------------------------------------------------- -LLFloaterAnimPreview::LLFloaterAnimPreview(const std::string& filename) : +LLFloaterBvhPreview::LLFloaterBvhPreview(const std::string& filename) : LLFloaterNameDesc(filename) { mLastMouseX = 0; @@ -153,35 +153,35 @@ LLFloaterAnimPreview::LLFloaterAnimPreview(const std::string& filename) : //----------------------------------------------------------------------------- // setAnimCallbacks() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::setAnimCallbacks() +void LLFloaterBvhPreview::setAnimCallbacks() { - getChild<LLUICtrl>("playback_slider")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onSliderMove, this)); + getChild<LLUICtrl>("playback_slider")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onSliderMove, this)); - getChild<LLUICtrl>("preview_base_anim")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitBaseAnim, this)); + getChild<LLUICtrl>("preview_base_anim")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitBaseAnim, this)); getChild<LLUICtrl>("preview_base_anim")->setValue("Standing"); - getChild<LLUICtrl>("priority")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitPriority, this)); - getChild<LLUICtrl>("loop_check")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitLoop, this)); - getChild<LLUICtrl>("loop_in_point")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitLoopIn, this)); - getChild<LLUICtrl>("loop_in_point")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateLoopIn, this, _1)); - getChild<LLUICtrl>("loop_out_point")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitLoopOut, this)); - getChild<LLUICtrl>("loop_out_point")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateLoopOut, this, _1)); + getChild<LLUICtrl>("priority")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitPriority, this)); + getChild<LLUICtrl>("loop_check")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoop, this)); + getChild<LLUICtrl>("loop_in_point")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoopIn, this)); + getChild<LLUICtrl>("loop_in_point")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopIn, this, _1)); + getChild<LLUICtrl>("loop_out_point")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoopOut, this)); + getChild<LLUICtrl>("loop_out_point")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopOut, this, _1)); - getChild<LLUICtrl>("hand_pose_combo")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitHandPose, this)); + getChild<LLUICtrl>("hand_pose_combo")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitHandPose, this)); - getChild<LLUICtrl>("emote_combo")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitEmote, this)); + getChild<LLUICtrl>("emote_combo")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEmote, this)); getChild<LLUICtrl>("emote_combo")->setValue("[None]"); - getChild<LLUICtrl>("ease_in_time")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitEaseIn, this)); - getChild<LLUICtrl>("ease_in_time")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateEaseIn, this, _1)); - getChild<LLUICtrl>("ease_out_time")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitEaseOut, this)); - getChild<LLUICtrl>("ease_out_time")->setValidateBeforeCommit( boost::bind(&LLFloaterAnimPreview::validateEaseOut, this, _1)); + getChild<LLUICtrl>("ease_in_time")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEaseIn, this)); + getChild<LLUICtrl>("ease_in_time")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateEaseIn, this, _1)); + getChild<LLUICtrl>("ease_out_time")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitEaseOut, this)); + getChild<LLUICtrl>("ease_out_time")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateEaseOut, this, _1)); } //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterAnimPreview::postBuild() +BOOL LLFloaterBvhPreview::postBuild() { LLKeyframeMotion* motionp = NULL; LLBVHLoader* loaderp = NULL; @@ -191,7 +191,7 @@ BOOL LLFloaterAnimPreview::postBuild() return FALSE; } - getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterAnimPreview::onCommitName, this)); + getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitName, this)); childSetAction("ok_btn", onBtnOK, this); setDefaultBtn(); @@ -203,15 +203,15 @@ BOOL LLFloaterAnimPreview::postBuild() mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f); mPlayButton = getChild<LLButton>( "play_btn"); - mPlayButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnPlay, this)); + mPlayButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnPlay, this)); mPlayButton->setVisible(true); mPauseButton = getChild<LLButton>( "pause_btn"); - mPauseButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnPause, this)); + mPauseButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnPause, this)); mPauseButton->setVisible(false); mStopButton = getChild<LLButton>( "stop_btn"); - mStopButton->setClickedCallback(boost::bind(&LLFloaterAnimPreview::onBtnStop, this)); + mStopButton->setClickedCallback(boost::bind(&LLFloaterBvhPreview::onBtnStop, this)); getChildView("bad_animation_text")->setVisible(FALSE); @@ -363,9 +363,9 @@ BOOL LLFloaterAnimPreview::postBuild() } //----------------------------------------------------------------------------- -// LLFloaterAnimPreview() +// LLFloaterBvhPreview() //----------------------------------------------------------------------------- -LLFloaterAnimPreview::~LLFloaterAnimPreview() +LLFloaterBvhPreview::~LLFloaterBvhPreview() { mAnimPreview = NULL; @@ -375,7 +375,7 @@ LLFloaterAnimPreview::~LLFloaterAnimPreview() //----------------------------------------------------------------------------- // draw() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::draw() +void LLFloaterBvhPreview::draw() { LLFloater::draw(); LLRect r = getRect(); @@ -414,7 +414,7 @@ void LLFloaterAnimPreview::draw() //----------------------------------------------------------------------------- // resetMotion() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::resetMotion() +void LLFloaterBvhPreview::resetMotion() { LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); BOOL paused = avatarp->areAnimationsPaused(); @@ -450,7 +450,7 @@ void LLFloaterAnimPreview::resetMotion() //----------------------------------------------------------------------------- // handleMouseDown() //----------------------------------------------------------------------------- -BOOL LLFloaterAnimPreview::handleMouseDown(S32 x, S32 y, MASK mask) +BOOL LLFloaterBvhPreview::handleMouseDown(S32 x, S32 y, MASK mask) { if (mPreviewRect.pointInRect(x, y)) { @@ -468,7 +468,7 @@ BOOL LLFloaterAnimPreview::handleMouseDown(S32 x, S32 y, MASK mask) //----------------------------------------------------------------------------- // handleMouseUp() //----------------------------------------------------------------------------- -BOOL LLFloaterAnimPreview::handleMouseUp(S32 x, S32 y, MASK mask) +BOOL LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask) { gFocusMgr.setMouseCapture(FALSE); gViewerWindow->showCursor(); @@ -478,7 +478,7 @@ BOOL LLFloaterAnimPreview::handleMouseUp(S32 x, S32 y, MASK mask) //----------------------------------------------------------------------------- // handleHover() //----------------------------------------------------------------------------- -BOOL LLFloaterAnimPreview::handleHover(S32 x, S32 y, MASK mask) +BOOL LLFloaterBvhPreview::handleHover(S32 x, S32 y, MASK mask) { MASK local_mask = mask & ~MASK_ALT; @@ -533,7 +533,7 @@ BOOL LLFloaterAnimPreview::handleHover(S32 x, S32 y, MASK mask) //----------------------------------------------------------------------------- // handleScrollWheel() //----------------------------------------------------------------------------- -BOOL LLFloaterAnimPreview::handleScrollWheel(S32 x, S32 y, S32 clicks) +BOOL LLFloaterBvhPreview::handleScrollWheel(S32 x, S32 y, S32 clicks) { mAnimPreview->zoom((F32)clicks * -0.2f); mAnimPreview->requestUpdate(); @@ -544,7 +544,7 @@ BOOL LLFloaterAnimPreview::handleScrollWheel(S32 x, S32 y, S32 clicks) //----------------------------------------------------------------------------- // onMouseCaptureLost() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onMouseCaptureLost() +void LLFloaterBvhPreview::onMouseCaptureLost() { gViewerWindow->showCursor(); } @@ -552,7 +552,7 @@ void LLFloaterAnimPreview::onMouseCaptureLost() //----------------------------------------------------------------------------- // onBtnPlay() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onBtnPlay() +void LLFloaterBvhPreview::onBtnPlay() { if (!getEnabled()) return; @@ -576,7 +576,7 @@ void LLFloaterAnimPreview::onBtnPlay() //----------------------------------------------------------------------------- // onBtnPause() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onBtnPause() +void LLFloaterBvhPreview::onBtnPause() { if (!getEnabled()) return; @@ -598,7 +598,7 @@ void LLFloaterAnimPreview::onBtnPause() //----------------------------------------------------------------------------- // onBtnStop() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onBtnStop() +void LLFloaterBvhPreview::onBtnStop() { if (!getEnabled()) return; @@ -614,7 +614,7 @@ void LLFloaterAnimPreview::onBtnStop() //----------------------------------------------------------------------------- // onSliderMove() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onSliderMove() +void LLFloaterBvhPreview::onSliderMove() { if (!getEnabled()) return; @@ -639,7 +639,7 @@ void LLFloaterAnimPreview::onSliderMove() //----------------------------------------------------------------------------- // onCommitBaseAnim() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitBaseAnim() +void LLFloaterBvhPreview::onCommitBaseAnim() { if (!getEnabled()) return; @@ -668,7 +668,7 @@ void LLFloaterAnimPreview::onCommitBaseAnim() //----------------------------------------------------------------------------- // onCommitLoop() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitLoop() +void LLFloaterBvhPreview::onCommitLoop() { if (!getEnabled()) return; @@ -687,7 +687,7 @@ void LLFloaterAnimPreview::onCommitLoop() //----------------------------------------------------------------------------- // onCommitLoopIn() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitLoopIn() +void LLFloaterBvhPreview::onCommitLoopIn() { if (!getEnabled()) return; @@ -707,7 +707,7 @@ void LLFloaterAnimPreview::onCommitLoopIn() //----------------------------------------------------------------------------- // onCommitLoopOut() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitLoopOut() +void LLFloaterBvhPreview::onCommitLoopOut() { if (!getEnabled()) return; @@ -727,7 +727,7 @@ void LLFloaterAnimPreview::onCommitLoopOut() //----------------------------------------------------------------------------- // onCommitName() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitName() +void LLFloaterBvhPreview::onCommitName() { if (!getEnabled()) return; @@ -746,7 +746,7 @@ void LLFloaterAnimPreview::onCommitName() //----------------------------------------------------------------------------- // onCommitHandPose() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitHandPose() +void LLFloaterBvhPreview::onCommitHandPose() { if (!getEnabled()) return; @@ -757,7 +757,7 @@ void LLFloaterAnimPreview::onCommitHandPose() //----------------------------------------------------------------------------- // onCommitEmote() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitEmote() +void LLFloaterBvhPreview::onCommitEmote() { if (!getEnabled()) return; @@ -768,7 +768,7 @@ void LLFloaterAnimPreview::onCommitEmote() //----------------------------------------------------------------------------- // onCommitPriority() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitPriority() +void LLFloaterBvhPreview::onCommitPriority() { if (!getEnabled()) return; @@ -782,7 +782,7 @@ void LLFloaterAnimPreview::onCommitPriority() //----------------------------------------------------------------------------- // onCommitEaseIn() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitEaseIn() +void LLFloaterBvhPreview::onCommitEaseIn() { if (!getEnabled()) return; @@ -797,7 +797,7 @@ void LLFloaterAnimPreview::onCommitEaseIn() //----------------------------------------------------------------------------- // onCommitEaseOut() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onCommitEaseOut() +void LLFloaterBvhPreview::onCommitEaseOut() { if (!getEnabled()) return; @@ -812,7 +812,7 @@ void LLFloaterAnimPreview::onCommitEaseOut() //----------------------------------------------------------------------------- // validateEaseIn() //----------------------------------------------------------------------------- -bool LLFloaterAnimPreview::validateEaseIn(const LLSD& data) +bool LLFloaterBvhPreview::validateEaseIn(const LLSD& data) { if (!getEnabled()) return false; @@ -832,7 +832,7 @@ bool LLFloaterAnimPreview::validateEaseIn(const LLSD& data) //----------------------------------------------------------------------------- // validateEaseOut() //----------------------------------------------------------------------------- -bool LLFloaterAnimPreview::validateEaseOut(const LLSD& data) +bool LLFloaterBvhPreview::validateEaseOut(const LLSD& data) { if (!getEnabled()) return false; @@ -852,7 +852,7 @@ bool LLFloaterAnimPreview::validateEaseOut(const LLSD& data) //----------------------------------------------------------------------------- // validateLoopIn() //----------------------------------------------------------------------------- -bool LLFloaterAnimPreview::validateLoopIn(const LLSD& data) +bool LLFloaterBvhPreview::validateLoopIn(const LLSD& data) { if (!getEnabled()) return false; @@ -880,7 +880,7 @@ bool LLFloaterAnimPreview::validateLoopIn(const LLSD& data) //----------------------------------------------------------------------------- // validateLoopOut() //----------------------------------------------------------------------------- -bool LLFloaterAnimPreview::validateLoopOut(const LLSD& data) +bool LLFloaterBvhPreview::validateLoopOut(const LLSD& data) { if (!getEnabled()) return false; @@ -909,7 +909,7 @@ bool LLFloaterAnimPreview::validateLoopOut(const LLSD& data) //----------------------------------------------------------------------------- // refresh() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::refresh() +void LLFloaterBvhPreview::refresh() { // Are we showing the play button (default) or the pause button? bool show_play = true; @@ -958,9 +958,9 @@ void LLFloaterAnimPreview::refresh() //----------------------------------------------------------------------------- // onBtnOK() //----------------------------------------------------------------------------- -void LLFloaterAnimPreview::onBtnOK(void* userdata) +void LLFloaterBvhPreview::onBtnOK(void* userdata) { - LLFloaterAnimPreview* floaterp = (LLFloaterAnimPreview*)userdata; + LLFloaterBvhPreview* floaterp = (LLFloaterBvhPreview*)userdata; if (!floaterp->getEnabled()) return; if (floaterp->mAnimPreview) diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloaterbvhpreview.h index f1ffb6547f..b81cc6e3a5 100644 --- a/indra/newview/llfloateranimpreview.h +++ b/indra/newview/llfloaterbvhpreview.h @@ -1,6 +1,6 @@ /** - * @file llfloateranimpreview.h - * @brief LLFloaterAnimPreview class definition + * @file llfloaterbvhpreview.h + * @brief LLFloaterBvhPreview class definition * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ * Second Life Viewer Source Code @@ -24,14 +24,15 @@ * $/LicenseInfo$ */ -#ifndef LL_LLFLOATERANIMPREVIEW_H -#define LL_LLFLOATERANIMPREVIEW_H +#ifndef LL_LLFLOATERBVHPREVIEW_H +#define LL_LLFLOATERBVHPREVIEW_H #include "llassettype.h" #include "llfloaternamedesc.h" #include "lldynamictexture.h" #include "llcharacter.h" #include "llquaternion.h" +#include "llextendedstatus.h" class LLVOAvatar; class LLViewerJointMesh; @@ -67,11 +68,11 @@ protected: LLPointer<LLVOAvatar> mDummyAvatar; }; -class LLFloaterAnimPreview : public LLFloaterNameDesc +class LLFloaterBvhPreview : public LLFloaterNameDesc { public: - LLFloaterAnimPreview(const std::string& filename); - virtual ~LLFloaterAnimPreview(); + LLFloaterBvhPreview(const std::string& filename); + virtual ~LLFloaterBvhPreview(); BOOL postBuild(); @@ -128,4 +129,4 @@ protected: std::map<std::string, LLUUID> mIDList; }; -#endif // LL_LLFLOATERANIMPREVIEW_H +#endif // LL_LLFLOATERBVHPREVIEW_H diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp index abee7b5dc9..352361ce9e 100644 --- a/indra/newview/llfloatereditsky.cpp +++ b/indra/newview/llfloatereditsky.cpp @@ -151,8 +151,8 @@ void LLFloaterEditSky::initCallbacks(void) getChild<LLUICtrl>("WLBlueHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, ¶m_mgr.mBlueHorizon)); // haze density, horizon, mult, and altitude - getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, ¶m_mgr.mHazeDensity)); - getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, ¶m_mgr.mHazeHorizon)); + getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, ¶m_mgr.mHazeDensity)); + getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, ¶m_mgr.mHazeHorizon)); getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, ¶m_mgr.mDensityMult)); getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, ¶m_mgr.mMaxAlt)); @@ -220,15 +220,14 @@ void LLFloaterEditSky::syncControls() setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE); // haze density, horizon, mult, and altitude - param_mgr->mHazeDensity = cur_params.getVector(param_mgr->mHazeDensity.mName, err); - childSetValue("WLHazeDensity", param_mgr->mHazeDensity.r); - param_mgr->mHazeHorizon = cur_params.getVector(param_mgr->mHazeHorizon.mName, err); - childSetValue("WLHazeHorizon", param_mgr->mHazeHorizon.r); - param_mgr->mDensityMult = cur_params.getVector(param_mgr->mDensityMult.mName, err); - childSetValue("WLDensityMult", param_mgr->mDensityMult.x * - param_mgr->mDensityMult.mult); - param_mgr->mMaxAlt = cur_params.getVector(param_mgr->mMaxAlt.mName, err); - childSetValue("WLMaxAltitude", param_mgr->mMaxAlt.x); + param_mgr->mHazeDensity = cur_params.getFloat(param_mgr->mHazeDensity.mName, err); + childSetValue("WLHazeDensity", (F32) param_mgr->mHazeDensity); + param_mgr->mHazeHorizon = cur_params.getFloat(param_mgr->mHazeHorizon.mName, err); + childSetValue("WLHazeHorizon", (F32) param_mgr->mHazeHorizon); + param_mgr->mDensityMult = cur_params.getFloat(param_mgr->mDensityMult.mName, err); + childSetValue("WLDensityMult", ((F32) param_mgr->mDensityMult) * param_mgr->mDensityMult.mult); + param_mgr->mMaxAlt = cur_params.getFloat(param_mgr->mMaxAlt.mName, err); + childSetValue("WLMaxAltitude", (F32) param_mgr->mMaxAlt); // blue density param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err); @@ -273,10 +272,10 @@ void LLFloaterEditSky::syncControls() childSetValue("WLCloudDetailDensity", param_mgr->mCloudDetail.b); // Cloud extras - param_mgr->mCloudCoverage = cur_params.getVector(param_mgr->mCloudCoverage.mName, err); - param_mgr->mCloudScale = cur_params.getVector(param_mgr->mCloudScale.mName, err); - childSetValue("WLCloudCoverage", param_mgr->mCloudCoverage.x); - childSetValue("WLCloudScale", param_mgr->mCloudScale.x); + param_mgr->mCloudCoverage = cur_params.getFloat(param_mgr->mCloudCoverage.mName, err); + param_mgr->mCloudScale = cur_params.getFloat(param_mgr->mCloudScale.mName, err); + childSetValue("WLCloudCoverage", (F32) param_mgr->mCloudCoverage); + childSetValue("WLCloudScale", (F32) param_mgr->mCloudScale); // cloud scrolling bool lockX = !param_mgr->mCurParams.getEnableCloudScrollX(); @@ -306,13 +305,13 @@ void LLFloaterEditSky::syncControls() childSetValue("WLCloudScrollX", param_mgr->mCurParams.getCloudScrollX() - 10.0f); childSetValue("WLCloudScrollY", param_mgr->mCurParams.getCloudScrollY() - 10.0f); - param_mgr->mDistanceMult = cur_params.getVector(param_mgr->mDistanceMult.mName, err); - childSetValue("WLDistanceMult", param_mgr->mDistanceMult.x); + param_mgr->mDistanceMult = cur_params.getFloat(param_mgr->mDistanceMult.mName, err); + childSetValue("WLDistanceMult", (F32) param_mgr->mDistanceMult); // Tweak extras - param_mgr->mWLGamma = cur_params.getVector(param_mgr->mWLGamma.mName, err); - childSetValue("WLGamma", param_mgr->mWLGamma.x); + param_mgr->mWLGamma = cur_params.getFloat(param_mgr->mWLGamma.mName, err); + childSetValue("WLGamma", (F32) param_mgr->mWLGamma); childSetValue("WLStarAlpha", param_mgr->mCurParams.getStarBrightness()); } diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 895e16adef..4f2a6ec1b7 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -312,3 +312,9 @@ bool LLFloaterMediaSettings::haveValuesChanged() const return values_changed; } +bool LLFloaterMediaSettings::instanceExists() +{ + return LLFloaterReg::findTypedInstance<LLFloaterMediaSettings>("media_settings"); +} + + diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index ecc55d2cbc..1d25530986 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -45,6 +45,7 @@ public: /*virtual*/ void onClose(bool app_quitting); static LLFloaterMediaSettings* getInstance(); + static bool instanceExists(); static void apply(); static void initValues( const LLSD& media_settings , bool editable); static void clearValues( bool editable); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 9122e5a8f5..7448f2bb2a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -4525,7 +4525,17 @@ void LLModelPreview::updateStatusMessages() } } - if (mFMP->childGetValue("physics_lod_combo").asString() == "From file") + + LLCtrlSelectionInterface* iface = fmp->childGetSelectionInterface("physics_lod_combo"); + S32 which_mode = 0; + S32 file_mode = 1; + if (iface) + { + which_mode = iface->getFirstSelectedIndex(); + file_mode = iface->getItemCount() - 1; + } + + if (which_mode == file_mode) { mFMP->childEnable("physics_file"); mFMP->childEnable("physics_browse"); diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 66f0fc3cd7..27b1c3b9cd 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -207,6 +207,25 @@ BOOL LLFloaterSoundPreview::postBuild() //----------------------------------------------------------------------------- +// LLFloaterAnimPreview() +//----------------------------------------------------------------------------- + +LLFloaterAnimPreview::LLFloaterAnimPreview(const LLSD& filename ) + : LLFloaterNameDesc(filename) +{ +} + +BOOL LLFloaterAnimPreview::postBuild() +{ + if (!LLFloaterNameDesc::postBuild()) + { + return FALSE; + } + getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); + return TRUE; +} + +//----------------------------------------------------------------------------- // LLFloaterScriptPreview() //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h index 69bbccaf80..41643681ac 100644 --- a/indra/newview/llfloaternamedesc.h +++ b/indra/newview/llfloaternamedesc.h @@ -64,6 +64,13 @@ public: virtual BOOL postBuild(); }; +class LLFloaterAnimPreview : public LLFloaterNameDesc +{ +public: + LLFloaterAnimPreview(const LLSD& filename ); + virtual BOOL postBuild(); +}; + class LLFloaterScriptPreview : public LLFloaterNameDesc { public: diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index caf4a305b3..1c29323594 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -741,7 +741,8 @@ void LLFloaterPreference::onClose(bool app_quitting) void LLFloaterPreference::onOpenHardwareSettings() { - LLFloaterReg::showInstance("prefs_hardware_settings"); + LLFloater* floater = LLFloaterReg::showInstance("prefs_hardware_settings"); + addDependentFloater(floater, FALSE); } // static void LLFloaterPreference::onBtnOK() @@ -1801,7 +1802,46 @@ void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) } } +class LLPanelPreferencePrivacy : public LLPanelPreference +{ +public: + LLPanelPreferencePrivacy() + { + mAccountIndependentSettings.push_back("VoiceCallsFriendsOnly"); + mAccountIndependentSettings.push_back("AutoDisengageMic"); + } + + /*virtual*/ void saveSettings() + { + LLPanelPreference::saveSettings(); + + // Don't save (=erase from the saved values map) per-account privacy settings + // if we're not logged in, otherwise they will be reset to defaults on log off. + if (LLStartUp::getStartupState() != STATE_STARTED) + { + // Erase only common settings, assuming there are no color settings on Privacy page. + for (control_values_map_t::iterator it = mSavedValues.begin(); it != mSavedValues.end(); ) + { + const std::string setting = it->first->getName(); + if (std::find(mAccountIndependentSettings.begin(), + mAccountIndependentSettings.end(), setting) == mAccountIndependentSettings.end()) + { + mSavedValues.erase(it++); + } + else + { + ++it; + } + } + } + } + +private: + std::list<std::string> mAccountIndependentSettings; +}; + static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics"); +static LLRegisterPanelClassWrapper<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy"); BOOL LLPanelPreferenceGraphics::postBuild() { diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 7ee3294478..ec5994e917 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -198,15 +198,17 @@ public: virtual void saveSettings(); class Updater; + +protected: + typedef std::map<LLControlVariable*, LLSD> control_values_map_t; + control_values_map_t mSavedValues; + private: //for "Only friends and groups can call or IM me" static void showFriendsOnlyWarning(LLUICtrl*, const LLSD&); //for "Show my Favorite Landmarks at Login" static void showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LLSD& value); - typedef std::map<LLControlVariable*, LLSD> control_values_map_t; - control_values_map_t mSavedValues; - typedef std::map<std::string, LLColor4> string_color_map_t; string_color_map_t mSavedColors; diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index c402de66e8..ae45949b4a 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -33,6 +33,7 @@ #include "llfloater.h" #include "llhost.h" #include "llpanel.h" +#include "llextendedstatus.h" #include "llenvmanager.h" // for LLEnvironmentSettings diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index cd98f7be57..7d68431710 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -31,6 +31,7 @@ #include "llfloater.h" #include "lluuid.h" #include "v3math.h" +#include "llextendedstatus.h" class LLAvatarName; class LLMessageSystem; diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index a0d1a32e12..b691db1049 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -106,7 +106,11 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: if (objectp) { objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI)); - floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]); + floater_label = llformat("%s(%.0f, %.0f, %.0f)", + user_name.c_str(), + objectp->getPositionRegion().mV[VX], + objectp->getPositionRegion().mV[VY], + objectp->getPositionRegion().mV[VZ]); } else { diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index 977fdbbc46..96b5c6b09b 100644 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -59,7 +59,10 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na LLView* view = findChildView(panel_name, true); if (!view) return NULL; + if (!getVisible()) + { openFloater(); + } LLPanel* panel = NULL; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index bd5b5f4eb0..6978e6a430 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -36,6 +36,7 @@ #include "llagentcamera.h" #include "llbutton.h" #include "llcheckboxctrl.h" +#include "llcombobox.h" #include "lldraghandle.h" #include "llerror.h" #include "llfloaterbuildoptions.h" @@ -103,6 +104,7 @@ const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] = // Local prototypes +void commit_grid_mode(LLUICtrl *ctrl); void commit_select_component(void *data); void click_show_more(void*); void click_popup_info(void*); @@ -252,6 +254,7 @@ BOOL LLFloaterTools::postBuild() getChild<LLUICtrl>("checkbox uniform")->setValue((BOOL)gSavedSettings.getBOOL("ScaleUniform")); mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures"); getChild<LLUICtrl>("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures")); + mComboGridMode = getChild<LLComboBox>("combobox grid mode"); mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label"); // @@ -330,6 +333,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mCheckSnapToGrid(NULL), mBtnGridOptions(NULL), mTitleMedia(NULL), + mComboGridMode(NULL), mCheckStretchUniform(NULL), mCheckStretchTexture(NULL), mCheckStretchUniformLabel(NULL), @@ -386,6 +390,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mCommitCallbackRegistrar.add("BuildTool.commitRadioMove", boost::bind(&commit_radio_group_move,_1)); mCommitCallbackRegistrar.add("BuildTool.commitRadioEdit", boost::bind(&commit_radio_group_edit,_1)); + mCommitCallbackRegistrar.add("BuildTool.gridMode", boost::bind(&commit_grid_mode,_1)); mCommitCallbackRegistrar.add("BuildTool.selectComponent", boost::bind(&commit_select_component, this)); mCommitCallbackRegistrar.add("BuildTool.gridOptions", boost::bind(&LLFloaterTools::onClickGridOptions,this)); mCommitCallbackRegistrar.add("BuildTool.applyToSelection", boost::bind(&click_apply_to_selection, this)); @@ -687,6 +692,33 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mRadioGroupEdit->setValue("radio select face"); } + if (mComboGridMode) + { + mComboGridMode->setVisible( edit_visible ); + S32 index = mComboGridMode->getCurrentIndex(); + mComboGridMode->removeall(); + + switch (mObjectSelection->getSelectType()) + { + case SELECT_TYPE_HUD: + mComboGridMode->add(getString("grid_screen_text")); + mComboGridMode->add(getString("grid_local_text")); + break; + case SELECT_TYPE_WORLD: + mComboGridMode->add(getString("grid_world_text")); + mComboGridMode->add(getString("grid_local_text")); + mComboGridMode->add(getString("grid_reference_text")); + break; + case SELECT_TYPE_ATTACHMENT: + mComboGridMode->add(getString("grid_attachment_text")); + mComboGridMode->add(getString("grid_local_text")); + mComboGridMode->add(getString("grid_reference_text")); + break; + } + + mComboGridMode->setCurrentByIndex(index); + } + // Snap to grid disabled for grab tool - very confusing if (mCheckSnapToGrid) mCheckSnapToGrid->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ ); if (mBtnGridOptions) mBtnGridOptions->setVisible( edit_visible /* || tool == LLToolGrab::getInstance() */ ); @@ -1037,6 +1069,13 @@ void LLFloaterTools::setObjectType( LLPCode pcode ) gFocusMgr.setMouseCapture(NULL); } +void commit_grid_mode(LLUICtrl *ctrl) +{ + LLComboBox* combo = (LLComboBox*)ctrl; + + LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex()); +} + void LLFloaterTools::onClickGridOptions() { @@ -1144,7 +1183,7 @@ void LLFloaterTools::updateLandImpacts() childSetTextArg("remaining_capacity", "[CAPACITY_STRING]", remaining_capacity_str); // Update land impacts info in the weights floater - LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::getTypedInstance<LLFloaterObjectWeights>("object_weights"); + LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::findTypedInstance<LLFloaterObjectWeights>("object_weights"); if(object_weights_floater) { object_weights_floater->updateLandImpacts(parcel); @@ -1234,6 +1273,7 @@ void LLFloaterTools::getMediaState() } } func; + // check if all faces have media(or, all dont have media) LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo = selected_objects->getSelectedTEValue( &func, bool_has_media ); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 63ed9dc82b..7a19d093a4 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -33,6 +33,7 @@ class LLButton; class LLCheckBoxCtrl; +class LLComboBox; class LLPanelPermissions; class LLPanelObject; class LLPanelVolume; @@ -140,6 +141,7 @@ public: LLCheckBoxCtrl* mCheckSnapToGrid; LLButton* mBtnGridOptions; + LLComboBox* mComboGridMode; LLCheckBoxCtrl* mCheckStretchUniform; LLCheckBoxCtrl* mCheckStretchTexture; diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index 428a02e9f0..1a17183efd 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -293,6 +293,6 @@ void LLFloaterTranslationSettings::onBtnOK() gSavedSettings.setString("TranslationService", getSelectedService()); gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey()); gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey()); - LLNearbyChatBar::getInstance()->enableTranslationCheckbox(LLTranslate::isTranslationConfigured()); + LLNearbyChatBar::getInstance()->showTranslationCheckbox(LLTranslate::isTranslationConfigured()); closeFloater(false); } diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index d54f04475f..f375443e38 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -252,7 +252,7 @@ LLFolderView::LLFolderView(const Params& p) LLRect new_r = LLRect(rect.mLeft + ICON_PAD, rect.mTop - TEXT_PAD, rect.mRight, - rect.mTop - TEXT_PAD - llfloor(font->getLineHeight())); + rect.mTop - TEXT_PAD - font->getLineHeight()); text_p.rect(new_r); text_p.name(std::string(p.name)); text_p.font(font); @@ -385,7 +385,7 @@ void LLFolderView::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); -// This view grows and shinks to enclose all of its children items and folders. +// This view grows and shrinks to enclose all of its children items and folders. S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_generation ) { if (getListener()->getUUID().notNull()) @@ -411,7 +411,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen getRoot()->getFilter()->getShowFolderState(); S32 total_width = LEFT_PAD; - S32 running_height = mDebugFilters ? llceil(LLFontGL::getFontMonospace()->getLineHeight()) : 0; + S32 running_height = mDebugFilters ? LLFontGL::getFontMonospace()->getLineHeight() : 0; S32 target_height = running_height; S32 parent_item_height = getRect().getHeight(); @@ -527,12 +527,12 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) width = llmax(mMinWidth, scroll_rect.getWidth()); height = llmax(mRunningHeight, scroll_rect.getHeight()); - // restrict width with scroll container's width - if (mUseEllipses) + // Restrict width within scroll container's width + if (mUseEllipses && mScrollContainer) + { width = scroll_rect.getWidth(); - + } LLView::reshape(width, height, called_from_parent); - mReshapeSignal(mSelectedItems, FALSE); } @@ -909,7 +909,7 @@ void LLFolderView::draw() } else if (mShowEmptyMessage) { - if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) + if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) { mStatusText = LLTrans::getString("Searching"); } @@ -1920,9 +1920,9 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // by the folder which is the hierarchy root. if (!handled && getListener()->getUUID().notNull()) - { - handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - } + { + handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } if (handled) { @@ -1953,7 +1953,7 @@ void LLFolderView::scrollToShowSelection() // However we allow scrolling for folder views with mAutoSelectOverride // (used in Places SP) as an exception because the selection in them // is not reset during items filtering. See STORM-133. - if ( (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mAutoSelectOverride) + if ( (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mAutoSelectOverride) && mSelectedItems.size() ) { mNeedsScroll = TRUE; @@ -1981,7 +1981,7 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr LLRect visible_doc_rect = mScrollContainer->getVisibleContentRect(); S32 icon_height = mIcon.isNull() ? 0 : mIcon->getHeight(); - S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); + S32 label_height = getLabelFontForStyle(mLabelStyle)->getLineHeight(); // when navigating with keyboard, only move top of opened folder on screen, otherwise show whole folder S32 max_height_to_show = item->isOpen() && mScrollContainer->hasFocus() ? (llmax( icon_height, label_height ) + ICON_PAD) : local_rect.getHeight(); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index ab1794ff15..c2dec4ab27 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -410,8 +410,8 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo } -// Finds width and height of this object and it's children. Also -// makes sure that this view and it's children are the right size. +// Finds width and height of this object and its children. Also +// makes sure that this view and its children are the right size. S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) { const Params& p = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); @@ -422,7 +422,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) : 0; if (mLabelWidthDirty) { - mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mSearchableLabel); + mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + TEXT_PAD_RIGHT; mLabelWidthDirty = false; } @@ -1044,7 +1044,7 @@ void LLFolderViewItem::draw() } if ((mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) - || (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() + || (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && root_is_loading && mShowLoadStatus)) { diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 2fc79f5765..4e8dc2da16 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -114,6 +114,7 @@ public: static const S32 ICON_PAD = 2; static const S32 ICON_WIDTH = 16; static const S32 TEXT_PAD = 1; + static const S32 TEXT_PAD_RIGHT = 4; static const S32 ARROW_SIZE = 12; static const S32 MAX_FOLDER_ITEM_OVERLAP = 2; // animation parameters diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index bbf66ca750..129cddda45 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -123,6 +123,22 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask) return handled; } +// virtual +BOOL LLGroupList::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + BOOL handled = LLView::handleDoubleClick(x, y, mask); + // Handle double click only for the selected item in the list, skip clicks on empty space. + if (handled) + { + if (mDoubleClickSignal) + { + (*mDoubleClickSignal)(this, x, y, mask); + } + } + + return handled; +} + void LLGroupList::setNameFilter(const std::string& filter) { std::string filter_upper = filter; diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index d7051db891..8abf14b3d0 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -51,6 +51,7 @@ public: virtual void draw(); // from LLView /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); // from LLView + /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); // from LLView void setNameFilter(const std::string& filter); void toggleIcons(); diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 122711a86d..dff310ecf9 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -138,7 +138,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f)); F32 right_x; - font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x); + font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x); LLUI::popMatrix(); gGL.popMatrix(); diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 24a876c59a..579b6008ae 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -227,7 +227,7 @@ void LLHUDText::renderText() segment_iter != mTextSegments.end(); ++segment_iter ) { const LLFontGL* fontp = segment_iter->mFont; - y_offset -= fontp->getLineHeight(); + y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics U8 style = segment_iter->mStyle; LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW; @@ -480,8 +480,6 @@ void LLHUDText::updateSize() F32 width = 0.f; S32 max_lines = getMaxLines(); - //S32 lines = (max_lines < 0) ? (S32)mTextSegments.size() : llmin((S32)mTextSegments.size(), max_lines); - //F32 height = (F32)mFontp->getLineHeight() * (lines + mLabelSegments.size()); S32 start_segment; if (max_lines < 0) start_segment = 0; @@ -491,7 +489,7 @@ void LLHUDText::updateSize() while (iter != mTextSegments.end()) { const LLFontGL* fontp = iter->mFont; - height += fontp->getLineHeight(); + height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); ++iter; } diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp index 1437d0747c..c7034aea3a 100644 --- a/indra/newview/llimhandler.cpp +++ b/indra/newview/llimhandler.cpp @@ -41,7 +41,7 @@ LLIMHandler::LLIMHandler() : LLSysHandler("IM Notifications", "notifytoast") { // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); + mChannel = LLChannelManager::getInstance()->createNotificationChannel()->getHandle(); } //-------------------------------------------------------------------------- @@ -54,51 +54,51 @@ void LLIMHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLIMHandler::processNotification(const LLNotificationPtr& notification) { - if(!mChannel) + if(mChannel.isDead()) { return false; } // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } - LLSD substitutions = notification->getSubstitutions(); - - // According to comments in LLIMMgr::addMessage(), if we get message - // from ourselves, the sender id is set to null. This fixes EXT-875. - LLUUID avatar_id = substitutions["FROM_ID"].asUUID(); - if (avatar_id.isNull()) - avatar_id = gAgentID; - - LLToastIMPanel::Params im_p; - im_p.notification = notification; - im_p.avatar_id = avatar_id; - im_p.from = substitutions["FROM"].asString(); - im_p.time = substitutions["TIME"].asString(); - im_p.message = substitutions["MESSAGE"].asString(); - im_p.session_id = substitutions["SESSION_ID"].asUUID(); - - LLToastIMPanel* im_box = new LLToastIMPanel(im_p); - - LLToast::Params p; - p.notif_id = notification->getID(); - p.session_id = im_p.session_id; - p.notification = notification; - p.panel = im_box; - p.can_be_stored = false; - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); - if(channel) - channel->addToast(p); - + LLSD substitutions = notification->getSubstitutions(); + + // According to comments in LLIMMgr::addMessage(), if we get message + // from ourselves, the sender id is set to null. This fixes EXT-875. + LLUUID avatar_id = substitutions["FROM_ID"].asUUID(); + if (avatar_id.isNull()) + avatar_id = gAgentID; + + LLToastIMPanel::Params im_p; + im_p.notification = notification; + im_p.avatar_id = avatar_id; + im_p.from = substitutions["FROM"].asString(); + im_p.time = substitutions["TIME"].asString(); + im_p.message = substitutions["MESSAGE"].asString(); + im_p.session_id = substitutions["SESSION_ID"].asUUID(); + + LLToastIMPanel* im_box = new LLToastIMPanel(im_p); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.session_id = im_p.session_id; + p.notification = notification; + p.panel = im_box; + p.can_be_stored = false; + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); + } return false; } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a856bd0bdc..a7c4618fa4 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -171,8 +171,8 @@ void LLIMModel::setActiveSessionID(const LLUUID& session_id) LLIMModel::LLIMModel() { - addNewMsgCallback(LLIMFloater::newIMCallback); - addNewMsgCallback(toast_callback); + addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1)); + addNewMsgCallback(boost::bind(&toast_callback, _1)); } LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) @@ -2458,7 +2458,10 @@ void LLIMMgr::addMessage( make_ui_sound("UISndNewIncomingIMSession"); } - if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat)) + bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && + LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); + + if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message) { LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); } @@ -2977,6 +2980,17 @@ bool LLIMMgr::isVoiceCall(const LLUUID& session_id) return im_session->mStartedAsIMCall; } +void LLIMMgr::addNotifiedNonFriendSessionID(const LLUUID& session_id) +{ + mNotifiedNonFriendSessions.insert(session_id); +} + +bool LLIMMgr::isNonFriendSessionNotified(const LLUUID& session_id) +{ + return mNotifiedNonFriendSessions.end() != mNotifiedNonFriendSessions.find(session_id); + +} + void LLIMMgr::noteOfflineUsers( const LLUUID& session_id, const LLDynamicArray<LLUUID>& ids) diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index b1be26a169..7c2cd03d97 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -153,7 +153,6 @@ public: std::map<LLUUID, LLIMSession*> mId2SessionMap; typedef boost::signals2::signal<void(const LLSD&)> session_signal_t; - typedef boost::function<void(const LLSD&)> session_callback_t; session_signal_t mNewMsgSignal; session_signal_t mNoUnreadMsgsSignal; @@ -174,8 +173,8 @@ public: */ void processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id); - boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); } - boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); } + boost::signals2::connection addNewMsgCallback(const session_signal_t::slot_type& cb ) { return mNewMsgSignal.connect(cb); } + boost::signals2::connection addNoUnreadMsgsCallback(const session_signal_t::slot_type& cb ) { return mNoUnreadMsgsSignal.connect(cb); } /** * Create new session object in a model @@ -438,6 +437,10 @@ public: bool isVoiceCall(const LLUUID& session_id); + void addNotifiedNonFriendSessionID(const LLUUID& session_id); + + bool isNonFriendSessionNotified(const LLUUID& session_id); + private: /** @@ -465,6 +468,14 @@ private: typedef std::list <LLIMSessionObserver *> session_observers_list_t; session_observers_list_t mSessionObservers; + // EXP-901 + // If "Only friends and groups can IM me" option is ON but the user got message from non-friend, + // the user should be notified that to be able to see this message the option should be OFF. + // This set stores session IDs in which user was notified. Need to store this IDs so that the user + // be notified only one time per session with non-friend. + typedef std::set<LLUUID> notified_non_friend_sessions_t; + notified_non_friend_sessions_t mNotifiedNonFriendSessions; + LLSD mPendingInvitations; LLSD mPendingAgentListUpdates; }; diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp index d7b82667d1..f4fe5dec01 100644 --- a/indra/newview/llinspecttoast.cpp +++ b/indra/newview/llinspecttoast.cpp @@ -72,6 +72,8 @@ LLInspectToast::LLInspectToast(const LLSD& notification_id) : LLInspectToast::~LLInspectToast() { LLTransientFloaterMgr::getInstance()->removeControlView(this); + + mConnection.disconnect(); } // virtual diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index c0065a94e6..2de2b17373 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -113,6 +113,13 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response bool confirm_attachment_rez(const LLSD& notification, const LLSD& response); void teleport_via_landmark(const LLUUID& asset_id); static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); +static bool check_category(LLInventoryModel* model, + const LLUUID& cat_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter); +static bool check_item(const LLUUID& item_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter); // Helper functions @@ -148,7 +155,7 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, mInvType(LLInventoryType::IT_NONE), mIsLink(FALSE) { - mInventoryPanel = inventory->getHandle(); + mInventoryPanel = inventory->getInventoryPanelHandle(); const LLInventoryObject* obj = getInventoryObject(); mIsLink = obj && obj->getIsLinkType(); } @@ -798,7 +805,7 @@ LLInventoryObject* LLInvFVBridge::getInventoryObject() const LLInventoryModel* LLInvFVBridge::getInventoryModel() const { - LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); + LLInventoryPanel* panel = mInventoryPanel.get(); return panel ? panel->getModel() : NULL; } @@ -1324,8 +1331,8 @@ void LLItemBridge::selectItem() LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem()); if(item && !item->isFinished()) { - item->fetchFromServer(); - //LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); + //item->fetchFromServer(); + LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); } } @@ -1738,7 +1745,7 @@ BOOL LLFolderBridge::isItemRemovable() const return FALSE; } - LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); + LLInventoryPanel* panel = mInventoryPanel.get(); LLFolderViewFolder* folderp = dynamic_cast<LLFolderViewFolder*>(panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL); if (folderp) { @@ -1959,6 +1966,12 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (!isAgentAvatarValid()) return FALSE; if (!isAgentInventory()) return FALSE; // cannot drag categories into library + LLInventoryPanel* destination_panel = mInventoryPanel.get(); + if (!destination_panel) return false; + + LLInventoryFilter* filter = destination_panel->getFilter(); + if (!filter) return false; + const LLUUID &cat_id = inv_cat->getUUID(); const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); @@ -2096,7 +2109,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // NOTE: The cargo id's count is a total of categories AND items but we err on the side of // prevention rather than letting too many folders into the hierarchy of the outbox, // when we're dragging the item to a new parent - dragged_folder_count += LLToolDragAndDrop::instance().getCargoIDsCount(); + dragged_folder_count += LLToolDragAndDrop::instance().getCargoCount(); } } @@ -2146,6 +2159,39 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } + if (is_movable) + { + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + is_movable = active_panel != NULL; + + // For a folder to pass the filter all its descendants are required to pass. + // We make this exception to allow reordering folders within an inventory panel, + // which has a filter applied, like Recent tab for example. + // There may be folders which are displayed because some of their descendants pass + // the filter, but other don't, and thus remain hidden. Without this check, + // such folders would not be allowed to be moved within a panel. + if (destination_panel == active_panel) + { + is_movable = true; + } + else + { + LLFolderView* active_folder_view = NULL; + + if (is_movable) + { + active_folder_view = active_panel->getRootFolder(); + is_movable = active_folder_view != NULL; + } + + if (is_movable) + { + // Check whether the folder being dragged from active inventory panel + // passes the filter of the destination panel. + is_movable = check_category(model, cat_id, active_folder_view, filter); + } + } + } // //-------------------------------------------------------------------------------- @@ -2240,7 +2286,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else { - accept = move_inv_category_world_to_agent(cat_id, mUUID, drop); + accept = move_inv_category_world_to_agent(cat_id, mUUID, drop, NULL, NULL, filter); } } else if (LLToolDragAndDrop::SOURCE_LIBRARY == source) @@ -2285,7 +2331,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, BOOL drop, void (*callback)(S32, void*), - void* user_data) + void* user_data, + LLInventoryFilter* filter) { // Make sure the object exists. If we allowed dragging from // anonymous objects, it would be possible to bypass @@ -2309,7 +2356,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, return FALSE; } - BOOL accept = TRUE; + BOOL accept = FALSE; BOOL is_move = FALSE; // coming from a task. Need to figure out if the person can @@ -2318,9 +2365,16 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, LLInventoryObject::object_list_t::iterator end = inventory_objects.end(); for ( ; it != end; ++it) { + LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(it->get()); + if (!item) + { + llwarns << "Invalid inventory item for drop" << llendl; + continue; + } + // coming from a task. Need to figure out if the person can // move/copy this item. - LLPermissions perm(((LLInventoryItem*)((LLInventoryObject*)(*it)))->getPermissions()); + LLPermissions perm(item->getPermissions()); if((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) @@ -2335,9 +2389,14 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, is_move = TRUE; accept = TRUE; } - else + + if (filter && accept) + { + accept = filter->check(item); + } + + if (!accept) { - accept = FALSE; break; } } @@ -2820,18 +2879,62 @@ void LLFolderBridge::pasteFromClipboard() if(model && isClipboardPasteable()) { const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); + const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - - const LLUUID parent_id(mUUID); + const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); LLDynamicArray<LLUUID> objects; LLInventoryClipboard::instance().retrieve(objects); + + if (move_is_into_outbox) + { + LLFolderViewItem * outbox_itemp = mRoot->getItemByID(mUUID); + + if (outbox_itemp) + { + LLToolDragAndDrop::instance().setCargoCount(objects.size()); + + BOOL can_list = TRUE; + + for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin(); + (iter != objects.end()) && (can_list == TRUE); + ++iter) + { + const LLUUID& item_id = (*iter); + LLInventoryItem *item = model->getItem(item_id); + + if (item) + { + MASK mask = 0x0; + BOOL drop = FALSE; + EDragAndDropType cargo_type = LLViewerAssetType::lookupDragAndDropType(item->getActualType()); + void * cargo_data = (void *) item; + std::string tooltip_msg; + + can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + } + } + + LLToolDragAndDrop::instance().resetCargoCount(); + + if (can_list == FALSE) + { + // Notify user of failure somehow -- play error sound? modal dialog? + return; + } + } + } + + const LLUUID parent_id(mUUID); + for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) { const LLUUID& item_id = (*iter); + LLInventoryItem *item = model->getItem(item_id); if (item) { @@ -2874,8 +2977,17 @@ void LLFolderBridge::pasteLinkFromClipboard() if(model) { const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); + const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); + + if (move_is_into_outbox) + { + // Notify user of failure somehow -- play error sound? modal dialog? + return; + } const LLUUID parent_id(mUUID); @@ -3290,7 +3402,7 @@ void LLFolderBridge::createNewCategory(void* user_data) { LLFolderBridge* bridge = (LLFolderBridge*)user_data; if(!bridge) return; - LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(bridge->mInventoryPanel.get()); + LLInventoryPanel* panel = bridge->mInventoryPanel.get(); if (!panel) return; LLInventoryModel* model = panel->getModel(); if(!model) return; @@ -3470,7 +3582,7 @@ void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item) // use callback to rearrange favorite landmarks after adding // to have new one placed before target (on which it was dropped). See EXT-4312. LLPointer<AddFavoriteLandmarkCallback> cb = new AddFavoriteLandmarkCallback(); - LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); + LLInventoryPanel* panel = mInventoryPanel.get(); LLFolderViewItem* drag_over_item = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL; if (drag_over_item && drag_over_item->getListener()) { @@ -3520,6 +3632,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (!isAgentInventory()) return FALSE; // cannot drag into library if (!isAgentAvatarValid()) return FALSE; + LLInventoryPanel* destination_panel = mInventoryPanel.get(); + if (!destination_panel) return false; + + LLInventoryFilter* filter = destination_panel->getFilter(); + if (!filter) return false; + const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE, false); const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false); @@ -3529,7 +3647,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, const BOOL move_is_into_favorites = (mUUID == favorites_id); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); - const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); //(mUUID == outbox_id); + const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_item->getUUID(), outbox_id); LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); @@ -3608,7 +3726,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); - int existing_item_count = LLToolDragAndDrop::instance().getCargoIDsCount(); + int existing_item_count = LLToolDragAndDrop::instance().getCargoCount(); if (master_folder != NULL) { @@ -3628,6 +3746,21 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } } + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + + // Check whether the item being dragged from active inventory panel + // passes the filter of the destination panel. + if (accept && active_panel) + { + LLFolderView* active_folder_view = active_panel->getRootFolder(); + if (!active_folder_view) return false; + + LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID()); + if (!fv_item) return false; + + accept = filter->check(fv_item); + } + if (accept && drop) { if (inv_item->getType() == LLAssetType::AT_GESTURE @@ -3637,15 +3770,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } // If an item is being dragged between windows, unselect everything in the active window // so that we don't follow the selection to its new location (which is very annoying). - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - if (active_panel) - { - LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); - if (active_panel && (panel != active_panel)) + if (active_panel && (destination_panel != active_panel)) { active_panel->unSelectAll(); } - } //-------------------------------------------------------------------------------- // Destination folder logic @@ -3655,8 +3783,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // (only reorder the item in Favorites folder) if ((mUUID == inv_item->getParentUUID()) && move_is_into_favorites) { - LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); - LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL; + LLFolderViewItem* itemp = destination_panel->getRootFolder()->getDraggingOverItem(); if (itemp) { LLUUID srcItemId = inv_item->getUUID(); @@ -3760,6 +3887,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = FALSE; } + // Check whether the item being dragged from in world + // passes the filter of the destination panel. + if (accept) + { + accept = filter->check(inv_item); + } + if (accept && drop) { LLMoveInv* move_inv = new LLMoveInv; @@ -3797,6 +3931,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = !(move_is_into_current_outfit || move_is_into_outfit); } + // Check whether the item being dragged from notecard + // passes the filter of the destination panel. + if (accept) + { + accept = filter->check(inv_item); + } + if (accept && drop) { copy_inventory_from_notecard(mUUID, // Drop to the chosen destination folder @@ -3828,6 +3969,21 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = can_move_to_landmarks(inv_item); } + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + + // Check whether the item being dragged from the library + // passes the filter of the destination panel. + if (accept && active_panel) + { + LLFolderView* active_folder_view = active_panel->getRootFolder(); + if (!active_folder_view) return false; + + LLFolderViewItem* fv_item = active_folder_view->getItemByID(inv_item->getUUID()); + if (!fv_item) return false; + + accept = filter->check(fv_item); + } + if (accept && drop) { // FAVORITES folder @@ -3862,6 +4018,69 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, return accept; } +// static +bool check_category(LLInventoryModel* model, + const LLUUID& cat_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter) +{ + if (!model || !active_folder_view || !filter) + return false; + + if (!filter->checkFolder(cat_id)) + { + return false; + } + + LLInventoryModel::cat_array_t descendent_categories; + LLInventoryModel::item_array_t descendent_items; + model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE); + + S32 num_descendent_categories = descendent_categories.count(); + S32 num_descendent_items = descendent_items.count(); + + if (num_descendent_categories + num_descendent_items == 0) + { + // Empty folder should be checked as any other folder view item. + // If we are filtering by date the folder should not pass because + // it doesn't have its own creation date. See LLInvFVBridge::getCreationDate(). + return check_item(cat_id, active_folder_view, filter); + } + + for (S32 i = 0; i < num_descendent_categories; ++i) + { + LLInventoryCategory* category = descendent_categories[i]; + if(!check_category(model, category->getUUID(), active_folder_view, filter)) + { + return false; + } + } + + for (S32 i = 0; i < num_descendent_items; ++i) + { + LLViewerInventoryItem* item = descendent_items[i]; + if(!check_item(item->getUUID(), active_folder_view, filter)) + { + return false; + } + } + + return true; +} + +// static +bool check_item(const LLUUID& item_id, + LLFolderView* active_folder_view, + LLInventoryFilter* filter) +{ + if (!active_folder_view || !filter) return false; + + LLFolderViewItem* fv_item = active_folder_view->getItemByID(item_id); + if (!fv_item) return false; + + return filter->check(fv_item); +} + // +=================================================+ // | LLTextureBridge | // +=================================================+ @@ -4184,7 +4403,7 @@ LLCallingCardBridge::~LLCallingCardBridge() void LLCallingCardBridge::refreshFolderViewItem() { - LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); + LLInventoryPanel* panel = mInventoryPanel.get(); LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getItemByID(mUUID) : NULL; if (itemp) { @@ -4633,14 +4852,14 @@ void LLAnimationBridge::performAction(LLInventoryModel* model, std::string actio { if (getItem()) { - LLPreviewAnim::e_activation_type activate = LLPreviewAnim::NONE; - if ("playworld" == action) activate = LLPreviewAnim::PLAY; - if ("playlocal" == action) activate = LLPreviewAnim::AUDITION; + LLSD::String activate = "NONE"; + if ("playworld" == action) activate = "Inworld"; + if ("playlocal" == action) activate = "Locally"; LLPreviewAnim* preview = LLFloaterReg::showTypedInstance<LLPreviewAnim>("preview_anim", LLSD(mUUID)); if (preview) { - preview->activate(activate); + preview->play(activate); } } } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 871657a58a..3b4f845f54 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -35,6 +35,7 @@ #include "llviewercontrol.h" #include "llwearable.h" +class LLInventoryFilter; class LLInventoryPanel; class LLInventoryModel; class LLMenuGL; @@ -161,7 +162,7 @@ protected: BOOL restamp); void removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch); protected: - LLHandle<LLPanel> mInventoryPanel; + LLHandle<LLInventoryPanel> mInventoryPanel; LLFolderView* mRoot; const LLUUID mUUID; // item id LLInventoryType::EType mInvType; @@ -645,7 +646,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, BOOL drop, void (*callback)(S32, void*) = NULL, - void* user_data = NULL); + void* user_data = NULL, + LLInventoryFilter* filter = NULL); // Utility function to hide all entries except those in the list // Can be called multiple times on the same menu (e.g. if multiple items diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index d54bce4619..5496c273f2 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -108,16 +108,48 @@ BOOL LLInventoryFilter::check(const LLFolderViewItem* item) return passed; } -bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) +bool LLInventoryFilter::check(const LLInventoryItem* item) { - // we're showing all folders, overriding filter - if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) + mSubStringMatchOffset = mFilterSubString.size() ? item->getName().find(mFilterSubString) : std::string::npos; + + const bool passed_filtertype = checkAgainstFilterType(item); + const bool passed_permissions = checkAgainstPermissions(item); + const bool passed = (passed_filtertype && + passed_permissions && + (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)); + + return passed; +} + +bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder) const +{ + if (!folder) { - return true; + llwarns << "The filter can not be checked on an invalid folder." << llendl; + llassert(false); // crash in development builds + return false; } const LLFolderViewEventListener* listener = folder->getListener(); + if (!listener) + { + llwarns << "Folder view event listener not found." << llendl; + llassert(false); // crash in development builds + return false; + } + const LLUUID folder_id = listener->getUUID(); + + return checkFolder(folder_id); +} + +bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const +{ + // we're showing all folders, overriding filter + if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS) + { + return true; + } if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY) { @@ -227,6 +259,56 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con return TRUE; } +bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) const +{ + LLInventoryType::EType object_type = item->getInventoryType(); + const LLUUID object_id = item->getUUID(); + + const U32 filterTypes = mFilterOps.mFilterTypes; + + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_OBJECT + // Pass if this item's type is of the correct filter type + if (filterTypes & FILTERTYPE_OBJECT) + { + // If it has no type, pass it, unless it's a link. + if (object_type == LLInventoryType::IT_NONE) + { + if (item && item->getIsLinkType()) + { + return false; + } + } + else if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) + { + return false; + } + } + + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_UUID + // Pass if this item is the target UUID or if it links to the target UUID + if (filterTypes & FILTERTYPE_UUID) + { + if (!item) return false; + + if (item->getLinkedUUID() != mFilterOps.mFilterUUID) + return false; + } + + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_DATE + // Pass if this item is within the date range. + if (filterTypes & FILTERTYPE_DATE) + { + // We don't get the updated item creation date for the task inventory or + // a notecard embedded item. See LLTaskInvFVBridge::getCreationDate(). + return false; + } + + return true; +} + BOOL LLInventoryFilter::checkAgainstPermissions(const LLFolderViewItem* item) const { const LLFolderViewEventListener* listener = item->getListener(); @@ -244,6 +326,17 @@ BOOL LLInventoryFilter::checkAgainstPermissions(const LLFolderViewItem* item) co return (perm & mFilterOps.mPermissions) == mFilterOps.mPermissions; } +bool LLInventoryFilter::checkAgainstPermissions(const LLInventoryItem* item) const +{ + if (!item) return false; + + LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); + PermissionMask perm = new_item->getPermissionMask(); + new_item = NULL; + + return (perm & mFilterOps.mPermissions) == mFilterOps.mPermissions; +} + BOOL LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewItem* item) const { const LLFolderViewEventListener* listener = item->getListener(); @@ -464,7 +557,9 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date) mFilterOps.mMaxDate = llmax(mFilterOps.mMinDate, max_date); setModified(); } - mFilterOps.mFilterTypes |= FILTERTYPE_DATE; + + areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE + : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE; } void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) @@ -476,10 +571,12 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) } if (!sl && isSinceLogoff()) { - setDateRange(0, time_max()); + setDateRange(time_min(), time_max()); setModified(); } - mFilterOps.mFilterTypes |= FILTERTYPE_DATE; + + areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE + : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE; } BOOL LLInventoryFilter::isSinceLogoff() const @@ -524,7 +621,9 @@ void LLInventoryFilter::setHoursAgo(U32 hours) setModified(FILTER_RESTART); } } - mFilterOps.mFilterTypes |= FILTERTYPE_DATE; + + areDateLimitsSet() ? mFilterOps.mFilterTypes |= FILTERTYPE_DATE + : mFilterOps.mFilterTypes &= ~FILTERTYPE_DATE; } void LLInventoryFilter::setFilterLinks(U64 filter_links) @@ -804,7 +903,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() + if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() && filtered_by_type && !filtered_by_all_types) { @@ -974,3 +1073,10 @@ const std::string& LLInventoryFilter::getEmptyLookupMessage() const return mEmptyLookupMessage; } + +bool LLInventoryFilter::areDateLimitsSet() +{ + return mFilterOps.mMinDate != time_min() + || mFilterOps.mMaxDate != time_max() + || mFilterOps.mHoursAgo != 0; +} diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index bba24ac652..6be2acfaa3 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -32,6 +32,7 @@ class LLFolderViewItem; class LLFolderViewFolder; +class LLInventoryItem; class LLInventoryFilter { @@ -115,9 +116,13 @@ public: // + Execution And Results // +-------------------------------------------------------------------+ BOOL check(const LLFolderViewItem* item); - bool checkFolder(const LLFolderViewFolder* folder); + bool check(const LLInventoryItem* item); + bool checkFolder(const LLFolderViewFolder* folder) const; + bool checkFolder(const LLUUID& folder_id) const; BOOL checkAgainstFilterType(const LLFolderViewItem* item) const; + bool checkAgainstFilterType(const LLInventoryItem* item) const; BOOL checkAgainstPermissions(const LLFolderViewItem* item) const; + bool checkAgainstPermissions(const LLInventoryItem* item) const; BOOL checkAgainstFilterLinks(const LLFolderViewItem* item) const; std::string::size_type getStringMatchOffset() const; @@ -175,6 +180,8 @@ public: void fromLLSD(LLSD& data); private: + bool areDateLimitsSet(); + struct FilterOps { FilterOps(); diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 91fdd67806..f4d0110b0f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -43,6 +43,7 @@ const S32 MAX_FETCH_RETRIES = 10; LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : mBackgroundFetchActive(FALSE), + mFolderFetchActive(false), mAllFoldersFetched(FALSE), mRecursiveInventoryFetchStarted(FALSE), mRecursiveLibraryFetchStarted(FALSE), @@ -50,7 +51,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : mMinTimeBetweenFetches(0.3f), mMaxTimeBetweenFetches(10.f), mTimelyFetchPending(FALSE), - mBulkFetchCount(0) + mFetchCount(0) { } @@ -60,7 +61,7 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const { - return mFetchQueue.empty() && mBulkFetchCount<=0; + return mFetchQueue.empty() && mFetchCount<=0; } bool LLInventoryModelBackgroundFetch::libraryFetchStarted() const @@ -98,19 +99,21 @@ bool LLInventoryModelBackgroundFetch::isEverythingFetched() const return mAllFoldersFetched; } -BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const +BOOL LLInventoryModelBackgroundFetch::folderFetchActive() const { - return mBackgroundFetchActive; + return mFolderFetchActive; } -void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive) +void LLInventoryModelBackgroundFetch::start(const LLUUID& id, BOOL recursive) { - if (!mAllFoldersFetched || cat_id.notNull()) - { - LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL; + LLViewerInventoryCategory* cat = gInventory.getCategory(id); + if (cat || (id.isNull() && !isEverythingFetched())) + { // it's a folder, do a bulk fetch + LL_DEBUGS("InventoryFetch") << "Start fetching category: " << id << ", recursive: " << recursive << LL_ENDL; mBackgroundFetchActive = TRUE; - if (cat_id.isNull()) + mFolderFetchActive = true; + if (id.isNull()) { if (!mRecursiveInventoryFetchStarted) { @@ -128,41 +131,41 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive else { // Specific folder requests go to front of queue. - if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id) + if (mFetchQueue.empty() || mFetchQueue.front().mUUID != id) { - mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive)); + mFetchQueue.push_front(FetchQueueInfo(id, recursive)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } - if (cat_id == gInventory.getLibraryRootFolderID()) + if (id == gInventory.getLibraryRootFolderID()) { mRecursiveLibraryFetchStarted |= recursive; } - if (cat_id == gInventory.getRootFolderID()) + if (id == gInventory.getRootFolderID()) { mRecursiveInventoryFetchStarted |= recursive; } } } + else if (LLViewerInventoryItem* itemp = gInventory.getItem(id)) + { + if (!itemp->mIsComplete && (mFetchQueue.empty() || mFetchQueue.front().mUUID != id)) + { + mBackgroundFetchActive = TRUE; + + mFetchQueue.push_front(FetchQueueInfo(id, false, false)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } + } } void LLInventoryModelBackgroundFetch::findLostItems() { mBackgroundFetchActive = TRUE; + mFolderFetchActive = true; mFetchQueue.push_back(FetchQueueInfo(LLUUID::null, TRUE)); gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } -void LLInventoryModelBackgroundFetch::stopBackgroundFetch() -{ - if (mBackgroundFetchActive) - { - mBackgroundFetchActive = FALSE; - gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - mBulkFetchCount=0; - mMinTimeBetweenFetches=0.0f; - } -} - void LLInventoryModelBackgroundFetch::setAllFoldersFetched() { if (mRecursiveInventoryFetchStarted && @@ -170,7 +173,7 @@ void LLInventoryModelBackgroundFetch::setAllFoldersFetched() { mAllFoldersFetched = TRUE; } - stopBackgroundFetch(); + mFolderFetchActive = false; } void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *) @@ -183,10 +186,9 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (mBackgroundFetchActive && gAgent.getRegion()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents2"); - if (gSavedSettings.getBOOL("UseHTTPInventory") && !url.empty()) + if (gSavedSettings.getBOOL("UseHTTPInventory")) { - bulkFetch(url); + bulkFetch(); return; } @@ -201,6 +203,9 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() llinfos << "Inventory fetch completed" << llendl; setAllFoldersFetched(); + mBackgroundFetchActive = false; + mFolderFetchActive = false; + return; } @@ -230,80 +235,114 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } const FetchQueueInfo info = mFetchQueue.front(); - LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID); - // Category has been deleted, remove from queue. - if (!cat) + if (info.mIsCategory) { - mFetchQueue.pop_front(); - continue; - } + + LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); + + // Category has been deleted, remove from queue. + if (!cat) + { + mFetchQueue.pop_front(); + continue; + } - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && - LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - // Category exists but has no children yet, fetch the descendants - // for now, just request every time and rely on retry timer to throttle. - if (cat->fetch()) + if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && + LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) { - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; + // Category exists but has no children yet, fetch the descendants + // for now, just request every time and rely on retry timer to throttle. + if (cat->fetch()) + { + mFetchTimer.reset(); + mTimelyFetchPending = TRUE; + } + else + { + // The catagory also tracks if it has expired and here it says it hasn't + // yet. Get out of here because nothing is going to happen until we + // update the timers. + break; + } } - else + // Do I have all my children? + else if (gInventory.isCategoryComplete(info.mUUID)) { - // The catagory also tracks if it has expired and here it says it hasn't - // yet. Get out of here because nothing is going to happen until we - // update the timers. + // Finished with this category, remove from queue. + mFetchQueue.pop_front(); + + // Add all children to queue. + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); + } + + // We received a response in less than the fast time. + if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) + { + // Shrink timeouts based on success. + mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); + mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); + lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + } + + mTimelyFetchPending = FALSE; + continue; + } + else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) + { + // Received first packet, but our num descendants does not match db's num descendants + // so try again later. + mFetchQueue.pop_front(); + + if (mNumFetchRetries++ < MAX_FETCH_RETRIES) + { + // push on back of queue + mFetchQueue.push_back(info); + } + mTimelyFetchPending = FALSE; + mFetchTimer.reset(); break; } + + // Not enough time has elapsed to do a new fetch + break; } - // Do I have all my children? - else if (gInventory.isCategoryComplete(info.mCatUUID)) + else { - // Finished with this category, remove from queue. - mFetchQueue.pop_front(); + LLViewerInventoryItem* itemp = gInventory.getItem(info.mUUID); - // Add all children to queue. - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) + mFetchQueue.pop_front(); + if (!itemp) { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); + continue; } - // We received a response in less than the fast time. - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) + if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches) { - // Shrink timeouts based on success. - mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); - mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); - lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + itemp->fetchFromServer(); + mFetchTimer.reset(); + mTimelyFetchPending = TRUE; } - - mTimelyFetchPending = FALSE; - continue; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - // Received first packet, but our num descendants does not match db's num descendants - // so try again later. - mFetchQueue.pop_front(); - - if (mNumFetchRetries++ < MAX_FETCH_RETRIES) + else if (itemp->mIsComplete) + { + mTimelyFetchPending = FALSE; + } + else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) { - // push on back of queue mFetchQueue.push_back(info); + mFetchTimer.reset(); + mTimelyFetchPending = FALSE; } - mTimelyFetchPending = FALSE; - mFetchTimer.reset(); + // Not enough time has elapsed to do a new fetch break; } - - // Not enough time has elapsed to do a new fetch - break; } // @@ -313,15 +352,35 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } } -void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching) +void LLInventoryModelBackgroundFetch::incrFetchCount(S16 fetching) { - mBulkFetchCount += fetching; - if (mBulkFetchCount < 0) + mFetchCount += fetching; + if (mFetchCount < 0) { - mBulkFetchCount = 0; + mFetchCount = 0; } } +class LLInventoryModelFetchItemResponder : public LLInventoryModel::fetchInventoryResponder +{ +public: + LLInventoryModelFetchItemResponder(const LLSD& request_sd) : LLInventoryModel::fetchInventoryResponder(request_sd) {}; + void result(const LLSD& content); + void error(U32 status, const std::string& reason); +}; + +void LLInventoryModelFetchItemResponder::result( const LLSD& content ) +{ + LLInventoryModel::fetchInventoryResponder::result(content); + LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1); +} + +void LLInventoryModelFetchItemResponder::error( U32 status, const std::string& reason ) +{ + LLInventoryModel::fetchInventoryResponder::error(status, reason); + LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1); +} + class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder { @@ -458,7 +517,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) } } - fetcher->incrBulkFetch(-1); + fetcher->incrFetchCount(-1); if (fetcher->isBulkFetchProcessingComplete()) { @@ -477,7 +536,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str llinfos << "LLInventoryModelFetchDescendentsResponder::error " << status << ": " << reason << llendl; - fetcher->incrBulkFetch(-1); + fetcher->incrFetchCount(-1); if (status==499) // timed out { @@ -508,12 +567,13 @@ BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat // Bundle up a bunch of requests to send all at once. // static -void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) +void LLInventoryModelBackgroundFetch::bulkFetch() { //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. - //Stopbackgroundfetch will be run from the Responder instead of here. + LLViewerRegion* region = gAgent.getRegion(); + if (!region) return; S16 max_concurrent_fetches=8; F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely. @@ -523,12 +583,13 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) } if (gDisconnected || - (mBulkFetchCount > max_concurrent_fetches) || + (mFetchCount > max_concurrent_fetches) || (mFetchTimer.getElapsedTimeF32() < mMinTimeBetweenFetches)) { return; // just bail if we are disconnected } + U32 item_count=0; U32 folder_count=0; U32 max_batch_size=5; @@ -536,83 +597,159 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) uuid_vec_t recursive_cats; - LLSD body; - LLSD body_lib; + LLSD folder_request_body; + LLSD folder_request_body_lib; + LLSD item_request_body; + LLSD item_request_body_lib; - while (!(mFetchQueue.empty()) && (folder_count < max_batch_size)) + while (!mFetchQueue.empty() + && (item_count + folder_count) < max_batch_size) { const FetchQueueInfo& fetch_info = mFetchQueue.front(); - const LLUUID &cat_id = fetch_info.mCatUUID; - if (cat_id.isNull()) //DEV-17797 - { - LLSD folder_sd; - folder_sd["folder_id"] = LLUUID::null.asString(); - folder_sd["owner_id"] = gAgent.getID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - body["folders"].append(folder_sd); - folder_count++; - } - else - { - const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (fetch_info.mIsCategory) + { + const LLUUID &cat_id = fetch_info.mUUID; + if (cat_id.isNull()) //DEV-17797 + { + LLSD folder_sd; + folder_sd["folder_id"] = LLUUID::null.asString(); + folder_sd["owner_id"] = gAgent.getID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + folder_request_body["folders"].append(folder_sd); + folder_count++; + } + else + { + const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - if (cat) - { - if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - LLSD folder_sd; - folder_sd["folder_id"] = cat->getUUID(); - folder_sd["owner_id"] = cat->getOwnerID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - - if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) - body_lib["folders"].append(folder_sd); - else - body["folders"].append(folder_sd); - folder_count++; - } - // May already have this folder, but append child folders to list. - if (fetch_info.mRecursive) - { - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) + if (cat) + { + if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); - } - } - } - } - if (fetch_info.mRecursive) - recursive_cats.push_back(cat_id); + LLSD folder_sd; + folder_sd["folder_id"] = cat->getUUID(); + folder_sd["owner_id"] = cat->getOwnerID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + + if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) + folder_request_body_lib["folders"].append(folder_sd); + else + folder_request_body["folders"].append(folder_sd); + folder_count++; + } + // May already have this folder, but append child folders to list. + if (fetch_info.mRecursive) + { + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); + } + } + } + } + if (fetch_info.mRecursive) + recursive_cats.push_back(cat_id); + } + else + { + LLViewerInventoryItem* itemp = gInventory.getItem(fetch_info.mUUID); + if (itemp) + { + LLSD item_sd; + item_sd["owner_id"] = itemp->getPermissions().getOwner(); + item_sd["item_id"] = itemp->getUUID(); + if (itemp->getPermissions().getOwner() == gAgent.getID()) + { + item_request_body.append(item_sd); + } + else + { + item_request_body_lib.append(item_sd); + } + //itemp->fetchFromServer(); + item_count++; + } + } mFetchQueue.pop_front(); } - if (folder_count > 0) + if (item_count + folder_count > 0) { - mBulkFetchCount++; - if (body["folders"].size()) + if (folder_count) { - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body, recursive_cats); - LLHTTPClient::post(url, body, fetcher, 300.0); + std::string url = region->getCapability("FetchInventoryDescendents2"); + mFetchCount++; + if (folder_request_body["folders"].size()) + { + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats); + LLHTTPClient::post(url, folder_request_body, fetcher, 300.0); + } + if (folder_request_body_lib["folders"].size()) + { + std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); + + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body_lib, recursive_cats); + LLHTTPClient::post(url_lib, folder_request_body_lib, fetcher, 300.0); + } } - if (body_lib["folders"].size()) + if (item_count) { - std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); - - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats); - LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0); + std::string url; + + if (item_request_body.size()) + { + mFetchCount++; + url = region->getCapability("FetchInventory2"); + if (!url.empty()) + { + LLSD body; + body["agent_id"] = gAgent.getID(); + body["items"] = item_request_body; + + LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body)); + } + //else + //{ + // LLMessageSystem* msg = gMessageSystem; + // msg->newMessage("FetchInventory"); + // msg->nextBlock("AgentData"); + // msg->addUUID("AgentID", gAgent.getID()); + // msg->addUUID("SessionID", gAgent.getSessionID()); + // msg->nextBlock("InventoryData"); + // msg->addUUID("OwnerID", mPermissions.getOwner()); + // msg->addUUID("ItemID", mUUID); + // gAgent.sendReliableMessage(); + //} + } + + if (item_request_body_lib.size()) + { + mFetchCount++; + + url = region->getCapability("FetchLib2"); + if (!url.empty()) + { + LLSD body; + body["agent_id"] = gAgent.getID(); + body["items"] = item_request_body_lib; + + LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body)); + } + } } mFetchTimer.reset(); } + else if (isBulkFetchProcessingComplete()) { setAllFoldersFetched(); @@ -624,7 +761,7 @@ bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LL for (fetch_queue_t::const_iterator it = mFetchQueue.begin(); it != mFetchQueue.end(); ++it) { - const LLUUID& fetch_id = (*it).mCatUUID; + const LLUUID& fetch_id = (*it).mUUID; if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) return false; } diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index c35c785ceb..9dfedddd6d 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -48,7 +48,7 @@ public: // This gets triggered when performing a filter-search. void start(const LLUUID& cat_id = LLUUID::null, BOOL recursive = TRUE); - BOOL backgroundFetchActive() const; + BOOL folderFetchActive() const; bool isEverythingFetched() const; // completing the fetch once per session should be sufficient bool libraryFetchStarted() const; @@ -60,14 +60,13 @@ public: bool inventoryFetchInProgress() const; void findLostItems(); + void incrFetchCount(S16 fetching); protected: - void incrBulkFetch(S16 fetching); bool isBulkFetchProcessingComplete() const; - void bulkFetch(std::string url); + void bulkFetch(); void backgroundFetch(); static void backgroundFetchCB(void*); // background fetch idle function - void stopBackgroundFetch(); // stop fetch process void setAllFoldersFetched(); bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) const; @@ -77,7 +76,8 @@ private: BOOL mAllFoldersFetched; BOOL mBackgroundFetchActive; - S16 mBulkFetchCount; + bool mFolderFetchActive; + S16 mFetchCount; BOOL mTimelyFetchPending; S32 mNumFetchRetries; @@ -87,11 +87,11 @@ private: struct FetchQueueInfo { - FetchQueueInfo(const LLUUID& id, BOOL recursive) : - mCatUUID(id), mRecursive(recursive) - { - } - LLUUID mCatUUID; + FetchQueueInfo(const LLUUID& id, BOOL recursive, bool is_category = true) : + mUUID(id), mRecursive(recursive), mIsCategory(is_category) + {} + LLUUID mUUID; + bool mIsCategory; BOOL mRecursive; }; typedef std::deque<FetchQueueInfo> fetch_queue_t; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 382569fa3a..01a8ecfb5d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -817,7 +817,7 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask) if(handled) { ECursorType cursor = getWindow()->getCursor(); - if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && cursor == UI_CURSOR_ARROW) + if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW) { // replace arrow cursor with arrow and hourglass cursor getWindow()->setCursor(UI_CURSOR_WORKING); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 8279163762..7d805f6862 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -160,6 +160,8 @@ public: void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); + LLHandle<LLInventoryPanel> getInventoryPanelHandle() const { return getDerivedHandle<LLInventoryPanel>(); } + // Callbacks void doToSelected(const LLSD& userdata); void doCreate(const LLSD& userdata); diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp index 7e9c3c84a7..c0a323d6cb 100644 --- a/indra/newview/llmemoryview.cpp +++ b/indra/newview/llmemoryview.cpp @@ -220,7 +220,7 @@ void LLMemoryView::draw() S32 x, y; S32 margin = 10; - S32 texth = (S32)LLFontGL::getFontMonospace()->getLineHeight(); + S32 texth = LLFontGL::getFontMonospace()->getLineHeight(); S32 xleft = margin; S32 ytop = height - margin; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index b02bf79a28..bd20210190 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -728,7 +728,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) if (!http_url.empty()) { ret = mCurlRequest->getByteRange(http_url, headers, offset, size, - new LLMeshSkinInfoResponder(mesh_id, offset, size)); + new LLMeshSkinInfoResponder(mesh_id, offset, size)); if(ret) { LLMeshRepository::sHTTPRequestCount++; @@ -805,7 +805,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) if (!http_url.empty()) { ret = mCurlRequest->getByteRange(http_url, headers, offset, size, - new LLMeshDecompositionResponder(mesh_id, offset, size)); + new LLMeshDecompositionResponder(mesh_id, offset, size)); if(ret) { LLMeshRepository::sHTTPRequestCount++; @@ -881,7 +881,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) if (!http_url.empty()) { ret = mCurlRequest->getByteRange(http_url, headers, offset, size, - new LLMeshPhysicsShapeResponder(mesh_id, offset, size)); + new LLMeshPhysicsShapeResponder(mesh_id, offset, size)); if(ret) { @@ -1093,17 +1093,19 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat bool LLMeshRepoThread::lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size) { - LLVolume* volume = new LLVolume(mesh_params, LLVolumeLODGroup::getVolumeScaleFromDetail(lod)); + LLPointer<LLVolume> volume = new LLVolume(mesh_params, LLVolumeLODGroup::getVolumeScaleFromDetail(lod)); std::string mesh_string((char*) data, data_size); std::istringstream stream(mesh_string); if (volume->unpackVolumeFaces(stream, data_size)) { - LoadedMesh mesh(volume, mesh_params, lod); if (volume->getNumFaces() > 0) { - LLMutexLock lock(mMutex); - mLoadedQ.push(mesh); + LoadedMesh mesh(volume, mesh_params, lod); + { + LLMutexLock lock(mMutex); + mLoadedQ.push(mesh); + } return true; } } diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index 04e1570081..7a70370fe3 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -29,6 +29,7 @@ #include "llstring.h" #include "lluuid.h" +#include "llextendedstatus.h" class LLViewerObject; class LLMessageSystem; diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 4512c14b7a..b4224e30e6 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -124,7 +124,7 @@ BOOL LLNearbyChatBar::postBuild() // virtual void LLNearbyChatBar::onOpen(const LLSD& key) { - enableTranslationCheckbox(LLTranslate::isTranslationConfigured()); + showTranslationCheckbox(LLTranslate::isTranslationConfigured()); } bool LLNearbyChatBar::applyRectControl() @@ -170,9 +170,9 @@ void LLNearbyChatBar::showHistory() } } -void LLNearbyChatBar::enableTranslationCheckbox(BOOL enable) +void LLNearbyChatBar::showTranslationCheckbox(BOOL show) { - getChild<LLUICtrl>("translate_chat_checkbox")->setEnabled(enable); + getChild<LLUICtrl>("translate_chat_checkbox_lp")->setVisible(show); } void LLNearbyChatBar::draw() diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index baf12a06ea..8547cf0bce 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -61,7 +61,7 @@ public: static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); void showHistory(); - void enableTranslationCheckbox(BOOL enable); + void showTranslationCheckbox(BOOL show); /*virtual*/void setMinimized(BOOL b); protected: diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 269b42bbe9..4d9db01e0d 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -456,7 +456,9 @@ LLNearbyChatHandler::LLNearbyChatHandler() channel->setCreatePanelCallback(callback); - mChannel = LLChannelManager::getInstance()->addChannel(channel); + LLChannelManager::getInstance()->addChannel(channel); + + mChannel = channel->getHandle(); } LLNearbyChatHandler::~LLNearbyChatHandler() @@ -556,11 +558,12 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, && nearby_chat->isInVisibleChain() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) - || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode + || mChannel.isDead() + || !mChannel.get()->getShowToasts() ) // to prevent toasts in Busy mode return;//no need in toast if chat is visible or if bubble chat is enabled // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -577,7 +580,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, } */ - LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel); + LLNearbyChatScreenChannel* channel = dynamic_cast<LLNearbyChatScreenChannel*>(mChannel.get()); if(channel) { diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 15d5d7c162..1bda7640bd 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -74,6 +74,8 @@ const F32 DOT_SCALE = 0.75f; const F32 MIN_PICK_SCALE = 2.f; const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag +const F64 COARSEUPDATE_MAX_Z = 1020.0f; + LLNetMap::LLNetMap (const Params & p) : LLUICtrl (p), mBackgroundColor (p.bg_color()), @@ -300,7 +302,8 @@ void LLNetMap::draw() } LLVector3 map_center_agent = gAgent.getPosAgentFromGlobal(mObjectImageCenterGlobal); - map_center_agent -= gAgentCamera.getCameraPositionAgent(); + LLVector3 camera_position = gAgentCamera.getCameraPositionAgent(); + map_center_agent -= camera_position; map_center_agent.mV[VX] *= mScale/region_width; map_center_agent.mV[VY] *= mScale/region_width; @@ -321,9 +324,6 @@ void LLNetMap::draw() gGL.popMatrix(); - LLVector3d pos_global; - LLVector3 pos_map; - // Mouse pointer in local coordinates S32 local_mouse_x; S32 local_mouse_y; @@ -333,90 +333,67 @@ void LLNetMap::draw() F32 closest_dist_squared = F32_MAX; // value will be overridden in the loop F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE); + LLVector3 pos_map; + uuid_vec_t avatar_ids; + std::vector<LLVector3d> positions; + bool unknown_relative_z; + + LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgentCamera.getCameraPositionGlobal()); + // Draw avatars - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) + for (U32 i = 0; i < avatar_ids.size(); i++) { - LLViewerRegion* regionp = *iter; - const LLVector3d& origin_global = regionp->getOriginGlobal(); - - S32 count = regionp->mMapAvatars.count(); - S32 i; - LLVector3 pos_local; - U32 compact_local; - U8 bits; - // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest. - // just be careful to sort the avatar IDs along with the positions. -MG - for (i = 0; i < count; i++) - { - compact_local = regionp->mMapAvatars.get(i); + pos_map = globalPosToView(positions[i]); + LLUUID uuid = avatar_ids[i]; - bits = compact_local & 0xFF; - pos_local.mV[VZ] = F32(bits) * 4.f; - compact_local >>= 8; + bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL); - bits = compact_local & 0xFF; - pos_local.mV[VY] = (F32)bits; - compact_local >>= 8; + LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color; - bits = compact_local & 0xFF; - pos_local.mV[VX] = (F32)bits; + unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z && + camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z; - pos_global.setVec( pos_local ); - pos_global += origin_global; + LLWorldMapView::drawAvatar( + pos_map.mV[VX], pos_map.mV[VY], + color, + pos_map.mV[VZ], mDotRadius, + unknown_relative_z); - pos_map = globalPosToView(pos_global); - - LLUUID uuid(NULL); - BOOL show_as_friend = FALSE; - if( i < regionp->mMapAvatarIDs.count()) + if(uuid.notNull()) + { + bool selected = false; + uuid_vec_t::iterator sel_iter = gmSelected.begin(); + for (; sel_iter != gmSelected.end(); sel_iter++) { - uuid = regionp->mMapAvatarIDs.get(i); - show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL); + if(*sel_iter == uuid) + { + selected = true; + break; + } } - - LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color; - LLWorldMapView::drawAvatar( - pos_map.mV[VX], pos_map.mV[VY], - color, - pos_map.mV[VZ], mDotRadius); - - if(uuid.notNull()) + if(selected) { - bool selected = false; - uuid_vec_t::iterator sel_iter = gmSelected.begin(); - for (; sel_iter != gmSelected.end(); sel_iter++) + if( (pos_map.mV[VX] < 0) || + (pos_map.mV[VY] < 0) || + (pos_map.mV[VX] >= getRect().getWidth()) || + (pos_map.mV[VY] >= getRect().getHeight()) ) { - if(*sel_iter == uuid) - { - selected = true; - break; - } - } - if(selected) + S32 x = llround( pos_map.mV[VX] ); + S32 y = llround( pos_map.mV[VY] ); + LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10); + } else { - if( (pos_map.mV[VX] < 0) || - (pos_map.mV[VY] < 0) || - (pos_map.mV[VX] >= getRect().getWidth()) || - (pos_map.mV[VY] >= getRect().getHeight()) ) - { - S32 x = llround( pos_map.mV[VX] ); - S32 y = llround( pos_map.mV[VY] ); - LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10); - } else - { - LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f); - } + LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f); } } + } - F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), - LLVector2(local_mouse_x,local_mouse_y)); - if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared) - { - closest_dist_squared = dist_to_cursor_squared; - mClosestAgentToCursor = regionp->mMapAvatarIDs.get(i); - } + F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), + LLVector2(local_mouse_x,local_mouse_y)); + if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared) + { + closest_dist_squared = dist_to_cursor_squared; + mClosestAgentToCursor = uuid; } } @@ -440,7 +417,7 @@ void LLNetMap::draw() } // Draw dot for self avatar position - pos_global = gAgent.getPositionGlobal(); + LLVector3d pos_global = gAgent.getPositionGlobal(); pos_map = globalPosToView(pos_global); S32 dot_width = llround(mDotRadius * 2.f); LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage; @@ -514,9 +491,11 @@ void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) createObjectImage(); } -LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos ) +LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos) { - LLVector3d relative_pos_global = global_pos - gAgentCamera.getCameraPositionGlobal(); + LLVector3d camera_position = gAgentCamera.getCameraPositionGlobal(); + + LLVector3d relative_pos_global = global_pos - camera_position; LLVector3 pos_local; pos_local.setVec(relative_pos_global); // convert to floats from doubles @@ -541,7 +520,7 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos ) void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow ) { - LLVector3 pos_local = globalPosToView( pos_global ); + LLVector3 pos_local = globalPosToView(pos_global); if( (pos_local.mV[VX] < 0) || (pos_local.mV[VY] < 0) || (pos_local.mV[VX] >= getRect().getWidth()) || diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 20fcee0814..1f7e7d68c6 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -33,9 +33,9 @@ #include "v3dmath.h" #include "v4color.h" #include "llpointer.h" +#include "llcoord.h" class LLColor4U; -class LLCoordGL; class LLImageRaw; class LLViewerTexture; class LLFloaterMap; diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index e6239534f7..d13e2b629d 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -51,8 +51,8 @@ LLAlertHandler::LLAlertHandler(const std::string& name, const std::string& notif p.channel_align = CA_CENTRE; // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->getChannel(p); - mChannel->setCanStoreToasts(false); + mChannel = LLChannelManager::getInstance()->getChannel(p)->getHandle(); + mChannel.get()->setCanStoreToasts(false); } //-------------------------------------------------------------------------- @@ -64,62 +64,62 @@ LLAlertHandler::~LLAlertHandler() void LLAlertHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().getWidth() / 2; - mChannel->init(channel_right_bound, channel_right_bound); + mChannel.get()->init(channel_right_bound, channel_right_bound); } //-------------------------------------------------------------------------- bool LLAlertHandler::processNotification(const LLNotificationPtr& notification) { - if(!mChannel) + if(mChannel.isDead()) { return false; } // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } if (notification->canLogToIM() && notification->hasFormElements()) - { - const std::string name = LLHandlerUtil::getSubstitutionName(notification); - - LLUUID from_id = notification->getPayload()["from_id"]; - - // firstly create session... - LLHandlerUtil::spawnIMSession(name, from_id); - - // ...then log message to have IM Well notified about new message - LLHandlerUtil::logToIMP2P(notification); - } - - LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = dynamic_cast<LLToastPanel*>(alert_dialog); - p.enable_hide_btn = false; - p.can_fade = false; - p.is_modal = mIsModal; - p.on_delete_toast = boost::bind(&LLAlertHandler::onDeleteToast, this, _1); - - // Show alert in middle of progress view (during teleport) (EXT-1093) - LLProgressView* progress = gViewerWindow->getProgressView(); - LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled(); - mChannel->updatePositionAndSize(rc); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); - if(channel) - channel->addToast(p); + { + const std::string name = LLHandlerUtil::getSubstitutionName(notification); + + LLUUID from_id = notification->getPayload()["from_id"]; + + // firstly create session... + LLHandlerUtil::spawnIMSession(name, from_id); + + // ...then log message to have IM Well notified about new message + LLHandlerUtil::logToIMP2P(notification); + } + + LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = dynamic_cast<LLToastPanel*>(alert_dialog); + p.enable_hide_btn = false; + p.can_fade = false; + p.is_modal = mIsModal; + p.on_delete_toast = boost::bind(&LLAlertHandler::onDeleteToast, this, _1); + + // Show alert in middle of progress view (during teleport) (EXT-1093) + LLProgressView* progress = gViewerWindow->getProgressView(); + LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled(); + mChannel.get()->updatePositionAndSize(rc); + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); return false; -} + } void LLAlertHandler::onChange( LLNotificationPtr notification ) { LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); if(channel) channel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog); } diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp index 97e382e42f..50db4737ce 100644 --- a/indra/newview/llnotificationgrouphandler.cpp +++ b/indra/newview/llnotificationgrouphandler.cpp @@ -41,10 +41,11 @@ LLGroupHandler::LLGroupHandler() : LLSysHandler("Group Notifications", "groupnotify") { // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) channel->addOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1)); + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -57,19 +58,19 @@ void LLGroupHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLGroupHandler::processNotification(const LLNotificationPtr& notification) { - if(!mChannel) + if(mChannel.isDead()) { return false; } // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } @@ -83,7 +84,7 @@ bool LLGroupHandler::processNotification(const LLNotificationPtr& notification) p.panel = notify_box; p.on_delete_toast = boost::bind(&LLGroupHandler::onDeleteToast, this, _1); - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); if(channel) channel->addToast(p); diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 1725d632e8..805e29e2a4 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -76,7 +76,7 @@ protected: // at the moment, when a handlers creates a channel. virtual void initChannel()=0; - LLScreenChannelBase* mChannel; + LLHandle<LLScreenChannelBase> mChannel; }; // LLSysHandler and LLChatHandler are more specific base classes diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 3ebf0bcc9e..1494ac6b5c 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -65,7 +65,7 @@ LLSysHandler::LLSysHandler(const std::string& name, const std::string& notificat void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif) { - LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel *>(mChannel.get()); if (channel == NULL) { return; @@ -200,23 +200,23 @@ void log_name_callback(const std::string& full_name, const std::string& from_nam // static void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only) { - LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID from_id = notification->getPayload()["from_id"]; - if (from_id.isNull()) - { - llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; - return; - } + if (from_id.isNull()) + { + llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; + return; + } - if(to_file_only) - { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); - } - else - { - gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); + if(to_file_only) + { + gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); + } + else + { + gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); + } } -} // static void LLHandlerUtil::logGroupNoticeToIMGroup( @@ -348,20 +348,20 @@ void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notif void LLHandlerUtil::decIMMesageCounter(const LLNotificationPtr& notification) { const std::string name = LLHandlerUtil::getSubstitutionName(notification); - LLUUID from_id = notification->getPayload()["from_id"]; - LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); + LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession(session_id); if (session) { - LLSD arg; - arg["session_id"] = session_id; - session->mNumUnread--; - arg["num_unread"] = session->mNumUnread; - session->mParticipantUnreadMessageCount--; - arg["participant_unread"] = session->mParticipantUnreadMessageCount; - LLIMModel::getInstance()->mNewMsgSignal(arg); - } + LLSD arg; + arg["session_id"] = session_id; + session->mNumUnread--; + arg["num_unread"] = session->mNumUnread; + session->mParticipantUnreadMessageCount--; + arg["participant_unread"] = session->mParticipantUnreadMessageCount; + LLIMModel::getInstance()->mNewMsgSignal(arg); +} } diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 9beb8afac6..2862ad6962 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -35,6 +35,7 @@ #include "llnotifications.h" #include <boost/bind.hpp> +#include <boost/foreach.hpp> using namespace LLNotificationsUI; @@ -62,7 +63,7 @@ void LLNotificationManager::init() mChannels.push_back(new LLBrowserNotification()); mChannels.push_back(new LLOutboxNotification()); mChannels.push_back(new LLIMHandler()); - + mChatHandler = boost::shared_ptr<LLNearbyChatHandler>(new LLNearbyChatHandler()); } diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 051075cff9..52cc518968 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -44,12 +44,13 @@ LLOfferHandler::LLOfferHandler() : LLSysHandler("Offer", "offer") { // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - mChannel->setControlHovering(true); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) - channel->addOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1)); + { + channel->setControlHovering(true); + channel->setOnRejectToastCallback(boost::bind(&LLOfferHandler::onRejectToast, this, _1)); + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -62,108 +63,108 @@ void LLOfferHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) { - if(!mChannel) + if(mChannel.isDead()) { return false; } // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } - if( notification->getPayload().has("give_inventory_notification") + if( notification->getPayload().has("give_inventory_notification") && notification->getPayload()["give_inventory_notification"].asBoolean() == false) - { - // This is an original inventory offer, so add a script floater - LLScriptFloaterManager::instance().onAddNotification(notification->getID()); - } - else - { + { + // This is an original inventory offer, so add a script floater + LLScriptFloaterManager::instance().onAddNotification(notification->getID()); + } + else + { bool add_notif_to_im = notification->canLogToIM() && notification->hasFormElements(); notification->setReusable(add_notif_to_im); - LLUUID session_id; + LLUUID session_id; if (add_notif_to_im) - { - const std::string name = LLHandlerUtil::getSubstitutionName(notification); + { + const std::string name = LLHandlerUtil::getSubstitutionName(notification); - LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID from_id = notification->getPayload()["from_id"]; - session_id = LLHandlerUtil::spawnIMSession(name, from_id); - LLHandlerUtil::addNotifPanelToIM(notification); - } + session_id = LLHandlerUtil::spawnIMSession(name, from_id); + LLHandlerUtil::addNotifPanelToIM(notification); + } - if (notification->getPayload().has("SUPPRESS_TOAST") - && notification->getPayload()["SUPPRESS_TOAST"]) - { - LLNotificationsUtil::cancel(notification); - } + if (notification->getPayload().has("SUPPRESS_TOAST") + && notification->getPayload()["SUPPRESS_TOAST"]) + { + LLNotificationsUtil::cancel(notification); + } else if(!notification->canLogToIM() || !LLHandlerUtil::isIMFloaterOpened(notification)) - { - LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); - // don't close notification on panel destroy since it will be used by IM floater + { + LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); + // don't close notification on panel destroy since it will be used by IM floater notify_box->setCloseNotificationOnDestroy(!add_notif_to_im); - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - // we not save offer notifications to the syswell floater that should be added to the IM floater + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + // we not save offer notifications to the syswell floater that should be added to the IM floater p.can_be_stored = !add_notif_to_im; - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); - if(channel) - channel->addToast(p); - } + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); + } if (notification->canLogToIM()) - { - // log only to file if notif panel can be embedded to IM and IM is opened + { + // log only to file if notif panel can be embedded to IM and IM is opened bool file_only = add_notif_to_im && LLHandlerUtil::isIMFloaterOpened(notification); LLHandlerUtil::logToIMP2P(notification, file_only); - } - } + } + } return false; -} + } /*virtual*/ void LLOfferHandler::onDelete(LLNotificationPtr notification) -{ - if( notification->getPayload().has("give_inventory_notification") - && !notification->getPayload()["give_inventory_notification"] ) - { - // Remove original inventory offer script floater - LLScriptFloaterManager::instance().onRemoveNotification(notification->getID()); - } - else { + if( notification->getPayload().has("give_inventory_notification") + && !notification->getPayload()["give_inventory_notification"] ) + { + // Remove original inventory offer script floater + LLScriptFloaterManager::instance().onRemoveNotification(notification->getID()); + } + else + { if (notification->canLogToIM() && notification->hasFormElements() - && !LLHandlerUtil::isIMFloaterOpened(notification)) - { - LLHandlerUtil::decIMMesageCounter(notification); + && !LLHandlerUtil::isIMFloaterOpened(notification)) + { + LLHandlerUtil::decIMMesageCounter(notification); + } + mChannel.get()->killToastByNotificationID(notification->getID()); } - mChannel->killToastByNotificationID(notification->getID()); } -} //-------------------------------------------------------------------------- void LLOfferHandler::onRejectToast(LLUUID& id) { LLNotificationPtr notification = LLNotifications::instance().find(id); - if (notification + if (notification && mItems.find(notification) != mItems.end() - // don't delete notification since it may be used by IM floater + // don't delete notification since it may be used by IM floater && (!notification->canLogToIM() || !notification->hasFormElements())) { LLNotifications::instance().cancel(notification); diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index c74c967722..8472f9b2ae 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -42,13 +42,13 @@ LLScriptHandler::LLScriptHandler() : LLSysHandler("Notifications", "notify") { // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - mChannel->setControlHovering(true); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) + { + channel->setControlHovering(true); channel->addOnRejectToastCallback(boost::bind(&LLScriptHandler::onRejectToast, this, _1)); - + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -61,64 +61,64 @@ void LLScriptHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLScriptHandler::processNotification(const LLNotificationPtr& notification) { - if(!mChannel) + if(mChannel.isDead()) { return false; } // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } if (notification->canLogToIM()) - { - LLHandlerUtil::logToIMP2P(notification); - } + { + LLHandlerUtil::logToIMP2P(notification); + } if(notification->hasFormElements()) - { - LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); - } - else - { - LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); - - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); - if(channel) { - channel->addToast(p); + LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); } + else + { + LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + { + channel->addToast(p); + } } - + return false; -} + } void LLScriptHandler::onDelete( LLNotificationPtr notification ) -{ - if(notification->hasFormElements()) - { - LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID()); - } - else { - mChannel->killToastByNotificationID(notification->getID()); + if(notification->hasFormElements()) + { + LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID()); + } + else + { + mChannel.get()->killToastByNotificationID(notification->getID()); + } } -} //-------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 0b0ac040cb..f07109335d 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -45,11 +45,12 @@ LLTipHandler::LLTipHandler() : LLSysHandler("NotificationTips", "notifytip") { // Getting a Channel for our notifications - mChannel = LLChannelManager::getInstance()->createNotificationChannel(); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); + LLScreenChannel* channel = LLChannelManager::getInstance()->createNotificationChannel(); if(channel) + { channel->addOnRejectToastCallback(boost::bind(&LLTipHandler::onRejectToast, this, _1)); + mChannel = channel->getHandle(); + } } //-------------------------------------------------------------------------- @@ -62,77 +63,80 @@ void LLTipHandler::initChannel() { S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel.get()->init(channel_right_bound - channel_width, channel_right_bound); } //-------------------------------------------------------------------------- bool LLTipHandler::processNotification(const LLNotificationPtr& notification) { - if(!mChannel) + if(mChannel.isDead()) { return false; } // arrange a channel on a screen - if(!mChannel->getVisible()) + if(!mChannel.get()->getVisible()) { initChannel(); } - // archive message in nearby chat + // archive message in nearby chat if (notification->canLogToChat()) - { - LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); - - // don't show toast if Nearby Chat is opened - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance(); - if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible()) { - return false; + LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); + + // don't show toast if Nearby Chat is opened + LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); + LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance(); + if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible()) + { + return false; + } } - } - std::string session_name = notification->getPayload()["SESSION_NAME"]; - const std::string name = notification->getSubstitutions()["NAME"]; - if (session_name.empty()) - { - session_name = name; - } - LLUUID from_id = notification->getPayload()["from_id"]; + std::string session_name = notification->getPayload()["SESSION_NAME"]; + const std::string name = notification->getSubstitutions()["NAME"]; + if (session_name.empty()) + { + session_name = name; + } + LLUUID from_id = notification->getPayload()["from_id"]; if (notification->canLogToIM()) - { - LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name, - notification->getMessage(), from_id, from_id); - } + { + LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name, + notification->getMessage(), from_id, from_id); + } if (notification->canLogToIM() && notification->hasFormElements()) - { - LLHandlerUtil::spawnIMSession(name, from_id); - } + { + LLHandlerUtil::spawnIMSession(name, from_id); + } if (notification->canLogToIM() && LLHandlerUtil::isIMFloaterOpened(notification)) - { - return false; - } + { + return false; + } - LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); + LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime"); - p.panel = notify_box; - p.is_tip = true; - p.can_be_stored = false; + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime"); + p.panel = notify_box; + p.is_tip = true; + p.can_be_stored = false; - removeExclusiveNotifications(notification); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); - if(channel) - channel->addToast(p); - + removeExclusiveNotifications(notification); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) + channel->addToast(p); + } + else if (notify["sigtype"].asString() == "delete") + { + mChannel->killToastByNotificationID(notification->getID()); + } return false; } diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index a4f6921f98..7301b305b2 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -875,8 +875,15 @@ void LLPanelFace::getState() { getChild<LLUICtrl>("TexScaleU")->setValue(2.0f * getChild<LLUICtrl>("TexScaleU")->getValue().asReal() ); getChild<LLUICtrl>("TexScaleV")->setValue(2.0f * getChild<LLUICtrl>("TexScaleV")->getValue().asReal() ); - } + // EXP-1507 (change label based on the mapping mode) + getChild<LLUICtrl>("rpt")->setValue(getString("string repeats per meter")); + } + else + if (selected_texgen == 0) // FIXME: should not be magic numbers + { + getChild<LLUICtrl>("rpt")->setValue(getString("string repeats per face")); + } } { diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index fbe331c7ab..f825ee3215 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -749,7 +749,10 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { - gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); + if (mMembersList) + { + gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); + } } BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 0295ad151f..eda0749cdb 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -374,7 +374,7 @@ void LLPanelGroupControlPanel::draw() { // Need to resort the participant list if it's in sort by recent speaker order. if (mParticipantList) - mParticipantList->updateRecentSpeakersOrder(); + mParticipantList->update(); LLPanelChatControlPanel::draw(); } diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 058d1ad6bc..76aadcd913 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -216,6 +216,7 @@ void LLPanelLogin::addUsersWithFavoritesToUsername() void LLPanelLogin::addFavoritesToStartLocation() { + // Clear the combo. LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); if (!combo) return; int num_items = combo->getItemCount(); @@ -223,6 +224,10 @@ void LLPanelLogin::addFavoritesToStartLocation() { combo->remove(i); } + + // Load favorites into the combo. + std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple(); + std::string canonical_user_name = canonicalize_username(user_defined_name); std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); LLSD fav_llsd; llifstream file; @@ -232,15 +237,18 @@ void LLPanelLogin::addFavoritesToStartLocation() for (LLSD::map_const_iterator iter = fav_llsd.beginMap(); iter != fav_llsd.endMap(); ++iter) { - std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple(); - // The account name in stored_favorites.xml has Resident last name even if user has // a single word account name, so it can be compared case-insensitive with the // user defined "firstname lastname". - S32 res = LLStringUtil::compareInsensitive(canonicalize_username(user_defined_name), iter->first); - if (res != 0) continue; + S32 res = LLStringUtil::compareInsensitive(canonical_user_name, iter->first); + if (res != 0) + { + lldebugs << "Skipping favorites for " << iter->first << llendl; + continue; + } combo->addSeparator(); + lldebugs << "Loading favorites for " << iter->first << llendl; LLSD user_llsd = iter->second; for (LLSD::array_const_iterator iter1 = user_llsd.beginArray(); iter1 != user_llsd.endArray(); ++iter1) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 374afb90be..c3c62920d3 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -567,7 +567,7 @@ void LLPanelMainInventory::updateItemcountText() std::string text = ""; - if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()) + if (LLInventoryModelBackgroundFetch::instance().folderFetchActive()) { text = getString("ItemcountFetching", string_args); } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 6c3f07920b..9b06d05b4b 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -965,23 +965,23 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) { // store accordion tabs opened/closed state before any manipulation with accordion tabs if (!saved_filter.empty()) - { - notifyChildren(LLSD().with("action","store_state")); - } + { + notifyChildren(LLSD().with("action","store_state")); + } mOnlineFriendList->setNameFilter(filter); mAllFriendList->setNameFilter(filter); - setAccordionCollapsedByUser("tab_online", false); - setAccordionCollapsedByUser("tab_all", false); - showFriendsAccordionsIfNeeded(); + setAccordionCollapsedByUser("tab_online", false); + setAccordionCollapsedByUser("tab_all", false); + showFriendsAccordionsIfNeeded(); // restore accordion tabs state _after_ all manipulations if(saved_filter.empty()) - { - notifyChildren(LLSD().with("action","restore_state")); - } + { + notifyChildren(LLSD().with("action","restore_state")); } +} else if (cur_tab == GROUP_TAB_NAME) { mGroupList->setNameFilter(filter); @@ -1068,8 +1068,13 @@ void LLPanelPeople::onAddFriendWizButtonClicked() { // Show add friend wizard. LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE); + if (!picker) + { + return; + } + // Need to disable 'ok' button when friend occurs in selection - if (picker) picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); + picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); LLFloater* root_floater = gFloaterView->getParentFloater(this); if (root_floater) { diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 39c0628cbe..76d38f067d 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -818,7 +818,7 @@ bool LLPanelPrimMediaControls::isMouseOver() LLCoordGL cursor_pos_gl; S32 x, y; getWindow()->getCursorPosition(&cursor_pos_window); - getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); + cursor_pos_gl = cursor_pos_window.convert(); if(mMediaControlsStack->getVisible()) { diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 66956181f2..eeb433e306 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -30,9 +30,9 @@ #include "llpanel.h" #include "llviewermedia.h" #include "llnotificationptr.h" +#include "llcoord.h" class LLButton; -class LLCoordWindow; class LLIconCtrl; class LLLayoutStack; class LLProgressBar; diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index 4bbfec8ab7..5fec6d967d 100644 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -123,7 +123,6 @@ void LLPanelVoiceEffect::update(bool list_updated) if (mVoiceEffectCombo) { LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - llassert(effect_interface); if (!effect_interface) return; if (list_updated) { diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 5c95e805ce..975a6c67d8 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -390,7 +390,10 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) { const LLPointer<LLSpeaker>& speakerp = *it; - update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice); + if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) + { + update_speaker_indicator(list, speakerp->mID, speakerp->mModeratorMutedVoice); + } } } } @@ -466,12 +469,12 @@ void LLParticipantList::setValidateSpeakerCallback(validate_speaker_callback_t c mValidateSpeakerCallback = cb; } -void LLParticipantList::updateRecentSpeakersOrder() +void LLParticipantList::update() { + mSpeakerMgr->update(true); + if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder() && !isHovered()) { - // Need to update speakers to sort list correctly - mSpeakerMgr->update(true); // Resort avatar list sort(); } @@ -760,6 +763,7 @@ void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(speaker_id); if (speakerp.isNull()) { + LL_WARNS("Speakers") << "Speaker " << speaker_id << " not found" << llendl; return; } LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id)); diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index a001d29b67..53966c15fe 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -72,9 +72,9 @@ public: const EParticipantSortOrder getSortOrder() const; /** - * Refreshes the participant list if it's in sort by recent speaker order. + * Refreshes the participant list. */ - void updateRecentSpeakersOrder(); + void update(); /** * Set a callback to be called before adding a speaker. Invalid speakers will not be added. diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp index 225ac6e224..fe4cc0f55f 100644 --- a/indra/newview/llplacesinventorybridge.cpp +++ b/indra/newview/llplacesinventorybridge.cpp @@ -89,7 +89,7 @@ void LLPlacesFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) std::vector<std::string> items; std::vector<std::string> disabled_items; - LLInventoryPanel* inv_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); + LLInventoryPanel* inv_panel = mInventoryPanel.get(); bool is_open = false; if (inv_panel) { @@ -137,7 +137,7 @@ void LLPlacesFolderBridge::performAction(LLInventoryModel* model, std::string ac LLFolderViewFolder* LLPlacesFolderBridge::getFolder() { LLFolderViewFolder* folder = NULL; - LLInventoryPanel* inv_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); + LLInventoryPanel* inv_panel = mInventoryPanel.get(); if (inv_panel) { folder = dynamic_cast<LLFolderViewFolder*>(inv_panel->getRootFolder()->getItemByID(mUUID)); diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 9fbb67a63a..08829c1184 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -83,7 +83,7 @@ void LLPopupView::draw() LLUI::pushMatrix(); { - LLUI::translate( (F32) screen_x, (F32) screen_y, 0.f); + LLUI::translate( (F32) screen_x, (F32) screen_y); popup->draw(); } LLUI::popMatrix(); diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index 896e17c3c3..759430c3a5 100644 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -32,6 +32,7 @@ #include "llpointer.h" #include "lluuid.h" #include "llinventoryobserver.h" +#include "llextendedstatus.h" #include <map> class LLInventoryItem; diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 8e8b530e13..35ac0537a3 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -43,19 +43,7 @@ extern LLAgent gAgent; LLPreviewAnim::LLPreviewAnim(const LLSD& key) : LLPreview( key ) { -} - -// static -void LLPreviewAnim::endAnimCallback( void *userdata ) -{ - LLHandle<LLFloater>* handlep = ((LLHandle<LLFloater>*)userdata); - LLFloater* self = handlep->get(); - delete handlep; // done with the handle - if (self) - { - self->getChild<LLUICtrl>("Anim play btn")->setValue(FALSE); - self->getChild<LLUICtrl>("Anim audition btn")->setValue(FALSE); - } + mCommitCallbackRegistrar.add("PreviewAnim.Play", boost::bind(&LLPreviewAnim::play, this, _2)); } // virtual @@ -68,106 +56,115 @@ BOOL LLPreviewAnim::postBuild() getChild<LLUICtrl>("desc")->setValue(item->getDescription()); } - childSetAction("Anim play btn",playAnim, this); - childSetAction("Anim audition btn",auditionAnim, this); - childSetCommitCallback("desc", LLPreview::onText, this); getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); - + return LLPreview::postBuild(); } -void LLPreviewAnim::activate(e_activation_type type) +// static +// llinventorybridge also calls into here +void LLPreviewAnim::play(const LLSD& param) { - switch ( type ) + const LLInventoryItem *item = getItem(); + + if(item) { - case PLAY: + LLUUID itemID=item->getAssetUUID(); + + std::string btn_name = param.asString(); + LLButton* btn_inuse; + LLButton* btn_other; + + if ("Inworld" == btn_name) { - playAnim( (void *) this ); - break; + btn_inuse = getChild<LLButton>("Inworld"); + btn_other = getChild<LLButton>("Locally"); } - case AUDITION: + else if ("Locally" == btn_name) { - auditionAnim( (void *) this ); - break; + btn_inuse = getChild<LLButton>("Locally"); + btn_other = getChild<LLButton>("Inworld"); } - default: + else { - //do nothing + return; } - } -} - -// static -void LLPreviewAnim::playAnim( void *userdata ) -{ - LLPreviewAnim* self = (LLPreviewAnim*) userdata; - const LLInventoryItem *item = self->getItem(); - if(item) - { - LLUUID itemID=item->getAssetUUID(); + if (btn_inuse) + { + btn_inuse->toggleState(); + } - LLButton* btn = self->getChild<LLButton>("Anim play btn"); - if (btn) + if (btn_other) { - btn->toggleState(); + btn_other->setEnabled(false); } - if (self->getChild<LLUICtrl>("Anim play btn")->getValue().asBoolean() ) + if (getChild<LLUICtrl>(btn_name)->getValue().asBoolean() ) { - self->mPauseRequest = NULL; - gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START); + if("Inworld" == btn_name) + { + gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START); + } + else + { + gAgentAvatarp->startMotion(item->getAssetUUID()); + } + LLMotion* motion = gAgentAvatarp->findMotion(itemID); if (motion) { - motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle()))); + mItemID = itemID; + mDidStart = false; } } else { gAgentAvatarp->stopMotion(itemID); gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP); + + if (btn_other) + { + btn_other->setEnabled(true); + } } } } -// static -void LLPreviewAnim::auditionAnim( void *userdata ) +// virtual +void LLPreviewAnim::draw() { - LLPreviewAnim* self = (LLPreviewAnim*) userdata; - const LLInventoryItem *item = self->getItem(); - - if(item) + LLPreview::draw(); + if (!this->mItemID.isNull()) { - LLUUID itemID=item->getAssetUUID(); - - LLButton* btn = self->getChild<LLButton>("Anim audition btn"); - if (btn) - { - btn->toggleState(); - } - - if (self->getChild<LLUICtrl>("Anim audition btn")->getValue().asBoolean() ) + LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID); + if (motion) { - self->mPauseRequest = NULL; - gAgentAvatarp->startMotion(item->getAssetUUID()); - LLMotion* motion = gAgentAvatarp->findMotion(itemID); - - if (motion) + if (motion->isStopped() && this->mDidStart) { - motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle()))); + cleanup(); + } + if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart) + { + this->mDidStart = true; } - } - else - { - gAgentAvatarp->stopMotion(itemID); - gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP); } } } // virtual +void LLPreviewAnim::cleanup() +{ + this->mItemID = LLUUID::null; + this->mDidStart = false; + getChild<LLUICtrl>("Inworld")->setValue(FALSE); + getChild<LLUICtrl>("Locally")->setValue(FALSE); + getChild<LLUICtrl>("Inworld")->setEnabled(true); + getChild<LLUICtrl>("Locally")->setEnabled(true); +} + +// virtual void LLPreviewAnim::onClose(bool app_quitting) { const LLInventoryItem *item = getItem(); @@ -176,12 +173,5 @@ void LLPreviewAnim::onClose(bool app_quitting) { gAgentAvatarp->stopMotion(item->getAssetUUID()); gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP); - LLMotion* motion = gAgentAvatarp->findMotion(item->getAssetUUID()); - - if (motion) - { - // *TODO: minor memory leak here, user data is never deleted (Use real callbacks) - motion->setDeactivateCallback(NULL, (void *)NULL); - } } } diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h index 32e07ee33a..8eaed6ca1f 100644 --- a/indra/newview/llpreviewanim.h +++ b/indra/newview/llpreviewanim.h @@ -33,24 +33,18 @@ class LLPreviewAnim : public LLPreview { public: - enum e_activation_type { NONE = 0, PLAY = 1, AUDITION = 2 }; - LLPreviewAnim(const LLSD& key); - static void playAnim( void* userdata ); - static void auditionAnim( void* userdata ); - static void endAnimCallback( void *userdata ); + LLPreviewAnim(const LLSD& key); /*virtual*/ BOOL postBuild(); /*virtual*/ void onClose(bool app_quitting); - void activate(e_activation_type type); + void draw(); + void cleanup(); + void play(const LLSD& param); protected: - LLAnimPauseRequest mPauseRequest; - LLUUID mItemID; - std::string mTitle; - LLUUID mObjectID; - LLButton* mPlayBtn; - LLButton* mAuditionBtn; + LLUUID mItemID; + bool mDidStart; }; -#endif // LL_LLPREVIEWSOUND_H +#endif // LL_LLPREVIEWANIM_H diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index cc68c4c91a..003b53b28c 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -195,17 +195,18 @@ LLScreenChannel::~LLScreenChannel() } -std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher) +std::list<const LLToast*> LLScreenChannel::findToasts(const Matcher& matcher) { - std::list<LLToast*> res; + std::list<const LLToast*> res; // collect stored toasts for (std::vector<ToastElem>::iterator it = mStoredToastList.begin(); it != mStoredToastList.end(); it++) { - if (matcher.matches(it->toast->getNotification())) + const LLToast* toast = it->getToast(); + if (toast && matcher.matches(toast->getNotification())) { - res.push_back(it->toast); + res.push_back(toast); } } @@ -213,9 +214,10 @@ std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher) for (std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++) { - if (matcher.matches(it->toast->getNotification())) + const LLToast* toast = it->getToast(); + if (toast && matcher.matches(toast->getNotification())) { - res.push_back(it->toast); + res.push_back(toast); } } @@ -267,15 +269,16 @@ void LLScreenChannel::addToast(const LLToast::Params& p) return; } - ToastElem new_toast_elem(p); + LLToast* toast = new LLToast(p); + ToastElem new_toast_elem(toast->getHandle()); - new_toast_elem.toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, _1)); - new_toast_elem.toast->setOnToastDestroyedCallback(boost::bind(&LLScreenChannel::onToastDestroyed, this, _1)); + toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, _1)); + toast->setOnToastDestroyedCallback(boost::bind(&LLScreenChannel::onToastDestroyed, this, _1)); if(mControlHovering) { - new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2)); - new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopToastTimer, this, new_toast_elem.toast)); - new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startToastTimer, this, new_toast_elem.toast)); + toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2)); + toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopToastTimer, this, toast)); + toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startToastTimer, this, toast)); } if(show_toast) @@ -347,13 +350,13 @@ void LLScreenChannel::onToastFade(LLToast* toast) //-------------------------------------------------------------------------- void LLScreenChannel::deleteToast(LLToast* toast) { - if (toast->isDead()) + if (!toast || toast->isDead()) { return; } // send signal to observers about destroying of a toast - toast->mOnDeleteToastSignal(toast); + toast->closeToast(); // update channel's Hovering state // turning hovering off manually because onMouseLeave won't happen if a toast was closed using a keyboard @@ -361,9 +364,6 @@ void LLScreenChannel::deleteToast(LLToast* toast) { mHoveredToast = NULL; } - - // close the toast - toast->closeFloater(); } //-------------------------------------------------------------------------- @@ -371,12 +371,16 @@ void LLScreenChannel::deleteToast(LLToast* toast) void LLScreenChannel::storeToast(ToastElem& toast_elem) { // do not store clones - std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), toast_elem.id); + std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), toast_elem.getID()); if( it != mStoredToastList.end() ) return; + const LLToast* toast = toast_elem.getToast(); + if (toast) + { mStoredToastList.push_back(toast_elem); - mOnStoreToast(toast_elem.toast->getPanel(), toast_elem.id); + mOnStoreToast(toast->getPanel(), toast->getNotificationID()); + } } //-------------------------------------------------------------------------- @@ -389,9 +393,13 @@ void LLScreenChannel::loadStoredToastsToChannel() for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it) { - (*it).toast->setIsHidden(false); - (*it).toast->startTimer(); - mToastList.push_back((*it)); + LLToast* toast = it->getToast(); + if (toast) + { + toast->setIsHidden(false); + toast->startTimer(); + mToastList.push_back(*it); + } } mStoredToastList.clear(); @@ -406,8 +414,9 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id) if( it == mStoredToastList.end() ) return; - LLToast* toast = (*it).toast; - + LLToast* toast = it->getToast(); + if (toast) + { if(toast->getVisible()) { // toast is already in channel @@ -416,7 +425,8 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id) toast->setIsHidden(false); toast->startTimer(); - mToastList.push_back((*it)); + mToastList.push_back(*it); + } redrawToasts(); } @@ -430,9 +440,19 @@ void LLScreenChannel::removeStoredToastByNotificationID(LLUUID id) if( it == mStoredToastList.end() ) return; - LLToast* toast = (*it).toast; + const LLToast* toast = it->getToast(); + if (toast) + { + mRejectToastSignal(toast->getNotificationID()); + } + + // Call find() once more, because the mStoredToastList could have been changed + // in mRejectToastSignal callback and the iterator could have become invalid. + it = find(mStoredToastList.begin(), mStoredToastList.end(), id); + if (it != mStoredToastList.end()) + { mStoredToastList.erase(it); - mRejectToastSignal(toast->getNotificationID()); + } } //-------------------------------------------------------------------------- @@ -443,21 +463,22 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id) if( it != mToastList.end()) { - LLToast* toast = (*it).toast; + LLToast* toast = it->getToast(); // if it is a notification toast and notification is UnResponded - then respond on it // else - simply destroy a toast // // NOTE: if a notification is unresponded this function will be called twice for the same toast. // At first, the notification will be discarded, at second (it will be caused by discarding), // the toast will be destroyed. - if(toast->isNotificationValid()) + if(toast && toast->isNotificationValid()) { mRejectToastSignal(toast->getNotificationID()); } else { - mToastList.erase(it); + deleteToast(toast); + mToastList.erase(it); redrawToasts(); } return; @@ -468,18 +489,29 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id) if( it != mStoredToastList.end() ) { - LLToast* toast = (*it).toast; - mStoredToastList.erase(it); + LLToast* toast = it->getToast(); + if (toast) + { // send signal to a listener to let him perform some action on toast rejecting mRejectToastSignal(toast->getNotificationID()); deleteToast(toast); } } + // Call find() once more, because the mStoredToastList could have been changed + // in mRejectToastSignal callback and the iterator could have become invalid. + it = find(mStoredToastList.begin(), mStoredToastList.end(), id); + if (it != mStoredToastList.end()) + { + mStoredToastList.erase(it); + } + +} + void LLScreenChannel::killMatchedToasts(const Matcher& matcher) { - std::list<LLToast*> to_delete = findToasts(matcher); - for (std::list<LLToast*>::iterator it = to_delete.begin(); it + std::list<const LLToast*> to_delete = findToasts(matcher); + for (std::list<const LLToast*>::iterator it = to_delete.begin(); it != to_delete.end(); it++) { killToastByNotificationID((*it)-> getNotificationID()); @@ -493,12 +525,15 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) if( it != mToastList.end() && panel) { - LLToast* toast = (*it).toast; + LLToast* toast = it->getToast(); + if (toast) + { LLPanel* old_panel = toast->getPanel(); toast->removeChild(old_panel); delete old_panel; toast->insertPanel(panel); toast->startTimer(); + } redrawToasts(); } } @@ -547,16 +582,29 @@ void LLScreenChannel::showToastsBottom() { if(it != mToastList.rbegin()) { - LLToast* toast = (*(it-1)).toast; + LLToast* toast = (it-1)->getToast(); + if (!toast) + { + llwarns << "Attempt to display a deleted toast." << llendl; + return; + } + bottom = toast->getRect().mTop - toast->getTopPad(); toast_margin = gSavedSettings.getS32("ToastGap"); } - toast_rect = (*it).toast->getRect(); + LLToast* toast = it->getToast(); + if(!toast) + { + llwarns << "Attempt to display a deleted toast." << llendl; + return; + } + + toast_rect = toast->getRect(); toast_rect.setOriginAndSize(getRect().mRight - toast_rect.getWidth(), bottom + toast_margin, toast_rect.getWidth(), toast_rect.getHeight()); - (*it).toast->setRect(toast_rect); + toast->setRect(toast_rect); if(floater && floater->overlapsScreenChannel()) { @@ -568,7 +616,7 @@ void LLScreenChannel::showToastsBottom() { shift += floater->getDockControl()->getTongueHeight(); } - (*it).toast->translate(0, shift); + toast->translate(0, shift); } LLRect channel_rect = getChannelRect(); @@ -579,13 +627,13 @@ void LLScreenChannel::showToastsBottom() } } - bool stop_showing_toasts = (*it).toast->getRect().mTop > getRect().mTop; + bool stop_showing_toasts = toast->getRect().mTop > getRect().mTop; if(!stop_showing_toasts) { if( it != mToastList.rend()-1) { - S32 toast_top = (*it).toast->getRect().mTop + gSavedSettings.getS32("ToastGap"); + S32 toast_top = toast->getRect().mTop + gSavedSettings.getS32("ToastGap"); stop_showing_toasts = toast_top > getRect().mTop; } } @@ -599,17 +647,17 @@ void LLScreenChannel::showToastsBottom() if(stop_showing_toasts) break; - if( !(*it).toast->getVisible() ) + if( !toast->getVisible() ) { // HACK // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts - (*it).toast->setVisible(TRUE); + toast->setVisible(TRUE); } - if(!(*it).toast->hasFocus()) + if(!toast->hasFocus()) { // Fixing Z-order of toasts (EXT-4862) // Next toast will be positioned under this one. - gFloaterView->sendChildToBack((*it).toast); + gFloaterView->sendChildToBack(toast); } } @@ -619,7 +667,11 @@ void LLScreenChannel::showToastsBottom() mHiddenToastsNum = 0; for(; it != mToastList.rend(); it++) { - (*it).toast->hide(); + LLToast* toast = it->getToast(); + if (toast) + { + toast->hide(); + } } } } @@ -627,17 +679,31 @@ void LLScreenChannel::showToastsBottom() //-------------------------------------------------------------------------- void LLScreenChannel::showToastsCentre() { + LLToast* toast = mToastList[0].getToast(); + if (!toast) + { + llwarns << "Attempt to display a deleted toast." << llendl; + return; + } + LLRect toast_rect; - S32 bottom = (getRect().mTop - getRect().mBottom)/2 + mToastList[0].toast->getRect().getHeight()/2; + S32 bottom = (getRect().mTop - getRect().mBottom)/2 + toast->getRect().getHeight()/2; std::vector<ToastElem>::reverse_iterator it; for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) { - toast_rect = (*it).toast->getRect(); + LLToast* toast = it->getToast(); + if (!toast) + { + llwarns << "Attempt to display a deleted toast." << llendl; + return; + } + + toast_rect = toast->getRect(); toast_rect.setLeftTopAndSize(getRect().mLeft - toast_rect.getWidth() / 2, bottom + toast_rect.getHeight() / 2 + gSavedSettings.getS32("ToastGap"), toast_rect.getWidth() ,toast_rect.getHeight()); - (*it).toast->setRect(toast_rect); + toast->setRect(toast_rect); - (*it).toast->setVisible(TRUE); + toast->setVisible(TRUE); } } @@ -659,16 +725,29 @@ void LLScreenChannel::showToastsTop() { if(it != mToastList.rbegin()) { - LLToast* toast = (*(it-1)).toast; + LLToast* toast = (it-1)->getToast(); + if (!toast) + { + llwarns << "Attempt to display a deleted toast." << llendl; + return; + } + top = toast->getRect().mBottom - toast->getTopPad(); toast_margin = gSavedSettings.getS32("ToastGap"); } - toast_rect = (*it).toast->getRect(); + LLToast* toast = it->getToast(); + if (!toast) + { + llwarns << "Attempt to display a deleted toast." << llendl; + return; + } + + toast_rect = toast->getRect(); toast_rect.setLeftTopAndSize(channel_rect.mRight - toast_rect.getWidth(), top, toast_rect.getWidth(), toast_rect.getHeight()); - (*it).toast->setRect(toast_rect); + toast->setRect(toast_rect); if(floater && floater->overlapsScreenChannel()) { @@ -680,7 +759,7 @@ void LLScreenChannel::showToastsTop() { shift -= floater->getDockControl()->getTongueHeight(); } - (*it).toast->translate(0, shift); + toast->translate(0, shift); } LLRect channel_rect = getChannelRect(); @@ -691,13 +770,13 @@ void LLScreenChannel::showToastsTop() } } - bool stop_showing_toasts = (*it).toast->getRect().mBottom < channel_rect.mBottom; + bool stop_showing_toasts = toast->getRect().mBottom < channel_rect.mBottom; if(!stop_showing_toasts) { if( it != mToastList.rend()-1) { - S32 toast_bottom = (*it).toast->getRect().mBottom - gSavedSettings.getS32("ToastGap"); + S32 toast_bottom = toast->getRect().mBottom - gSavedSettings.getS32("ToastGap"); stop_showing_toasts = toast_bottom < channel_rect.mBottom; } } @@ -711,29 +790,41 @@ void LLScreenChannel::showToastsTop() if(stop_showing_toasts) break; - if( !(*it).toast->getVisible() ) + if (!toast->getVisible()) { // HACK // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts - (*it).toast->setVisible(TRUE); + toast->setVisible(TRUE); } - if(!(*it).toast->hasFocus()) + if (!toast->hasFocus()) { // Fixing Z-order of toasts (EXT-4862) // Next toast will be positioned under this one. - gFloaterView->sendChildToBack((*it).toast); + gFloaterView->sendChildToBack(toast); } } // Dismiss toasts we don't have space for (STORM-391). + std::vector<LLToast*> toasts_to_hide; if(it != mToastList.rend()) { mHiddenToastsNum = 0; for(; it != mToastList.rend(); it++) { - (*it).toast->hide(); + LLToast* toast = it->getToast(); + if (toast) + { + toasts_to_hide.push_back(toast); + } } } + + for (std::vector<LLToast*>::iterator it = toasts_to_hide.begin(), end_it = toasts_to_hide.end(); + it != end_it; + ++it) + { + (*it)->hide(); + } } //-------------------------------------------------------------------------- @@ -834,7 +925,17 @@ void LLNotificationsUI::LLScreenChannel::startToastTimer(LLToast* toast) void LLScreenChannel::hideToastsFromScreen() { for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++) - (*it).toast->setVisible(FALSE); + { + LLToast* toast = it->getToast(); + if (toast) + { + toast->setVisible(FALSE); + } + else + { + llwarns << "Attempt to hide a deleted toast." << llendl; + } + } } //-------------------------------------------------------------------------- @@ -843,8 +944,15 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id) std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), notification_id); if(mToastList.end() != it) { - ToastElem te = *it; - te.toast->hide(); + LLToast* toast = it->getToast(); + if (toast) + { + toast->hide(); + } + else + { + llwarns << "Attempt to hide a deleted toast." << llendl; + } } } @@ -852,24 +960,25 @@ void LLScreenChannel::closeHiddenToasts(const Matcher& matcher) { // since we can't guarantee that close toast operation doesn't change mToastList // we collect matched toasts that should be closed into separate list - std::list<ToastElem> toasts; + std::list<LLToast*> toasts; for (std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++) { - LLToast * toast = it->toast; + LLToast* toast = it->getToast(); // add to list valid toast that match to provided matcher criteria if (toast != NULL && !toast->isDead() && toast->getNotification() != NULL && !toast->getVisible() && matcher.matches(toast->getNotification())) { - toasts.push_back(*it); + toasts.push_back(toast); } } // close collected toasts - for (std::list<ToastElem>::iterator it = toasts.begin(); it + for (std::list<LLToast*>::iterator it = toasts.begin(); it != toasts.end(); it++) { - it->toast->closeFloater(); + LLToast* toast = *it; + toast->closeFloater(); } } @@ -879,7 +988,7 @@ void LLScreenChannel::removeToastsFromChannel() hideToastsFromScreen(); for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++) { - deleteToast((*it).toast); + deleteToast(it->getToast()); } mToastList.clear(); } @@ -893,9 +1002,10 @@ void LLScreenChannel::removeAndStoreAllStorableToasts() hideToastsFromScreen(); for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end();) { - if((*it).toast->getCanBeStored()) + LLToast* toast = it->getToast(); + if(toast && toast->getCanBeStored()) { - storeToast(*(it)); + storeToast(*it); it = mToastList.erase(it); } else @@ -915,9 +1025,10 @@ void LLScreenChannel::removeToastsBySessionID(LLUUID id) hideToastsFromScreen(); for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end();) { - if((*it).toast->getSessionID() == id) + LLToast* toast = it->getToast(); + if(toast && toast->getSessionID() == id) { - deleteToast((*it).toast); + deleteToast(toast); it = mToastList.erase(it); } else @@ -975,5 +1086,5 @@ LLToast* LLScreenChannel::getToastByNotificationID(LLUUID id) if (it == mStoredToastList.end()) return NULL; - return it->toast; + return it->getToast(); } diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 2ea5b8e546..eaff61a0f4 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -117,7 +117,7 @@ public: // get ID of a channel LLUUID getChannelID() { return mID; } - LLHandle<LLScreenChannelBase> getHandle() { mRootHandle.bind(this); return mRootHandle; } + LLHandle<LLScreenChannelBase> getHandle() { return getDerivedHandle<LLScreenChannelBase>(); } protected: void updateRect(); @@ -130,7 +130,6 @@ protected: bool mDisplayToastsAlways; // controls whether a channel shows toasts or not bool mShowToasts; - LLRootHandle<LLScreenChannelBase> mRootHandle; // EToastAlignment mToastAlignment; EChannelAlignment mChannelAlignment; @@ -163,7 +162,7 @@ public: virtual bool matches(const LLNotificationPtr) const = 0; }; - std::list<LLToast*> findToasts(const Matcher& matcher); + std::list<const LLToast*> findToasts(const Matcher& matcher); // Channel's outfit-functions // update channel's size and position in the World View @@ -238,31 +237,39 @@ private: store_toast_signal_t mOnStoreToast; reject_toast_signal_t mRejectToastSignal; - struct ToastElem + class ToastElem { - LLUUID id; - LLToast* toast; + public: + ToastElem(const LLHandle<LLToast>& toast) : mToast(toast) + { + } - ToastElem(LLToast::Params p) : id(p.notif_id) + ToastElem(const ToastElem& toast_elem) : mToast(toast_elem.mToast) { - toast = new LLToast(p); } - ToastElem(const ToastElem& toast_elem) + LLToast* getToast() const { - id = toast_elem.id; - toast = toast_elem.toast; + return mToast.get(); + } + + LLUUID getID() const + { + return mToast.isDead() ? LLUUID() : mToast.get()->getNotificationID(); } bool operator == (const LLUUID &id_op) const { - return (id == id_op); + return (getID() == id_op); } bool operator == (LLPanel* panel_op) const { - return (toast == panel_op); + return (mToast.get() == panel_op); } + + private: + LLHandle<LLToast> mToast; }; // Channel's handlers diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 8d64c8c04f..30400a4c6a 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1360,7 +1360,11 @@ void LLSecAPIBasicHandler::_writeProtectedData() // (even though this file isn't really secure. Perhaps in the future // it may be, however. LLFile::remove(tmp_filename); - throw LLProtectedDataException("Error writing Protected Data Store"); + + // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData() + // Decided throwing an exception here was overkill until we figure out why this happens + //throw LLProtectedDataException("Error writing Protected Data Store"); + llinfos << "LLProtectedDataException(Error writing Protected Data Store)" << llendl; } // move the temporary file to the specified file location. @@ -1369,7 +1373,11 @@ void LLSecAPIBasicHandler::_writeProtectedData() (LLFile::rename(tmp_filename, mProtectedDataFilename))) { LLFile::remove(tmp_filename); - throw LLProtectedDataException("Could not overwrite protected data store"); + + // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData() + // Decided throwing an exception here was overkill until we figure out why this happens + //throw LLProtectedDataException("Could not overwrite protected data store"); + llinfos << "LLProtectedDataException(Could not overwrite protected data store)" << llendl; } } diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 038b18afbd..c8b67cc9ec 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -217,15 +217,17 @@ BOOL LLSidepanelInventory::postBuild() { LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME); - // Collapse inbox panel - inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true); - // Set up button states and callbacks LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME); - inbox_button->setToggleState(false); inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); + // Get the previous inbox state from "InventoryInboxToggleState" setting. + bool is_inbox_collapsed = !inbox_button->getToggleState(); + + // Restore the collapsed inbox panel state + inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), is_inbox_collapsed); + // Set the inbox visible based on debug settings (final setting comes from http request below) enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index c588bd8fb4..07d2f1ad6f 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -272,6 +272,7 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin speakerp->mStatus = status; mSpeakers.insert(std::make_pair(speakerp->mID, speakerp)); mSpeakersSorted.push_back(speakerp); + LL_DEBUGS("Speakers") << "Added speaker " << id << llendl; fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add"); } else @@ -290,6 +291,10 @@ LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::strin speakerp->lookupName(); } } + else + { + LL_WARNS("Speakers") << "Speaker " << id << " not found" << llendl; + } } mSpeakerDelayRemover->unsetActionTimer(speakerp->mID); @@ -354,6 +359,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) if (moderator_muted_voice != speakerp->mModeratorMutedVoice) { speakerp->mModeratorMutedVoice = moderator_muted_voice; + LL_DEBUGS("Speakers") << (speakerp->mModeratorMutedVoice? "Muted" : "Umuted") << " speaker " << speaker_id<< llendl; speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp)); } @@ -484,6 +490,7 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id) } } + LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << llendl; fireEvent(new LLSpeakerListChangeEvent(this, speaker_id), "remove"); update(TRUE); @@ -595,7 +602,10 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers) speaker_it->second["mutes"]["text"]; // Fire event only if moderator changed if ( is_moderator != speakerp->mIsModerator ) + { + LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl; fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator"); + } } } } @@ -665,7 +675,10 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) speakerp->mIsModerator = agent_info["is_moderator"]; // Fire event only if moderator changed if ( is_moderator != speakerp->mIsModerator ) + { + LL_DEBUGS("Speakers") << "Speaker " << agent_id << (is_moderator ? "is now" : "no longer is") << " a moderator" << llendl; fireEvent(new LLSpeakerUpdateModeratorEvent(speakerp), "update_moderator"); + } } if (agent_info.has("mutes")) @@ -857,6 +870,7 @@ void LLActiveSpeakerMgr::updateSpeakerList() // always populate from active voice channel if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) //MA: seems this is always false { + LL_DEBUGS("Speakers") << "Removed all speakers" << llendl; fireEvent(new LLSpeakerListChangeEvent(this, LLUUID::null), "clear"); mSpeakers.clear(); mSpeakersSorted.clear(); diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 35f2ee7056..b9358cf37c 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -208,6 +208,8 @@ private: class LLSpeakerMgr : public LLOldEvents::LLObservable { + LOG_CLASS(LLSpeakerMgr); + public: LLSpeakerMgr(LLVoiceChannel* channelp); virtual ~LLSpeakerMgr(); @@ -271,6 +273,8 @@ protected: class LLIMSpeakerMgr : public LLSpeakerMgr { + LOG_CLASS(LLIMSpeakerMgr); + public: LLIMSpeakerMgr(LLVoiceChannel* channel); @@ -320,6 +324,8 @@ protected: class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr> { + LOG_CLASS(LLActiveSpeakerMgr); + public: LLActiveSpeakerMgr(); protected: @@ -328,6 +334,7 @@ protected: class LLLocalSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLLocalSpeakerMgr> { + LOG_CLASS(LLLocalSpeakerMgr); public: LLLocalSpeakerMgr(); ~LLLocalSpeakerMgr (); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3923b4510a..0ac8c1fe39 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -880,7 +880,6 @@ bool idle_startup() LLFile::mkdir(gDirUtilp->getLindenUserDir()); // Set PerAccountSettingsFile to the default value. - std::string per_account_settings_file = LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"); gSavedSettings.setString("PerAccountSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"))); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index de22f2ae6b..19a944e88e 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -922,13 +922,20 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) S32 image_top = getRect().getHeight(); S32 image_bottom = BTN_HEIGHT_SMALL; S32 image_middle = (image_top + image_bottom) / 2; - S32 line_height = llround(LLFontGL::getFontSansSerifSmall()->getLineHeight()); + S32 line_height = LLFontGL::getFontSansSerifSmall()->getLineHeight(); LLTextBox::Params tentative_label_p(p.multiselect_text); tentative_label_p.name("Multiple"); tentative_label_p.rect(LLRect (0, image_middle + line_height / 2, getRect().getWidth(), image_middle - line_height / 2 )); tentative_label_p.follows.flags(FOLLOWS_ALL); mTentativeLabel = LLUICtrlFactory::create<LLTextBox> (tentative_label_p); + + // It is no longer possible to associate a style with a textbox, so it has to be done in this fashion + LLStyle::Params style_params; + style_params.color = LLColor4::white; + + mTentativeLabel->setText(LLTrans::getString("multiple_textures"), style_params); + mTentativeLabel->setHAlign(LLFontGL::HCENTER); addChild( mTentativeLabel ); LLRect border_rect = getLocalRect(); diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 1c89766b26..5b41a05f2a 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -386,7 +386,7 @@ public: Params() : texture_view("texture_view") { - S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); changeDefault(rect, LLRect(0,0,100,line_height * 4)); } }; @@ -411,7 +411,7 @@ void LLAvatarTexBar::draw() LLVOAvatarSelf* avatarp = gAgentAvatarp; if (!avatarp) return; - const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + const S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); const S32 v_offset = 0; const S32 l_offset = 3; @@ -485,7 +485,7 @@ public: Params() : texture_view("texture_view") { - S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); changeDefault(rect, LLRect(0,0,100,line_height * 4)); } }; @@ -512,7 +512,7 @@ void LLGLTexMemBar::draw() F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ; F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ; - S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = (S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024); @@ -1097,7 +1097,7 @@ void LLTextureSizeView::drawTextureSizeGraph() { if(mTextureSizeBar.size() == 0) { - S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); mTextureSizeBar.resize(LLImageGL::sTextureLoadedCounter.size()) ; mTextureSizeBarRect.set(700, line_height * 2 + 400, 700 + mTextureSizeBar.size() * mTextureSizeBarWidth, line_height * 2) ; @@ -1140,7 +1140,7 @@ F32 LLTextureSizeView::drawTextureSizeDistributionGraph() } } - S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 left = mTextureSizeBarRect.mLeft ; S32 bottom = mTextureSizeBarRect.mBottom ; S32 right = mTextureSizeBarRect.mRight ; @@ -1222,7 +1222,7 @@ void LLTextureSizeView::drawTextureCategoryGraph() { if(mTextureSizeBar.size() == 0) { - S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); mTextureSizeBar.resize(LLViewerTexture::getTotalNumOfCategories()) ; mTextureSizeBarRect.set(700, line_height * 2 + 400, 700 + mTextureSizeBar.size() * mTextureSizeBarWidth, line_height * 2) ; @@ -1267,7 +1267,7 @@ F32 LLTextureSizeView::drawTextureCategoryDistributionGraph() } } - S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); + S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 left = mTextureSizeBarRect.mLeft ; S32 bottom = mTextureSizeBarRect.mBottom ; S32 right = mTextureSizeBarRect.mRight ; diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index da691a2d0c..0eec7f0afd 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -180,11 +180,14 @@ LLToast::~LLToast() //-------------------------------------------------------------------------- void LLToast::hide() { - setVisible(FALSE); - setFading(false); - mTimer->stop(); - mIsHidden = true; - mOnFadeSignal(this); + if (!mIsHidden) + { + setVisible(FALSE); + setFading(false); + mTimer->stop(); + mIsHidden = true; + mOnFadeSignal(this); + } } void LLToast::onFocusLost() @@ -215,6 +218,13 @@ void LLToast::setFadingTime(S32 seconds) mToastFadingTime = seconds; } +void LLToast::closeToast() +{ + mOnDeleteToastSignal(this); + + closeFloater(); +} + S32 LLToast::getTopPad() { if(mWrapperPanel) @@ -296,9 +306,7 @@ void LLToast::reshapeToPanel() if(!panel) return; - LLRect panel_rect = panel->getRect(); - - panel_rect.setLeftTopAndSize(0, panel_rect.getHeight(), panel_rect.getWidth(), panel_rect.getHeight()); + LLRect panel_rect = panel->getLocalRect(); panel->setShape(panel_rect); LLRect toast_rect = getRect(); diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 0b06728935..e1d99b1bcb 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -75,6 +75,7 @@ class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast> public: typedef boost::function<void (LLToast* toast)> toast_callback_t; typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t; + typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t; struct Params : public LLInitParam::Block<Params> { @@ -131,7 +132,7 @@ public: void reshapeToPanel(); // get toast's panel - LLPanel* getPanel() { return mPanel; } + LLPanel* getPanel() const { return mPanel; } // enable/disable Toast's Hide button void setHideButtonEnabled(bool enabled); // @@ -155,6 +156,8 @@ public: void setFadingTime(S32 seconds); + void closeToast(); + /** * Returns padding between floater top and wrapper_panel top. * This padding should be taken into account when positioning or reshaping toasts @@ -167,9 +170,9 @@ public: // get information whether the notification corresponding to the toast is valid or not bool isNotificationValid(); // get toast's Notification ID - const LLUUID getNotificationID() { return mNotificationID;} + const LLUUID getNotificationID() const { return mNotificationID;} // get toast's Session ID - const LLUUID getSessionID() { return mSessionID;} + const LLUUID getSessionID() const { return mSessionID;} // void setCanFade(bool can_fade); // @@ -179,19 +182,12 @@ public: // set whether this toast considered as hidden or not void setIsHidden( bool is_toast_hidden ) { mIsHidden = is_toast_hidden; } - const LLNotificationPtr& getNotification() { return mNotification;} + const LLNotificationPtr& getNotification() const { return mNotification;} // Registers signals/callbacks for events - toast_signal_t mOnFadeSignal; - toast_signal_t mOnDeleteToastSignal; - toast_signal_t mOnToastDestroyedSignal; - boost::signals2::connection setOnFadeCallback(toast_callback_t cb) { return mOnFadeSignal.connect(cb); } - boost::signals2::connection setOnToastDestroyedCallback(toast_callback_t cb) { return mOnToastDestroyedSignal.connect(cb); } - - typedef boost::function<void (LLToast* toast, bool mouse_enter)> toast_hover_check_callback_t; - typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t; - toast_hover_check_signal_t mOnToastHoverSignal; - boost::signals2::connection setOnToastHoverCallback(toast_hover_check_callback_t cb) { return mOnToastHoverSignal.connect(cb); } + boost::signals2::connection setOnFadeCallback(const toast_signal_t::slot_type& cb) { return mOnFadeSignal.connect(cb); } + boost::signals2::connection setOnToastDestroyedCallback(const toast_signal_t::slot_type& cb) { return mOnToastDestroyedSignal.connect(cb); } + boost::signals2::connection setOnToastHoverCallback(const toast_hover_check_signal_t::slot_type& cb) { return mOnToastHoverSignal.connect(cb); } boost::signals2::connection setMouseEnterCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseEnterSignal.connect(cb); }; boost::signals2::connection setMouseLeaveCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseLeaveSignal.connect(cb); }; @@ -237,6 +233,11 @@ private: bool mIsFading; bool mIsHovered; + toast_signal_t mOnFadeSignal; + toast_signal_t mOnDeleteToastSignal; + toast_signal_t mOnToastDestroyedSignal; + toast_hover_check_signal_t mOnToastHoverSignal; + commit_signal_t mToastMouseEnterSignal; commit_signal_t mToastMouseLeaveSignal; }; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 0f337825e9..8fef2ed6d1 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -69,8 +69,22 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLabel(notification->getName()), mLineEditor(NULL) { + // EXP-1822 + // save currently focused view, so that return focus to it + // on destroying this toast. + LLView* current_selection = dynamic_cast<LLView*>(gFocusMgr.getKeyboardFocus()); + while(current_selection) + { + if (current_selection->isFocusRoot()) + { + mPreviouslyFocusedView = current_selection->getHandle(); + break; + } + current_selection = current_selection->getParent(); + } + const LLFontGL* font = LLFontGL::getFontSansSerif(); - const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); + const S32 LINE_HEIGHT = font->getLineHeight(); const S32 EDITOR_HEIGHT = 20; LLNotificationFormPtr form = mNotification->getForm(); @@ -365,7 +379,7 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std:: } const LLFontGL* font = mCheck->getFont(); - const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); + const S32 LINE_HEIGHT = font->getLineHeight(); // Extend dialog for "check next time" S32 max_msg_width = LLToastPanel::getRect().getWidth() - 2 * HPAD; @@ -408,6 +422,13 @@ LLToastAlertPanel::~LLToastAlertPanel() { LLTransientFloaterMgr::instance().removeControlView( LLTransientFloaterMgr::GLOBAL, this); + + // EXP-1822 + // return focus to the previously focused view if the viewer is not exiting + if (mPreviouslyFocusedView.get() && !LLApp::isExiting()) + { + mPreviouslyFocusedView.get()->setFocus(TRUE); + } } BOOL LLToastAlertPanel::hasTitleBar() const diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index 7b157f19bb..d1be5e018e 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -113,6 +113,7 @@ private: LLFrameTimer mDefaultBtnTimer; // For Dialogs that take a line as text as input: LLLineEditor* mLineEditor; + LLHandle<LLView> mPreviouslyFocusedView; }; diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index fc69157a40..d2a4ce8745 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -68,7 +68,7 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) if (message->getVisible()) { S32 heightDelta = 0; - S32 maxTextHeight = (S32)(message->getDefaultFont()->getLineHeight() * maxLineCount); + S32 maxTextHeight = message->getDefaultFont()->getLineHeight() * maxLineCount; LLRect messageRect = message->getRect(); S32 oldTextHeight = messageRect.getHeight(); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 8c32dfcb4d..c7ab934f9e 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -333,14 +333,15 @@ LLToolDragAndDrop::LLDragAndDropDictionary::LLDragAndDropDictionary() }; LLToolDragAndDrop::LLToolDragAndDrop() -: LLTool(std::string("draganddrop"), NULL), - mDragStartX(0), - mDragStartY(0), - mSource(SOURCE_AGENT), - mCursor(UI_CURSOR_NO), - mLastAccept(ACCEPT_NO), - mDrop(FALSE), - mCurItemIndex(0) +: LLTool(std::string("draganddrop"), NULL), + mCargoCount(0), + mDragStartX(0), + mDragStartY(0), + mSource(SOURCE_AGENT), + mCursor(UI_CURSOR_NO), + mLastAccept(ACCEPT_NO), + mDrop(FALSE), + mCurItemIndex(0) { } diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 188d36cd1b..245c2a23e6 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -86,8 +86,11 @@ public: EAcceptance getLastAccept() { return mLastAccept; } boost::signals2::connection setEndDragCallback( const enddrag_signal_t::slot_type& cb ) { return mEndDragSignal.connect(cb); } - - uuid_vec_t::size_type getCargoIDsCount() const { return mCargoIDs.size(); } + + void setCargoCount(U32 count) { mCargoCount = count; } + void resetCargoCount() { mCargoCount = 0; } + U32 getCargoCount() const { return (mCargoCount > 0) ? mCargoCount : mCargoIDs.size(); } + static S32 getOperationId() { return sOperationId; } protected: @@ -118,6 +121,8 @@ protected: protected: + U32 mCargoCount; + S32 mDragStartX; S32 mDragStartY; diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 6bc7c6de11..ac01316462 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -81,7 +81,7 @@ LLToolMgr::LLToolMgr() // Not a panel, register these callbacks globally. LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2)); gToolNull = new LLTool(LLStringUtil::null); // Does nothing setCurrentTool(gToolNull); @@ -245,8 +245,15 @@ bool LLToolMgr::canEdit() return LLViewerParcelMgr::getInstance()->allowAgentBuild(); } -void LLToolMgr::toggleBuildMode() +void LLToolMgr::toggleBuildMode(const LLSD& sdname) { + const std::string& param = sdname.asString(); + + if (param == "build" && !canEdit()) + { + return; + } + LLFloaterReg::toggleInstanceOrBringToFront("build"); bool build_visible = LLFloaterReg::instanceVisible("build"); diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h index d489c4c829..12649cfba2 100644 --- a/indra/newview/lltoolmgr.h +++ b/indra/newview/lltoolmgr.h @@ -54,7 +54,7 @@ public: bool inEdit(); bool canEdit(); - void toggleBuildMode(); + void toggleBuildMode(const LLSD& sdname); /* Determines if we are in Build mode or not. */ bool inBuildMode(); diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index c1cc9c7bc4..f3d8de1904 100755 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -162,10 +162,10 @@ void LLBingTranslationHandler::getTranslateURL( const std::string &text) const { url = std::string("http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=") - + getAPIKey() + "&text=" + LLURI::escape(text) + "&to=" + to_lang; + + getAPIKey() + "&text=" + LLURI::escape(text) + "&to=" + getAPILanguageCode(to_lang); if (!from_lang.empty()) { - url += "&from=" + from_lang; + url += "&from=" + getAPILanguageCode(from_lang); } } @@ -236,6 +236,12 @@ std::string LLBingTranslationHandler::getAPIKey() return gSavedSettings.getString("BingTranslateAPIKey"); } +// static +std::string LLBingTranslationHandler::getAPILanguageCode(const std::string& lang) +{ + return lang == "zh" ? "zh-CHT" : lang; // treat Chinese as Traditional Chinese +} + LLTranslate::TranslationReceiver::TranslationReceiver(const std::string& from_lang, const std::string& to_lang) : mFromLang(from_lang) , mToLang(to_lang) diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h index 424bc14587..c58e1adb8c 100755 --- a/indra/newview/lltranslate.h +++ b/indra/newview/lltranslate.h @@ -157,6 +157,7 @@ public: /*virtual*/ bool isConfigured() const; private: static std::string getAPIKey(); + static std::string getAPILanguageCode(const std::string& lang); }; /** diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp index df7c5be0d6..e59064c074 100644 --- a/indra/newview/lluploaddialog.cpp +++ b/indra/newview/lluploaddialog.cpp @@ -115,7 +115,7 @@ void LLUploadDialog::setMessage( const std::string& msg) token = strtok( NULL, "\n" ); } - S32 line_height = S32( font->getLineHeight() + 0.99f ); + S32 line_height = font->getLineHeight(); S32 dialog_width = max_msg_width + 2 * HPAD; S32 dialog_height = line_height * msg_lines.size() + 2 * VPAD; diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index cc3395115b..184033de42 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -32,8 +32,8 @@ #include "llstat.h" #include "lltimer.h" #include "m4math.h" +#include "llcoord.h" -class LLCoordGL; class LLViewerObject; // This rotation matrix moves the default OpenGL reference frame diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index cb40af7061..0adb187dd2 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -260,6 +260,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gPipeline.disableLights(); + //reset vertex buffers if needed + gPipeline.doResetVertexBuffers(); + stop_glerror(); // Don't draw if the window is hidden or minimized. diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 685ef44921..5ced32a9ab 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -35,7 +35,6 @@ #include "llcallfloater.h" #include "llfasttimerview.h" #include "llfloaterabout.h" -#include "llfloateranimpreview.h" #include "llfloaterauction.h" #include "llfloateravatar.h" #include "llfloateravatarpicker.h" @@ -49,6 +48,7 @@ #include "llfloaterbuyland.h" #include "llfloaterbulkpermission.h" #include "llfloaterbump.h" +#include "llfloaterbvhpreview.h" #include "llfloatercamera.h" #include "llfloaterdeleteenvpreset.h" #include "llfloaterdisplayname.h" @@ -296,7 +296,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterUIPreviewUtil::registerFloater(); - LLFloaterReg::add("upload_anim", "floater_animation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload"); + LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBvhPreview>, "upload"); + LLFloaterReg::add("upload_anim_anim", "floater_animation_anim_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload"); LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterImagePreview>, "upload"); LLFloaterReg::add("upload_model", "floater_model_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterModelPreview>, "upload"); LLFloaterReg::add("upload_model_wizard", "floater_model_wizard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterModelWizard>); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 163581ea7f..45ca23cdfe 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -436,11 +436,6 @@ void LLViewerInventoryItem::fetchFromServer(void) const gAgent.sendReliableMessage(); } } - else - { - // *FIX: this can be removed after a bit. - llwarns << "request to fetch complete item" << llendl; - } } // virtual @@ -1462,6 +1457,7 @@ const std::string& LLViewerInventoryItem::getName() const class LLFavoritesOrderStorage : public LLSingleton<LLFavoritesOrderStorage> , public LLDestroyClass<LLFavoritesOrderStorage> { + LOG_CLASS(LLFavoritesOrderStorage); public: /** * Sets sort index for specified with LLUUID favorite landmark @@ -1620,10 +1616,18 @@ void LLFavoritesOrderStorage::load() void LLFavoritesOrderStorage::saveFavoritesSLURLs() { // Do not change the file if we are not logged in yet. - if (!LLLoginInstance::getInstance()->authSuccess()) return; + if (!LLLoginInstance::getInstance()->authSuccess()) + { + llwarns << "Cannot save favorites: not logged in" << llendl; + return; + } std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); - if (user_dir.empty()) return; + if (user_dir.empty()) + { + llwarns << "Cannot save favorites: empty user dir name" << llendl; + return; + } std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); llifstream in_file; @@ -1649,13 +1653,19 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); if (slurl_iter != mSLURLs.end()) { + lldebugs << "Saving favorite: idx=" << (*it)->getSortField() << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl; value["slurl"] = slurl_iter->second; user_llsd[(*it)->getSortField()] = value; } + else + { + llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl; + } } LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); + lldebugs << "Saved favorites for " << av_name.getLegacyName() << llendl; fav_llsd[av_name.getLegacyName()] = user_llsd; llofstream file; @@ -1674,6 +1684,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); + lldebugs << "Removed favorites for " << av_name.getLegacyName() << llendl; if (fav_llsd.has(av_name.getLegacyName())) { fav_llsd.erase(av_name.getLegacyName()); @@ -1706,6 +1717,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl) { + lldebugs << "Saving landmark SLURL: " << slurl << llendl; mSLURLs[asset_id] = slurl; } diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 76f4e18c27..e052e37393 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -63,7 +63,6 @@ extern PFNGLWEIGHTFVARBPROC glWeightfvARB; extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB; #endif -static LLPointer<LLVertexBuffer> sRenderBuffer = NULL; static const U32 sRenderMask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 046360e9e9..1eb4bedfaf 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -387,7 +387,6 @@ class LLViewerMediaMuteListObserver : public LLMuteListObserver static LLViewerMediaMuteListObserver sViewerMediaMuteListObserver; static bool sViewerMediaMuteListObserverInitialized = false; -static bool sInWorldMediaDisabled = false; ////////////////////////////////////////////////////////////////////////////////////////// @@ -654,20 +653,6 @@ void LLViewerMedia::muteListChanged() ////////////////////////////////////////////////////////////////////////////////////////// // static -void LLViewerMedia::setInWorldMediaDisabled(bool disabled) -{ - sInWorldMediaDisabled = disabled; -} - -////////////////////////////////////////////////////////////////////////////////////////// -// static -bool LLViewerMedia::getInWorldMediaDisabled() -{ - return sInWorldMediaDisabled; -} - -////////////////////////////////////////////////////////////////////////////////////////// -// static bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest) { bool result = false; @@ -1568,7 +1553,6 @@ LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource() bool LLViewerMedia::hasInWorldMedia() { - if (sInWorldMediaDisabled) return false; impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); // This should be quick, because there should be very few non-in-world-media impls @@ -1901,7 +1885,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ } } - LL_WARNS_ONCE("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL; + LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL; LLSD args; args["MIME_TYPE"] = media_type; LLNotificationsUtil::add("NoPlugin", args); @@ -3107,15 +3091,6 @@ bool LLViewerMediaImpl::isForcedUnloaded() const return true; } - if(sInWorldMediaDisabled) - { - // When inworld media is disabled, all instances that aren't marked as "used in UI" will not be loaded. - if(!mUsedInUI) - { - return true; - } - } - // If this media's class is not supposed to be shown, unload if (!shouldShowBasedOnClass()) { @@ -3783,12 +3758,22 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const // If it is attached to an avatar and the pref is off, we shouldn't show it if (attached_to_another_avatar) - return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING); - + { + static LLCachedControl<bool> show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING); + return show_media_on_others; + } if (inside_parcel) - return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING); + { + static LLCachedControl<bool> show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING); + + return show_media_within_parcel; + } else - return gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING); + { + static LLCachedControl<bool> show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING); + + return show_media_outside_parcel; + } } ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 15dcda59cf..fff5b3fc08 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -112,9 +112,6 @@ public: static F32 getVolume(); static void muteListChanged(); - static void setInWorldMediaDisabled(bool disabled); - static bool getInWorldMediaDisabled(); - static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); // Returns the priority-sorted list of all media impls. diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ae32683c99..d75651835f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7272,12 +7272,6 @@ class LLToolsUseSelectionForGrid : public view_listener_t } func; LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func); LLSelectMgr::getInstance()->setGridMode(GRID_MODE_REF_OBJECT); - - LLFloaterBuildOptions* build_options_floater = LLFloaterReg::getTypedInstance<LLFloaterBuildOptions>("build_options"); - if (build_options_floater && build_options_floater->getVisible()) - { - build_options_floater->setGridMode(GRID_MODE_REF_OBJECT); - } return true; } }; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 7e830e14bf..dc55247df2 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -183,7 +183,7 @@ void LLFilePickerThread::clearDead() #if LL_WINDOWS static std::string SOUND_EXTENSIONS = "wav"; static std::string IMAGE_EXTENSIONS = "tga bmp jpg jpeg png"; -static std::string ANIM_EXTENSIONS = "bvh"; +static std::string ANIM_EXTENSIONS = "bvh anim"; #ifdef _CORY_TESTING static std::string GEOMETRY_EXTENSIONS = "slg"; #endif @@ -385,7 +385,14 @@ class LLFileUploadAnim : public view_listener_t const std::string filename = upload_pick((void*)LLFilePicker::FFLOAD_ANIM); if (!filename.empty()) { - LLFloaterReg::showInstance("upload_anim", LLSD(filename)); + if (filename.rfind(".anim") != std::string::npos) + { + LLFloaterReg::showInstance("upload_anim_anim", LLSD(filename)); + } + else + { + LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename)); + } } return true; } @@ -527,8 +534,22 @@ class LLFileTakeSnapshotToDisk : public view_listener_t FALSE)) { gViewerWindow->playSnapshotAnimAndSound(); - - LLPointer<LLImageFormatted> formatted = new LLImagePNG; + LLPointer<LLImageFormatted> formatted; + LLFloaterSnapshot::ESnapshotFormat fmt = (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat"); + switch (fmt) + { + case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: + formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); + break; + default: + llwarns << "Unknown local snapshot format: " << fmt << llendl; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: + formatted = new LLImagePNG; + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: + formatted = new LLImageBMP; + break; + } formatted->enableOverSize() ; formatted->encode(raw, 0); formatted->disableOverSize() ; @@ -785,6 +806,11 @@ LLUUID upload_new_resource( upload_error(error_message, "DoNotSupportBulkAnimationUpload", filename, args); return LLUUID(); } + else if (exten == "anim") + { + asset_type = LLAssetType::AT_ANIMATION; + filename = src_filename; + } else { // Unknown extension diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4f83d9096c..c2bafd043d 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -135,6 +135,7 @@ extern BOOL gDebugClicks; // function prototypes bool check_offer_throttle(const std::string& from_name, bool check_only); +bool check_asset_previewable(const LLAssetType::EType asset_type); static void process_money_balance_reply_extended(LLMessageSystem* msg); //inventory offer throttle globals @@ -1148,6 +1149,17 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } } +// Return "true" if we have a preview method for that asset type, "false" otherwise +bool check_asset_previewable(const LLAssetType::EType asset_type) +{ + return (asset_type == LLAssetType::AT_NOTECARD) || + (asset_type == LLAssetType::AT_LANDMARK) || + (asset_type == LLAssetType::AT_TEXTURE) || + (asset_type == LLAssetType::AT_ANIMATION) || + (asset_type == LLAssetType::AT_SCRIPT) || + (asset_type == LLAssetType::AT_SOUND); +} + void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name) { for (uuid_vec_t::const_iterator obj_iter = objects.begin(); @@ -1171,7 +1183,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam // Either an inventory item or a category. const LLInventoryItem* item = dynamic_cast<const LLInventoryItem*>(obj); - if (item) + if (item && check_asset_previewable(asset_type)) { //////////////////////////////////////////////////////////////////////////////// // Special handling for various types. @@ -1246,6 +1258,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam LLFloaterReg::showInstance("preview_sound", LLSD(obj_id), take_focus); break; default: + LL_DEBUGS("Messaging") << "No preview method for previewable asset type : " << LLAssetType::lookupHumanReadable(asset_type) << LL_ENDL; break; } } @@ -2362,6 +2375,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) bool mute_im = is_muted; if(accept_im_from_only_friend&&!is_friend) { + if (!gIMMgr->isNonFriendSessionNotified(session_id)) + { + std::string message = LLTrans::getString("IM_unblock_only_groups_friends"); + gIMMgr->addMessage(session_id, from_id, name, message); + gIMMgr->addNotifiedNonFriendSessionID(session_id); + } + mute_im = true; } if (!mute_im || is_linden) @@ -5814,6 +5834,16 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) S32 orig = notification["payload"]["questions"].asInteger(); S32 new_questions = orig; + if (response["Details"]) + { + // respawn notification... + LLNotificationsUtil::add(notification["name"], notification["substitutions"], notification["payload"]); + + // ...with description on top + LLNotificationsUtil::add("DebitPermissionDetails"); + return false; + } + // check whether permissions were granted or denied BOOL allowed = TRUE; // the "yes/accept" button is the first button in the template, making it button 0 @@ -5871,14 +5901,6 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id)); } - if (response["Details"]) - { - // respawn notification... - LLNotificationsUtil::add(notification["name"], notification["substitutions"], notification["payload"]); - - // ...with description on top - LLNotificationsUtil::add("DebitPermissionDetails"); - } return false; } static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb); diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index d8acd99953..46bfb2dad0 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -35,6 +35,7 @@ #include "message.h" #include "stdenums.h" #include "llnotifications.h" +#include "llextendedstatus.h" // // Forward declarations diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 37fb77a10a..e590f29a9a 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -143,7 +143,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - gAgentAvatarp->updateRegion(regionp); + if (isAgentAvatarValid()) + { + gAgentAvatarp->updateRegion(regionp); + } } res = gAgentAvatarp; } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 5de363e03c..6db2138688 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -730,7 +730,7 @@ BOOL LLViewerShaderMgr::loadBasicShaders() vector< pair<string, S32> > shaders; shaders.push_back( make_pair( "windlight/atmosphericsVarsV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) ); - shaders.push_back( make_pair( "windlight/atmosphericsVarsWaterV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) ); + shaders.push_back( make_pair( "windlight/atmosphericsVarsWaterV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) ); shaders.push_back( make_pair( "windlight/atmosphericsHelpersV.glsl", mVertexShaderLevel[SHADER_WINDLIGHT] ) ); shaders.push_back( make_pair( "lighting/lightFuncV.glsl", mVertexShaderLevel[SHADER_LIGHTING] ) ); shaders.push_back( make_pair( "lighting/sumLightsV.glsl", sum_lights_class ) ); @@ -1102,19 +1102,25 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (success) { gDeferredSkinnedAlphaProgram.mName = "Deferred Skinned Alpha Shader"; + gDeferredSkinnedAlphaProgram.mFeatures.atmosphericHelpers = true; gDeferredSkinnedAlphaProgram.mFeatures.hasObjectSkinning = true; gDeferredSkinnedAlphaProgram.mFeatures.calculatesAtmospherics = true; gDeferredSkinnedAlphaProgram.mFeatures.hasGamma = true; gDeferredSkinnedAlphaProgram.mFeatures.hasAtmospherics = true; - gDeferredSkinnedAlphaProgram.mFeatures.calculatesLighting = true; - gDeferredSkinnedAlphaProgram.mFeatures.hasLighting = true; + gDeferredSkinnedAlphaProgram.mFeatures.calculatesLighting = false; + gDeferredSkinnedAlphaProgram.mFeatures.hasLighting = false; gDeferredSkinnedAlphaProgram.mFeatures.isAlphaLighting = true; gDeferredSkinnedAlphaProgram.mFeatures.disableTextureIndex = true; gDeferredSkinnedAlphaProgram.mShaderFiles.clear(); gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaSkinnedV.glsl", GL_VERTEX_SHADER_ARB)); gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedF.glsl", GL_FRAGMENT_SHADER_ARB)); gDeferredSkinnedAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED]; + success = gDeferredSkinnedAlphaProgram.createShader(NULL, NULL); + + // Hack to include uniforms for lighting without linking in lighting file + gDeferredSkinnedAlphaProgram.mFeatures.calculatesLighting = true; + gDeferredSkinnedAlphaProgram.mFeatures.hasLighting = true; } if (success) @@ -1231,11 +1237,12 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (success) { gDeferredAlphaProgram.mName = "Deferred Alpha Shader"; - gDeferredAlphaProgram.mFeatures.calculatesLighting = true; + gDeferredAlphaProgram.mFeatures.atmosphericHelpers = true; + gDeferredAlphaProgram.mFeatures.calculatesLighting = false; gDeferredAlphaProgram.mFeatures.calculatesAtmospherics = true; gDeferredAlphaProgram.mFeatures.hasGamma = true; gDeferredAlphaProgram.mFeatures.hasAtmospherics = true; - gDeferredAlphaProgram.mFeatures.hasLighting = true; + gDeferredAlphaProgram.mFeatures.hasLighting = false; gDeferredAlphaProgram.mFeatures.isAlphaLighting = true; gDeferredAlphaProgram.mFeatures.disableTextureIndex = true; //hack to disable auto-setup of texture channels if (mVertexShaderLevel[SHADER_DEFERRED] < 1) @@ -1251,7 +1258,12 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB)); gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB)); gDeferredAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED]; + success = gDeferredAlphaProgram.createShader(NULL, NULL); + + // Hack + gDeferredAlphaProgram.mFeatures.calculatesLighting = true; + gDeferredAlphaProgram.mFeatures.hasLighting = true; } if (success) @@ -1394,19 +1406,24 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (success) { gDeferredAvatarAlphaProgram.mName = "Avatar Alpha Shader"; + gDeferredAvatarAlphaProgram.mFeatures.atmosphericHelpers = true; gDeferredAvatarAlphaProgram.mFeatures.hasSkinning = true; - gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = true; + gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = false; gDeferredAvatarAlphaProgram.mFeatures.calculatesAtmospherics = true; gDeferredAvatarAlphaProgram.mFeatures.hasGamma = true; gDeferredAvatarAlphaProgram.mFeatures.hasAtmospherics = true; - gDeferredAvatarAlphaProgram.mFeatures.hasLighting = true; + gDeferredAvatarAlphaProgram.mFeatures.hasLighting = false; gDeferredAvatarAlphaProgram.mFeatures.isAlphaLighting = true; gDeferredAvatarAlphaProgram.mFeatures.disableTextureIndex = true; gDeferredAvatarAlphaProgram.mShaderFiles.clear(); gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/avatarAlphaV.glsl", GL_VERTEX_SHADER_ARB)); gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaNonIndexedNoColorF.glsl", GL_FRAGMENT_SHADER_ARB)); gDeferredAvatarAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED]; + success = gDeferredAvatarAlphaProgram.createShader(NULL, &mAvatarUniforms); + + gDeferredAvatarAlphaProgram.mFeatures.calculatesLighting = true; + gDeferredAvatarAlphaProgram.mFeatures.hasLighting = true; } if (success) diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index b41ed00f17..99102309a1 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -187,7 +187,7 @@ public: else { width = EMBEDDED_ITEM_LABEL_PADDING + mImage->getWidth() + mStyle->getFont()->getWidth(mLabel.c_str()); - height = llmax(mImage->getHeight(), llceil(mStyle->getFont()->getLineHeight())); + height = llmax(mImage->getHeight(), mStyle->getFont()->getLineHeight()); } return false; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6d9b8b4eb3..117078bcd1 100644..100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -27,9 +27,6 @@ #include "llviewerprecompiledheaders.h" #include "llviewerwindow.h" -#if LL_WINDOWS -#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally -#endif // system library includes #include <stdio.h> @@ -49,7 +46,6 @@ #include "llviewquery.h" #include "llxmltree.h" #include "llslurl.h" -//#include "llviewercamera.h" #include "llrender.h" #include "llvoiceclient.h" // for push-to-talk button handling @@ -1540,14 +1536,15 @@ LLViewerWindow::LLViewerWindow(const Params& p) mResDirty(false), mStatesDirty(false), mCurrResolutionIndex(0), + mProgressView(NULL) +{ // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to // pass its value right now. Instead, pass it a nullary function that // will, when we later need it, return the value of gKeyboard. // boost::lambda::var() constructs such a functor on the fly. mWindowListener(new LLWindowListener(this, boost::lambda::var(gKeyboard))), mViewerWindowListener(new LLViewerWindowListener(this)), - mProgressView(NULL) -{ + LLNotificationChannelPtr vw_alerts_channel(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert"))); LLNotificationChannelPtr vw_alerts_modal_channel(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal"))); @@ -2375,7 +2372,7 @@ void LLViewerWindow::draw() gGL.matrixMode(LLRender::MM_MODELVIEW); LLUI::pushMatrix(); - LLUI::translate( (F32) screen_x, (F32) screen_y, 0.f); + LLUI::translate( (F32) screen_x, (F32) screen_y); top_ctrl->draw(); LLUI::popMatrix(); } @@ -3183,12 +3180,6 @@ void LLViewerWindow::updateLayout() //gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible()); } - LLFloaterBuildOptions* build_options_floater = LLFloaterReg::findTypedInstance<LLFloaterBuildOptions>("build_options"); - if (build_options_floater && build_options_floater->getVisible()) - { - build_options_floater->updateGridMode(); - } - // Always update console if(gConsole) { @@ -4106,14 +4097,11 @@ void LLViewerWindow::resetSnapshotLoc() void LLViewerWindow::movieSize(S32 new_width, S32 new_height) { LLCoordWindow size; + LLCoordWindow new_size(new_width, new_height); gViewerWindow->getWindow()->getSize(&size); - if ( size.mX != new_width - || size.mY != new_height) + if ( size != new_size ) { - LLCoordWindow new_size(new_width, new_height); - LLCoordScreen screen_size; - gViewerWindow->getWindow()->convertCoords(new_size, &screen_size); - gViewerWindow->getWindow()->setSize(screen_size); + gViewerWindow->getWindow()->setSize(new_size.convert()); } } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index e525d6bad0..f063653cc5 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -366,9 +366,9 @@ BOOL LLVOAvatarSelf::buildMenus() item_params.label = sub_piemenu_name; } item_params.name =(item_params.label ); - item_params.on_click.function_name = "Attachment.Detach"; + item_params.on_click.function_name = "Attachment.DetachFromPoint"; item_params.on_click.parameter = iter->first; - item_params.on_enable.function_name = "Attachment.EnableDetach"; + item_params.on_enable.function_name = "Attachment.PointFilled"; item_params.on_enable.parameter = iter->first; LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index e9db37821b..312034022e 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -342,7 +342,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) blue_density = LLColor3(); blue_horizon = LLColor3(); haze_density = 0.f; - haze_horizon = LLColor3(); + haze_horizon = 1.f; density_multiplier = 0.f; max_y = 0.f; glow = LLColor3(); @@ -651,17 +651,17 @@ void LLVOSky::initAtmospherics(void) sunlight_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("sunlight_color", error)); ambient = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("ambient", error)); //lightnorm = LLWLParamManager::getInstance()->mCurParams.getVector("lightnorm", error); - gamma = LLWLParamManager::getInstance()->mCurParams.getVector("gamma", error)[0]; + gamma = LLWLParamManager::getInstance()->mCurParams.getFloat("gamma", error); blue_density = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_density", error)); blue_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("blue_horizon", error)); - haze_density = LLWLParamManager::getInstance()->mCurParams.getVector("haze_density", error)[0]; - haze_horizon = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("haze_horizon", error)); - density_multiplier = LLWLParamManager::getInstance()->mCurParams.getVector("density_multiplier", error)[0]; - max_y = LLWLParamManager::getInstance()->mCurParams.getVector("max_y", error)[0]; + haze_density = LLWLParamManager::getInstance()->mCurParams.getFloat("haze_density", error); + haze_horizon = LLWLParamManager::getInstance()->mCurParams.getFloat("haze_horizon", error); + density_multiplier = LLWLParamManager::getInstance()->mCurParams.getFloat("density_multiplier", error); + max_y = LLWLParamManager::getInstance()->mCurParams.getFloat("max_y", error); glow = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("glow", error)); - cloud_shadow = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_shadow", error)[0]; + cloud_shadow = LLWLParamManager::getInstance()->mCurParams.getFloat("cloud_shadow", error); cloud_color = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_color", error)); - cloud_scale = LLWLParamManager::getInstance()->mCurParams.getVector("cloud_scale", error)[0]; + cloud_scale = LLWLParamManager::getInstance()->mCurParams.getFloat("cloud_scale", error); cloud_pos_density1 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density1", error)); cloud_pos_density2 = LLColor3(LLWLParamManager::getInstance()->mCurParams.getVector("cloud_pos_density2", error)); @@ -825,7 +825,7 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo // Haze color above cloud vary_HazeColor = (blue_horizon * blue_weight * (sunlight + ambient) - + componentMult(haze_horizon.mV[0] * haze_weight, sunlight * temp2.mV[0] + ambient) + + componentMult(haze_horizon * haze_weight, sunlight * temp2.mV[0] + ambient) ); // Increase ambient when there are more clouds @@ -836,7 +836,7 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo // Haze color below cloud LLColor3 additiveColorBelowCloud = (blue_horizon * blue_weight * (sunlight + tmpAmbient) - + componentMult(haze_horizon.mV[0] * haze_weight, sunlight * temp2.mV[0] + tmpAmbient) + + componentMult(haze_horizon * haze_weight, sunlight * temp2.mV[0] + tmpAmbient) ); // Final atmosphere additive @@ -1002,7 +1002,7 @@ void LLVOSky::calcAtmospherics(void) //haze color vary_HazeColor = (blue_horizon * blue_weight * (sunlight*(1.f - cloud_shadow) + tmpAmbient) - + componentMult(haze_horizon.mV[0] * haze_weight, sunlight*(1.f - cloud_shadow) * temp2.mV[0] + tmpAmbient) + + componentMult(haze_horizon * haze_weight, sunlight*(1.f - cloud_shadow) * temp2.mV[0] + tmpAmbient) ); //brightness of surface both sunlight and ambient diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index d3a42583ea..6e6898d80a 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -410,7 +410,7 @@ public: LLColor3 blue_density; LLColor3 blue_horizon; F32 haze_density; - LLColor3 haze_horizon; + F32 haze_horizon; F32 density_multiplier; F32 max_y; LLColor3 glow; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 03d4c51aff..438d578ac5 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4939,6 +4939,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: fullbright = TRUE; } + if (hud_group) + { //all hud attachments are fullbright + fullbright = TRUE; + } + const LLTextureEntry* te = facep->getTextureEntry(); tex = facep->getTexture(); @@ -4968,7 +4973,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: } } else if (gPipeline.canUseVertexShaders() - && group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD && LLPipeline::sRenderBump && te->getShiny()) { //shiny @@ -5033,9 +5037,12 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: } } - //not sure why this is here -- shiny HUD attachments maybe? -- davep 5/11/2010 - if (!is_alpha && te->getShiny() && LLPipeline::sRenderBump) - { + + if (!gPipeline.canUseVertexShaders() && + !is_alpha && + te->getShiny() && + LLPipeline::sRenderBump) + { //shiny as an extra pass when shaders are disabled registerFace(group, facep, LLRenderPass::PASS_SHINY); } } diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 20b34637b8..e386112334 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -194,7 +194,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader) shader->uniform4fv("waterPlane", 1, mWaterPlane.mV); shader->uniform1f("waterFogDensity", getFogDensity()); shader->uniform1f("waterFogKS", mWaterFogKS); - shader->uniform4f("distance_multiplier", 0, 0, 0, 0); + shader->uniform1f("distance_multiplier", 0); } } diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 55608a059f..49d9d44d74 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -64,7 +64,6 @@ LLWLParamManager::LLWLParamManager() : //set the defaults for the controls - // index is from sWLUniforms in pipeline.cpp line 979 /// Sun Delta Terrain tweak variables. mSunDeltaYaw(180.0f), @@ -72,10 +71,10 @@ LLWLParamManager::LLWLParamManager() : mWLGamma(1.0f, "gamma"), mBlueHorizon(0.25f, 0.25f, 1.0f, 1.0f, "blue_horizon", "WLBlueHorizon"), - mHazeDensity(1.0f, 1.0f, 1.0f, 0.5f, "haze_density"), + mHazeDensity(1.0f, "haze_density"), mBlueDensity(0.25f, 0.25f, 0.25f, 1.0f, "blue_density", "WLBlueDensity"), mDensityMult(1.0f, "density_multiplier", 1000), - mHazeHorizon(1.0f, 1.0f, 1.0f, 0.5f, "haze_horizon"), + mHazeHorizon(1.0f, "haze_horizon"), mMaxAlt(4000.0f, "max_y"), // Lighting diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h index bc984b9126..72422500fc 100644 --- a/indra/newview/llwlparammanager.h +++ b/indra/newview/llwlparammanager.h @@ -102,9 +102,8 @@ struct WLFloatControl { { } - inline WLFloatControl & operator = (LLVector4 const & val) { - x = val.mV[0]; - + inline WLFloatControl & operator = (F32 val) { + x = val; return *this; } @@ -340,10 +339,10 @@ public: /// Atmospherics WLColorControl mBlueHorizon; - WLColorControl mHazeDensity; + WLFloatControl mHazeDensity; WLColorControl mBlueDensity; WLFloatControl mDensityMult; - WLColorControl mHazeHorizon; + WLFloatControl mHazeHorizon; WLFloatControl mMaxAlt; /// Lighting diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp index 5bb7025031..b04d30db55 100644 --- a/indra/newview/llwlparamset.cpp +++ b/indra/newview/llwlparamset.cpp @@ -41,33 +41,7 @@ LLWLParamSet::LLWLParamSet(void) : mName("Unnamed Preset"), mCloudScrollXOffset(0.f), mCloudScrollYOffset(0.f) -{ -/* REMOVE or init the LLSD - const std::map<std::string, LLVector4>::value_type hardcodedPreset[] = { - std::make_pair("lightnorm", LLVector4(0.f, 0.707f, -0.707f, 0.f)), - std::make_pair("sunlight_color", LLVector4(0.6f, 0.6f, 2.83f, 2.27f)), - std::make_pair("ambient", LLVector4(0.27f, 0.33f, 0.44f, 1.19f)), - std::make_pair("blue_horizon", LLVector4(0.3f, 0.4f, 0.9f, 1.f)), - std::make_pair("blue_density", LLVector4(0.3f, 0.4f, 0.8f, 1.f)), - std::make_pair("haze_horizon", LLVector4(0.6f, 0.6f, 0.6f, 1.f)), - std::make_pair("haze_density", LLVector4(0.3f, 0.3f, 0.3f, 1.f)), - std::make_pair("cloud_shadow", LLVector4(0.f, 0.f, 0.f, 0.f)), - std::make_pair("density_multiplier", LLVector4(0.001f, 0.001f, 0.001f, 0.001f)), - std::make_pair("distance_multiplier", LLVector4(1.f, 1.f, 1.f, 1.f)), - std::make_pair("max_y", LLVector4(600.f, 600.f, 600.f, 0.f)), - std::make_pair("glow", LLVector4(15.f, 0.001f, -0.03125f, 0.f)), - std::make_pair("cloud_color", LLVector4(0.0f, 0.0f, 0.0f, 0.0f)), - std::make_pair("cloud_pos_density1", LLVector4(0.f, 0.f, 0.f, 1.f)), - std::make_pair("cloud_pos_density2", LLVector4(0.f, 0.f, 0.f, 1.f)), - std::make_pair("cloud_scale", LLVector4(0.42f, 0.f, 0.f, 1.f)), - std::make_pair("gamma", LLVector4(2.0f, 2.0f, 2.0f, 0.0f)), - }; - std::map<std::string, LLVector4>::value_type const * endHardcodedPreset = - hardcodedPreset + LL_ARRAY_SIZE(hardcodedPreset); - - mParamValues.insert(hardcodedPreset, endHardcodedPreset); -*/ -} +{} static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update"); @@ -79,55 +53,78 @@ void LLWLParamSet::update(LLGLSLShader * shader) const i != mParamValues.endMap(); ++i) { - - const std::string& param = i->first; - if( param == "star_brightness" || param == "preset_num" || param == "sun_angle" || + if (param == "star_brightness" || param == "preset_num" || param == "sun_angle" || param == "east_angle" || param == "enable_cloud_scroll" || param == "cloud_scroll_rate" || param == "lightnorm" ) { continue; } - if(param == "cloud_pos_density1") + if (param == "cloud_pos_density1") { LLVector4 val; val.mV[0] = F32(i->second[0].asReal()) + mCloudScrollXOffset; val.mV[1] = F32(i->second[1].asReal()) + mCloudScrollYOffset; val.mV[2] = (F32) i->second[2].asReal(); val.mV[3] = (F32) i->second[3].asReal(); + stop_glerror(); shader->uniform4fv(param, 1, val.mV); stop_glerror(); - } + } + else if (param == "cloud_scale" || param == "cloud_shadow" || + param == "density_multiplier" || param == "distance_multiplier" || + param == "haze_density" || param == "haze_horizon" || + param == "max_y" ) + { + F32 val = (F32) i->second[0].asReal(); + + stop_glerror(); + shader->uniform1f(param, val); + stop_glerror(); + } else // param is the uniform name { - LLVector4 val; - // handle all the different cases - if(i->second.isArray() && i->second.size() == 4) + if (i->second.isArray() && i->second.size() == 4) { + LLVector4 val; + val.mV[0] = (F32) i->second[0].asReal(); val.mV[1] = (F32) i->second[1].asReal(); val.mV[2] = (F32) i->second[2].asReal(); val.mV[3] = (F32) i->second[3].asReal(); + + stop_glerror(); + shader->uniform4fv(param, 1, val.mV); + stop_glerror(); } - else if(i->second.isReal()) + else if (i->second.isReal()) { - val.mV[0] = (F32) i->second.asReal(); + F32 val = (F32) i->second.asReal(); + + stop_glerror(); + shader->uniform1f(param, val); + stop_glerror(); } - else if(i->second.isInteger()) + else if (i->second.isInteger()) { - val.mV[0] = (F32) i->second.asReal(); + S32 val = (S32) i->second.asInteger(); + + stop_glerror(); + shader->uniform1i(param, val); + stop_glerror(); } - else if(i->second.isBoolean()) + else if (i->second.isBoolean()) { - val.mV[0] = i->second.asBoolean(); + S32 val = (i->second.asBoolean() ? 1 : 0); + + stop_glerror(); + shader->uniform1i(param, val); + stop_glerror(); } - stop_glerror(); - shader->uniform4fv(param, 1, val.mV); - stop_glerror(); } } } @@ -148,7 +145,8 @@ void LLWLParamSet::set(const std::string& paramName, float x) } } -void LLWLParamSet::set(const std::string& paramName, float x, float y) { +void LLWLParamSet::set(const std::string& paramName, float x, float y) +{ mParamValues[paramName][0] = x; mParamValues[paramName][1] = y; } @@ -194,7 +192,6 @@ void LLWLParamSet::set(const std::string& paramName, const LLColor4 & val) LLVector4 LLWLParamSet::getVector(const std::string& paramName, bool& error) { - // test to see if right type LLSD cur_val = mParamValues.get(paramName); if (!cur_val.isArray()) @@ -215,7 +212,6 @@ LLVector4 LLWLParamSet::getVector(const std::string& paramName, bool& error) F32 LLWLParamSet::getFloat(const std::string& paramName, bool& error) { - // test to see if right type LLSD cur_val = mParamValues.get(paramName); if (cur_val.isArray() && cur_val.size() != 0) @@ -234,8 +230,6 @@ F32 LLWLParamSet::getFloat(const std::string& paramName, bool& error) return 0; } - - void LLWLParamSet::setSunAngle(float val) { // keep range 0 - 2pi @@ -263,7 +257,6 @@ void LLWLParamSet::setEastAngle(float val) mParamValues["east_angle"] = val; } - void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight) { // set up the iterators @@ -282,7 +275,6 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight) // Iterate through values for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter) { - // If param exists in both src and dest, set the holder variables, otherwise skip if(src.mParamValues.has(iter->first) && dest.mParamValues.has(iter->first)) { diff --git a/indra/newview/llwlparamset.h b/indra/newview/llwlparamset.h index 3c44ed3bb8..b087119dd5 100644 --- a/indra/newview/llwlparamset.h +++ b/indra/newview/llwlparamset.h @@ -110,7 +110,7 @@ public: /// \param error A flag to set if it's not the proper return type LLVector4 getVector(const std::string& paramName, bool& error); - /// Get an integer parameter + /// Get a float parameter /// \param paramName The name of the parameter to set. /// \param error A flag to set if it's not the proper return type F32 getFloat(const std::string& paramName, bool& error); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 676287c0ad..fbd8b3ada3 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1161,24 +1161,13 @@ void send_agent_resume() static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin) { - LLVector3d pos_global; - LLVector3 pos_local; - U8 bits; + LLVector3d pos_local; - bits = compact_local & 0xFF; - pos_local.mV[VZ] = F32(bits) * 4.f; - compact_local >>= 8; + pos_local.mdV[VZ] = (compact_local & 0xFFU) * 4; + pos_local.mdV[VY] = (compact_local >> 8) & 0xFFU; + pos_local.mdV[VX] = (compact_local >> 16) & 0xFFU; - bits = compact_local & 0xFF; - pos_local.mV[VY] = (F32)bits; - compact_local >>= 8; - - bits = compact_local & 0xFF; - pos_local.mV[VX] = (F32)bits; - - pos_global.setVec( pos_local ); - pos_global += region_origin; - return pos_global; + return region_origin + pos_local; } void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const @@ -1199,23 +1188,20 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi iter != LLCharacter::sInstances.end(); ++iter) { LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; - if(!pVOAvatar->isDead() && !pVOAvatar->isSelf()) + LLVector3d pos_global = pVOAvatar->getPositionGlobal(); + LLUUID uuid = pVOAvatar->getID(); + if( !pVOAvatar->isDead() + && !pVOAvatar->isSelf() + && !uuid.isNull() && + dist_vec_squared(pos_global, relative_to) <= radius_squared) { - LLUUID uuid = pVOAvatar->getID(); - if(!uuid.isNull()) + if(positions != NULL) { - LLVector3d pos_global = pVOAvatar->getPositionGlobal(); - if(dist_vec_squared(pos_global, relative_to) <= radius_squared) - { - if(positions != NULL) - { - positions->push_back(pos_global); - } - if(avatar_ids !=NULL) - { - avatar_ids->push_back(uuid); - } - } + positions->push_back(pos_global); + } + if(avatar_ids !=NULL) + { + avatar_ids->push_back(uuid); } } } @@ -1233,9 +1219,9 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi { LLUUID uuid = regionp->mMapAvatarIDs.get(i); // if this avatar doesn't already exist in the list, add it - if(uuid.notNull() && avatar_ids!=NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end()) + if(uuid.notNull() && avatar_ids != NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end()) { - if(positions != NULL) + if (positions != NULL) { positions->push_back(pos_global); } diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index e50851b8e7..a3ccf87cfc 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -77,6 +77,7 @@ LLUIImagePtr LLWorldMapView::sAvatarYouLargeImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarLevelImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL; +LLUIImagePtr LLWorldMapView::sAvatarUnknownImage = NULL; LLUIImagePtr LLWorldMapView::sTelehubImage = NULL; LLUIImagePtr LLWorldMapView::sInfohubImage = NULL; @@ -120,6 +121,7 @@ void LLWorldMapView::initClass() sAvatarLevelImage = LLUI::getUIImage("map_avatar_32.tga"); sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_32.tga"); sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_32.tga"); + sAvatarUnknownImage = LLUI::getUIImage("map_avatar_unknown_32.tga"); sHomeImage = LLUI::getUIImage("map_home.tga"); sTelehubImage = LLUI::getUIImage("map_telehub.tga"); @@ -149,6 +151,7 @@ void LLWorldMapView::cleanupClass() sAvatarLevelImage = NULL; sAvatarAboveImage = NULL; sAvatarBelowImage = NULL; + sAvatarUnknownImage = NULL; sTelehubImage = NULL; sInfohubImage = NULL; @@ -513,7 +516,7 @@ void LLWorldMapView::draw() TRUE, "You are here", "", - llround(LLFontGL::getFontSansSerifSmall()->getLineHeight())); // offset vertically by one line, to avoid overlap with target tracking + LLFontGL::getFontSansSerifSmall()->getLineHeight()); // offset vertically by one line, to avoid overlap with target tracking } // Draw the current agent viewing angle @@ -992,7 +995,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& const S32 TEXT_PADDING = DEFAULT_TRACKING_ARROW_SIZE + 2; S32 half_text_width = llfloor(font->getWidthF32(label) * 0.5f); text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING); - text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llround(font->getLineHeight()) - TEXT_PADDING - vert_offset); + text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - font->getLineHeight() - TEXT_PADDING - vert_offset); if (label != "") { @@ -1005,7 +1008,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& if (tooltip != "") { - text_y -= (S32)font->getLineHeight(); + text_y -= font->getLineHeight(); font->renderUTF8( tooltip, 0, @@ -1147,17 +1150,25 @@ void LLWorldMapView::drawAvatar(F32 x_pixels, F32 y_pixels, const LLColor4& color, F32 relative_z, - F32 dot_radius) + F32 dot_radius, + bool unknown_relative_z) { const F32 HEIGHT_THRESHOLD = 7.f; LLUIImagePtr dot_image = sAvatarLevelImage; - if(relative_z < -HEIGHT_THRESHOLD) + if (unknown_relative_z) { - dot_image = sAvatarBelowImage; + dot_image = sAvatarUnknownImage; } - else if(relative_z > HEIGHT_THRESHOLD) - { - dot_image = sAvatarAboveImage; + else + { + if(relative_z < -HEIGHT_THRESHOLD) + { + dot_image = sAvatarBelowImage; + } + else if(relative_z > HEIGHT_THRESHOLD) + { + dot_image = sAvatarAboveImage; + } } S32 dot_width = llround(dot_radius * 2.f); dot_image->draw(llround(x_pixels - dot_radius), @@ -1203,7 +1214,7 @@ void LLWorldMapView::drawIconName(F32 x_pixels, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW); - text_y -= llround(LLFontGL::getFontSansSerif()->getLineHeight()); + text_y -= LLFontGL::getFontSansSerif()->getLineHeight(); // render text LLFontGL::getFontSansSerif()->renderUTF8(second_line, 0, diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h index 9ab53b1ba3..a2a6dc53fb 100644 --- a/indra/newview/llworldmapview.h +++ b/indra/newview/llworldmapview.h @@ -112,7 +112,8 @@ public: F32 y_pixels, const LLColor4& color, F32 relative_z = 0.f, - F32 dot_radius = 3.f); + F32 dot_radius = 3.f, + bool reached_max_z = false); static void drawIconName(F32 x_pixels, F32 y_pixels, const LLColor4& color, @@ -138,6 +139,7 @@ public: static LLUIImagePtr sAvatarLevelImage; static LLUIImagePtr sAvatarAboveImage; static LLUIImagePtr sAvatarBelowImage; + static LLUIImagePtr sAvatarUnknownImage; static LLUIImagePtr sTelehubImage; static LLUIImagePtr sInfohubImage; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fc499bfe9c..6900a82ea8 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -203,10 +203,6 @@ extern S32 gBoxFrame; extern BOOL gDisplaySwapBuffers; extern BOOL gDebugGL; -// hack counter for rendering a fixed number of frames after toggling -// fullscreen to work around DEV-5361 -static S32 sDelayedVBOEnable = 0; - BOOL gAvatarBacklight = FALSE; BOOL gDebugPipeline = FALSE; @@ -411,6 +407,7 @@ LLPipeline::LLPipeline() : mOldRenderDebugMask(0), mGroupQ1Locked(false), mGroupQ2Locked(false), + mResetVertexBuffers(false), mLastRebuildPool(NULL), mAlphaPool(NULL), mSkyPool(NULL), @@ -692,8 +689,6 @@ void LLPipeline::destroyGL() if (LLVertexBuffer::sEnableVBOs) { - // render 30 frames after switching to work around DEV-5361 - sDelayedVBOEnable = 30; LLVertexBuffer::sEnableVBOs = FALSE; } } @@ -2523,15 +2518,6 @@ void LLPipeline::updateGeom(F32 max_dtime) assertInitialized(); - if (sDelayedVBOEnable > 0) - { - if (--sDelayedVBOEnable <= 0) - { - resetVertexBuffers(); - LLVertexBuffer::sEnableVBOs = TRUE; - } - } - // notify various object types to reset internal cost metrics, etc. // for now, only LLVOVolume does this to throttle LOD changes LLVOVolume::preUpdateGeom(); @@ -6180,7 +6166,7 @@ LLSpatialPartition* LLPipeline::getSpatialPartition(LLViewerObject* vobj) void LLPipeline::resetVertexBuffers(LLDrawable* drawable) { - if (!drawable || drawable->isDead()) + if (!drawable) { return; } @@ -6194,6 +6180,18 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable) void LLPipeline::resetVertexBuffers() { + mResetVertexBuffers = true; +} + +void LLPipeline::doResetVertexBuffers() +{ + if (!mResetVertexBuffers) + { + return; + } + + mResetVertexBuffers = false; + for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -6219,11 +6217,9 @@ void LLPipeline::resetVertexBuffers() if (LLVertexBuffer::sGLCount > 0) { - llwarns << "VBO wipe failed." << llendl; + llwarns << "VBO wipe failed -- " << LLVertexBuffer::sGLCount << " buffers remaining." << llendl; } - llassert(LLVertexBuffer::sGLCount == 0); - LLVertexBuffer::unbind(); sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 9c78048c46..3c4e389ce0 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -111,6 +111,7 @@ public: void destroyGL(); void restoreGL(); void resetVertexBuffers(); + void doResetVertexBuffers(); void resizeScreenTexture(); void releaseGLBuffers(); void releaseScreenBuffers(); @@ -653,6 +654,8 @@ protected: bool mGroupQ2Locked; bool mGroupQ1Locked; + bool mResetVertexBuffers; //if true, clear vertex buffers on next update + LLViewerObject::vobj_list_t mCreateQ; LLDrawable::drawable_set_t mRetexturedList; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 8baaa14595..b616e2327b 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -615,6 +615,9 @@ name="PanelFocusBackgroundColor" reference="DkGray2" /> <color + name="PanelNotificationBackground" + value="1 0.3 0.3 0" /> + <color name="ParcelHoverColor" reference="White" /> <color @@ -747,6 +750,9 @@ name="TitleBarFocusColor" reference="White_10" /> <color + name="ToastBackground" + value="0.3 0.3 0.3 0" /> + <color name="ToolTipBgColor" value="0.937 0.89 0.655 1" /> <color diff --git a/indra/newview/skins/default/textures/checker.png b/indra/newview/skins/default/textures/checker.png Binary files differnew file mode 100644 index 0000000000..1ab87e3f02 --- /dev/null +++ b/indra/newview/skins/default/textures/checker.png diff --git a/indra/newview/skins/default/textures/map_avatar_unknown_32.tga b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga Binary files differnew file mode 100644 index 0000000000..d1192478c6 --- /dev/null +++ b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index e4a8622a4b..eabcc68916 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -122,6 +122,8 @@ with the same filename but different name <texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" /> <texture name="Check_Mark" file_name="icons/check_mark.png" preload="true" /> + <texture name="Checker" file_name="checker.png" preload="false" /> + <texture name="Command_AboutLand_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_Appearance_Icon" file_name="toolbar_icons/appearance.png" preload="true" /> <texture name="Command_Avatar_Icon" file_name="toolbar_icons/avatars.png" preload="true" /> diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml index 930bbaa8cb..d11373ce1d 100644 --- a/indra/newview/skins/default/xui/en/floater_aaa.xml +++ b/indra/newview/skins/default/xui/en/floater_aaa.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater - legacy_header_height="18" can_minimize="false" can_tear_off="false" can_resize="true" @@ -16,67 +15,98 @@ save_dock_state="true" save_visibility="true" single_instance="true" - width="320"> - <string name="nudge_parabuild" translate="false">Nudge 1</string> - <string name="test_the_vlt">This string CHANGE2 is extracted.</string> - <string name="testing_eli">Just a test. changes.</string> - <text_editor - parse_urls="true" - bg_readonly_color="ChatHistoryBgColor" - bg_writeable_color="ChatHistoryBgColor" - border_visible="false" - follows="all" - font="SansSerif" - left="1" - top="20" - layout="topleft" - height="260" - name="chat_history" - max_length="200000" - parse_highlights="true" - text_color="ChatHistoryTextColor" - text_readonly_color="ChatHistoryTextColor" - translate="false" - track_end="true" - wrap="true" - width="320"> - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - Really long line that is long enough to wrap once with jyg descenders. - </text_editor> + width="650"> + <text left="0" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="top"> +this +is +some +text +that +is +top +aligned</text> + <text left_pad="5" + follows="left|top|bottom" + top="5" + bottom="-5" + clip_partial="true" + width="100" + valign="center"> +this +is +some +text +that +is +center +aligned</text> + <text left_pad="5" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="bottom"> +this +is +some +text +that +is +bottom +aligned</text> + <text_editor left_pad="5" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="top"> +this +is +some +text +that +is +top +aligned + </text_editor> + <text_editor left_pad="5" + follows="left|top|bottom" + top="5" + bottom="-5" + clip_partial="true" + width="100" + valign="center"> +this +is +some +text +that +is +center +aligned + </text_editor> + <text_editor left_pad="5" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="bottom"> +this +is +some +text +that +is +bottom +aligned + </text_editor> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 1d5a6740b7..3a6c2678c1 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -192,12 +192,12 @@ type="string" length="1" follows="left|top" - height="20" + height="18" layout="topleft" left_pad="2" valign="center" name="ContentRatingText" - top_delta="0" + top_delta="-2" width="250"> Adult </text> @@ -209,7 +209,7 @@ layout="topleft" left="10" name="Owner:" - top_pad="1" + top_pad="3" width="100"> Owner: </text> @@ -736,7 +736,7 @@ height="16" layout="topleft" left_pad="10" - top_delta="-3" + top_delta="-1" mouse_opaque="false" name="region_maturity_text" valign="center" @@ -1210,7 +1210,7 @@ Only large parcels can be listed in search. type="string" length="1" follows="left|top" - text_color="white" + text_color="White" height="16" layout="topleft" left="10" @@ -1500,7 +1500,7 @@ Only large parcels can be listed in search. layout="topleft" left="20" name="Snapshot:" - text_color="white" + text_color="White" top="225" width="200"> Snapshot: @@ -1546,7 +1546,7 @@ Only large parcels can be listed in search. layout="topleft" left="255" top="282" - text_color="white" + text_color="White" name="landing_point" word_wrap="true" width="200"> @@ -1576,7 +1576,7 @@ Only large parcels can be listed in search. <text type="string" length="1" - text_color="white" + text_color="White" follows="left|top" height="16" layout="topleft" @@ -1951,7 +1951,7 @@ Only large parcels can be listed in search. name="access_estate_defined"> (Defined by the Estate) </panel.string> - <panel.string + <panel.string name="estate_override"> One or more of these options is set at the estate level </panel.string> @@ -2085,7 +2085,7 @@ Only large parcels can be listed in search. column_padding="0" follows="top|bottom" heading_height="14" - height="120" + height="125" layout="topleft" left="0" multi_select="true" @@ -2134,7 +2134,7 @@ Only large parcels can be listed in search. column_padding="0" follows="top|bottom" heading_height="14" - height="120" + height="125" layout="topleft" left="0" multi_select="true" diff --git a/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml new file mode 100644 index 0000000000..b5538a511c --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + height="190" + layout="topleft" + name="Anim Preview" + help_topic="animation_anim_preview" + title="ANIMATION.ANIM" + width="300"> + <text + type="string" + length="1" + follows="left|top" + height="15" + layout="topleft" + left="10" + mouse_opaque="false" + name="name_label" + top="20" + width="275"> + Name: + </text> + <line_editor + border_style="line" + border_thickness="1" + follows="left|top|right" + height="19" + layout="topleft" + left_delta="0" + max_length_bytes="63" + name="name_form" + top_pad="0" + width="280" /> + <text + type="string" + length="1" + follows="left|top" + height="15" + layout="topleft" + left_delta="0" + mouse_opaque="false" + name="description_label" + top_pad="10" + width="270"> + Description: + </text> + <line_editor + border_style="line" + border_thickness="1" + follows="left|top|right" + height="19" + layout="topleft" + left_delta="0" + max_length_bytes="127" + name="description_form" + top_pad="0" + width="280" /> + <button + follows="left|bottom" + height="22" + label="Upload (L$[AMOUNT])" + layout="topleft" + left="45" + name="ok_btn" + top_pad="60" + width="150" /> + <button + follows="right|bottom" + height="22" + label="Cancel" + label_selected="Cancel" + layout="topleft" + name="cancel_btn" + left_pad="5" + width="90" /> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml index cb6b2f6ebc..cb6b2f6ebc 100644 --- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_bvh_preview.xml diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml index 35918e9705..38428b36fc 100644 --- a/indra/newview/skins/default/xui/en/floater_build_options.xml +++ b/indra/newview/skins/default/xui/en/floater_build_options.xml @@ -1,70 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="198" + height="170" layout="topleft" name="build options floater" help_topic="build_options_floater" save_rect="true" title="GRID OPTIONS" width="264"> - <floater.string - name="grid_screen_text"> - Screen - </floater.string> - <floater.string - name="grid_local_text"> - Local - </floater.string> - <floater.string - name="grid_world_text"> - World - </floater.string> - <floater.string - name="grid_reference_text"> - Reference - </floater.string> - <floater.string - name="grid_attachment_text"> - Attachment - </floater.string> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left="10" - tool_tip="Grid opacity" - name="grid_mode_label" - top_pad="30" - width="123"> - Mode - </text> - <combo_box - height="23" - layout="topleft" - left_pad="9" - follows="left|top" - name="combobox grid mode" - tool_tip="Choose the type of grid ruler for positioning the object" - top_delta="-3" - width="108"> - <combo_box.item - label="World grid" - name="World" - value="World" /> - <combo_box.item - label="Local grid" - name="Local" - value="Local" /> - <combo_box.item - label="Reference grid" - name="Reference" - value="Reference" /> - <combo_box.commit_callback - function="GridOptions.gridMode"/> - </combo_box> <spinner control_name="GridResolution" follows="left|top" @@ -77,7 +20,7 @@ max_val="5" min_val="0.01" name="GridResolution" - top_pad="4" + top_pad="30" width="200" /> <spinner control_name="GridDrawSize" diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml index 92001534e7..ac96a70805 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml @@ -62,7 +62,7 @@ layout="topleft" left="10" name="buy_text" - text_color="white" + text_color="White" top="220" use_ellipses="true" width="260"> diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 6afa24d04a..553c5d51d0 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -215,7 +215,7 @@ <text type="string" length="1" - text_color="0.7 0.7 0.7 0.5" + text_color="LtGray_50" follows="top|left" layout="topleft" halign="right" @@ -229,7 +229,7 @@ <text type="string" length="1" - text_color="0.7 0.7 0.7 0.5" + text_color="LtGray_50" follows="top|left" layout="topleft" halign="right" @@ -243,7 +243,7 @@ Re-enter amount to see the latest exchange rate. <text type="string" length="1" - text_color="0.7 0.7 0.7 0.5" + text_color="LtGray_50" follows="top|left" layout="topleft" halign="right" @@ -257,7 +257,7 @@ Re-enter amount to see the latest exchange rate. <text type="string" length="1" - text_color="0.7 0.7 0.7 0.5" + text_color="LtGray_50" follows="top|left" layout="topleft" halign="right" diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml index 8dfb6ba00c..5fdd4aa49d 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml @@ -89,7 +89,7 @@ left_delta="0" line_spacing.pixels="7" name="buy_text" - text_color="white" + text_color="White" top_pad="5" use_ellipses="true" width="260" @@ -106,7 +106,7 @@ Buy for L$[AMOUNT] from: left_delta="0" line_spacing.pixels="7" name="buy_name_text" - text_color="white" + text_color="White" top_pad="5" use_ellipses="true" width="260"> diff --git a/indra/newview/skins/default/xui/en/floater_choose_group.xml b/indra/newview/skins/default/xui/en/floater_choose_group.xml index dc1ee5f24e..2cf6e682fd 100644 --- a/indra/newview/skins/default/xui/en/floater_choose_group.xml +++ b/indra/newview/skins/default/xui/en/floater_choose_group.xml @@ -20,7 +20,7 @@ Choose a group: </text> <scroll_list - height="160" + height="165" layout="topleft" left_delta="0" name="group list" diff --git a/indra/newview/skins/default/xui/en/floater_fast_timers.xml b/indra/newview/skins/default/xui/en/floater_fast_timers.xml index 49aa8f3840..77adb5524e 100644 --- a/indra/newview/skins/default/xui/en/floater_fast_timers.xml +++ b/indra/newview/skins/default/xui/en/floater_fast_timers.xml @@ -22,7 +22,6 @@ top="5" width="180" height="40" - pad_bottom="-5" label="Pause" font="SansSerifHuge"/> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index 6f387f4800..3d33d19de5 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -99,7 +99,7 @@ halign="center" font="SansSerifMedium" font_shadow="hard" - valign="bottom"> + valign="top"> Drag items here to create folders </text> </panel> @@ -114,8 +114,8 @@ height="20" wrap="true" halign="left" - valign="bottom" - font="SansSerif" /> + valign="center" + font="SansSerif"/> <button label="Send to Marketplace" tool_tip="Push to my Marketplace Storefront" diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index eebc5ddc72..0e211551e6 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -117,18 +117,18 @@ name="lod_tab_border" top_pad="0" width="619" /> - <text - follows="left|top" - height="18" - initial_value="Source" - layout="topleft" - left="75" - name="source" - text_color="ModelUploaderLabels" - top="15" - valign="center" - value="Source" - width="335" /> + <text + follows="left|top" + height="18" + initial_value="Source" + layout="topleft" + left="75" + name="source" + text_color="ModelUploaderLabels" + top="15" + valign="center" + value="Source" + width="335"/> <text follows="left|top" halign="right" @@ -163,7 +163,7 @@ name="high_label" text_color="ModelUploaderLabels" top_pad="10" - valign="center" + valign="top" value="High" width="65" /> <combo_box @@ -240,34 +240,34 @@ <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="high_triangles" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="high_vertices" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="center" - height="18" + height="15" initial_value="" layout="topleft" left_pad="0" name="high_status" - valign="center" + valign="top" value="" width="65" /> <icon @@ -277,7 +277,7 @@ left_delta="20" mouse_opaque="true" name="status_icon_high" - top_delta="0" + top_delta="-2" width="16" /> <text follows="left|top" @@ -288,7 +288,7 @@ name="medium_label" text_color="ModelUploaderLabels" top_pad="15" - valign="center" + valign="top" value="Medium" width="65" /> <combo_box @@ -368,34 +368,34 @@ <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="medium_triangles" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="medium_vertices" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="center" - height="18" + height="15" initial_value="" layout="topleft" left_pad="0" name="medium_status" - valign="center" + valign="top" value="" width="65" /> <icon @@ -405,7 +405,7 @@ left_delta="20" mouse_opaque="true" name="status_icon_medium" - top_delta="0" + top_delta="-2" width="16" /> <text follows="left|top" @@ -416,7 +416,7 @@ name="low_label" text_color="ModelUploaderLabels" top_pad="15" - valign="center" + valign="top" value="Low" width="65" /> <combo_box @@ -496,34 +496,34 @@ <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="low_triangles" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="low_vertices" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="center" - height="18" + height="15" initial_value="" layout="topleft" left_pad="0" name="low_status" - valign="center" + valign="top" value="" width="65" /> <icon @@ -533,7 +533,7 @@ left_delta="20" mouse_opaque="true" name="status_icon_low" - top_delta="0" + top_delta="-2" width="16" /> <text follows="left|top" @@ -544,7 +544,7 @@ name="lowest_label" text_color="ModelUploaderLabels" top_pad="15" - valign="center" + valign="top" value="Lowest" width="65" /> <combo_box @@ -624,34 +624,34 @@ <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="lowest_triangles" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="right" - height="18" + height="15" initial_value="0" layout="topleft" left_pad="0" name="lowest_vertices" - valign="center" + valign="top" value="0" width="65" /> <text follows="left|top" halign="center" - height="18" + height="15" initial_value="" layout="topleft" left_pad="0" name="lowest_status" - valign="center" + valign="top" value="" width="65" /> <icon diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 402868bb97..b2662331b0 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -100,7 +100,7 @@ help_topic="preferences_colors_tab" name="colors" /> <panel - class="panel_preference" + class="panel_preference_privacy" filename="panel_preferences_privacy.xml" label="Privacy" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_preview_animation.xml b/indra/newview/skins/default/xui/en/floater_preview_animation.xml index 8427c7b06f..3ea5f54f2c 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_animation.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_animation.xml @@ -41,18 +41,26 @@ label_selected="Stop" layout="topleft" left="10" - name="Anim play btn" + name="Inworld" tool_tip="Play this animation so that others can see it" top="47" - width="125" /> + width="125"> + <button.commit_callback + function="PreviewAnim.Play" + parameter="Inworld" /> + </button> <button height="20" label="Play Locally" label_selected="Stop" layout="topleft" left_pad="5" - name="Anim audition btn" + name="Locally" tool_tip="Play this animation so that only you can see it" top_delta="0" - width="125" /> + width="125"> + <button.commit_callback + function="PreviewAnim.Play" + parameter="Locally" /> + </button> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml index f95f21e63a..a04050e7eb 100644 --- a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml +++ b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml @@ -32,6 +32,26 @@ bg_alpha_color="blue" height="11" min_height="0" + visible="false" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="11" + min_height="0" + visible="true" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="11" + min_height="0" background_visible="true"> <text follows="top|left|right" halign="center" text_color="white">flex</text> </layout_panel> diff --git a/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml b/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml new file mode 100644 index 0000000000..d11373ce1d --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_test_text_vertical_aligment.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + can_minimize="false" + can_tear_off="false" + can_resize="true" + can_drag_on_left="false" + can_close="true" + can_dock="true" + bevel_style="in" + height="300" + layout="topleft" + name="Test Floater" + save_rect="true" + title="TEST FLOATER" + save_dock_state="true" + save_visibility="true" + single_instance="true" + width="650"> + <text left="0" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="top"> +this +is +some +text +that +is +top +aligned</text> + <text left_pad="5" + follows="left|top|bottom" + top="5" + bottom="-5" + clip_partial="true" + width="100" + valign="center"> +this +is +some +text +that +is +center +aligned</text> + <text left_pad="5" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="bottom"> +this +is +some +text +that +is +bottom +aligned</text> + <text_editor left_pad="5" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="top"> +this +is +some +text +that +is +top +aligned + </text_editor> + <text_editor left_pad="5" + follows="left|top|bottom" + top="5" + bottom="-5" + clip_partial="true" + width="100" + valign="center"> +this +is +some +text +that +is +center +aligned + </text_editor> + <text_editor left_pad="5" + follows="left|top|bottom" + top="5" + clip_partial="true" + bottom="-5" + width="100" + valign="bottom"> +this +is +some +text +that +is +bottom +aligned + </text_editor> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml index 2df9bb35fe..1d31fbd6dc 100644 --- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml +++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml @@ -8,21 +8,7 @@ help_topic="floater_test_textbox" translate="false" width="800"> - <text - type="string" - length="1" - height="90" - layout="topleft" - left="10" - top_pad="30" - width="300"> - First line of multiple lines -Second line of multiple lines -Third line of multiple lines -Fourth line of multiple lines -Fifth line of multiple lines - </text> - <text + <text clip_partial="true" top_pad="10" left="10" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index f9147ea650..2d63c94fe1 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -14,7 +14,27 @@ save_visibility="true" sound_flags="0" width="295"> - <floater.string + <floater.string + name="grid_screen_text"> + Screen + </floater.string> + <floater.string + name="grid_local_text"> + Local + </floater.string> + <floater.string + name="grid_world_text"> + World + </floater.string> + <floater.string + name="grid_reference_text"> + Reference + </floater.string> + <floater.string + name="grid_attachment_text"> + Attachment + </floater.string> + <floater.string name="status_rotate"> Drag colored bands to rotate object </floater.string> @@ -312,20 +332,48 @@ top_pad="0" name="checkbox snap to grid" width="134" /> - <button - left_pad="0" - label="Options..." + <combo_box + height="20" + layout="topleft" + follows="left|top" + name="combobox grid mode" + tool_tip="Choose the type of grid ruler for positioning the object" + top="83" + left="195" + top_pad="0" + width="60"> + <combo_box.item + label="World" + name="World" + value="World" /> + <combo_box.item + label="Local" + name="Local" + value="Local" /> + <combo_box.item + label="Reference" + name="Reference" + value="Reference" /> + <combo_box.commit_callback + function="BuildTool.gridMode"/> + </combo_box> + + <button + left="259" + label="" + image_selected="ForwardArrow_Press" + image_unselected="ForwardArrow_Off" layout="topleft" follows="top|left" name="Options..." tool_tip="See more grid options" top="83" - right="-35" - width="65" - height="21" > + width="25" + height="20" > <button.commit_callback function="BuildTool.gridOptions"/> </button> + <button follows="left|top" height="20" diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 72e6187a14..fcaae9d172 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -18,7 +18,7 @@ <text follows="left|top" font="SansSerifMedium" - valign="bottom" + valign="top" halign="left" height="20" layout="topleft" @@ -33,7 +33,7 @@ <text follows="left|top" font="SansSerifMedium" - valign="bottom" + valign="top" halign="left" height="20" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index cea19ec75c..d99b29f324 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -71,7 +71,7 @@ layout="topleft" left_pad="10" name="user_text" - text_color="white" + text_color="White" top="4" use_ellipses="true" value="My Avatar:" diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index 8d14c974b4..bfeb8fc470 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -56,7 +56,7 @@ owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about halign="right" right="-5" name="price_text" - text_color="white" + text_color="White" top="60" font_shadow="none" width="60"> @@ -90,6 +90,7 @@ L$30,000 follows="all" font="SansSerifSmall" height="13" + clip="false" name="object_media_url" width="207" left_pad="2" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 73ec6ffdb3..d35cebbd16 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1667,7 +1667,7 @@ Unable to create output file: [FILE] icon="alertmodal.tga" name="DoNotSupportBulkAnimationUpload" type="alertmodal"> -[APP_NAME] does not currently support bulk upload of animation files. +[APP_NAME] does not currently support bulk upload of BVH format animation files. <tag>fail</tag> </notification> @@ -6431,11 +6431,11 @@ Grant this request? <form name="form"> <button index="-2" - name="Mute" + name="Client_Side_Mute" text="Block"/> <button index="-1" - name="Ignore" + name="Client_Side_Ignore" text="Ignore"/> </form> </notification> @@ -6450,11 +6450,11 @@ Grant this request? <form name="form"> <button index="-2" - name="Mute" + name="Client_Side_Mute" text="Block"/> <button index="-1" - name="Ignore" + name="Client_Side_Ignore" text="Ignore"/> </form> </notification> diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml index 18532da593..3577d2f457 100644 --- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml @@ -5,20 +5,46 @@ height="305" layout="topleft" left="0" + right="-1" name="block_list_panel" help_topic="blocked_list" min_height="350" min_width="240" - right="-1"> + width="280"> + <button + follows="top|left" + height="24" + image_hover_unselected="BackButton_Over" + image_pressed="BackButton_Press" + image_unselected="BackButton_Off" + layout="topleft" + name="back" + left="4" + tab_stop="false" + top="1" + width="30"/> + <text + follows="top|left|right" + font="SansSerifLargeBold" + height="20" + layout="topleft" + left_pad="10" + name="title_text" + text_color="white" + top="5" + width="250"> + Block List + </text> <scroll_list follows="all" - height="220" + height="190" layout="topleft" - left="3" + left="5" name="blocked" tool_tip="List of currently blocked Residents" - right="-1" - top="1"> + top="30" + right="-1" + width="270"> <scroll_list.columns name="item_name" /> <scroll_list.columns diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 2645d472f9..5c5c718bdf 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -23,7 +23,7 @@ <text parse_urls="false" allow_scroll="false" - v_pad = "7" + v_pad = "6" read_only = "true" follows="left|right" font.style="BOLD" @@ -37,7 +37,7 @@ top="0" translate="false" use_ellipses="true" - valign="bottom" + valign="top" value="TestString PleaseIgnore" /> <text allow_scroll="false" @@ -49,7 +49,7 @@ left_pad="5" name="time_box" right="-5" - top="8" + top="7" value="23:30" width="110" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml index 6af1105400..1b97de2b05 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_item.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml @@ -16,13 +16,13 @@ top="3" width="18" /> <text_chat - top="5" + top="3" left="30" height="120" text_color="white" word_wrap="true" mouse_opaque="true" - valign="bottom" + valign="top" name="msg_text"> </text_chat> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml index df459b4083..4b05ab27e4 100644 --- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml @@ -29,7 +29,7 @@ width="380" /> <icon height="16" - color="0.75 0.75 0.75 1" + color="LtGray" follows="top|left" image_name="Inv_Object" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index 69a692e2c4..f34b913218 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -164,7 +164,7 @@ layout="topleft" left_pad="8" name="edit_wearable_title" - text_color="white" + text_color="White" top="3" value="Editing Shape" use_ellipses="true" @@ -190,7 +190,7 @@ layout="topleft" left="10" name="description_text" - text_color="white" + text_color="White" top="10" value="Shape:" width="150" /> @@ -254,7 +254,7 @@ name="description" prevalidate_callback="ascii" select_on_focus="true" - text_color="black" + text_color="Black" top_pad="3" width="290" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index a7178dc288..eea2606125 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -172,7 +172,7 @@ including the Everyone and Owner Roles. draw_heading="true" draw_stripes="false" heading_height="23" - height="130" + height="132" layout="topleft" search_column="1" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml index 383e637ace..413e22e444 100644 --- a/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_inbox_inventory.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <inbox_inventory_panel + accepts_drag_and_drop="false" name="inventory_inbox" start_folder="Received Items" follows="all" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml index 4251128714..2e5d650902 100644 --- a/indra/newview/skins/default/xui/en/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml @@ -15,7 +15,7 @@ <panel background_visible="true" bevel_style="in" - bg_alpha_color="black" + bg_alpha_color="Black" follows="top" height="24" label="im_header" @@ -64,7 +64,7 @@ left_pad="5" name="user_name" parse_urls="false" - text_color="white" + text_color="White" top="8" translate="false" use_ellipses="true" @@ -90,7 +90,7 @@ layout="topleft" left="10" name="message" - text_color="white" + text_color="White" top="33" use_ellipses="true" value="" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index d2088594dd..fd6e96b9a7 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -271,7 +271,7 @@ <text_editor bg_readonly_color="DkGray2" follows="all" - height="70" + height="75" layout="topleft" left="0" max_length="127" @@ -288,7 +288,7 @@ layout="topleft" left="0" name="folder_label" - top_pad="15" + top_pad="10" value="Landmark location:" width="290" /> <combo_box diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index d6d8b2a83e..1c882bb099 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -80,7 +80,6 @@ top="16" width="288" /> <recent_inventory_panel - accepts_drag_and_drop="false" bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" background_visible="true" 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 4bf420b79f..3edeb9aa36 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -70,7 +70,7 @@ layout="topleft" auto_resize="true" user_resize="true" - min_width="480" + min_width="410" name="navigation_layout_panel" width="480"> <panel @@ -148,15 +148,15 @@ layout="topleft" auto_resize="true" user_resize="true" - min_width="315" + min_width="185" name="favorites_layout_panel" - width="315"> + width="320"> <icon follows="top|left" height="25" image_name="ChatBarHandle" layout="topleft" - left="-318" + left="-323" name="resize_handle" top="4" width="5" /> @@ -171,16 +171,17 @@ name="favorite" image_drag_indication="Accordion_ArrowOpened_Off" tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" - width="311"> + width="320"> <label follows="left|top" - height="15" + height="13" layout="topleft" left="10" name="favorites_bar_label" text_color="LtGray" tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" - top="12" + top="13" + valign="bottom" width="102"> Favorites Bar </label> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml index d492f9bd68..d683116eb8 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml @@ -1,35 +1,63 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel - height="300" follows="all" + height="300" + help_topic="nearby_chat" layout="topleft" name="nearby_chat" - help_topic="nearby_chat" width="320"> - <check_box - bottom_delta="36" - control_name="TranslateChat" - enabled="true" - height="16" - label="Translate chat" - layout="topleft" - left="5" - name="translate_chat_checkbox" - width="230" /> - <chat_history - parse_urls="true" - bg_readonly_color="ChatHistoryBgColor" - bg_writeable_color="ChatHistoryBgColor" - follows="all" - left="5" - top_delta="17" - layout="topleft" - height="260" - name="chat_history" - parse_highlights="true" - text_color="ChatHistoryTextColor" - text_readonly_color="ChatHistoryTextColor" - right_widget_pad="5" - left_widget_pad="0" - width="315" /> + <layout_stack + follows="all" + height="295" + layout="topleft" + left="0" + name="stack" + top="5" + orientation="vertical" + width="320"> + <layout_panel + auto_resize="false" + height="26" + layout="topleft" + left_delta="0" + name="translate_chat_checkbox_lp" + top_delta="0" + visible="true" + width="313"> + <check_box + top="10" + control_name="TranslateChat" + enabled="true" + height="16" + label="Translate chat" + layout="topleft" + left="5" + name="translate_chat_checkbox" + width="300" /> + </layout_panel> + <layout_panel + auto_resize="true" + height="277" + left_delta="0" + layout="topleft" + name="chat_history_lp" + width="318"> + <chat_history + bg_readonly_color="ChatHistoryBgColor" + bg_writeable_color="ChatHistoryBgColor" + follows="all" + layout="topleft" + left="5" + left_widget_pad="0" + height="272" + name="chat_history" + parse_highlights="true" + parse_urls="true" + right_widget_pad="5" + text_color="ChatHistoryTextColor" + text_readonly_color="ChatHistoryTextColor" + top="0" + width="313" /> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml index f6f62ac54e..94c468e1bb 100644 --- a/indra/newview/skins/default/xui/en/panel_notification.xml +++ b/indra/newview/skins/default/xui/en/panel_notification.xml @@ -3,8 +3,8 @@ background_opaque="false" border_visible="false" background_visible="true" - bg_alpha_color="1 0.3 0.3 0" - bg_opaque_color="1 0.3 0.3 0" + bg_alpha_color="PanelNotificationBackground" + bg_opaque_color="PanelNotificationBackground" label="notification_panel" layout="topleft" left="0" @@ -20,8 +20,8 @@ border_visible="false" bevel_style="none" background_visible="true" - bg_alpha_color="0.3 0.3 0.3 0" - bg_opaque_color="0.3 0.3 0.3 0" + bg_alpha_color="ToastBackground" + bg_opaque_color="ToastBackground" follows="left|right|top" height="100" label="info_panel" @@ -39,7 +39,7 @@ left="10" name="text_box" read_only="true" - text_color="white" + text_color="White" top="10" visible="false" width="285" @@ -52,7 +52,7 @@ layout="topleft" left="10" name="caution_text_box" - text_color="1 0.82 0.46 1" + text_color="NotifyCautionBoxColor" top="10" visible="false" width="285" @@ -60,7 +60,7 @@ <text_editor h_pad="0" v_pad="0" - bg_readonly_color="0.0 0.0 0.0 0" + bg_readonly_color="Transparent" border_visible="false" embedded_items="false" enabled="false" @@ -73,8 +73,8 @@ name="text_editor_box" read_only="true" tab_stop="false" - text_color="white" - text_readonly_color="white" + text_color="White" + text_readonly_color="White" top="10" visible="false" width="285" diff --git a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml index b1a7697e83..dadbd9c9ab 100644 --- a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml @@ -25,7 +25,7 @@ layout="topleft" left_pad="5" name="message" - text_color="white" + text_color="White" top="15" use_ellipses="true" value="" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 9827180aa7..24882988b0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -331,7 +331,7 @@ </text> <radio_group control_name="LetterKeysFocusChatBar" - height="20" + height="34" layout="topleft" left="35" top_pad="0" @@ -339,7 +339,7 @@ <radio_item label="Starts local chat" name="radio_start_chat" - top_delta="20" + top="0" layout="topleft" height="16" left="0" @@ -364,7 +364,7 @@ layout="topleft" left="30" name="title_afk_text" - top_pad="15" + top_pad="5" width="190"> Away timeout: </text> 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 1f92244eb9..b71586aab1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -63,7 +63,7 @@ layout="topleft" left_pad="0" name="mute_chb_label" - top_delta="0" + top_delta="-1" width="150" wrap="true"> Mute when minimized 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 d453a970e7..22c1139cdb 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -67,7 +67,6 @@ label_shadow="true" name="buyL" pad_right="0" - pad_bottom="2" tool_tip="Click to buy more L$" top="0" width="80" /> @@ -87,7 +86,6 @@ left_pad="0" label_shadow="true" name="goShop" - pad_bottom="2" tool_tip="Open Second Life Marketplace" top="0" width="65" /> diff --git a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml index 5e74689c5a..007b73a4bc 100644 --- a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml +++ b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml @@ -13,7 +13,7 @@ follows="left|right" background_opaque="false" background_visible="true" - bg_alpha_color="0.0 0.0 0.0 0.0" > + bg_alpha_color="SysWellItemUnselected" > <text clip_partial="true" top="2" @@ -22,7 +22,7 @@ height="28" layout="topleft" follows="right|left" - text_color="white" + text_color="White" use_ellipses="true" word_wrap="true" mouse_opaque="false" diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml index c89e1dc215..c5b0be0616 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml @@ -44,7 +44,7 @@ parse_urls="false" use_ellipses="true" name="region" - text_color="white" + text_color="White" top="4" value="..." width="330" /> diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml index 062c403a26..0b5aff54ca 100644 --- a/indra/newview/skins/default/xui/en/panel_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_toast.xml @@ -59,7 +59,7 @@ left="20" name="toast_text" word_wrap="true" - text_color="white" + text_color="White" top="5" translate="false" use_ellipses="true" diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 29aa6d1039..ee790e8dd4 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -48,7 +48,7 @@ height="300" width="330" /> </layout_panel> - <layout_panel + <layout_panel width="330" layout="topleft" auto_resize="true" @@ -73,6 +73,7 @@ <string name="InboxLabelWithArg">Received items ([NUM])</string> <string name="InboxLabelNoArg">Received items</string> <button + control_name="InventoryInboxToggleState" label="Received items" font="SansSerifMedium" name="inbox_btn" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 4bc72be49b..9752652679 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -369,6 +369,9 @@ Please try logging in again in a minute.</string> <string name="anim_yes_happy">Yes (Happy)</string> <string name="anim_yes_head">Yes</string> + <!-- build floater --> + <string name="multiple_textures">Multiple</string> + <!-- world map --> <string name="texture_loading">Loading...</string> <string name="worldmap_offline">Offline</string> @@ -3238,6 +3241,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="IM_to_label">To</string> <string name="IM_moderator_label">(Moderator)</string> <string name="Saved_message">(Saved [LONG_TIMESTAMP])</string> + <string name="IM_unblock_only_groups_friends">To see this message, you must uncheck 'Only friends and groups can call or IM me' in Preferences/Privacy.</string> <!-- voice calls --> <string name="answered_call">Your call has been answered</string> diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml index 1bb3188cc8..8a4ccb19f9 100644 --- a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml @@ -17,13 +17,13 @@ <voice_call_invited_style font="SansSerifSmall" font.style="NORMAL" - color="0.5 0.5 0.5 0.5"/> + color="AvatarListItemIconVoiceInvitedColor"/> <!-- styles for avatar item JOINED to voice call --> <voice_call_joined_style font="SansSerifSmall" font.style="NORMAL" - color="white"/> + color="White"/> <!-- styles for avatar item which HAS LEFT voice call --> <voice_call_left_style @@ -35,11 +35,11 @@ <online_style font="SansSerifSmall" font.style="NORMAL" - color="white"/> + color="White"/> <!-- styles for OFFLINE avatar item --> <offline_style font="SansSerifSmall" font.style="NORMAL" - color="0.5 0.5 0.5 1.0"/> + color="Gray"/> </avatar_list_item> diff --git a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml index 0eec002006..0016a8cf53 100644 --- a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml @@ -24,7 +24,7 @@ parse_urls="false" use_ellipses="true" name="item_name" - text_color="white" + text_color="White" top="5" value="..." width="359" /> diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml index e2baba92a3..2b2c3faf91 100644 --- a/indra/newview/skins/default/xui/en/widgets/button.xml +++ b/indra/newview/skins/default/xui/en/widgets/button.xml @@ -21,7 +21,7 @@ font="SansSerifSmall" hover_glow_amount="0.15" halign="center" - pad_bottom="3" + pad_bottom="1" height="23" scale_image="true" handle_right_mouse="true" diff --git a/indra/newview/skins/default/xui/en/widgets/check_box.xml b/indra/newview/skins/default/xui/en/widgets/check_box.xml index cca64fad2a..8947024e45 100644 --- a/indra/newview/skins/default/xui/en/widgets/check_box.xml +++ b/indra/newview/skins/default/xui/en/widgets/check_box.xml @@ -10,7 +10,7 @@ text_readonly_color="LabelDisabledColor"/> <check_box.check_button name="CheckboxCtrl Button" left="2" - bottom="2" + bottom="1" width="13" height="13" commit_on_return="false" diff --git a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml index 96d72c78a6..d83f44737e 100644 --- a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml @@ -24,7 +24,7 @@ parse_urls="false" use_ellipses="true" name="item_name" - text_color="white" + text_color="White" top="5" value="..." width="359" /> diff --git a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml index 6c60624805..8c805da048 100644 --- a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml @@ -9,7 +9,7 @@ width="380"> <item_icon height="16" - color="0.75 0.75 0.75 1" + color="LtGray" follows="top|left" image_name="Inv_Object" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 3e2202b20f..0586119681 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -11,7 +11,7 @@ label_pad_left - padding to the left of tab button labels halign="center" font="SansSerifSmall" tab_height="21" - label_pad_bottom="2" + label_pad_bottom="1" label_pad_left="4"> <!-- Possible additional attributes for tabs: diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp index 4c0959d1a9..e7ef017760 100644 --- a/indra/newview/tests/llworldmipmap_test.cpp +++ b/indra/newview/tests/llworldmipmap_test.cpp @@ -100,9 +100,9 @@ namespace tut { S32 level = mMap->scaleToLevel(0.0); ensure("scaleToLevel() test 1 failed", level == LLWorldMipmap::MAP_LEVELS); - level = mMap->scaleToLevel(LLWorldMipmap::MAP_TILE_SIZE); + level = mMap->scaleToLevel((F32)LLWorldMipmap::MAP_TILE_SIZE); ensure("scaleToLevel() test 2 failed", level == 1); - level = mMap->scaleToLevel(10 * LLWorldMipmap::MAP_TILE_SIZE); + level = mMap->scaleToLevel(10.f * LLWorldMipmap::MAP_TILE_SIZE); ensure("scaleToLevel() test 3 failed", level == 1); } // Test 2 : globalToMipmap() diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0931c4ec9b..9bf755c8f8 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1047,9 +1047,13 @@ class Linux_i686Manifest(LinuxManifest): self.path("libuuid.so.16") self.path("libuuid.so.16.0.22") self.path("libSDL-1.2.so.0.11.3") + self.path("libSDL-1.2.so.0") self.path("libdirectfb-1.4.so.5.0.4") + self.path("libdirectfb-1.4.so.5") self.path("libfusion-1.4.so.5.0.4") + self.path("libfusion-1.4.so.5") self.path("libdirect-1.4.so.5.0.4") + self.path("libdirect-1.4.so.5") self.path("libopenjpeg.so.1.4.0") self.path("libopenjpeg.so.1") self.path("libopenjpeg.so") |