aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2011-07-21 21:00:47 +1000
committerDavid Walter Seikel2011-07-21 21:00:47 +1000
commitf4d07b4a04b432141d8426932f4dd955b9f1a9f1 (patch)
tree1b8e09f6c0ba902fb2212e9c05c4b361fbcb6bbb
parentBump version number. (diff)
parentSupport modulo in llcalcparser (diff)
downloadmeta-impy-f4d07b4a04b432141d8426932f4dd955b9f1a9f1.zip
meta-impy-f4d07b4a04b432141d8426932f4dd955b9f1a9f1.tar.gz
meta-impy-f4d07b4a04b432141d8426932f4dd955b9f1a9f1.tar.bz2
meta-impy-f4d07b4a04b432141d8426932f4dd955b9f1a9f1.tar.xz
Merge remote-tracking branch 'imprudence/1.4-beta1.5' into next
Conflicts (merged manually): .gitignore linden/indra/newview/llgesturemgr.cpp linden/indra/newview/viewerinfo.cpp
-rw-r--r--.gitignore3
-rw-r--r--linden/indra/cmake/OPENAL.cmake4
-rw-r--r--linden/indra/llaudio/llaudioengine_openal.cpp242
-rw-r--r--linden/indra/llaudio/llaudioengine_openal.h34
-rw-r--r--linden/indra/llcommon/llapr.cpp16
-rw-r--r--linden/indra/llmath/llcalcparser.h3
-rw-r--r--linden/indra/llui/llfloater.cpp10
-rw-r--r--linden/indra/newview/CMakeLists.txt4
-rw-r--r--linden/indra/newview/app_settings/cmd_line.xml2
-rw-r--r--linden/indra/newview/app_settings/logcontrol.xml1
-rw-r--r--linden/indra/newview/app_settings/settings.xml153
-rw-r--r--linden/indra/newview/floatercache.cpp100
-rw-r--r--linden/indra/newview/floatercache.h50
-rw-r--r--linden/indra/newview/floaterdice.cpp100
-rw-r--r--linden/indra/newview/floaterdice.h49
-rw-r--r--linden/indra/newview/installers/windows/imprudence_installer_icon_left.bmpbin0 -> 154542 bytes
-rw-r--r--linden/indra/newview/installers/windows/imprudence_installer_icon_right.bmpbin0 -> 8534 bytes
-rw-r--r--linden/indra/newview/installers/windows/imprudence_installer_script.iss120
-rw-r--r--linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss124
-rw-r--r--linden/indra/newview/installers/windows/vcredist_x86_VS2005_SP1_MFC_SEC.EXEbin0 -> 2707352 bytes
-rw-r--r--linden/indra/newview/installers/windows/vcredist_x86_VS2008_SP1_ATL_SEC.exebin0 -> 4485976 bytes
-rw-r--r--linden/indra/newview/installers/windows/vcredist_x86_VS2010_SP1.exebin0 -> 4995416 bytes
-rw-r--r--linden/indra/newview/llappviewer.cpp139
-rw-r--r--linden/indra/newview/llfloaterabout.cpp23
-rw-r--r--linden/indra/newview/llfloaterpreference.cpp95
-rw-r--r--linden/indra/newview/llgesturemgr.cpp1
-rw-r--r--linden/indra/newview/llpanelgeneral.cpp5
-rw-r--r--linden/indra/newview/llpanelinput.cpp6
-rw-r--r--linden/indra/newview/llpanellandaudio.cpp17
-rw-r--r--linden/indra/newview/llpanellandaudio.h3
-rw-r--r--linden/indra/newview/llpanellandmedia.cpp30
-rw-r--r--linden/indra/newview/llpanellandmedia.h4
-rw-r--r--linden/indra/newview/llpanelmsgs.cpp6
-rw-r--r--linden/indra/newview/llpanelnetwork.cpp6
-rw-r--r--linden/indra/newview/llprefschat.cpp25
-rw-r--r--linden/indra/newview/llprefschat.h3
-rw-r--r--linden/indra/newview/llprefsim.cpp70
-rw-r--r--linden/indra/newview/llprefsim.h3
-rw-r--r--linden/indra/newview/llviewercontrol.cpp14
-rw-r--r--linden/indra/newview/llviewermenu.cpp29
-rw-r--r--linden/indra/newview/llviewertexteditor.cpp2
-rw-r--r--linden/indra/newview/llvovolume.cpp35
-rw-r--r--linden/indra/newview/llvovolume.h4
-rw-r--r--linden/indra/newview/primbackup.cpp11
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml31
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_dice.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_hardware_settings.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml7
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml7
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml12
-rw-r--r--linden/indra/newview/viewerinfo.cpp4
-rwxr-xr-xlinden/install.xml4
53 files changed, 1344 insertions, 286 deletions
diff --git a/.gitignore b/.gitignore
index b50a77f..d4d74cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,4 +39,5 @@ ChangeLog.txt
39.DS_Store 39.DS_Store
40*.zip 40*.zip
41linden/indra/newview/mozilla-universal-darwin.tgz 41linden/indra/newview/mozilla-universal-darwin.tgz
42linden/indra/newview/hide \ No newline at end of file 42linden/indra/newview/hide
43
diff --git a/linden/indra/cmake/OPENAL.cmake b/linden/indra/cmake/OPENAL.cmake
index b9efd57..944bc7e 100644
--- a/linden/indra/cmake/OPENAL.cmake
+++ b/linden/indra/cmake/OPENAL.cmake
@@ -25,8 +25,8 @@ elseif (OPENAL)
25 25
26 if (WINDOWS) 26 if (WINDOWS)
27 set(OPENAL_LIB 27 set(OPENAL_LIB
28 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libOpenAL32.dll.a.lib 28 optimized ${ARCH_PREBUILT_DIRS_RELEASE}/openal32.lib
29 debug ${ARCH_PREBUILT_DIRS_DEBUG}/libOpenAL32.dll.a.lib 29 debug ${ARCH_PREBUILT_DIRS_DEBUG}/openal32.lib
30 ) 30 )
31 31
32 elseif (DARWIN) 32 elseif (DARWIN)
diff --git a/linden/indra/llaudio/llaudioengine_openal.cpp b/linden/indra/llaudio/llaudioengine_openal.cpp
index 93bc42b..720fb7f 100644
--- a/linden/indra/llaudio/llaudioengine_openal.cpp
+++ b/linden/indra/llaudio/llaudioengine_openal.cpp
@@ -38,7 +38,36 @@
38#include "lllistener_openal.h" 38#include "lllistener_openal.h"
39 39
40 40
41static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec 41static const F32 WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec
42
43std::string convertALErrorToString(ALenum error)
44{
45 switch(error)
46 {
47 case AL_NO_ERROR:
48 return std::string("AL_NO_ERROR");
49 break;
50 case AL_INVALID_NAME:
51 return std::string("AL_INVALID_NAME");
52 break;
53 case AL_INVALID_ENUM:
54 return std::string("AL_INVALID_ENUM");
55 break;
56 case AL_INVALID_VALUE:
57 return std::string("AL_INVALID_VALUE");
58 break;
59 case AL_INVALID_OPERATION:
60 return std::string("AL_INVALID_OPERATION");
61 break;
62 case AL_OUT_OF_MEMORY:
63 return std::string("AL_OUT_OF_MEMORY");
64 break;
65 default:
66 std::stringstream s;
67 s << error;
68 return s.str();
69 }
70}
42 71
43LLAudioEngine_OpenAL::LLAudioEngine_OpenAL() 72LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
44 : 73 :
@@ -48,7 +77,9 @@ LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
48 mWindBufSamples(0), 77 mWindBufSamples(0),
49 mWindBufBytes(0), 78 mWindBufBytes(0),
50 mWindSource(AL_NONE), 79 mWindSource(AL_NONE),
51 mNumEmptyWindALBuffers(MAX_NUM_WIND_BUFFERS) 80 mNumEmptyWindALBuffers(MAX_NUM_WIND_BUFFERS),
81 mContext(NULL),
82 mDevice(NULL)
52{ 83{
53} 84}
54 85
@@ -63,36 +94,106 @@ bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata)
63 mWindGen = NULL; 94 mWindGen = NULL;
64 LLAudioEngine::init(num_channels, userdata); 95 LLAudioEngine::init(num_channels, userdata);
65 96
66 if(!alutInit(NULL, NULL)) 97 if (!alutInit(NULL, NULL))
67 { 98 {
68 llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl; 99 llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl;
69 return false; 100 return false;
70 } 101 }
71 102
103 // check for extensions
104 const ALCchar* device_list(NULL);
105 const ALCchar* device_default(NULL);
106 if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") == AL_TRUE)
107 {
108 device_default = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
109 device_list = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
110 llinfos << "Results for ALC_ENUMERATION_EXT:\n"
111 << ll_safe_string(device_list)
112 << llendl;
113
114 }
115
116 // initialize device
117 ALCdevice* mDevice = alcOpenDevice(NULL);
118 if (mDevice == NULL)
119 {
120 llinfos << "Could not find a default device, trying to open default manually: "
121 << ll_safe_string(device_default)
122 << llendl;
123 mDevice = alcOpenDevice(device_default);
124 if (mDevice == NULL)
125 {
126 const ALCchar* device_list_walk = device_list;
127 do
128 {
129 mDevice = alcOpenDevice(device_list_walk);
130 if (mDevice != NULL)
131 {
132 break;
133 }
134 else
135 {
136 device_list_walk += strlen(device_list_walk)+1;
137 }
138 }
139 while (device_list_walk[0] != '\0');
140
141 if (mDevice == NULL)
142 {
143 llinfos << "OpenAL could not find an installed audio device. Aborting" << llendl;
144 ALCenum error = alcGetError(mDevice);
145 if (error != ALC_NO_ERROR)
146 {
147 llinfos << "ALC error: " << ll_safe_string(alcGetString(mDevice, error)) << llendl;
148 }
149 return false;
150 }
151 }
152 }
153
154 // create context
155 ALCcontext* mContext = alcCreateContext(mDevice, NULL);
156 if (mContext != NULL)
157 {
158 if (!alcMakeContextCurrent(mContext))
159 {
160 ALenum error = alGetError();
161 if (error != AL_NO_ERROR)
162 {
163 llinfos << "ALC error: " << convertALErrorToString(error) << ". Could not set current context!" << llendl;
164 }
165 alcDestroyContext(mContext);
166 return false;
167 }
168 }
169 else
170 {
171 llinfos << "ALC error: could not create context from device!" << llendl;
172 alcCloseDevice(mDevice);
173 return false;
174 }
175
72 llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl; 176 llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl;
73 177
178 llinfos << "ALC default device: "
179 << ll_safe_string(alcGetString(mDevice, ALC_DEFAULT_DEVICE_SPECIFIER))
180 << llendl;
181
74 llinfos << "OpenAL version: " 182 llinfos << "OpenAL version: "
75 << ll_safe_string(alGetString(AL_VERSION)) << llendl; 183 << ll_safe_string(alGetString(AL_VERSION)) << llendl;
76 llinfos << "OpenAL vendor: " 184 llinfos << "OpenAL vendor: "
77 << ll_safe_string(alGetString(AL_VENDOR)) << llendl; 185 << ll_safe_string(alGetString(AL_VENDOR)) << llendl;
78 llinfos << "OpenAL renderer: " 186 llinfos << "OpenAL renderer: "
79 << ll_safe_string(alGetString(AL_RENDERER)) << llendl; 187 << ll_safe_string(alGetString(AL_RENDERER)) << llendl;
80 188
81 ALint major = alutGetMajorVersion (); 189 ALint major = alutGetMajorVersion();
82 ALint minor = alutGetMinorVersion (); 190 ALint minor = alutGetMinorVersion();
83 llinfos << "ALUT version: " << major << "." << minor << llendl; 191 llinfos << "ALUT version: " << major << "." << minor << llendl;
84 192
85 ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext()); 193 alcGetIntegerv(mDevice, ALC_MAJOR_VERSION, 1, &major);
86 194 alcGetIntegerv(mDevice, ALC_MINOR_VERSION, 1, &minor);
87 alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major);
88 alcGetIntegerv(device, ALC_MINOR_VERSION, 1, &minor);
89 llinfos << "ALC version: " << major << "." << minor << llendl; 195 llinfos << "ALC version: " << major << "." << minor << llendl;
90 196
91 llinfos << "ALC default device: "
92 << ll_safe_string(alcGetString(device,
93 ALC_DEFAULT_DEVICE_SPECIFIER))
94 << llendl;
95
96 return true; 197 return true;
97} 198}
98 199
@@ -129,7 +230,7 @@ std::string LLAudioEngine_OpenAL::getDriverName(bool verbose)
129void LLAudioEngine_OpenAL::allocateListener() 230void LLAudioEngine_OpenAL::allocateListener()
130{ 231{
131 mListenerp = (LLListener *) new LLListener_OpenAL(); 232 mListenerp = (LLListener *) new LLListener_OpenAL();
132 if(!mListenerp) 233 if (!mListenerp)
133 { 234 {
134 llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl; 235 llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl;
135 } 236 }
@@ -138,20 +239,53 @@ void LLAudioEngine_OpenAL::allocateListener()
138// virtual 239// virtual
139void LLAudioEngine_OpenAL::shutdown() 240void LLAudioEngine_OpenAL::shutdown()
140{ 241{
141 llinfos << "About to LLAudioEngine::shutdown()" << llendl; 242 llinfos << "Entering LLAudioEngine::shutdown()" << llendl;
243
142 LLAudioEngine::shutdown(); 244 LLAudioEngine::shutdown();
143 245
144 llinfos << "About to alutExit()" << llendl; 246 llinfos << "Entering alutExit()" << llendl;
145 if(!alutExit()) 247 if (!alutExit())
146 { 248 {
147 llwarns << "Nuts." << llendl; 249 llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString(alutGetError()) << llendl;
148 llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl; 250 }
251 else
252 {
253 llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl;
149 } 254 }
150
151 llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl;
152 255
153 delete mListenerp; 256 delete mListenerp;
154 mListenerp = NULL; 257 mListenerp = NULL;
258
259 ALenum error;
260
261 alcMakeContextCurrent(NULL);
262 error = alGetError();
263 if (error != AL_NO_ERROR)
264 {
265 llinfos << "AL error: " << convertALErrorToString(error) << ". Could not make current context NULL!" << llendl;
266 }
267
268 alcDestroyContext(mContext);
269 error = alGetError();
270 if (error != AL_NO_ERROR)
271 {
272 llinfos << "AL error: " << convertALErrorToString(error) << ". Could not destroy context!" << llendl;
273 }
274 else
275 {
276 mContext = NULL;
277 }
278
279 alcCloseDevice(mDevice);
280 error = alGetError();
281 if (error != AL_NO_ERROR)
282 {
283 llinfos << "AL error: " << convertALErrorToString(error) << ". Could not close device!" << llendl;
284 }
285 else
286 {
287 mDevice = NULL;
288 }
155} 289}
156 290
157LLAudioBuffer *LLAudioEngine_OpenAL::createBuffer() 291LLAudioBuffer *LLAudioEngine_OpenAL::createBuffer()
@@ -181,7 +315,11 @@ LLAudioChannelOpenAL::LLAudioChannelOpenAL()
181LLAudioChannelOpenAL::~LLAudioChannelOpenAL() 315LLAudioChannelOpenAL::~LLAudioChannelOpenAL()
182{ 316{
183 cleanup(); 317 cleanup();
184 alDeleteSources(1, &mALSource); 318 if (mALSource != AL_NONE)
319 {
320 alDeleteSources(1, &mALSource);
321 mALSource = AL_NONE;
322 }
185} 323}
186 324
187void LLAudioChannelOpenAL::cleanup() 325void LLAudioChannelOpenAL::cleanup()
@@ -198,7 +336,7 @@ void LLAudioChannelOpenAL::play()
198 return; 336 return;
199 } 337 }
200 338
201 if(!isPlaying()) 339 if (!isPlaying())
202 { 340 {
203 alSourcePlay(mALSource); 341 alSourcePlay(mALSource);
204 getSource()->setPlayedOnce(true); 342 getSource()->setPlayedOnce(true);
@@ -324,7 +462,7 @@ LLAudioBufferOpenAL::~LLAudioBufferOpenAL()
324 462
325void LLAudioBufferOpenAL::cleanup() 463void LLAudioBufferOpenAL::cleanup()
326{ 464{
327 if(mALBuffer != AL_NONE) 465 if (mALBuffer != AL_NONE)
328 { 466 {
329 alDeleteBuffers(1, &mALBuffer); 467 alDeleteBuffers(1, &mALBuffer);
330 mALBuffer = AL_NONE; 468 mALBuffer = AL_NONE;
@@ -335,23 +473,25 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename)
335{ 473{
336 cleanup(); 474 cleanup();
337 mALBuffer = alutCreateBufferFromFile(filename.c_str()); 475 mALBuffer = alutCreateBufferFromFile(filename.c_str());
338 if(mALBuffer == AL_NONE) 476 if (mALBuffer == AL_NONE)
339 { 477 {
340 ALenum error = alutGetError(); 478 ALenum error = alutGetError();
341 if (gDirUtilp->fileExists(filename)) 479 if (gDirUtilp->fileExists(filename))
342 { 480 {
343 llwarns << 481 llwarns << "LLAudioBufferOpenAL::loadWAV() Error loading "
344 "LLAudioBufferOpenAL::loadWAV() Error loading " 482 << filename << " "
345 << filename 483 << convertALErrorToString(error) << ": "
346 << " " << alutGetErrorString(error) << llendl; 484 << alutGetErrorString(error)
485 << llendl;
347 } 486 }
348 else 487 else
349 { 488 {
350 // It's common for the file to not actually exist. 489 // It's common for the file to not actually exist.
351 lldebugs << 490 lldebugs << "LLAudioBufferOpenAL::loadWAV() Error loading "
352 "LLAudioBufferOpenAL::loadWAV() Error loading " 491 << filename << " "
353 << filename 492 << convertALErrorToString(error) << ": "
354 << " " << alutGetErrorString(error) << llendl; 493 << alutGetErrorString(error)
494 << llendl;
355 } 495 }
356 return false; 496 return false;
357 } 497 }
@@ -361,7 +501,7 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename)
361 501
362U32 LLAudioBufferOpenAL::getLength() 502U32 LLAudioBufferOpenAL::getLength()
363{ 503{
364 if(mALBuffer == AL_NONE) 504 if (mALBuffer == AL_NONE)
365 { 505 {
366 return 0; 506 return 0;
367 } 507 }
@@ -383,9 +523,9 @@ void LLAudioEngine_OpenAL::initWind()
383 523
384 alGenSources(1,&mWindSource); 524 alGenSources(1,&mWindSource);
385 525
386 if((error=alGetError()) != AL_NO_ERROR) 526 if ((error=alGetError()) != AL_NO_ERROR)
387 { 527 {
388 llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<llendl; 528 llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: " << convertALErrorToString(error) << llendl;
389 } 529 }
390 530
391 mWindGen = new LLWindGen<WIND_SAMPLE_T>; 531 mWindGen = new LLWindGen<WIND_SAMPLE_T>;
@@ -396,7 +536,7 @@ void LLAudioEngine_OpenAL::initWind()
396 536
397 mWindBuf = new WIND_SAMPLE_T [mWindBufSamples * 2 /*stereo*/]; 537 mWindBuf = new WIND_SAMPLE_T [mWindBufSamples * 2 /*stereo*/];
398 538
399 if(mWindBuf==NULL) 539 if (mWindBuf == NULL)
400 { 540 {
401 llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl; 541 llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl;
402 mEnableWind=false; 542 mEnableWind=false;
@@ -445,7 +585,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
445 if (!mEnableWind) 585 if (!mEnableWind)
446 return; 586 return;
447 587
448 if(!mWindBuf) 588 if (!mWindBuf)
449 return; 589 return;
450 590
451 if (mWindUpdateTimer.checkExpirationAndReset(LL_WIND_UPDATE_INTERVAL)) 591 if (mWindUpdateTimer.checkExpirationAndReset(LL_WIND_UPDATE_INTERVAL))
@@ -485,14 +625,14 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
485 625
486 //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl; 626 //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl;
487 627
488 while(processed--) // unqueue old buffers 628 while (processed--) // unqueue old buffers
489 { 629 {
490 ALuint buffer; 630 ALuint buffer;
491 ALenum error; 631 ALenum error;
492 alGetError(); /* clear error */ 632 alGetError(); /* clear error */
493 alSourceUnqueueBuffers(mWindSource, 1, &buffer); 633 alSourceUnqueueBuffers(mWindSource, 1, &buffer);
494 error = alGetError(); 634 error = alGetError();
495 if(error != AL_NO_ERROR) 635 if (error != AL_NO_ERROR)
496 { 636 {
497 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; 637 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl;
498 } 638 }
@@ -508,9 +648,9 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
508 ALuint buffer; 648 ALuint buffer;
509 alGetError(); /* clear error */ 649 alGetError(); /* clear error */
510 alGenBuffers(1,&buffer); 650 alGenBuffers(1,&buffer);
511 if((error=alGetError()) != AL_NO_ERROR) 651 if ((error=alGetError()) != AL_NO_ERROR)
512 { 652 {
513 llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << llendl; 653 llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << convertALErrorToString(error) << llendl;
514 break; 654 break;
515 } 655 }
516 656
@@ -521,14 +661,14 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
521 mWindBufBytes, 661 mWindBufBytes,
522 mWindBufFreq); 662 mWindBufFreq);
523 error = alGetError(); 663 error = alGetError();
524 if(error != AL_NO_ERROR) 664 if (error != AL_NO_ERROR)
525 { 665 {
526 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl; 666 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl;
527 } 667 }
528 668
529 alSourceQueueBuffers(mWindSource, 1, &buffer); 669 alSourceQueueBuffers(mWindSource, 1, &buffer);
530 error = alGetError(); 670 error = alGetError();
531 if(error != AL_NO_ERROR) 671 if (error != AL_NO_ERROR)
532 { 672 {
533 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; 673 llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl;
534 } 674 }
@@ -538,11 +678,13 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
538 678
539 ALint playing; 679 ALint playing;
540 alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing); 680 alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing);
541 if(playing != AL_PLAYING) 681 if (playing != AL_PLAYING)
542 { 682 {
543 alSourcePlay(mWindSource); 683 alSourcePlay(mWindSource);
544 684
545 lldebugs << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << llendl; 685 lldebugs << "Wind had stopped - probably ran out of buffers - restarting: "
686 << (unprocessed+mNumEmptyWindALBuffers) << " now queued."
687 << llendl;
546 } 688 }
547} 689}
548 690
diff --git a/linden/indra/llaudio/llaudioengine_openal.h b/linden/indra/llaudio/llaudioengine_openal.h
index 900bcb3..47748c3 100644
--- a/linden/indra/llaudio/llaudioengine_openal.h
+++ b/linden/indra/llaudio/llaudioengine_openal.h
@@ -47,7 +47,7 @@ class LLAudioEngine_OpenAL : public LLAudioEngine
47 virtual ~LLAudioEngine_OpenAL(); 47 virtual ~LLAudioEngine_OpenAL();
48 48
49 virtual bool init(const S32 num_channels, void *user_data); 49 virtual bool init(const S32 num_channels, void *user_data);
50 virtual std::string getDriverName(bool verbose); 50 virtual std::string getDriverName(bool verbose);
51 virtual void allocateListener(); 51 virtual void allocateListener();
52 52
53 virtual void shutdown(); 53 virtual void shutdown();
@@ -62,17 +62,20 @@ class LLAudioEngine_OpenAL : public LLAudioEngine
62 /*virtual*/ void updateWind(LLVector3 direction, F32 camera_altitude); 62 /*virtual*/ void updateWind(LLVector3 direction, F32 camera_altitude);
63 63
64 private: 64 private:
65 void * windDSP(void *newbuffer, int length); 65 void* windDSP(void *newbuffer, int length);
66 typedef S16 WIND_SAMPLE_T; 66 typedef S16 WIND_SAMPLE_T;
67 LLWindGen<WIND_SAMPLE_T> *mWindGen; 67 LLWindGen<WIND_SAMPLE_T>* mWindGen;
68 S16 *mWindBuf; 68 S16 *mWindBuf;
69 U32 mWindBufFreq; 69 U32 mWindBufFreq;
70 U32 mWindBufSamples; 70 U32 mWindBufSamples;
71 U32 mWindBufBytes; 71 U32 mWindBufBytes;
72 ALuint mWindSource; 72 ALuint mWindSource;
73 int mNumEmptyWindALBuffers; 73 S32 mNumEmptyWindALBuffers;
74 74
75 static const int MAX_NUM_WIND_BUFFERS = 80; 75 static const S32 MAX_NUM_WIND_BUFFERS = 80;
76
77 ALCcontext* mContext;
78 ALCdevice* mDevice;
76}; 79};
77 80
78class LLAudioChannelOpenAL : public LLAudioChannel 81class LLAudioChannelOpenAL : public LLAudioChannel
@@ -91,10 +94,11 @@ class LLAudioChannelOpenAL : public LLAudioChannel
91 /*virtual*/ void updateLoop(); 94 /*virtual*/ void updateLoop();
92 95
93 ALuint mALSource; 96 ALuint mALSource;
94 ALint mLastSamplePos; 97 ALint mLastSamplePos;
95}; 98};
96 99
97class LLAudioBufferOpenAL : public LLAudioBuffer{ 100class LLAudioBufferOpenAL : public LLAudioBuffer
101{
98 public: 102 public:
99 LLAudioBufferOpenAL(); 103 LLAudioBufferOpenAL();
100 virtual ~LLAudioBufferOpenAL(); 104 virtual ~LLAudioBufferOpenAL();
@@ -105,7 +109,7 @@ class LLAudioBufferOpenAL : public LLAudioBuffer{
105 friend class LLAudioChannelOpenAL; 109 friend class LLAudioChannelOpenAL;
106 protected: 110 protected:
107 void cleanup(); 111 void cleanup();
108 ALuint getBuffer() {return mALBuffer;} 112 ALuint getBuffer() { return mALBuffer; }
109 113
110 ALuint mALBuffer; 114 ALuint mALBuffer;
111}; 115};
diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp
index a013d9c..1040671 100644
--- a/linden/indra/llcommon/llapr.cpp
+++ b/linden/indra/llcommon/llapr.cpp
@@ -82,7 +82,7 @@ bool ll_apr_warn_status(apr_status_t status)
82 if(APR_SUCCESS == status) return false; 82 if(APR_SUCCESS == status) return false;
83 char buf[MAX_STRING]; /* Flawfinder: ignore */ 83 char buf[MAX_STRING]; /* Flawfinder: ignore */
84 apr_strerror(status, buf, MAX_STRING); 84 apr_strerror(status, buf, MAX_STRING);
85 LL_WARNS("APR") << "APR: " << buf << LL_ENDL; 85 LL_WARNS("APR") << "APR: " << buf << " (" << status << ")" << LL_ENDL;
86 return true; 86 return true;
87} 87}
88 88
@@ -194,8 +194,12 @@ apr_status_t LLAPRFile::open(std::string const& filename, apr_int32_t flags, acc
194// File I/O 194// File I/O
195S32 LLAPRFile::read(void *buf, S32 nbytes) 195S32 LLAPRFile::read(void *buf, S32 nbytes)
196{ 196{
197 llassert_always(mFile) ; 197 if(!mFile)
198 198 {
199 llwarns << "apr mFile is removed by somebody else. Can not read." << llendl ;
200 return 0;
201 }
202
199 apr_size_t sz = nbytes; 203 apr_size_t sz = nbytes;
200 apr_status_t s = apr_file_read(mFile, buf, &sz); 204 apr_status_t s = apr_file_read(mFile, buf, &sz);
201 if (s != APR_SUCCESS) 205 if (s != APR_SUCCESS)
@@ -212,7 +216,11 @@ S32 LLAPRFile::read(void *buf, S32 nbytes)
212 216
213S32 LLAPRFile::write(const void *buf, S32 nbytes) 217S32 LLAPRFile::write(const void *buf, S32 nbytes)
214{ 218{
215 llassert_always(mFile) ; 219 if(!mFile)
220 {
221 llwarns << "apr mFile is removed by somebody else. Can not read." << llendl ;
222 return 0;
223 }
216 224
217 apr_size_t sz = nbytes; 225 apr_size_t sz = nbytes;
218 apr_status_t s = apr_file_write(mFile, buf, &sz); 226 apr_status_t s = apr_file_write(mFile, buf, &sz);
diff --git a/linden/indra/llmath/llcalcparser.h b/linden/indra/llmath/llcalcparser.h
index d8acc1f..90059b6 100644
--- a/linden/indra/llmath/llcalcparser.h
+++ b/linden/indra/llmath/llcalcparser.h
@@ -132,7 +132,8 @@ struct LLCalcParser : grammar<LLCalcParser>
132 term = 132 term =
133 power[term.value = arg1] >> 133 power[term.value = arg1] >>
134 *(('*' >> assert_syntax(power[term.value *= arg1])) | 134 *(('*' >> assert_syntax(power[term.value *= arg1])) |
135 ('/' >> assert_syntax(power[term.value /= arg1])) 135 ('/' >> assert_syntax(power[term.value /= arg1])) |
136 ('%' >> assert_syntax(power[term.value = bind(&fmodf)(term.value, arg1)]))
136 ) 137 )
137 ; 138 ;
138 139
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index bb42ca3..58c717a 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -1368,6 +1368,7 @@ LLFloater* LLFloater::getClosableFloaterFromFocus()
1368 1368
1369 // The focused floater may not be closable, 1369 // The focused floater may not be closable,
1370 // Find and close a parental floater that is closeable, if any. 1370 // Find and close a parental floater that is closeable, if any.
1371 LLFloater* prev_floater = NULL;
1371 for(LLFloater* floater_to_close = focused_floater; 1372 for(LLFloater* floater_to_close = focused_floater;
1372 NULL != floater_to_close; 1373 NULL != floater_to_close;
1373 floater_to_close = gFloaterView->getParentFloater(floater_to_close)) 1374 floater_to_close = gFloaterView->getParentFloater(floater_to_close))
@@ -1376,6 +1377,15 @@ LLFloater* LLFloater::getClosableFloaterFromFocus()
1376 { 1377 {
1377 return floater_to_close; 1378 return floater_to_close;
1378 } 1379 }
1380
1381 // If floater has as parent root view
1382 // gFloaterView->getParentFloater(floater_to_close) returns
1383 // the same floater_to_close, so we need to check this.
1384 if (prev_floater == floater_to_close)
1385 {
1386 break;
1387 }
1388 prev_floater = floater_to_close;
1379 } 1389 }
1380 1390
1381 return NULL; 1391 return NULL;
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 84efa1e..4e7f200 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -110,6 +110,8 @@ set(viewer_SOURCE_FILES
110 floaterao.cpp 110 floaterao.cpp
111 floaterbusy.cpp 111 floaterbusy.cpp
112 floatercommandline.cpp 112 floatercommandline.cpp
113 floatercache.cpp
114 floaterdice.cpp
113 floatergriddefault.cpp 115 floatergriddefault.cpp
114 floatergridmanager.cpp 116 floatergridmanager.cpp
115 floaterlocalassetbrowse.cpp 117 floaterlocalassetbrowse.cpp
@@ -573,6 +575,8 @@ set(viewer_HEADER_FILES
573 floaterao.h 575 floaterao.h
574 floaterbusy.h 576 floaterbusy.h
575 floatercommandline.h 577 floatercommandline.h
578 floatercache.h
579 floaterdice.h
576 floatergriddefault.h 580 floatergriddefault.h
577 floatergridmanager.h 581 floatergridmanager.h
578 floaterlocalassetbrowse.h 582 floaterlocalassetbrowse.h
diff --git a/linden/indra/newview/app_settings/cmd_line.xml b/linden/indra/newview/app_settings/cmd_line.xml
index f5c6cdb..9fd4669 100644
--- a/linden/indra/newview/app_settings/cmd_line.xml
+++ b/linden/indra/newview/app_settings/cmd_line.xml
@@ -157,7 +157,7 @@
157 <key>desc</key> 157 <key>desc</key>
158 <string>Delete files in the cache.</string> 158 <string>Delete files in the cache.</string>
159 <key>map-to</key> 159 <key>map-to</key>
160 <string>PurgeCacheOnNextStartup</string> 160 <string>PurgeCacheOnStartup</string>
161 </map> 161 </map>
162 162
163 <key>noinvlib</key> 163 <key>noinvlib</key>
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml
index cb40d7e..74a8189 100644
--- a/linden/indra/newview/app_settings/logcontrol.xml
+++ b/linden/indra/newview/app_settings/logcontrol.xml
@@ -87,6 +87,7 @@
87 <!--<string>VOAvatar</string>--> 87 <!--<string>VOAvatar</string>-->
88 <!--<string>View</string>--> 88 <!--<string>View</string>-->
89 <!--<string>ViewerImages</string>--> 89 <!--<string>ViewerImages</string>-->
90 <!--<string>Volume</string>-->
90 <!--<string>TextureCache</string>--> 91 <!--<string>TextureCache</string>-->
91 <!--<string>Throttle</string>--> 92 <!--<string>Throttle</string>-->
92 <!--<string>Voice</string>--> 93 <!--<string>Voice</string>-->
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 475c8eb..3132031 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -439,6 +439,44 @@
439 <key>Value</key> 439 <key>Value</key>
440 <integer>3</integer> 440 <integer>3</integer>
441 </map> 441 </map>
442 <key>DiceLastCount</key>
443 <map>
444 <key>Comment</key>
445 <string>Last entered dice count</string>
446 <key>Persist</key>
447 <integer>1</integer>
448 <key>Type</key>
449 <string>S32</string>
450 <key>Value</key>
451 <integer>1</integer>
452 </map>
453 <key>DiceLastSides</key>
454 <map>
455 <key>Comment</key>
456 <string>Last entered dice sides</string>
457 <key>Persist</key>
458 <integer>1</integer>
459 <key>Type</key>
460 <string>S32</string>
461 <key>Value</key>
462 <integer>6</integer>
463 </map>
464 <key>DiceFloaterRect</key>
465 <map>
466 <key>Comment</key>
467 <string>Rectangle for dice window</string>
468 <key>Persist</key>
469 <integer>1</integer>
470 <key>Type</key>
471 <string>Rect</string>
472 <key>Value</key>
473 <array>
474 <integer>0</integer>
475 <integer>100</integer>
476 <integer>100</integer>
477 <integer>100</integer>
478 </array>
479 </map>
442 <key>DisableInternalFlyUpAnimation</key> 480 <key>DisableInternalFlyUpAnimation</key>
443 <map> 481 <map>
444 <key>Comment</key> 482 <key>Comment</key>
@@ -1088,6 +1126,28 @@
1088 <key>Value</key> 1126 <key>Value</key>
1089 <integer>1</integer> 1127 <integer>1</integer>
1090 </map> 1128 </map>
1129 <key>RenderSculptSAMax</key>
1130 <map>
1131 <key>Comment</key>
1132 <string>The maximum combined surface area of sculpts(per frame) that are above the threshold before they stop being rendered</string>
1133 <key>Persist</key>
1134 <integer>1</integer>
1135 <key>Type</key>
1136 <string>F32</string>
1137 <key>Value</key>
1138 <integer>50000</integer>
1139 </map>
1140 <key>RenderSculptSAThreshold</key>
1141 <map>
1142 <key>Comment</key>
1143 <string>Surface area at which sculpts are considered for not being rendered</string>
1144 <key>Persist</key>
1145 <integer>1</integer>
1146 <key>Type</key>
1147 <string>F32</string>
1148 <key>Value</key>
1149 <integer>1750</integer>
1150 </map>
1091 <key>RenderWaterVoidCulling</key> 1151 <key>RenderWaterVoidCulling</key>
1092 <map> 1152 <map>
1093 <key>Comment</key> 1153 <key>Comment</key>
@@ -2562,6 +2622,88 @@
2562 </map> 2622 </map>
2563 2623
2564 <!-- End: full radar (Advanced menu) --> 2624 <!-- End: full radar (Advanced menu) -->
2625
2626 <!-- Begin: cache clearing -->
2627
2628 <key>KeepUnpackedCacheFiles</key>
2629 <map>
2630 <key>Comment</key>
2631 <string>If TRUE, the viewer won't delete unpacked cache files when logging out (improves overall performance and fixes sound bugs)</string>
2632 <key>Persist</key>
2633 <integer>1</integer>
2634 <key>Type</key>
2635 <string>Boolean</string>
2636 <key>Value</key>
2637 <integer>1</integer>
2638 </map>
2639 <key>PurgeCacheOnStartup</key>
2640 <map>
2641 <key>Comment</key>
2642 <string>Clear local file cache every time viewer is run (cmd line --purge)</string>
2643 <key>Persist</key>
2644 <integer>1</integer>
2645 <key>Type</key>
2646 <string>Boolean</string>
2647 <key>Value</key>
2648 <integer>0</integer>
2649 </map>
2650 <key>ClearTextureCache</key>
2651 <map>
2652 <key>Comment</key>
2653 <string>Clear texture cache</string>
2654 <key>Persist</key>
2655 <integer>1</integer>
2656 <key>Type</key>
2657 <string>Boolean</string>
2658 <key>Value</key>
2659 <integer>0</integer>
2660 </map>
2661 <key>ClearObjectCache</key>
2662 <map>
2663 <key>Comment</key>
2664 <string>Clear object cache</string>
2665 <key>Persist</key>
2666 <integer>1</integer>
2667 <key>Type</key>
2668 <string>Boolean</string>
2669 <key>Value</key>
2670 <integer>0</integer>
2671 </map>
2672 <key>ClearInvCache</key>
2673 <map>
2674 <key>Comment</key>
2675 <string>Clear inventory cache</string>
2676 <key>Persist</key>
2677 <integer>1</integer>
2678 <key>Type</key>
2679 <string>Boolean</string>
2680 <key>Value</key>
2681 <integer>0</integer>
2682 </map>
2683 <key>ClearNameCache</key>
2684 <map>
2685 <key>Comment</key>
2686 <string>Clear cached avatar names/uuids</string>
2687 <key>Persist</key>
2688 <integer>1</integer>
2689 <key>Type</key>
2690 <string>Boolean</string>
2691 <key>Value</key>
2692 <integer>0</integer>
2693 </map>
2694 <key>ClearSoundsCache</key>
2695 <map>
2696 <key>Comment</key>
2697 <string>Clear cached sounds</string>
2698 <key>Persist</key>
2699 <integer>1</integer>
2700 <key>Type</key>
2701 <string>Boolean</string>
2702 <key>Value</key>
2703 <integer>0</integer>
2704 </map>
2705
2706 <!-- End: clear cache -->
2565 2707
2566 <!-- END IMPRUDENCE-SPECIFIC SETTINGS --> 2708 <!-- END IMPRUDENCE-SPECIFIC SETTINGS -->
2567 2709
@@ -9348,17 +9490,6 @@
9348 <key>Value</key> 9490 <key>Value</key>
9349 <integer>0</integer> 9491 <integer>0</integer>
9350 </map> 9492 </map>
9351 <key>PurgeCacheOnStartup</key>
9352 <map>
9353 <key>Comment</key>
9354 <string>Clear local file cache every time viewer is run</string>
9355 <key>Persist</key>
9356 <integer>1</integer>
9357 <key>Type</key>
9358 <string>Boolean</string>
9359 <key>Value</key>
9360 <integer>0</integer>
9361 </map>
9362 <key>PushToTalkButton</key> 9493 <key>PushToTalkButton</key>
9363 <map> 9494 <map>
9364 <key>Comment</key> 9495 <key>Comment</key>
diff --git a/linden/indra/newview/floatercache.cpp b/linden/indra/newview/floatercache.cpp
new file mode 100644
index 0000000..211fd5a
--- /dev/null
+++ b/linden/indra/newview/floatercache.cpp
@@ -0,0 +1,100 @@
1/**
2* @file floatercache.cpp
3* @brief clear cache window for Imprudence
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2011, McCabe Maxsted
8*
9* Imprudence Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*/
30
31#include "llviewerprecompiledheaders.h"
32
33#include "floatercache.h"
34
35#include "llcheckboxctrl.h"
36#include "lluictrlfactory.h"
37
38#include "llviewercontrol.h"
39
40
41FloaterCache::FloaterCache(const LLSD& seed) : LLFloater("Clear Cache")
42{
43 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_clear_cache.xml");
44}
45
46FloaterCache::~FloaterCache()
47{
48}
49
50BOOL FloaterCache::postBuild()
51{
52 getChild<LLCheckBoxCtrl>("texture_cache")->setValue(gSavedSettings.getBOOL("ClearTextureCache"));
53 getChild<LLCheckBoxCtrl>("object_cache")->setValue(gSavedSettings.getBOOL("ClearObjectCache"));
54 getChild<LLCheckBoxCtrl>("inv_cache")->setValue(gSavedSettings.getBOOL("ClearInvCache"));
55 getChild<LLCheckBoxCtrl>("name_cache")->setValue(gSavedSettings.getBOOL("ClearNameCache"));
56 getChild<LLCheckBoxCtrl>("sounds_cache")->setValue(gSavedSettings.getBOOL("ClearSoundsCache"));
57
58 childSetAction("btn_ok", onClickOK, this);
59 childSetAction("btn_cancel", onClickCancel, this);
60
61 return TRUE;
62}
63
64// static
65void FloaterCache::onClickOK(void* data)
66{
67 FloaterCache* self = (FloaterCache*)data;
68 if (self)
69 {
70 bool purge_textures = self->getChild<LLCheckBoxCtrl>("texture_cache")->getValue().asBoolean();
71 bool purge_objects = self->getChild<LLCheckBoxCtrl>("object_cache")->getValue().asBoolean();
72 bool purge_inv = self->getChild<LLCheckBoxCtrl>("inv_cache")->getValue().asBoolean();
73 bool purge_names = self->getChild<LLCheckBoxCtrl>("name_cache")->getValue().asBoolean();
74 bool purge_sounds = self->getChild<LLCheckBoxCtrl>("sounds_cache")->getValue().asBoolean();
75
76 gSavedSettings.setBOOL("ClearTextureCache", purge_textures);
77 gSavedSettings.setBOOL("ClearObjectCache", purge_objects);
78 gSavedSettings.setBOOL("ClearInvCache", purge_inv);
79 gSavedSettings.setBOOL("ClearNameCache", purge_names);
80 gSavedSettings.setBOOL("ClearSoundsCache", purge_sounds);
81
82 if (purge_textures || purge_objects || purge_inv || purge_names || purge_sounds)
83 {
84 // flag client cache for clearing next time the client runs
85 gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
86 }
87
88 self->close();
89 }
90}
91
92// static
93void FloaterCache::onClickCancel(void* data)
94{
95 FloaterCache* self = (FloaterCache*)data;
96 if (self)
97 {
98 self->close();
99 }
100}
diff --git a/linden/indra/newview/floatercache.h b/linden/indra/newview/floatercache.h
new file mode 100644
index 0000000..ea3c53e
--- /dev/null
+++ b/linden/indra/newview/floatercache.h
@@ -0,0 +1,50 @@
1/**
2* @file floatercache.h
3* @brief clear cache window for Imprudence
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2011, McCabe Maxsted
8*
9* Imprudence Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*/
30
31#ifndef floatercache_h
32#define floatercache_h
33
34#include "llfloater.h"
35
36class FloaterCache : public LLFloater, public LLFloaterSingleton<FloaterCache>
37{
38public:
39
40 FloaterCache(const LLSD& seed);
41 virtual ~FloaterCache();
42 BOOL postBuild();
43
44private:
45
46 static void onClickOK(void* data);
47 static void onClickCancel(void* data);
48};
49
50#endif //floatercache_h
diff --git a/linden/indra/newview/floaterdice.cpp b/linden/indra/newview/floaterdice.cpp
new file mode 100644
index 0000000..203878c
--- /dev/null
+++ b/linden/indra/newview/floaterdice.cpp
@@ -0,0 +1,100 @@
1/**
2* @file floaterdice.cpp
3* @brief Dice window for Imprudence
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2011, McCabe Maxsted
8*
9* Imprudence Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*/
30
31#include "llviewerprecompiledheaders.h"
32
33#include "floaterdice.h"
34
35#include "llspinctrl.h"
36#include "lluictrlfactory.h"
37
38#include "llchat.h"
39#include "llchatbar.h"
40#include "llviewercontrol.h"
41
42
43FloaterDice::FloaterDice(const LLSD& seed) : LLFloater("Roll Dice")
44{
45 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_dice.xml");
46}
47
48FloaterDice::~FloaterDice()
49{
50}
51
52BOOL FloaterDice::postBuild()
53{
54 childSetAction("btn_roll", onClickRoll, this);
55
56 return TRUE;
57}
58
59// static
60void FloaterDice::onClickRoll(void* data)
61{
62 FloaterDice* self = (FloaterDice*)data;
63 if (self)
64 {
65 S32 dice_count = (S32)(self->getChild<LLSpinCtrl>("spin_dice_count")->getValue());
66 S32 dice_sides = (S32)(self->getChild<LLSpinCtrl>("spin_dice_sides")->getValue());
67
68 if (dice_count <= 0 || dice_sides <= 3)
69 {
70 llwarns << "Invalid dice roll! Someone's trying to cheat, perhaps?" << llendl;
71 return;
72 }
73 else
74 {
75 S32 dice_total = 0;
76 std::ostringstream rolls;
77 S32 i = 0;
78 do
79 {
80 // see the clamping rules for ll_rand
81 S32 roll = ll_rand(dice_sides+1);
82 if (roll > 0)
83 {
84 dice_total += roll;
85 rolls << roll;
86 if (i < dice_count - 1) rolls << ", ";
87 ++i;
88 }
89 }
90 while (i < dice_count);
91
92 std::string roll_text = llformat("/me rolled %dd%d for a total of %d", dice_count, dice_sides, dice_total);
93 if (dice_count > 1)
94 {
95 roll_text += " (" + rolls.str() + ")";
96 }
97 gChatBar->sendChatFromViewer(roll_text, CHAT_TYPE_NORMAL, FALSE);
98 }
99 }
100}
diff --git a/linden/indra/newview/floaterdice.h b/linden/indra/newview/floaterdice.h
new file mode 100644
index 0000000..5f36a80
--- /dev/null
+++ b/linden/indra/newview/floaterdice.h
@@ -0,0 +1,49 @@
1/**
2* @file floaterdice.h
3* @brief Dice window for Imprudence
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2011, McCabe Maxsted
8*
9* Imprudence Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*/
30
31#ifndef floaterdice_h
32#define floaterdice_h
33
34#include "llfloater.h"
35
36class FloaterDice : public LLFloater, public LLFloaterSingleton<FloaterDice>
37{
38public:
39
40 FloaterDice(const LLSD& seed);
41 virtual ~FloaterDice();
42 BOOL postBuild();
43
44private:
45
46 static void onClickRoll(void* data);
47};
48
49#endif //floaterdice_h
diff --git a/linden/indra/newview/installers/windows/imprudence_installer_icon_left.bmp b/linden/indra/newview/installers/windows/imprudence_installer_icon_left.bmp
new file mode 100644
index 0000000..79fd407
--- /dev/null
+++ b/linden/indra/newview/installers/windows/imprudence_installer_icon_left.bmp
Binary files differ
diff --git a/linden/indra/newview/installers/windows/imprudence_installer_icon_right.bmp b/linden/indra/newview/installers/windows/imprudence_installer_icon_right.bmp
new file mode 100644
index 0000000..1c1d5dc
--- /dev/null
+++ b/linden/indra/newview/installers/windows/imprudence_installer_icon_right.bmp
Binary files differ
diff --git a/linden/indra/newview/installers/windows/imprudence_installer_script.iss b/linden/indra/newview/installers/windows/imprudence_installer_script.iss
index 3282c48..e463640 100644
--- a/linden/indra/newview/installers/windows/imprudence_installer_script.iss
+++ b/linden/indra/newview/installers/windows/imprudence_installer_script.iss
@@ -1,5 +1,5 @@
1; Script generated by the Inno Setup Script Wizard. 1; Imprudence inno setup installer script by McCabe Maxsted
2; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 2; This script only works with VS2005, currently
3 3
4[Setup] 4[Setup]
5; NOTE: The value of AppId uniquely identifies this application. 5; NOTE: The value of AppId uniquely identifies this application.
@@ -17,15 +17,14 @@ OutputBaseFilename=Imprudence-1.4.0-beta1-(SSE2-optimized)
17VersionInfoVersion=1.4.0 17VersionInfoVersion=1.4.0
18VersionInfoTextVersion=1.4.0 18VersionInfoTextVersion=1.4.0
19VersionInfoProductVersion=1.4.0 19VersionInfoProductVersion=1.4.0
20AppVersion=1.4.0
20VersionInfoCopyright=2011 21VersionInfoCopyright=2011
21AppCopyright=2011
22 22
23; These won't change 23; These won't change
24VersionInfoCompany=Imprudence 24VersionInfoCompany=Imprudence
25AppPublisher=The Imprudence Project 25AppPublisher=The Imprudence Project
26AppPublisherURL=http://kokuaviewer.org 26AppPublisherURL=http://kokuaviewer.org
27AppSupportURL=http://kokuaviewer.org 27AppSupportURL=http://kokuaviewer.org
28AppUpdatesURL=http://kokuaviewer.org
29AllowNoIcons=true 28AllowNoIcons=true
30InfoAfterFile=..\..\..\..\..\README.txt 29InfoAfterFile=..\..\..\..\..\README.txt
31OutputDir=C:\imprudence_installers 30OutputDir=C:\imprudence_installers
@@ -33,11 +32,13 @@ SetupIconFile=..\windows\imp_icon.ico
33Compression=lzma2/ultra64 32Compression=lzma2/ultra64
34InternalCompressLevel=ultra64 33InternalCompressLevel=ultra64
35SolidCompression=true 34SolidCompression=true
36;PrivilegesRequired=poweruser 35PrivilegesRequired=poweruser
37AllowRootDirectory=true 36AllowRootDirectory=true
38WizardImageFile=..\windows\imprudence_installer_icon_left.bmp 37WizardImageFile=..\windows\imprudence_installer_icon_left.bmp
39WizardSmallImageFile=..\windows\imprudence_installer_icon_right.bmp 38WizardSmallImageFile=..\windows\imprudence_installer_icon_right.bmp
40SetupLogging=true 39SetupLogging=true
40RestartIfNeededByRun=false
41AlwaysRestart=false
41 42
42[Languages] 43[Languages]
43Name: english; MessagesFile: compiler:Default.isl 44Name: english; MessagesFile: compiler:Default.isl
@@ -141,8 +142,10 @@ Source: ..\..\..\build-vc80\newview\release\package\SLVoice.exe; DestDir: {app};
141Source: ..\..\..\build-vc80\newview\release\package\vivoxsdk.dll; DestDir: {app}; Flags: ignoreversion 142Source: ..\..\..\build-vc80\newview\release\package\vivoxsdk.dll; DestDir: {app}; Flags: ignoreversion
142Source: ..\..\..\build-vc80\newview\release\package\wrap_oal.dll; DestDir: {app}; Flags: ignoreversion 143Source: ..\..\..\build-vc80\newview\release\package\wrap_oal.dll; DestDir: {app}; Flags: ignoreversion
143 144
144; VC++ 2005 x86 redist 145; VC++ 2005 SP1 x86, VC++ 2008 SP1 x86, and VC++ 2010 SP1 x86 redist
145Source: ..\windows\vcredist_x86_VS2005.exe; DestDir: {tmp}; DestName: vcredist_x86_2005.exe 146Source: ..\windows\vcredist_x86_VS2005_SP1_MFC_SEC.exe; DestDir: {app}\redist; DestName: vcredist_x86_VS2005_SP1_MFC_SEC.exe
147;Source: ..\windows\vcredist_x86_VS2008_SP1_ATL_SEC.exe; DestDir: {app}\redist; DestName: vcredist_x86_VS2008_SP1_ATL_SEC.exe
148Source: ..\windows\vcredist_x86_VS2010_SP1.exe; DestDir: {app}\redist; DestName: vcredist_x86_VS2010_SP1.exe
146 149
147; Old files we don't use anymore: 150; Old files we don't use anymore:
148; Source: ..\..\..\build-vc80\newview\release\package\dronesettings.xml; DestDir: {app}; Flags: ignoreversion 151; Source: ..\..\..\build-vc80\newview\release\package\dronesettings.xml; DestDir: {app}; Flags: ignoreversion
@@ -173,7 +176,17 @@ Name: {group}\Imprudence; Filename: {app}\imprudence.exe; WorkingDir: {app}; Com
173[Run] 176[Run]
174Filename: {app}\imprudence.exe; WorkingDir: {app}; Flags: nowait postinstall 177Filename: {app}\imprudence.exe; WorkingDir: {app}; Flags: nowait postinstall
175Filename: {app}\imprudence.url; WorkingDir: {app}; Flags: nowait postinstall shellexec; Description: See what makes Imprudence different 178Filename: {app}\imprudence.url; WorkingDir: {app}; Flags: nowait postinstall shellexec; Description: See what makes Imprudence different
176Filename: {tmp}\vcredist_x86_2005.exe; Parameters: "/q:a /c:""VCREDI~1.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""" """; Flags: runhidden 179
180; Install redistributables.
181;
182; !!!!BEWARE!!!!
183;
184; Command line parameters and filenames WILL change with each version. Blame Microsoft.
185
186; Always use /q for VS2005 rather than something quieter such as Parameters: "/q:a c:""msiexec /i vcredist.msi /qn"" ". The redist will fail sometimes if you do otherwise.
187Filename: {app}\redist\vcredist_x86_VS2005_SP1_MFC_SEC.exe; Parameters: "/q"; Check: Needs2005Redist; Flags: runhidden
188;Filename: {app}\redist\vcredist_x86_VS2008_SP1_ATL_SEC.exe; Parameters: "/q"; Check: Needs2008Redist; Flags: runhidden
189Filename: {app}\redist\vcredist_x86_VS2010_SP1.exe; Parameters: "/q /norestart"; Check: Needs2010Redist; Flags: runhidden
177 190
178[UninstallDelete] 191[UninstallDelete]
179Name: {userappdata}\Imprudence\user_settings\password.dat; Type: files; Languages: 192Name: {userappdata}\Imprudence\user_settings\password.dat; Type: files; Languages:
@@ -192,7 +205,11 @@ Name: C:\Documents and Settings\{username}\.gstreamer-0.10; Type: filesandordirs
192; Name: {app}\*.dll; Type: files; Tasks: ; Languages: 205; Name: {app}\*.dll; Type: files; Tasks: ; Languages:
193Name: {app}\lib\gstreamer-plugins\*; Type: filesandordirs; Tasks: ; Languages: 206Name: {app}\lib\gstreamer-plugins\*; Type: filesandordirs; Tasks: ; Languages:
194; Name: {app}\skins\default\xui\*; Type: filesandordirs; Tasks: ; Languages: 207; Name: {app}\skins\default\xui\*; Type: filesandordirs; Tasks: ; Languages:
195; Name: {app}\skins\silver\xui\*; Type: filesandordirs; Tasks: ; Languages: 208; Old xui skin files can cause bugs, always kill them
209Name: {app}\skins\silver\xui\en-us\*; Type: filesandordirs; Tasks: ; Languages:
210Name: {app}\app_settings\mozilla; Type: filesandordirs; Tasks: ; Languages:
211Name: {app}\app_settings\mozilla_debug; Type: filesandordirs; Tasks: ; Languages:
212Name: {app}\app_settings\viewerversion.xml; Type: filesandordirs; Tasks: ; Languages:
196Name: C:\Documents and Settings\{username}\.gstreamer-0.10\*; Type: filesandordirs 213Name: C:\Documents and Settings\{username}\.gstreamer-0.10\*; Type: filesandordirs
197Name: C:\Users\{username}\.gstreamer-0.10\*; Type: filesandordirs 214Name: C:\Users\{username}\.gstreamer-0.10\*; Type: filesandordirs
198; Breaks the browser if installing on top of 1.1: 215; Breaks the browser if installing on top of 1.1:
@@ -270,3 +287,88 @@ Name: {app}\msvcp80.dll; Type: files; Tasks: ; Languages:
270Name: {app}\msvcr80.dll; Type: files; Tasks: ; Languages: 287Name: {app}\msvcr80.dll; Type: files; Tasks: ; Languages:
271Name: {app}\msvcr71.dll; Type: files; Tasks: ; Languages: 288Name: {app}\msvcr71.dll; Type: files; Tasks: ; Languages:
272Name: {app}\imprudence.exe.config; Type: files; Tasks: ; Languages: 289Name: {app}\imprudence.exe.config; Type: files; Tasks: ; Languages:
290
291
292[Code]
293// [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86]
294// Installed = 1 (REG_DWORD)
295function IsVS2010RedistInstalled(): Boolean;
296var
297 V: Cardinal;
298 Success: Boolean;
299begin
300 if IsWin64 then begin
301 Success := RegQueryDWordValue(HKLM64, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86', 'Installed', V);
302 end else begin
303 Success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86', 'Installed', V);
304 end
305
306 if Success = TRUE then begin
307 if V = 1 then begin
308 Result := TRUE;
309 end else begin
310 Result := FALSE;
311 end
312 end else begin
313 Result := FALSE;
314 end
315end;
316
317function Needs2010Redist(): Boolean;
318begin
319 Result := (IsVS2010RedistInstalled = FALSE);
320 if (Result = TRUE) then begin
321 Log('User system needs VS 2010 SP1 x86 Redistributable, installing.');
322 end else begin
323 Log('User already has VS 2010 SP1 x86 Redistributable installed, skipping.');
324 end
325end;
326
327// VS2008 and 2005 x86 redists. Always look for the latest version we know about. I wish there were a better way to check for these
328const
329 VS2005_X86 = '{A49F249F-0C91-497F-86DF-B2585E8E76B7}'; // http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE
330 VS2005_SP1_X86 = '{7299052B-02A4-4627-81F2-1818DA5D550D}'; // 8.0.50727.762: http://www.microsoft.com/downloads/details.aspx?FamilyID=200B2FD9-AE1A-4A14-984D-389C36F85647
331 VS2005_SP1_X86_ATL_SEC = '{837B34E3-7C30-493C-8F6A-2B0F04E2912C}'; // 8.0.50727.4053: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14431
332 VS2005_SP1_X86_MFC_SEC = '{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}'; // 8.0.50727.6195: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26347
333
334 VS2008_X86 = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}'; // http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf
335 VS2008_SP1_X86 = '{9A25302D-30C0-39D9-BD6F-21E6EC160475}'; // 9.0.30729.17: http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2
336 VS2008_SP1_X86_ATL_SEC = '{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}'; // 9.0.30729.4148: http://www.microsoft.com/downloads/details.aspx?familyid=2051A0C1-C9B5-4B0A-A8F5-770A549FD78C
337 // These updates currently don't have redist links:
338 // 9.0.30729.5026:
339 // 9.0.30729.5570:
340 // 9.0.30729.6161: http://support.microsoft.com/kb/2538243
341
342 INSTALLSTATE_INVALIDARG = -2; // An invalid parameter was passed to the function
343 INSTALLSTATE_UNKNOWN = -1; // The product is not advertised or installed
344 INSTALLSTATE_ADVERTISED = 1; // The product is advertised but not installed
345 INSTALLSTATE_ABSENT = 2; // The product is installed for a different user
346 INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user
347
348function MsiQueryProductState(ProductCode: String): Integer;
349 external 'MsiQueryProductStateA@msi.dll stdcall';
350
351function IsProductCodeInstalled(ProductUUID: String): Boolean;
352begin
353 Result := (MsiQueryProductState(ProductUUID) = INSTALLSTATE_DEFAULT);
354end;
355
356function Needs2005Redist(): Boolean;
357begin
358 Result:= (IsProductCodeInstalled(VS2005_SP1_X86_MFC_SEC) = FALSE);
359 if (Result = TRUE) then begin
360 Log('User system needs VS 2005 SP1 x86 Redistributable, installing.');
361 end else begin
362 Log('User already has VS 2005 SP1 x86 Redistributable installed, skipping.');
363 end
364end;
365
366function Needs2008Redist(): Boolean;
367begin
368 Result := (IsProductCodeInstalled(VS2008_SP1_X86_ATL_SEC) = FALSE);
369 if (Result = TRUE) then begin
370 Log('User system needs VS 2008 SP1 x86 Redistributable, installing.');
371 end else begin
372 Log('User already has VS 2008 SP1 x86 Redistributable installed, skipping.');
373 end
374end;
diff --git a/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss b/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss
index 99eb4fe..c551919 100644
--- a/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss
+++ b/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss
@@ -1,5 +1,5 @@
1; Script generated by the Inno Setup Script Wizard. 1; Imprudence inno setup installer script by McCabe Maxsted
2; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! 2; This script only works with VS2005, currently
3 3
4[Setup] 4[Setup]
5; NOTE: The value of AppId uniquely identifies this application. 5; NOTE: The value of AppId uniquely identifies this application.
@@ -9,23 +9,22 @@
9; These will change 9; These will change
10AppId={{1B3E68BC-13EB-4277-9439-CB5FF9259460} 10AppId={{1B3E68BC-13EB-4277-9439-CB5FF9259460}
11AppName=Imprudence Viewer Experimental 11AppName=Imprudence Viewer Experimental
12AppVerName=Imprudence Viewer 1.4.0 Experimental 2011.04.19 12AppVerName=Imprudence Viewer 1.4.0 beta 1.5 windows test release
13DefaultDirName={pf}\ImprudenceExperimental 13DefaultDirName={pf}\ImprudenceExperimental
14DefaultGroupName=Imprudence Viewer Experimental 14DefaultGroupName=Imprudence Viewer Experimental
15VersionInfoProductName=Imprudence Viewer Experimental 15VersionInfoProductName=Imprudence Viewer Experimental
16OutputBaseFilename=Imprudence-1.4.0-Experimental-2011.04.19-Setup 16OutputBaseFilename=Imprudence-1.4.0-beta-1.5-windows-test
17VersionInfoVersion=1.4.0 17VersionInfoVersion=1.4.0
18VersionInfoTextVersion=1.4.0 18VersionInfoTextVersion=1.4.0
19VersionInfoProductVersion=1.4.0 19VersionInfoProductVersion=1.4.0
20AppVersion=1.4.0
20VersionInfoCopyright=2011 21VersionInfoCopyright=2011
21AppCopyright=2011
22 22
23; These won't change 23; These won't change
24VersionInfoCompany=Imprudence 24VersionInfoCompany=Imprudence
25AppPublisher=The Imprudence Project 25AppPublisher=The Imprudence Project
26AppPublisherURL=http://kokuaviewer.org 26AppPublisherURL=http://kokuaviewer.org
27AppSupportURL=http://kokuaviewer.org 27AppSupportURL=http://kokuaviewer.org
28AppUpdatesURL=http://kokuaviewer.org
29AllowNoIcons=true 28AllowNoIcons=true
30InfoAfterFile=..\..\..\..\..\README.txt 29InfoAfterFile=..\..\..\..\..\README.txt
31OutputDir=C:\imprudence_installers 30OutputDir=C:\imprudence_installers
@@ -33,11 +32,13 @@ SetupIconFile=..\windows\imp_icon.ico
33Compression=lzma2/ultra64 32Compression=lzma2/ultra64
34InternalCompressLevel=ultra64 33InternalCompressLevel=ultra64
35SolidCompression=true 34SolidCompression=true
36;PrivilegesRequired=poweruser 35PrivilegesRequired=poweruser
37AllowRootDirectory=true 36AllowRootDirectory=true
38WizardImageFile=..\windows\imprudence_installer_icon_left.bmp 37WizardImageFile=..\windows\imprudence_installer_icon_left.bmp
39WizardSmallImageFile=..\windows\imprudence_installer_icon_right.bmp 38WizardSmallImageFile=..\windows\imprudence_installer_icon_right.bmp
40SetupLogging=true 39SetupLogging=true
40RestartIfNeededByRun=false
41AlwaysRestart=false
41 42
42[Languages] 43[Languages]
43Name: english; MessagesFile: compiler:Default.isl 44Name: english; MessagesFile: compiler:Default.isl
@@ -141,8 +142,10 @@ Source: ..\..\..\build-vc80\newview\release\package\SLVoice.exe; DestDir: {app};
141Source: ..\..\..\build-vc80\newview\release\package\vivoxsdk.dll; DestDir: {app}; Flags: ignoreversion 142Source: ..\..\..\build-vc80\newview\release\package\vivoxsdk.dll; DestDir: {app}; Flags: ignoreversion
142Source: ..\..\..\build-vc80\newview\release\package\wrap_oal.dll; DestDir: {app}; Flags: ignoreversion 143Source: ..\..\..\build-vc80\newview\release\package\wrap_oal.dll; DestDir: {app}; Flags: ignoreversion
143 144
144; VC++ 2005 x86 redist 145; VC++ 2005 SP1 x86, VC++ 2008 SP1 x86, and VC++ 2010 SP1 x86 redist
145Source: ..\windows\vcredist_x86_VS2005.exe; DestDir: {tmp}; DestName: vcredist_x86_2005.exe 146Source: ..\windows\vcredist_x86_VS2005_SP1_MFC_SEC.exe; DestDir: {app}\redist; DestName: vcredist_x86_VS2005_SP1_MFC_SEC.exe
147;Source: ..\windows\vcredist_x86_VS2008_SP1_ATL_SEC.exe; DestDir: {app}\redist; DestName: vcredist_x86_VS2008_SP1_ATL_SEC.exe
148Source: ..\windows\vcredist_x86_VS2010_SP1.exe; DestDir: {app}\redist; DestName: vcredist_x86_VS2010_SP1.exe
146 149
147; Old files we don't use anymore: 150; Old files we don't use anymore:
148; Source: ..\..\..\build-vc80\newview\release\package\dronesettings.xml; DestDir: {app}; Flags: ignoreversion 151; Source: ..\..\..\build-vc80\newview\release\package\dronesettings.xml; DestDir: {app}; Flags: ignoreversion
@@ -173,7 +176,17 @@ Name: {group}\Imprudence Experimental; Filename: {app}\imprudence.exe; WorkingDi
173[Run] 176[Run]
174Filename: {app}\imprudence.exe; WorkingDir: {app}; Flags: nowait postinstall 177Filename: {app}\imprudence.exe; WorkingDir: {app}; Flags: nowait postinstall
175Filename: {app}\imprudence.url; WorkingDir: {app}; Flags: nowait postinstall shellexec; Description: See what makes Imprudence different 178Filename: {app}\imprudence.url; WorkingDir: {app}; Flags: nowait postinstall shellexec; Description: See what makes Imprudence different
176Filename: {tmp}\vcredist_x86_2005.exe; Parameters: "/q:a /c:""VCREDI~1.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""" """; Flags: runhidden 179
180; Install redistributables.
181;
182; !!!!BEWARE!!!!
183;
184; Command line parameters and filenames WILL change with each version. Blame Microsoft.
185
186; Always use /q for VS2005 rather than something quieter such as Parameters: "/q:a c:""msiexec /i vcredist.msi /qn"" ". The redist will fail sometimes if you do otherwise.
187Filename: {app}\redist\vcredist_x86_VS2005_SP1_MFC_SEC.exe; Parameters: "/q"; Check: Needs2005Redist; Flags: runhidden
188;Filename: {app}\redist\vcredist_x86_VS2008_SP1_ATL_SEC.exe; Parameters: "/q"; Check: Needs2008Redist; Flags: runhidden
189Filename: {app}\redist\vcredist_x86_VS2010_SP1.exe; Parameters: "/q /norestart"; Check: Needs2010Redist; Flags: runhidden
177 190
178[UninstallDelete] 191[UninstallDelete]
179Name: {userappdata}\Imprudence\user_settings\password.dat; Type: files; Languages: 192Name: {userappdata}\Imprudence\user_settings\password.dat; Type: files; Languages:
@@ -192,7 +205,11 @@ Name: C:\Documents and Settings\{username}\.gstreamer-0.10; Type: filesandordirs
192; Name: {app}\*.dll; Type: files; Tasks: ; Languages: 205; Name: {app}\*.dll; Type: files; Tasks: ; Languages:
193Name: {app}\lib\gstreamer-plugins\*; Type: filesandordirs; Tasks: ; Languages: 206Name: {app}\lib\gstreamer-plugins\*; Type: filesandordirs; Tasks: ; Languages:
194; Name: {app}\skins\default\xui\*; Type: filesandordirs; Tasks: ; Languages: 207; Name: {app}\skins\default\xui\*; Type: filesandordirs; Tasks: ; Languages:
195; Name: {app}\skins\silver\xui\*; Type: filesandordirs; Tasks: ; Languages: 208; Old xui skin files can cause bugs, always kill them
209Name: {app}\skins\silver\xui\en-us\*; Type: filesandordirs; Tasks: ; Languages:
210Name: {app}\app_settings\mozilla; Type: filesandordirs; Tasks: ; Languages:
211Name: {app}\app_settings\mozilla_debug; Type: filesandordirs; Tasks: ; Languages:
212Name: {app}\app_settings\viewerversion.xml; Type: filesandordirs; Tasks: ; Languages:
196Name: C:\Documents and Settings\{username}\.gstreamer-0.10\*; Type: filesandordirs 213Name: C:\Documents and Settings\{username}\.gstreamer-0.10\*; Type: filesandordirs
197Name: C:\Users\{username}\.gstreamer-0.10\*; Type: filesandordirs 214Name: C:\Users\{username}\.gstreamer-0.10\*; Type: filesandordirs
198; Breaks the browser if installing on top of 1.1: 215; Breaks the browser if installing on top of 1.1:
@@ -270,3 +287,88 @@ Name: {app}\msvcp80.dll; Type: files; Tasks: ; Languages:
270Name: {app}\msvcr80.dll; Type: files; Tasks: ; Languages: 287Name: {app}\msvcr80.dll; Type: files; Tasks: ; Languages:
271Name: {app}\msvcr71.dll; Type: files; Tasks: ; Languages: 288Name: {app}\msvcr71.dll; Type: files; Tasks: ; Languages:
272Name: {app}\imprudence.exe.config; Type: files; Tasks: ; Languages: 289Name: {app}\imprudence.exe.config; Type: files; Tasks: ; Languages:
290
291
292[Code]
293// [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86]
294// Installed = 1 (REG_DWORD)
295function IsVS2010RedistInstalled(): Boolean;
296var
297 V: Cardinal;
298 Success: Boolean;
299begin
300 if IsWin64 then begin
301 Success := RegQueryDWordValue(HKLM64, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86', 'Installed', V);
302 end else begin
303 Success := RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86', 'Installed', V);
304 end
305
306 if Success = TRUE then begin
307 if V = 1 then begin
308 Result := TRUE;
309 end else begin
310 Result := FALSE;
311 end
312 end else begin
313 Result := FALSE;
314 end
315end;
316
317function Needs2010Redist(): Boolean;
318begin
319 Result := (IsVS2010RedistInstalled = FALSE);
320 if (Result = TRUE) then begin
321 Log('User system needs VS 2010 SP1 x86 Redistributable, installing.');
322 end else begin
323 Log('User already has VS 2010 SP1 x86 Redistributable installed, skipping.');
324 end
325end;
326
327// VS2008 and 2005 x86 redists. Always look for the latest version we know about. I wish there were a better way to check for these
328const
329 VS2005_X86 = '{A49F249F-0C91-497F-86DF-B2585E8E76B7}'; // http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE
330 VS2005_SP1_X86 = '{7299052B-02A4-4627-81F2-1818DA5D550D}'; // 8.0.50727.762: http://www.microsoft.com/downloads/details.aspx?FamilyID=200B2FD9-AE1A-4A14-984D-389C36F85647
331 VS2005_SP1_X86_ATL_SEC = '{837B34E3-7C30-493C-8F6A-2B0F04E2912C}'; // 8.0.50727.4053: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14431
332 VS2005_SP1_X86_MFC_SEC = '{710f4c1c-cc18-4c49-8cbf-51240c89a1a2}'; // 8.0.50727.6195: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26347
333
334 VS2008_X86 = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}'; // http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf
335 VS2008_SP1_X86 = '{9A25302D-30C0-39D9-BD6F-21E6EC160475}'; // 9.0.30729.17: http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2
336 VS2008_SP1_X86_ATL_SEC = '{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}'; // 9.0.30729.4148: http://www.microsoft.com/downloads/details.aspx?familyid=2051A0C1-C9B5-4B0A-A8F5-770A549FD78C
337 // These updates currently don't have redist links:
338 // 9.0.30729.5026:
339 // 9.0.30729.5570:
340 // 9.0.30729.6161: http://support.microsoft.com/kb/2538243
341
342 INSTALLSTATE_INVALIDARG = -2; // An invalid parameter was passed to the function
343 INSTALLSTATE_UNKNOWN = -1; // The product is not advertised or installed
344 INSTALLSTATE_ADVERTISED = 1; // The product is advertised but not installed
345 INSTALLSTATE_ABSENT = 2; // The product is installed for a different user
346 INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user
347
348function MsiQueryProductState(ProductCode: String): Integer;
349 external 'MsiQueryProductStateA@msi.dll stdcall';
350
351function IsProductCodeInstalled(ProductUUID: String): Boolean;
352begin
353 Result := (MsiQueryProductState(ProductUUID) = INSTALLSTATE_DEFAULT);
354end;
355
356function Needs2005Redist(): Boolean;
357begin
358 Result:= (IsProductCodeInstalled(VS2005_SP1_X86_MFC_SEC) = FALSE);
359 if (Result = TRUE) then begin
360 Log('User system needs VS 2005 SP1 x86 Redistributable, installing.');
361 end else begin
362 Log('User already has VS 2005 SP1 x86 Redistributable installed, skipping.');
363 end
364end;
365
366function Needs2008Redist(): Boolean;
367begin
368 Result := (IsProductCodeInstalled(VS2008_SP1_X86_ATL_SEC) = FALSE);
369 if (Result = TRUE) then begin
370 Log('User system needs VS 2008 SP1 x86 Redistributable, installing.');
371 end else begin
372 Log('User already has VS 2008 SP1 x86 Redistributable installed, skipping.');
373 end
374end;
diff --git a/linden/indra/newview/installers/windows/vcredist_x86_VS2005_SP1_MFC_SEC.EXE b/linden/indra/newview/installers/windows/vcredist_x86_VS2005_SP1_MFC_SEC.EXE
new file mode 100644
index 0000000..8cd783c
--- /dev/null
+++ b/linden/indra/newview/installers/windows/vcredist_x86_VS2005_SP1_MFC_SEC.EXE
Binary files differ
diff --git a/linden/indra/newview/installers/windows/vcredist_x86_VS2008_SP1_ATL_SEC.exe b/linden/indra/newview/installers/windows/vcredist_x86_VS2008_SP1_ATL_SEC.exe
new file mode 100644
index 0000000..378e7f0
--- /dev/null
+++ b/linden/indra/newview/installers/windows/vcredist_x86_VS2008_SP1_ATL_SEC.exe
Binary files differ
diff --git a/linden/indra/newview/installers/windows/vcredist_x86_VS2010_SP1.exe b/linden/indra/newview/installers/windows/vcredist_x86_VS2010_SP1.exe
new file mode 100644
index 0000000..d81f3f5
--- /dev/null
+++ b/linden/indra/newview/installers/windows/vcredist_x86_VS2010_SP1.exe
Binary files differ
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index a026391..9afcfe6 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -427,6 +427,8 @@ static void settings_to_globals()
427 LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor"); 427 LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor");
428 LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor"); 428 LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor");
429 LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); 429 LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible");
430 LLVOVolume::sSculptSAThresh = gSavedSettings.getF32("RenderSculptSAThreshold");
431 LLVOVolume::sSculptSAMax = gSavedSettings.getF32("RenderSculptSAMax");
430 LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); 432 LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible");
431 // clamp auto-open time to some minimum usable value 433 // clamp auto-open time to some minimum usable value
432 LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); 434 LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay"));
@@ -612,6 +614,10 @@ bool LLAppViewer::init()
612 // 614 //
613 // OK to write stuff to logs now, we've now crash reported if necessary 615 // OK to write stuff to logs now, we've now crash reported if necessary
614 // 616 //
617
618 // Always add the version to the top of the log--makes debugging easier -- MC
619 llinfos << ViewerInfo::prettyInfo() << llendl;
620
615 if (!initConfiguration()) 621 if (!initConfiguration())
616 return false; 622 return false;
617 623
@@ -1289,35 +1295,6 @@ bool LLAppViewer::cleanup()
1289 1295
1290 llinfos << "Global stuff deleted" << llendflush; 1296 llinfos << "Global stuff deleted" << llendflush;
1291 1297
1292 if (gAudioStream)
1293 {
1294 // shut down the streaming audio sub-subsystem first, in case it relies on not outliving the general audio subsystem.
1295
1296 delete gAudioStream;
1297 gAudioStream = NULL;
1298 }
1299
1300 if (gAudiop)
1301 {
1302 // shut down the audio subsystem
1303
1304 bool want_longname = false;
1305 if (gAudiop->getDriverName(want_longname) == "FMOD")
1306 {
1307 // This hack exists because fmod likes to occasionally
1308 // crash or hang forever when shutting down, for no
1309 // apparent reason.
1310 llwarns << "Hack, skipping FMOD audio engine cleanup" << llendflush;
1311 }
1312 else
1313 {
1314 gAudiop->shutdown();
1315 }
1316
1317 delete gAudiop;
1318 gAudiop = NULL;
1319 }
1320
1321 // Note: this is where LLFeatureManager::getInstance()-> used to be deleted. 1298 // Note: this is where LLFeatureManager::getInstance()-> used to be deleted.
1322 1299
1323 // Patch up settings for next time 1300 // Patch up settings for next time
@@ -1328,13 +1305,17 @@ bool LLAppViewer::cleanup()
1328 llinfos << "Settings patched up" << llendflush; 1305 llinfos << "Settings patched up" << llendflush;
1329 1306
1330 // delete some of the files left around in the cache. 1307 // delete some of the files left around in the cache.
1331 removeCacheFiles("*.wav"); 1308 if (!gSavedSettings.getBOOL("KeepUnpackedCacheFiles"))
1309 {
1310 LL_INFOS("AppCache") << "Purging unpacked files..." << llendl;
1311 removeCacheFiles("*.wav");
1312 removeCacheFiles("*.lso");
1313 removeCacheFiles("*.dsf");
1314 removeCacheFiles("*.bodypart");
1315 removeCacheFiles("*.clothing");
1316 }
1332 removeCacheFiles("*.tmp"); 1317 removeCacheFiles("*.tmp");
1333 removeCacheFiles("*.lso");
1334 removeCacheFiles("*.out"); 1318 removeCacheFiles("*.out");
1335 removeCacheFiles("*.dsf");
1336 removeCacheFiles("*.bodypart");
1337 removeCacheFiles("*.clothing");
1338 1319
1339 llinfos << "Cache files removed" << llendflush; 1320 llinfos << "Cache files removed" << llendflush;
1340 1321
@@ -1553,6 +1534,36 @@ bool LLAppViewer::cleanup()
1553 end_messaging_system(); 1534 end_messaging_system();
1554 llinfos << "Message system deleted." << llendflush; 1535 llinfos << "Message system deleted." << llendflush;
1555 1536
1537 if (gAudioStream)
1538 {
1539 // shut down the streaming audio sub-subsystem first, in case it relies on not outliving the general audio subsystem.
1540
1541 delete gAudioStream;
1542 gAudioStream = NULL;
1543 }
1544
1545 if (gAudiop)
1546 {
1547 // shut down the audio subsystem
1548
1549 bool want_longname = false;
1550 if (gAudiop->getDriverName(want_longname) == "FMOD")
1551 {
1552 // This hack exists because fmod likes to occasionally
1553 // crash or hang forever when shutting down, for no
1554 // apparent reason.
1555 llwarns << "Hack, skipping FMOD audio engine cleanup" << llendflush;
1556 }
1557 else
1558 {
1559 gAudiop->shutdown();
1560 }
1561
1562 delete gAudiop;
1563 gAudiop = NULL;
1564 }
1565 llinfos << "Audio system deleted" << llendl;
1566
1556 // *NOTE:Mani - The following call is not thread safe. 1567 // *NOTE:Mani - The following call is not thread safe.
1557 LLCurl::cleanupClass(); 1568 LLCurl::cleanupClass();
1558 llinfos << "LLCurl cleaned up." << llendflush; 1569 llinfos << "LLCurl cleaned up." << llendflush;
@@ -2966,10 +2977,11 @@ bool LLAppViewer::initCache()
2966{ 2977{
2967 mPurgeCache = false; 2978 mPurgeCache = false;
2968 // Purge cache if user requested it 2979 // Purge cache if user requested it
2969 if (gSavedSettings.getBOOL("PurgeCacheOnStartup") || 2980 if (gSavedSettings.getBOOL("PurgeCacheOnStartup") || // cmd-line -- MC
2970 gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) 2981 gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) // ui -- MC
2971 { 2982 {
2972 gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false); 2983 gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false);
2984 gSavedSettings.setBOOL("PurgeCacheOnStartup", FALSE);
2973 mPurgeCache = true; 2985 mPurgeCache = true;
2974 } 2986 }
2975 // Purge cache if it belongs to an old version 2987 // Purge cache if it belongs to an old version
@@ -2993,7 +3005,7 @@ bool LLAppViewer::initCache()
2993 cache_location = gSavedSettings.getString("CacheLocation"); 3005 cache_location = gSavedSettings.getString("CacheLocation");
2994 } 3006 }
2995 std::string new_cache_location = gSavedSettings.getString("NewCacheLocation"); 3007 std::string new_cache_location = gSavedSettings.getString("NewCacheLocation");
2996 if ((new_cache_location != cache_location) && new_cache_location != "") 3008 if (new_cache_location != cache_location)
2997 { 3009 {
2998 gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")); 3010 gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
2999 purgeCache(); // purge old cache 3011 purgeCache(); // purge old cache
@@ -3001,7 +3013,7 @@ bool LLAppViewer::initCache()
3001 cache_location = new_cache_location; 3013 cache_location = new_cache_location;
3002 } 3014 }
3003 3015
3004 if (!gDirUtilp->setCacheDir(cache_location)) 3016 if (!gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")))
3005 { 3017 {
3006 LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL; 3018 LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL;
3007 gSavedSettings.setString("CacheLocation", ""); 3019 gSavedSettings.setString("CacheLocation", "");
@@ -3178,10 +3190,53 @@ bool LLAppViewer::initCache()
3178 3190
3179void LLAppViewer::purgeCache() 3191void LLAppViewer::purgeCache()
3180{ 3192{
3181 LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << llendl; 3193 LL_INFOS("AppCache") << "Begin purging cachees..." << llendl;
3182 LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); 3194 if (gSavedSettings.getBOOL("PurgeCacheOnStartup")) // purging from cmd line
3183 std::string mask = gDirUtilp->getDirDelimiter() + "*.*"; 3195 {
3184 gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""),mask); 3196 LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE);
3197 removeCacheFiles("*.*");
3198 }
3199 else // purging cache from ui
3200 {
3201 if (gSavedSettings.getBOOL("ClearTextureCache"))
3202 {
3203 LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE);
3204 gSavedSettings.setBOOL("ClearTextureCache", FALSE);
3205 }
3206
3207 if (gSavedSettings.getBOOL("ClearObjectCache"))
3208 {
3209 removeCacheFiles("*.slc");
3210 gSavedSettings.setBOOL("ClearObjectCache", FALSE);
3211 }
3212
3213 if (gSavedSettings.getBOOL("ClearInvCache"))
3214 {
3215 removeCacheFiles("*.inv.gz");
3216 removeCacheFiles(std::string(VFS_DATA_FILE_BASE) + "*");
3217 removeCacheFiles(std::string(VFS_INDEX_FILE_BASE) + "*");
3218 removeCacheFiles("*.lso");
3219 removeCacheFiles("*.bodypart");
3220 removeCacheFiles("*.clothing");
3221 gSavedSettings.setBOOL("ClearInvCache", FALSE);
3222 }
3223
3224 if (gSavedSettings.getBOOL("ClearNameCache"))
3225 {
3226 // ick @ not making these variables -- MC
3227 removeCacheFiles("name.cache");
3228 removeCacheFiles("avatar_name_cache.xml");
3229 removeCacheFiles("*.cached_mute");
3230 gSavedSettings.setBOOL("ClearNameCache", FALSE);
3231 }
3232
3233 if (gSavedSettings.getBOOL("ClearSoundsCache"))
3234 {
3235 removeCacheFiles("*.wav");
3236 removeCacheFiles("*.dsf");
3237 gSavedSettings.setBOOL("ClearSoundsCache", FALSE);
3238 }
3239 }
3185} 3240}
3186 3241
3187const std::string& LLAppViewer::getSecondLifeTitle() const 3242const std::string& LLAppViewer::getSecondLifeTitle() const
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp
index 8878de5..13795e5 100644
--- a/linden/indra/newview/llfloaterabout.cpp
+++ b/linden/indra/newview/llfloaterabout.cpp
@@ -190,7 +190,14 @@ LLFloaterAbout::LLFloaterAbout()
190 support.append("CPU: "); 190 support.append("CPU: ");
191 support.append( gSysCPU.getCPUString() ); 191 support.append( gSysCPU.getCPUString() );
192 support.append("\n"); 192 support.append("\n");
193 193
194 support.append("SSE Support:");
195 if(gSysCPU.hasSSE())
196 support.append(" SSE2\n");
197 else if(gSysCPU.hasSSE())
198 support.append(" SSE\n");
199 else
200 support.append(" None\n");
194 U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024; 201 U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
195 // Moved hack adjustment to Windows memory size into llsys.cpp 202 // Moved hack adjustment to Windows memory size into llsys.cpp
196 203
@@ -225,9 +232,19 @@ LLFloaterAbout::LLFloaterAbout()
225 232
226 support.append("OpenGL Version: "); 233 support.append("OpenGL Version: ");
227 support.append( (const char*) glGetString(GL_VERSION) ); 234 support.append( (const char*) glGetString(GL_VERSION) );
228 support.append("\n"); 235 support.append("\n\n");
236
237 support.append("Viewer SSE Version: ");
238#if _M_IX86_FP > 0 //Windows
239 support.append(llformat("SSE%i\n", _M_IX86_FP ));
240#elif defined(__SSE2__) //GCC
241 support.append("SSE2\n");
242#elif defined(__SSE__) //GCC
243 support.append("SSE\n");
244#else
245 support.append("None\n");
246#endif
229 247
230 support.append("\n");
231 248
232 support.append("libcurl Version: "); 249 support.append("libcurl Version: ");
233 support.append( LLCurl::getVersionString() ); 250 support.append( LLCurl::getVersionString() );
diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp
index 94eb2de..2c91e8a 100644
--- a/linden/indra/newview/llfloaterpreference.cpp
+++ b/linden/indra/newview/llfloaterpreference.cpp
@@ -307,6 +307,24 @@ void LLPreferenceCore::apply()
307 mLCDPanel->apply(); 307 mLCDPanel->apply();
308 } 308 }
309#endif 309#endif
310
311 // Sims always wants us to send IMViaEMail and DirectoryVisible in the same msg or we crash, they're evil like that
312 // We only know both these values after mPrefsChat and mPrefsIM have been applied -- MC
313 if (mPrefsChat->getUpdateUserInfo() || mPrefsIM->getUpdateUserInfo())
314 {
315 bool new_im_via_email = mPrefsChat->getIMViaEmail();
316 std::string directory_visibility = mPrefsIM->getDirectoryVis();
317
318 LLMessageSystem* msg = gMessageSystem;
319 msg->newMessageFast(_PREHASH_UpdateUserInfo);
320 msg->nextBlockFast(_PREHASH_AgentData);
321 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
322 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
323 msg->nextBlockFast(_PREHASH_UserData);
324 msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email);
325 msg->addString("DirectoryVisibility", directory_visibility);
326 gAgent.sendReliableMessage();
327 }
310} 328}
311 329
312 330
@@ -473,34 +491,37 @@ bool LLFloaterPreference::callbackReset(const LLSD& notification, const LLSD& re
473void LLFloaterPreference::onBtnOK( void* userdata ) 491void LLFloaterPreference::onBtnOK( void* userdata )
474{ 492{
475 LLFloaterPreference *fp =(LLFloaterPreference *)userdata; 493 LLFloaterPreference *fp =(LLFloaterPreference *)userdata;
476 // commit any outstanding text entry 494 if (fp)
477 if (fp->hasFocus())
478 { 495 {
479 LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); 496 // commit any outstanding text entry
480 if (cur_focus->acceptsTextInput()) 497 if (fp->hasFocus())
481 { 498 {
482 cur_focus->onCommit(); 499 LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
500 if (cur_focus->acceptsTextInput())
501 {
502 cur_focus->onCommit();
503 }
483 } 504 }
484 }
485 505
486 if (fp->canClose()) 506 if (fp->canClose())
487 { 507 {
488 fp->apply(); 508 fp->apply();
489 fp->close(false); 509 fp->close(false);
490 510
491 gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); 511 gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
492 512
493 std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); 513 std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
494 // save all settings, even if equals defaults 514 // save all settings, even if equals defaults
495 gCrashSettings.saveToFile(crash_settings_filename, FALSE); 515 gCrashSettings.saveToFile(crash_settings_filename, FALSE);
496 } 516 }
497 else 517 else
498 { 518 {
499 // Show beep, pop up dialog, etc. 519 // Show beep, pop up dialog, etc.
500 llinfos << "Can't close preferences!" << llendl; 520 llinfos << "Can't close preferences!" << llendl;
501 } 521 }
502 522
503 LLPanelLogin::refreshLocation( false ); 523 LLPanelLogin::refreshLocation( false );
524 }
504} 525}
505 526
506 527
@@ -508,17 +529,20 @@ void LLFloaterPreference::onBtnOK( void* userdata )
508void LLFloaterPreference::onBtnApply( void* userdata ) 529void LLFloaterPreference::onBtnApply( void* userdata )
509{ 530{
510 LLFloaterPreference *fp =(LLFloaterPreference *)userdata; 531 LLFloaterPreference *fp =(LLFloaterPreference *)userdata;
511 if (fp->hasFocus()) 532 if (fp)
512 { 533 {
513 LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); 534 if (fp->hasFocus())
514 if (cur_focus->acceptsTextInput())
515 { 535 {
516 cur_focus->onCommit(); 536 LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
537 if (cur_focus->acceptsTextInput())
538 {
539 cur_focus->onCommit();
540 }
517 } 541 }
518 } 542 fp->apply();
519 fp->apply();
520 543
521 LLPanelLogin::refreshLocation( false ); 544 LLPanelLogin::refreshLocation( false );
545 }
522} 546}
523 547
524 548
@@ -534,15 +558,18 @@ void LLFloaterPreference::onClose(bool app_quitting)
534void LLFloaterPreference::onBtnCancel( void* userdata ) 558void LLFloaterPreference::onBtnCancel( void* userdata )
535{ 559{
536 LLFloaterPreference *fp =(LLFloaterPreference *)userdata; 560 LLFloaterPreference *fp =(LLFloaterPreference *)userdata;
537 if (fp->hasFocus()) 561 if (fp)
538 { 562 {
539 LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); 563 if (fp->hasFocus())
540 if (cur_focus->acceptsTextInput())
541 { 564 {
542 cur_focus->onCommit(); 565 LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
566 if (cur_focus->acceptsTextInput())
567 {
568 cur_focus->onCommit();
569 }
543 } 570 }
571 fp->close(); // side effect will also cancel any unsaved changes.
544 } 572 }
545 fp->close(); // side effect will also cancel any unsaved changes.
546} 573}
547 574
548 575
diff --git a/linden/indra/newview/llgesturemgr.cpp b/linden/indra/newview/llgesturemgr.cpp
index 29bbc97..2258bc1 100644
--- a/linden/indra/newview/llgesturemgr.cpp
+++ b/linden/indra/newview/llgesturemgr.cpp
@@ -564,7 +564,6 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s
564 found_gestures = TRUE; 564 found_gestures = TRUE;
565 } 565 }
566 } 566 }
567
568 } 567 }
569 568
570 if(!gesture) 569 if(!gesture)
diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp
index ac957ed..9c5e993 100644
--- a/linden/indra/newview/llpanelgeneral.cpp
+++ b/linden/indra/newview/llpanelgeneral.cpp
@@ -99,9 +99,6 @@ BOOL LLPanelGeneral::postBuild()
99 childSetValue("afk_timeout_checkbox", gSavedSettings.getBOOL("AllowIdleAFK")); 99 childSetValue("afk_timeout_checkbox", gSavedSettings.getBOOL("AllowIdleAFK"));
100 childSetCommitCallback("afk_timeout_checkbox", onCommitAFKCheckbox, this); 100 childSetCommitCallback("afk_timeout_checkbox", onCommitAFKCheckbox, this);
101 101
102 childSetValue("mini_map_notify_chat", gSavedSettings.getBOOL("MiniMapNotifyChatRange"));
103 childSetValue("mini_map_notify_sim", gSavedSettings.getBOOL("MiniMapNotifySimRange"));
104
105// mDisplayNamesUsage = gSavedSettings.getU32("DisplayNamesUsage"); 102// mDisplayNamesUsage = gSavedSettings.getU32("DisplayNamesUsage");
106// mLegacyNamesForFriends = gSavedSettings.getBOOL("LegacyNamesForFriends"); 103// mLegacyNamesForFriends = gSavedSettings.getBOOL("LegacyNamesForFriends");
107 104
@@ -168,8 +165,6 @@ void LLPanelGeneral::apply()
168 //gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); -- MC 165 //gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); -- MC
169 gSavedSettings.setF32("AFKTimeout", 60 * childGetValue("afk_timeout_spinner").asReal()); // User enters minutes, we store as seconds -- MC 166 gSavedSettings.setF32("AFKTimeout", 60 * childGetValue("afk_timeout_spinner").asReal()); // User enters minutes, we store as seconds -- MC
170 gSavedSettings.setBOOL("AllowIdleAFK", childGetValue("afk_timeout_checkbox")); 167 gSavedSettings.setBOOL("AllowIdleAFK", childGetValue("afk_timeout_checkbox"));
171 gSavedSettings.setBOOL("MiniMapNotifyChatRange", childGetValue("mini_map_notify_chat"));
172 gSavedSettings.setBOOL("MiniMapNotifySimRange", childGetValue("mini_map_notify_sim"));
173 gSavedSettings.setString("Language", childGetValue("language_combobox")); 168 gSavedSettings.setString("Language", childGetValue("language_combobox"));
174 169
175 /* 170 /*
diff --git a/linden/indra/newview/llpanelinput.cpp b/linden/indra/newview/llpanelinput.cpp
index 9664b6f..538f706 100644
--- a/linden/indra/newview/llpanelinput.cpp
+++ b/linden/indra/newview/llpanelinput.cpp
@@ -79,6 +79,8 @@ BOOL LLPanelInput::postBuild()
79 childSetValue("double_click_action", gSavedSettings.getString("DoubleClickAction")); 79 childSetValue("double_click_action", gSavedSettings.getString("DoubleClickAction"));
80 childSetCommitCallback("double_click_action", onCommitAction, this); 80 childSetCommitCallback("double_click_action", onCommitAction, this);
81 childSetValue("go_action", gSavedSettings.getString("GoAction")); 81 childSetValue("go_action", gSavedSettings.getString("GoAction"));
82 childSetEnabled("go_action_label", gSavedSettings.getString("DoubleClickAction") == "Go");
83 childSetEnabled("go_action", gSavedSettings.getString("DoubleClickAction") == "Go");
82 84
83 childSetValue("Disable camera constraints", gSavedSettings.getBOOL("DisableCameraConstraints")); 85 childSetValue("Disable camera constraints", gSavedSettings.getBOOL("DisableCameraConstraints"));
84 childSetValue("disable_min_zoom_check", gSavedSettings.getBOOL("DisableMinZoomDist")); 86 childSetValue("disable_min_zoom_check", gSavedSettings.getBOOL("DisableMinZoomDist"));
@@ -139,7 +141,7 @@ void LLPanelInput::onCommitAction(LLUICtrl* ctrl, void* user_data)
139 LLComboBox* combo = (LLComboBox*)ctrl; 141 LLComboBox* combo = (LLComboBox*)ctrl;
140 if (self && combo) 142 if (self && combo)
141 { 143 {
142 self->childSetEnabled("go_action_label", combo->getSimple() == "Go"); 144 self->childSetEnabled("go_action_label", combo->getValue().asString() == "Go");
143 self->childSetEnabled("go_action", combo->getSimple() == "Go"); 145 self->childSetEnabled("go_action", combo->getValue().asString() == "Go");
144 } 146 }
145} 147}
diff --git a/linden/indra/newview/llpanellandaudio.cpp b/linden/indra/newview/llpanellandaudio.cpp
index 8d902b6..c7543a0 100644
--- a/linden/indra/newview/llpanellandaudio.cpp
+++ b/linden/indra/newview/llpanellandaudio.cpp
@@ -69,7 +69,12 @@ enum
69//--------------------------------------------------------------------------- 69//---------------------------------------------------------------------------
70 70
71LLPanelLandAudio::LLPanelLandAudio(LLParcelSelectionHandle& parcel) 71LLPanelLandAudio::LLPanelLandAudio(LLParcelSelectionHandle& parcel)
72: LLPanel(std::string("land_media_panel")), mParcel(parcel) 72: LLPanel(std::string("land_media_panel")),
73 mParcel(parcel),
74 mCheckSoundLocal(NULL),
75 mSoundHelpButton(NULL),
76 mRadioVoiceChat(NULL),
77 mMusicURLEdit(NULL)
73{ 78{
74} 79}
75 80
@@ -82,6 +87,9 @@ LLPanelLandAudio::~LLPanelLandAudio()
82 87
83BOOL LLPanelLandAudio::postBuild() 88BOOL LLPanelLandAudio::postBuild()
84{ 89{
90 mSoundHelpButton = getChild<LLButton>("?");
91 mSoundHelpButton->setClickedCallback(onClickSoundHelp, this);
92
85 mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check_sound_local"); 93 mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check_sound_local");
86 childSetCommitCallback("check_sound_local", onCommitAny, this); 94 childSetCommitCallback("check_sound_local", onCommitAny, this);
87 95
@@ -185,3 +193,10 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
185 // Might have changed properties, so let's redraw! 193 // Might have changed properties, so let's redraw!
186 self->refresh(); 194 self->refresh();
187} 195}
196
197
198// static
199void LLPanelLandAudio::onClickSoundHelp(void*)
200{
201 LLNotifications::instance().add("ClickSoundHelpLand");
202}
diff --git a/linden/indra/newview/llpanellandaudio.h b/linden/indra/newview/llpanellandaudio.h
index 82e27f6..b443beb 100644
--- a/linden/indra/newview/llpanellandaudio.h
+++ b/linden/indra/newview/llpanellandaudio.h
@@ -50,11 +50,12 @@ public:
50 50
51private: 51private:
52 static void onCommitAny(LLUICtrl* ctrl, void *userdata); 52 static void onCommitAny(LLUICtrl* ctrl, void *userdata);
53 static void onClickSoundHelp(void*);
53 54
54private:
55 LLCheckBoxCtrl* mCheckSoundLocal; 55 LLCheckBoxCtrl* mCheckSoundLocal;
56 LLRadioGroup* mRadioVoiceChat; 56 LLRadioGroup* mRadioVoiceChat;
57 LLLineEditor* mMusicURLEdit; 57 LLLineEditor* mMusicURLEdit;
58 LLButton* mSoundHelpButton;
58 59
59 LLSafeHandle<LLParcelSelection>& mParcel; 60 LLSafeHandle<LLParcelSelection>& mParcel;
60}; 61};
diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp
index 8a0be86..dba7883 100644
--- a/linden/indra/newview/llpanellandmedia.cpp
+++ b/linden/indra/newview/llpanellandmedia.cpp
@@ -65,12 +65,9 @@ LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel)
65: LLPanel(std::string("land_media_panel")), 65: LLPanel(std::string("land_media_panel")),
66 66
67 mParcel(parcel), 67 mParcel(parcel),
68 mCheckSoundLocal(NULL),
69 mSoundHelpButton(NULL),
70 mCheckEnableVoiceChat(NULL), 68 mCheckEnableVoiceChat(NULL),
71 mCheckEnableVoiceChatIsEstateDisabled(NULL), 69 mCheckEnableVoiceChatIsEstateDisabled(NULL),
72 mCheckEnableVoiceChatParcel(NULL), 70 mCheckEnableVoiceChatParcel(NULL),
73 mMusicURLEdit(NULL),
74 mMediaURLEdit(NULL), 71 mMediaURLEdit(NULL),
75 mMediaDescEdit(NULL), 72 mMediaDescEdit(NULL),
76 mMediaTypeCombo(NULL), 73 mMediaTypeCombo(NULL),
@@ -92,21 +89,8 @@ LLPanelLandMedia::~LLPanelLandMedia()
92} 89}
93 90
94 91
95// static
96void LLPanelLandMedia::onClickSoundHelp(void*)
97{
98 LLNotifications::instance().add("ClickSoundHelpLand");
99}
100
101
102BOOL LLPanelLandMedia::postBuild() 92BOOL LLPanelLandMedia::postBuild()
103{ 93{
104 mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check sound local");
105 childSetCommitCallback("check sound local", onCommitAny, this);
106
107 mSoundHelpButton = getChild<LLButton>("?");
108 mSoundHelpButton->setClickedCallback(onClickSoundHelp, this);
109
110 mCheckEnableVoiceChat = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel"); 94 mCheckEnableVoiceChat = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel");
111 childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this); 95 childSetCommitCallback("parcel_enable_voice_channel", onCommitAny, this);
112 mCheckEnableVoiceChatIsEstateDisabled = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_is_estate_disabled"); 96 mCheckEnableVoiceChatIsEstateDisabled = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_is_estate_disabled");
@@ -114,9 +98,6 @@ BOOL LLPanelLandMedia::postBuild()
114 mCheckEnableVoiceChatParcel = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_parcel"); 98 mCheckEnableVoiceChatParcel = getChild<LLCheckBoxCtrl>("parcel_enable_voice_channel_parcel");
115 childSetCommitCallback("parcel_enable_voice_channel_parcel", onCommitAny, this); 99 childSetCommitCallback("parcel_enable_voice_channel_parcel", onCommitAny, this);
116 100
117 mMusicURLEdit = getChild<LLLineEditor>("music_url");
118 childSetCommitCallback("music_url", onCommitAny, this);
119
120 mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); 101 mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture");
121 mMediaTextureCtrl->setCommitCallback( onCommitAny ); 102 mMediaTextureCtrl->setCommitCallback( onCommitAny );
122 mMediaTextureCtrl->setCallbackUserData( this ); 103 mMediaTextureCtrl->setCallbackUserData( this );
@@ -169,9 +150,6 @@ void LLPanelLandMedia::refresh()
169 // Display options 150 // Display options
170 BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); 151 BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA);
171 152
172 mCheckSoundLocal->set( parcel->getSoundLocal() );
173 mCheckSoundLocal->setEnabled( can_change_media );
174
175 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); 153 LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
176 if (!region) 154 if (!region)
177 { 155 {
@@ -217,9 +195,6 @@ void LLPanelLandMedia::refresh()
217 195
218 mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel()); 196 mCheckEnableVoiceChatParcel->set(!parcel->getParcelFlagUseEstateVoiceChannel());
219 197
220 mMusicURLEdit->setText(parcel->getMusicURL());
221 mMusicURLEdit->setEnabled( can_change_media );
222
223 mMediaURLEdit->setText(parcel->getMediaURL()); 198 mMediaURLEdit->setText(parcel->getMediaURL());
224 mMediaURLEdit->setEnabled( FALSE ); 199 mMediaURLEdit->setEnabled( FALSE );
225 200
@@ -374,8 +349,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
374 } 349 }
375 350
376 // Extract data from UI 351 // Extract data from UI
377 BOOL sound_local = self->mCheckSoundLocal->get();
378 std::string music_url = self->mMusicURLEdit->getText();
379 std::string media_url = self->mMediaURLEdit->getText(); 352 std::string media_url = self->mMediaURLEdit->getText();
380 std::string media_desc = self->mMediaDescEdit->getText(); 353 std::string media_desc = self->mMediaDescEdit->getText();
381 std::string mime_type = self->childGetText("mime_type"); 354 std::string mime_type = self->childGetText("mime_type");
@@ -391,14 +364,11 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
391 self->childSetText("mime_type", mime_type); 364 self->childSetText("mime_type", mime_type);
392 365
393 // Remove leading/trailing whitespace (common when copying/pasting) 366 // Remove leading/trailing whitespace (common when copying/pasting)
394 LLStringUtil::trim(music_url);
395 LLStringUtil::trim(media_url); 367 LLStringUtil::trim(media_url);
396 368
397 // Push data into current parcel 369 // Push data into current parcel
398 parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled); 370 parcel->setParcelFlag(PF_ALLOW_VOICE_CHAT, voice_enabled);
399 parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); 371 parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan);
400 parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local);
401 parcel->setMusicURL(music_url);
402 parcel->setMediaURL(media_url); 372 parcel->setMediaURL(media_url);
403 parcel->setMediaType(mime_type); 373 parcel->setMediaType(mime_type);
404 parcel->setMediaDesc(media_desc); 374 parcel->setMediaDesc(media_desc);
diff --git a/linden/indra/newview/llpanellandmedia.h b/linden/indra/newview/llpanellandmedia.h
index 845b953..fda99bd 100644
--- a/linden/indra/newview/llpanellandmedia.h
+++ b/linden/indra/newview/llpanellandmedia.h
@@ -56,15 +56,11 @@ private:
56 static void onCommitAny(LLUICtrl* ctrl, void *userdata); 56 static void onCommitAny(LLUICtrl* ctrl, void *userdata);
57 static void onCommitType(LLUICtrl* ctrl, void *userdata); 57 static void onCommitType(LLUICtrl* ctrl, void *userdata);
58 static void onSetBtn(void* userdata); 58 static void onSetBtn(void* userdata);
59 static void onClickSoundHelp(void*);
60 59
61private: 60private:
62 LLCheckBoxCtrl* mCheckSoundLocal;
63 LLButton* mSoundHelpButton;
64 LLCheckBoxCtrl* mCheckEnableVoiceChat; 61 LLCheckBoxCtrl* mCheckEnableVoiceChat;
65 LLCheckBoxCtrl* mCheckEnableVoiceChatIsEstateDisabled; 62 LLCheckBoxCtrl* mCheckEnableVoiceChatIsEstateDisabled;
66 LLCheckBoxCtrl* mCheckEnableVoiceChatParcel; 63 LLCheckBoxCtrl* mCheckEnableVoiceChatParcel;
67 LLLineEditor* mMusicURLEdit;
68 LLLineEditor* mMediaURLEdit; 64 LLLineEditor* mMediaURLEdit;
69 LLLineEditor* mMediaDescEdit; 65 LLLineEditor* mMediaDescEdit;
70 LLComboBox* mMediaTypeCombo; 66 LLComboBox* mMediaTypeCombo;
diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp
index 572bcc3..ad8de87 100644
--- a/linden/indra/newview/llpanelmsgs.cpp
+++ b/linden/indra/newview/llpanelmsgs.cpp
@@ -72,6 +72,9 @@ BOOL LLPanelMsgs::postBuild()
72 72
73 childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); 73 childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification"));
74 74
75 childSetValue("mini_map_notify_chat", gSavedSettings.getBOOL("MiniMapNotifyChatRange"));
76 childSetValue("mini_map_notify_sim", gSavedSettings.getBOOL("MiniMapNotifySimRange"));
77
75 return TRUE; 78 return TRUE;
76} 79}
77 80
@@ -170,6 +173,9 @@ void LLPanelMsgs::apply()
170 gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox")); 173 gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox"));
171 174
172 gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean()); 175 gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean());
176
177 gSavedSettings.setBOOL("MiniMapNotifyChatRange", childGetValue("mini_map_notify_chat"));
178 gSavedSettings.setBOOL("MiniMapNotifySimRange", childGetValue("mini_map_notify_sim"));
173} 179}
174 180
175void LLPanelMsgs::cancel() 181void LLPanelMsgs::cancel()
diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp
index a867a9c..c12f901 100644
--- a/linden/indra/newview/llpanelnetwork.cpp
+++ b/linden/indra/newview/llpanelnetwork.cpp
@@ -45,6 +45,7 @@
45#include "llviewerwindow.h" 45#include "llviewerwindow.h"
46 46
47// project includes 47// project includes
48#include "floatercache.h"
48#include "llcheckboxctrl.h" 49#include "llcheckboxctrl.h"
49#include "hippogridmanager.h" 50#include "hippogridmanager.h"
50#include "lluictrlfactory.h" 51#include "lluictrlfactory.h"
@@ -267,9 +268,8 @@ void LLPanelNetwork::refresh()
267// static 268// static
268void LLPanelNetwork::onClickClearDiskCache(void*) 269void LLPanelNetwork::onClickClearDiskCache(void*)
269{ 270{
270 // flag client cache for clearing next time the client runs 271 FloaterCache::getInstance()->open();
271 gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); 272 FloaterCache::getInstance()->center();
272 LLNotifications::instance().add("CacheWillClear");
273} 273}
274 274
275// static 275// static
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index 9490ba2..1cdab46 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -46,7 +46,6 @@
46#include "lggautocorrectfloater.h" 46#include "lggautocorrectfloater.h"
47#include "llprefschat.h" 47#include "llprefschat.h"
48#include "llviewercontrol.h" 48#include "llviewercontrol.h"
49#include "llviewermessage.h"
50 49
51class LLPrefsChatImpl : public LLPanel 50class LLPrefsChatImpl : public LLPanel
52{ 51{
@@ -72,8 +71,10 @@ public:
72 static void onSpellEditCustom(void* data); 71 static void onSpellEditCustom(void* data);
73 static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); 72 static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata);
74 73
75protected: 74 bool mUpdateUserInfo;
76 bool mOriginalIMViaEmail; 75 bool mOriginalIMViaEmail;
76
77protected:
77 bool mGotPersonalInfo; 78 bool mGotPersonalInfo;
78 79
79private: 80private:
@@ -84,7 +85,8 @@ LLPrefsChatImpl::LLPrefsChatImpl()
84 : LLPanel(std::string("Chat Panel")), 85 : LLPanel(std::string("Chat Panel")),
85 mChatChannel(false), 86 mChatChannel(false),
86 mOriginalIMViaEmail(false), 87 mOriginalIMViaEmail(false),
87 mGotPersonalInfo(false) 88 mGotPersonalInfo(false),
89 mUpdateUserInfo(false)
88{ 90{
89 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_chat.xml"); 91 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_chat.xml");
90} 92}
@@ -230,14 +232,17 @@ void LLPrefsChatImpl::apply()
230 232
231 if (new_im_via_email != mOriginalIMViaEmail) 233 if (new_im_via_email != mOriginalIMViaEmail)
232 { 234 {
233 LLMessageSystem* msg = gMessageSystem; 235 mOriginalIMViaEmail = new_im_via_email;
236 mUpdateUserInfo = true;
237
238 /*LLMessageSystem* msg = gMessageSystem;
234 msg->newMessageFast(_PREHASH_UpdateUserInfo); 239 msg->newMessageFast(_PREHASH_UpdateUserInfo);
235 msg->nextBlockFast(_PREHASH_AgentData); 240 msg->nextBlockFast(_PREHASH_AgentData);
236 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 241 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
237 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 242 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
238 msg->nextBlockFast(_PREHASH_UserData); 243 msg->nextBlockFast(_PREHASH_UserData);
239 msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email); 244 msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email);
240 gAgent.sendReliableMessage(); 245 gAgent.sendReliableMessage();*/
241 } 246 }
242 } 247 }
243 248
@@ -379,6 +384,16 @@ void LLPrefsChat::setPersonalInfo(bool im_via_email, const std::string& email)
379 impl.setPersonalInfo(im_via_email, email); 384 impl.setPersonalInfo(im_via_email, email);
380} 385}
381 386
387bool LLPrefsChat::getUpdateUserInfo()
388{
389 return impl.mUpdateUserInfo;
390}
391
392bool LLPrefsChat::getIMViaEmail()
393{
394 return impl.mOriginalIMViaEmail;
395}
396
382LLPanel* LLPrefsChat::getPanel() 397LLPanel* LLPrefsChat::getPanel()
383{ 398{
384 return &impl; 399 return &impl;
diff --git a/linden/indra/newview/llprefschat.h b/linden/indra/newview/llprefschat.h
index 64bfb36..6c69a2b 100644
--- a/linden/indra/newview/llprefschat.h
+++ b/linden/indra/newview/llprefschat.h
@@ -48,6 +48,9 @@ public:
48 48
49 LLPanel* getPanel(); 49 LLPanel* getPanel();
50 50
51 bool getUpdateUserInfo();
52 bool getIMViaEmail();
53
51protected: 54protected:
52 LLPrefsChatImpl& impl; 55 LLPrefsChatImpl& impl;
53}; 56};
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp
index 53be673..2ee357c 100644
--- a/linden/indra/newview/llprefsim.cpp
+++ b/linden/indra/newview/llprefsim.cpp
@@ -76,13 +76,15 @@ public:
76 static void onClickBusyAdvanced(void* user_data); 76 static void onClickBusyAdvanced(void* user_data);
77 static void onClickOTRAdvanced(void* user_data); 77 static void onClickOTRAdvanced(void* user_data);
78 78
79 bool mUpdateUserInfo;
80 std::string mDirectoryVisibility;
81
79protected: 82protected:
80 83
81 bool mGotPersonalInfo; 84 bool mGotPersonalInfo;
82 bool mGotPerAccountSettings; 85 bool mGotPerAccountSettings;
83 86
84 bool mOriginalHideOnlineStatus; 87 bool mOriginalHideOnlineStatus;
85 std::string mDirectoryVisibility;
86}; 88};
87 89
88 90
@@ -90,7 +92,9 @@ LLPrefsIMImpl::LLPrefsIMImpl()
90 : LLPanel(std::string("IM Prefs Panel")), 92 : LLPanel(std::string("IM Prefs Panel")),
91 mGotPersonalInfo(false), 93 mGotPersonalInfo(false),
92 mGotPerAccountSettings(false), 94 mGotPerAccountSettings(false),
93 mOriginalHideOnlineStatus(false) 95 mOriginalHideOnlineStatus(false),
96 mDirectoryVisibility(""),
97 mUpdateUserInfo(false)
94{ 98{
95 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_im.xml"); 99 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_im.xml");
96} 100}
@@ -181,27 +185,45 @@ void LLPrefsIMImpl::apply()
181 185
182 if (new_hide_online != mOriginalHideOnlineStatus) 186 if (new_hide_online != mOriginalHideOnlineStatus)
183 { 187 {
184 LLMessageSystem* msg = gMessageSystem; 188 mOriginalHideOnlineStatus = new_hide_online;
185 msg->newMessageFast(_PREHASH_UpdateUserInfo); 189
186 msg->nextBlockFast(_PREHASH_AgentData);
187 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
188 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
189 msg->nextBlockFast(_PREHASH_UserData);
190 //msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email);
191 // This hack is because we are representing several different 190 // This hack is because we are representing several different
192 // possible strings with a single checkbox. Since most users 191 // possible strings with a single checkbox. Since most users
193 // can only select between 2 values, we represent it as a 192 // can only select between 2 values, we represent it as a
194 // checkbox. This breaks down a little bit for liaisons, but 193 // checkbox. This breaks down a little bit for liaisons, but
195 // works out in the end. 194 // works out in the end.
196 if(new_hide_online != mOriginalHideOnlineStatus) 195 if (new_hide_online)
197 { 196 {
198 if(new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN; 197 mDirectoryVisibility = VISIBILITY_HIDDEN;
199 else mDirectoryVisibility = VISIBILITY_DEFAULT; 198 }
200 //Update showonline value, otherwise multiple applys won't work 199 else
201 mOriginalHideOnlineStatus = new_hide_online; 200 {
202 } 201 mDirectoryVisibility = VISIBILITY_DEFAULT;
203 msg->addString("DirectoryVisibility", mDirectoryVisibility); 202 }
204 gAgent.sendReliableMessage(); 203
204 mUpdateUserInfo = true;
205
206 //LLMessageSystem* msg = gMessageSystem;
207 //msg->newMessageFast(_PREHASH_UpdateUserInfo);
208 //msg->nextBlockFast(_PREHASH_AgentData);
209 //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
210 //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
211 //msg->nextBlockFast(_PREHASH_UserData);
212 ////msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email);
213 //// This hack is because we are representing several different
214 //// possible strings with a single checkbox. Since most users
215 //// can only select between 2 values, we represent it as a
216 //// checkbox. This breaks down a little bit for liaisons, but
217 //// works out in the end.
218 //if(new_hide_online != mOriginalHideOnlineStatus)
219 //{
220 // if(new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN;
221 // else mDirectoryVisibility = VISIBILITY_DEFAULT;
222 // //Update showonline value, otherwise multiple applys won't work
223 // mOriginalHideOnlineStatus = new_hide_online;
224 //}
225 //msg->addString("DirectoryVisibility", mDirectoryVisibility);
226 //gAgent.sendReliableMessage();
205 } 227 }
206 } 228 }
207} 229}
@@ -351,6 +373,16 @@ void LLPrefsIM::preparePerAccountPrefs(bool enable)
351 impl.preparePerAccountPrefs(enable); 373 impl.preparePerAccountPrefs(enable);
352} 374}
353 375
376bool LLPrefsIM::getUpdateUserInfo()
377{
378 return impl.mUpdateUserInfo;
379}
380
381std::string LLPrefsIM::getDirectoryVis()
382{
383 return impl.mDirectoryVisibility;
384}
385
354LLPanel* LLPrefsIM::getPanel() 386LLPanel* LLPrefsIM::getPanel()
355{ 387{
356 return &impl; 388 return &impl;
diff --git a/linden/indra/newview/llprefsim.h b/linden/indra/newview/llprefsim.h
index 054e4c7..8003ca2 100644
--- a/linden/indra/newview/llprefsim.h
+++ b/linden/indra/newview/llprefsim.h
@@ -50,6 +50,9 @@ public:
50 50
51 LLPanel* getPanel(); 51 LLPanel* getPanel();
52 52
53 bool getUpdateUserInfo();
54 std::string getDirectoryVis();
55
53protected: 56protected:
54 LLPrefsIMImpl& impl; 57 LLPrefsIMImpl& impl;
55}; 58};
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp
index 0a23045..4c81e71 100644
--- a/linden/indra/newview/llviewercontrol.cpp
+++ b/linden/indra/newview/llviewercontrol.cpp
@@ -530,6 +530,18 @@ bool handleSliderScrollWheelMultiplierChanged(const LLSD& newvalue)
530 return true; 530 return true;
531} 531}
532 532
533bool handleRenderSculptSAThresholdChanged(const LLSD& newvalue)
534{
535 LLVOVolume::sSculptSAThresh = newvalue.asReal();
536 return true;
537}
538
539bool handleRenderSculptSAMaxChanged(const LLSD& newvalue)
540{
541 LLVOVolume::sSculptSAMax = newvalue.asReal();
542 return true;
543}
544
533 545
534//////////////////////////////////////////////////////////////////////////// 546////////////////////////////////////////////////////////////////////////////
535 547
@@ -676,6 +688,8 @@ void settings_setup_listeners()
676 gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); 688 gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
677 gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); 689 gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1));
678 gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1)); 690 gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1));
691 gSavedSettings.getControl("RenderSculptSAThreshold")->getSignal()->connect(boost::bind(&handleRenderSculptSAThresholdChanged, _1));
692 gSavedSettings.getControl("RenderSculptSAMax")->getSignal()->connect(boost::bind(&handleRenderSculptSAMaxChanged, _1));
679} 693}
680 694
681template <> eControlType get_control_type<U32>(const U32& in, LLSD& out) 695template <> eControlType get_control_type<U32>(const U32& in, LLSD& out)
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 09065db..f2f37c4 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -84,6 +84,7 @@
84#include "llfirstuse.h" 84#include "llfirstuse.h"
85#include "llfloater.h" 85#include "llfloater.h"
86#include "floaterao.h" 86#include "floaterao.h"
87#include "floaterdice.h"
87#include "llfloaterabout.h" 88#include "llfloaterabout.h"
88#include "llfloaterbuycurrency.h" 89#include "llfloaterbuycurrency.h"
89#include "llfloateractivespeakers.h" 90#include "llfloateractivespeakers.h"
@@ -9601,6 +9602,32 @@ class LLAdvancedReloadBalance : public view_listener_t
9601 } 9602 }
9602}; 9603};
9603 9604
9605
9606/////////////////
9607// DICE WINDOW //
9608/////////////////
9609
9610
9611class LLAdvancedToggleDice : public view_listener_t
9612{
9613 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
9614 {
9615 FloaterDice::toggleInstance();
9616 return true;
9617 }
9618};
9619
9620class LLAdvancedCheckDice : public view_listener_t
9621{
9622 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
9623 {
9624 bool new_value = FloaterDice::instanceVisible();
9625 std::string control_name = userdata["control"].asString();
9626 gMenuHolder->findControl(control_name)->setValue(new_value);
9627 return true;
9628 }
9629};
9630
9604///////////////////// 9631/////////////////////
9605// DUMP SELECT MGR // 9632// DUMP SELECT MGR //
9606///////////////////// 9633/////////////////////
@@ -11421,6 +11448,8 @@ void initialize_menus()
11421 addMenu(new LLAdvancedWebBrowserTest(), "Advanced.WebBrowserTest"); 11448 addMenu(new LLAdvancedWebBrowserTest(), "Advanced.WebBrowserTest");
11422 addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI"); 11449 addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI");
11423 addMenu(new LLAdvancedReloadBalance(), "Advanced.ReloadBalance"); 11450 addMenu(new LLAdvancedReloadBalance(), "Advanced.ReloadBalance");
11451 addMenu(new LLAdvancedToggleDice(), "Advanced.ToggleDice");
11452 addMenu(new LLAdvancedCheckDice(), "Advanced.CheckDice");
11424 //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI"); 11453 //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI");
11425 addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); 11454 addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr");
11426 addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); 11455 addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory");
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp
index 5d0656d..217770c 100644
--- a/linden/indra/newview/llviewertexteditor.cpp
+++ b/linden/indra/newview/llviewertexteditor.cpp
@@ -417,6 +417,7 @@ void LLEmbeddedItems::bindEmbeddedChars( const LLFontGL* font ) const
417 417
418 break; 418 break;
419 case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break; 419 case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break;
420 case LLAssetType::AT_CALLINGCARD: img_name = "inv_item_callingcard_offline.tga"; break;
420 case LLAssetType::AT_LANDMARK: 421 case LLAssetType::AT_LANDMARK:
421 if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED) 422 if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
422 { 423 {
@@ -1384,6 +1385,7 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc)
1384 case LLAssetType::AT_GESTURE: 1385 case LLAssetType::AT_GESTURE:
1385 showCopyToInvDialog( item, wc ); 1386 showCopyToInvDialog( item, wc );
1386 return TRUE; 1387 return TRUE;
1388 case LLAssetType::AT_CALLINGCARD:
1387 default: 1389 default:
1388 return FALSE; 1390 return FALSE;
1389 } 1391 }
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp
index 8d5bfb4..b422c51 100644
--- a/linden/indra/newview/llvovolume.cpp
+++ b/linden/indra/newview/llvovolume.cpp
@@ -71,10 +71,6 @@
71const S32 MIN_QUIET_FRAMES_COALESCE = 30; 71const S32 MIN_QUIET_FRAMES_COALESCE = 30;
72const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; 72const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
73const F32 FORCE_CULL_AREA = 8.f; 73const F32 FORCE_CULL_AREA = 8.f;
74
75static const F32 sSculptSAThresh = 1750.f; // Surface area at which sculpts are considered for not being rendered
76static const F32 sSculptSAMax = 50000.f; // The maximum combined surface area of sculpts(per frame) that are above the
77 // threshold before they stop being rendered
78 74
79BOOL gAnimateTextures = TRUE; 75BOOL gAnimateTextures = TRUE;
80extern BOOL gHideSelectedObjects; 76extern BOOL gHideSelectedObjects;
@@ -83,6 +79,9 @@ F32 LLVOVolume::sLODFactor = 1.f;
83F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop 79F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop
84F32 LLVOVolume::sDistanceFactor = 1.0f; 80F32 LLVOVolume::sDistanceFactor = 1.0f;
85S32 LLVOVolume::sNumLODChanges = 0; 81S32 LLVOVolume::sNumLODChanges = 0;
82F32 LLVOVolume::sSculptSAThresh = 1750.f;
83F32 LLVOVolume::sSculptSAMax = 50000.f;
84
86 85
87LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) 86LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
88 : LLViewerObject(id, pcode, regionp), 87 : LLViewerObject(id, pcode, regionp),
@@ -109,6 +108,20 @@ LLVOVolume::~LLVOVolume()
109 mVolumeImpl = NULL; 108 mVolumeImpl = NULL;
110} 109}
111 110
111// virtual
112void LLVOVolume::markDead()
113{
114 if (!mDead)
115 {
116 if (mSculptTexture.notNull())
117 {
118 mSculptTexture->removeVolume(this);
119 }
120 }
121
122 LLViewerObject::markDead();
123}
124
112 125
113// static 126// static
114void LLVOVolume::initClass() 127void LLVOVolume::initClass()
@@ -2308,16 +2321,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
2308 2321
2309 LLVOVolume* vobj = drawablep->getVOVolume(); 2322 LLVOVolume* vobj = drawablep->getVOVolume();
2310 2323
2311 if (vobj->mSculptSurfaceArea > sSculptSAThresh) 2324 llassert_always(vobj);
2325
2326 if (vobj->isSculpted() && vobj->mSculptSurfaceArea > LLVOVolume::sSculptSAThresh)
2312 { 2327 {
2313 LLPipeline::sSculptSurfaceAreaFrame += vobj->mSculptSurfaceArea; 2328 LLPipeline::sSculptSurfaceAreaFrame += vobj->mSculptSurfaceArea;
2314 if(LLPipeline::sSculptSurfaceAreaFrame > sSculptSAMax) 2329 if (LLPipeline::sSculptSurfaceAreaFrame > LLVOVolume::sSculptSAMax)
2315 { 2330 {
2316 continue; 2331 LL_DEBUGS("Volume") << "Sculptie ("
2332 << vobj->getID() << ") above RenderSculptSAMax ("
2333 << LLVOVolume::sSculptSAMax
2334 << ")! Turning invisible!"
2335 << LL_ENDL;
2336 continue;
2317 } 2337 }
2318 } 2338 }
2319 2339
2320 llassert_always(vobj);
2321 vobj->updateTextureVirtualSize(); 2340 vobj->updateTextureVirtualSize();
2322 vobj->preRebuild(); 2341 vobj->preRebuild();
2323 2342
diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h
index 2da1d7a..2f53bea 100644
--- a/linden/indra/newview/llvovolume.h
+++ b/linden/indra/newview/llvovolume.h
@@ -91,6 +91,7 @@ public:
91 91
92public: 92public:
93 LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); 93 LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
94 /*virtual*/ void markDead(); // Override (and call through to parent) to clean up sculpt texture references
94 95
95 /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); 96 /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
96 97
@@ -247,6 +248,9 @@ public:
247 static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop 248 static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
248 static F32 sLODFactor; // LOD scale factor 249 static F32 sLODFactor; // LOD scale factor
249 static F32 sDistanceFactor; // LOD distance factor 250 static F32 sDistanceFactor; // LOD distance factor
251 static F32 sSculptSAThresh; // Surface area at which sculpts are considered for not being rendered
252 static F32 sSculptSAMax; // The maximum combined surface area of sculpts(per frame) that are above the
253 // threshold before they stop being rendered
250 254
251protected: 255protected:
252 static S32 sNumLODChanges; 256 static S32 sNumLODChanges;
diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp
index e6288c6..fd20b7e 100644
--- a/linden/indra/newview/primbackup.cpp
+++ b/linden/indra/newview/primbackup.cpp
@@ -484,6 +484,10 @@ void PrimBackup::exportWorker(void *userdata)
484 llwarns << "Incorrect permission to export" << llendl; 484 llwarns << "Incorrect permission to export" << llendl;
485 PrimBackup::getInstance()->mExportState = EXPORT_FAILED; 485 PrimBackup::getInstance()->mExportState = EXPORT_FAILED;
486 LLSelectMgr::getInstance()->getSelection()->unref(); 486 LLSelectMgr::getInstance()->getSelection()->unref();
487 gIdleCallbacks.deleteFunction(exportWorker);
488 LLNotifications::instance().add("ExportFailed");
489 PrimBackup::getInstance()->close();
490 return;
487 } 491 }
488 } 492 }
489 break; 493 break;
@@ -590,10 +594,7 @@ void PrimBackup::exportWorker(void *userdata)
590 break; 594 break;
591 595
592 case EXPORT_FAILED: 596 case EXPORT_FAILED:
593 gIdleCallbacks.deleteFunction(exportWorker);
594 llwarns << "Export process aborted." << llendl; 597 llwarns << "Export process aborted." << llendl;
595 LLNotifications::instance().add("ExportFailed");
596 PrimBackup::getInstance()->close();
597 break; 598 break;
598 } 599 }
599} 600}
@@ -691,6 +692,10 @@ LLSD PrimBackup::primsToLLSD(LLViewerObject::child_list_t child_list, bool is_at
691 { 692 {
692 llwarns << "Incorrect permission to export a sculpt texture." << llendl; 693 llwarns << "Incorrect permission to export a sculpt texture." << llendl;
693 PrimBackup::getInstance()->mExportState = EXPORT_FAILED; 694 PrimBackup::getInstance()->mExportState = EXPORT_FAILED;
695 gIdleCallbacks.deleteFunction(exportWorker);
696 LLNotifications::instance().add("ExportFailed");
697 PrimBackup::getInstance()->close();
698 return LLSD();
694 } 699 }
695 } 700 }
696 701
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml b/linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml
new file mode 100644
index 0000000..7974d85
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_clear_cache.xml
@@ -0,0 +1,31 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-200" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" follows="left|top" mouse_opaque="true" height="200" width="200"
4 name="Clear Cache" title="Clear Disk Cache">
5 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
6 bottom="-39" drop_shadow_visible="true" follows="left|top" font-style="BOLD|SHADOW"
7 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="20"
8 mouse_opaque="true" name="cache_label" v_pad="0" width="185">
9Cache Will Be Cleared After
10You Restart Imprudence
11 </text>
12 <check_box bottom_delta="-37" follows="left|top" font="SansSerifSmall" height="20"
13 initial_value="false" label="Clear texture cache" left="10"
14 mouse_opaque="true" name="texture_cache" width="185" />
15 <check_box bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20"
16 initial_value="false" label="Clear object cache" left_delta="0"
17 mouse_opaque="true" name="object_cache" width="185" />
18 <check_box bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20"
19 initial_value="false" label="Clear inventory cache" left_delta="0"
20 mouse_opaque="true" name="inv_cache" width="185" />
21 <check_box bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20"
22 initial_value="false" label="Clear sound cache" left_delta="0"
23 mouse_opaque="true" name="sounds_cache" width="185" />
24 <check_box bottom_delta="-22" follows="left|top" font="SansSerifSmall" height="20"
25 initial_value="false" label="Clear avatar name cache" left_delta="0"
26 mouse_opaque="true" name="name_cache" width="185" />
27 <button bottom_delta="-30" follows="right|top" font="SansSerif" halign="center" height="22"
28 label="OK" left="-170" mouse_opaque="true" name="btn_ok" width="80" />
29 <button bottom_delta="0" follows="right|top" font="SansSerif" halign="center" height="22"
30 label="Cancel" left="-85" mouse_opaque="true" name="btn_cancel" width="80" />
31</floater> \ No newline at end of file
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_dice.xml b/linden/indra/newview/skins/default/xui/en-us/floater_dice.xml
new file mode 100644
index 0000000..4a70c1c
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_dice.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-95" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" follows="left|top" mouse_opaque="true" height="95" width="200"
4 name="Roll Dice" title="Roll Dice" rect_control="DiceFloaterRect">
5 <spinner bottom="-37" decimal_digits="0" follows="left|top" height="16"
6 increment="1" initial_val="1" label="Number of dice:" label_width="120" left="10"
7 max_val="512" min_val="1" mouse_opaque="true" name="spin_dice_count"
8 width="170" control_name="DiceLastCount" />
9 <spinner bottom_delta="-25" decimal_digits="0" follows="left|top" height="16"
10 increment="1" initial_val="6" label="Number of sides:" label_width="120" left="10"
11 max_val="512" min_val="4" mouse_opaque="true" name="spin_dice_sides"
12 width="170" control_name="DiceLastSides" />
13 <button bottom_delta="-30" follows="right|top" font="SansSerif" halign="center" height="22"
14 label="Roll" left="-85" mouse_opaque="true" name="btn_roll" width="80" />
15</floater> \ No newline at end of file
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_hardware_settings.xml b/linden/indra/newview/skins/default/xui/en-us/floater_hardware_settings.xml
index 24a895b..3309c11 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_hardware_settings.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_hardware_settings.xml
@@ -40,7 +40,7 @@
40 </combo_item> 40 </combo_item>
41 </combo_box> 41 </combo_box>
42 <spinner bottom_delta="-21" control_name="RenderGamma" decimal_digits="2" enabled="true" 42 <spinner bottom_delta="-21" control_name="RenderGamma" decimal_digits="2" enabled="true"
43 follows="left|top" height="16" increment="0.01" 43 follows="left|top" height="16" increment="0.01" tool_top="Disable basic shaders to set gamma"
44 initial_val="1" label="Gamma:" label_width="138" left="10" max_val="2" 44 initial_val="1" label="Gamma:" label_width="138" left="10" max_val="2"
45 min_val="0.0" mouse_opaque="true" name="gamma" width="202" /> 45 min_val="0.0" mouse_opaque="true" name="gamma" width="202" />
46 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 46 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 03967d9..193592b 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -1609,10 +1609,15 @@
1609 <on_check control="ShowSearchBar" /> 1609 <on_check control="ShowSearchBar" />
1610 </menu_item_check> 1610 </menu_item_check>
1611 1611
1612 <menu_item_call name="Reload Balance" label="Reload [CURRENCY] balance" shortcut="control|alt|B"> 1612 <menu_item_call name="Reload Balance" label="Reload [CURRENCY] balance" shortcut="control|alt|B">
1613 <on_click function="Advanced.ReloadBalance" userdata="" /> 1613 <on_click function="Advanced.ReloadBalance" userdata="" />
1614 </menu_item_call> 1614 </menu_item_call>
1615 1615
1616 <menu_item_check name="Roll Dice"
1617 label="Roll Dice">
1618 <on_click function="Advanced.ToggleDice" userdata="" />
1619 <on_check function="Advanced.CheckDice" userdata="" />
1620 </menu_item_check>
1616 1621
1617 <menu_item_separator /> 1622 <menu_item_separator />
1618 1623
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
index ea48462..5f97d74 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -903,13 +903,6 @@ Would you like to disable all popups which can be skipped?
903 903
904<notification 904<notification
905 icon="notify.tga" 905 icon="notify.tga"
906 name="CacheWillClear"
907 type="notify">
908Cache will be cleared after you restart [VIEWER_NAME].
909</notification>
910
911<notification
912 icon="notify.tga"
913 name="CacheWillBeMoved" 906 name="CacheWillBeMoved"
914 type="notify"> 907 type="notify">
915Cache will be moved after you restart [VIEWER_NAME]. 908Cache will be moved after you restart [VIEWER_NAME].
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
index 5713933..9f3c5c4 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml
@@ -25,7 +25,7 @@ USE left="270" FOR TABBING OPTIONS
25 Double-Click Action: 25 Double-Click Action:
26 </text> 26 </text>
27 27
28 <combo_box name="double_click_action" 28 <combo_box name="double_click_action" enabled="true"
29 bottom_delta="-25" left_delta="30" height="18" width="160" 29 bottom_delta="-25" left_delta="30" height="18" width="160"
30 follows="left|top" mouse_opaque="true"> 30 follows="left|top" mouse_opaque="true">
31 <combo_item name="None" value="None"> 31 <combo_item name="None" value="None">
diff --git a/linden/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml b/linden/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
index 27825b7..c3e8d83 100644
--- a/linden/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
+++ b/linden/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes"?> 1<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2<panel label="Graphiques" name="Display panel"> 2<panel label="Graphiques" name="Display panel">
3 <button label="?" name="GraphicsPreferencesHelpButton"/> 3 <button label="?" name="GraphicsPreferencesHelpButton"/>
4 <text_editor bottom="-56" height="40" left="25" name="FullScreenInfo" width="460"> 4 <text_editor name="FullScreenInfo" width="460">
5 Décochez cette option pour passer en mode plein écran. 5 Décochez cette option pour passer en mode plein écran.
6 </text_editor> 6 </text_editor>
7 <text name="WindowSizeLabel"> 7 <text name="WindowSizeLabel">
@@ -63,7 +63,7 @@
63 Options d&apos;affichage : 63 Options d&apos;affichage :
64 </text> 64 </text>
65 <check_box label="Lancer Second Life en mode fenêtré" name="windowed mode"/> 65 <check_box label="Lancer Second Life en mode fenêtré" name="windowed mode"/>
66 <check_box label="Auto-détection du ratio" left="350" name="aspect_auto_detect"/> 66 <check_box label="Auto-détection du ratio" name="aspect_auto_detect"/>
67 <check_box label="Utiliser échelle de résolution indépendante" name="ui_auto_scale"/> 67 <check_box label="Utiliser échelle de résolution indépendante" name="ui_auto_scale"/>
68 <check_box label="Montrer l&apos;avatar en vue subjective" name="avfp"/> 68 <check_box label="Montrer l&apos;avatar en vue subjective" name="avfp"/>
69 <spinner label="Distance d&apos;affichage :" name="draw_distance"/> 69 <spinner label="Distance d&apos;affichage :" name="draw_distance"/>
@@ -73,7 +73,7 @@
73 <text name="QualityText"> 73 <text name="QualityText">
74 Performance : 74 Performance :
75 </text> 75 </text>
76 <text left="105" name="FasterText"> 76 <text name="FasterText">
77 Plus rapide 77 Plus rapide
78 </text> 78 </text>
79 <text name="ShadersPrefText"> 79 <text name="ShadersPrefText">
@@ -88,11 +88,11 @@
88 <text name="ShadersPrefText4"> 88 <text name="ShadersPrefText4">
89 Ultra 89 Ultra
90 </text> 90 </text>
91 <text bottom="-86" left="325" name="HigherText2"> 91 <text name="HigherText2">
92 Plus élevée 92 Plus élevée
93 </text> 93 </text>
94 <text name="QualityText2" visible="false"/> 94 <text name="QualityText2" visible="false"/>
95 <check_box label="Personnaliser" left="395" name="CustomSettings"/> 95 <check_box label="Personnaliser" name="CustomSettings"/>
96 <text name="ShadersText"> 96 <text name="ShadersText">
97 Effets : 97 Effets :
98 </text> 98 </text>
@@ -173,7 +173,7 @@
173 Lumières à proximité 173 Lumières à proximité
174 </radio_item> 174 </radio_item>
175 </radio_group> 175 </radio_group>
176 <text left="380" name="TerrainDetailText"> 176 <text name="TerrainDetailText">
177 Rendu du terrain : 177 Rendu du terrain :
178 </text> 178 </text>
179 <radio_group name="TerrainDetailRadio"> 179 <radio_group name="TerrainDetailRadio">
diff --git a/linden/indra/newview/viewerinfo.cpp b/linden/indra/newview/viewerinfo.cpp
index ebc7436..48e8df3 100644
--- a/linden/indra/newview/viewerinfo.cpp
+++ b/linden/indra/newview/viewerinfo.cpp
@@ -35,8 +35,8 @@ namespace ViewerInfo
35 const S32 MAJOR = 1; 35 const S32 MAJOR = 1;
36 const S32 MINOR = 4; 36 const S32 MINOR = 4;
37 const S32 PATCH = 1; 37 const S32 PATCH = 1;
38 const S32 RLEAS = 2; // increment for each beta/RC/release 38 const S32 RLEAS = 3; // increment for each beta/RC/release
39 const std::string EXTRA = "beta 1"; 39 const std::string EXTRA = "beta 1.5";
40 40
41 // Mac OS X bundle identifier. Should match the one in Info.plist. 41 // Mac OS X bundle identifier. Should match the one in Info.plist.
42 const std::string BUNDLE_ID = "org.imprudenceviewer.viewer"; 42 const std::string BUNDLE_ID = "org.imprudenceviewer.viewer";
diff --git a/linden/install.xml b/linden/install.xml
index d25636d..24c201b 100755
--- a/linden/install.xml
+++ b/linden/install.xml
@@ -1173,9 +1173,9 @@ Copyright (C) 2004-2005 Vladimir Berezniker @ http://public.xdi.org/=vmpn
1173 <key>windows</key> 1173 <key>windows</key>
1174 <map> 1174 <map>
1175 <key>md5sum</key> 1175 <key>md5sum</key>
1176 <string>79bb92dcc79e310ff9aebf7fbe6b10e5</string> 1176 <string>8ded552db94e06574db77a83ff672420</string>
1177 <key>url</key> 1177 <key>url</key>
1178 <uri>http://imprudenceviewer.org/download/libs/openal-soft-1.12.854-windows-20100822.tar.bz2</uri> 1178 <uri>http://download.kokuaviewer.org/files/libs/openal-soft-1.13-windows-20110624.tar.bz2</uri>
1179 </map> 1179 </map>
1180 </map> 1180 </map>
1181 </map> 1181 </map>