From 1ef083244ad8cc603b50c1d737d8efb4ed14bb17 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 25 Apr 2011 22:37:15 -0700 Subject: EXP-664 : Add JPEG2000 compression settings for test, fix one crash on compression, enhanced error handling on image upload --- indra/newview/app_settings/settings.xml | 33 +++++++++++++++++++++++++++++++++ indra/newview/llviewertexturelist.cpp | 31 ++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f2a0e5ac19..24c495a0ef 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4295,6 +4295,39 @@ Value 0.25 + Jpeg2000AdvancedCompression + + Comment + Use advanced Jpeg2000 compression options (precincts, blocks, ordering, markers) + Persist + 1 + Type + Boolean + Value + 0 + + Jpeg2000PrecinctsSize + + Comment + Size of image precincts. Assumed square and same for all levels. Must be power of 2. + Persist + 1 + Type + S32 + Value + 256 + + Jpeg2000BlocksSize + + Comment + Size of encoding blocks. Assumed square and same for all levels. Must be power of 2. Max 64, Min 4. + Persist + 1 + Type + S32 + Value + 64 + KeepAspectForSnapshot Comment diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5afed721ac..182cba0e8c 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -932,16 +932,19 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer image = LLImageFormatted::createFromType(codec); if (image.isNull()) { + image->setLastError("Couldn't open the image to be uploaded."); return FALSE; } if (!image->load(filename)) { + image->setLastError("Couldn't load the image to be uploaded."); return FALSE; } // Decompress or expand it in a raw image structure LLPointer raw_image = new LLImageRaw; if (!image->decode(raw_image, 0.0f)) { + image->setLastError("Couldn't decode the image to be uploaded."); return FALSE; } // Check the image constraints @@ -952,8 +955,15 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, } // Convert to j2c (JPEG2000) and save the file locally LLPointer compressedImage = convertToUploadFile(raw_image); + if (compressedImage.isNull()) + { + image->setLastError("Couldn't convert the image to jpeg2000."); + llinfos << "Couldn't convert to j2c, file : " << filename << llendl; + return FALSE; + } if (!compressedImage->save(out_filename)) { + image->setLastError("Couldn't create the jpeg2000 image for upload."); llinfos << "Couldn't create output file : " << out_filename << llendl; return FALSE; } @@ -961,6 +971,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer integrity_test = new LLImageJ2C; if (!integrity_test->loadAndValidate( out_filename )) { + image->setLastError("The created jpeg2000 image is corrupt."); llinfos << "Image file : " << out_filename << " is corrupt" << llendl; return FALSE; } @@ -978,7 +989,25 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointergetWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)) compressedImage->setReversible(TRUE); - compressedImage->encode(raw_image, 0.0f); + + if (gSavedSettings.getBOOL("Jpeg2000AdvancedCompression")) + { + // This test option will create jpeg2000 images with precincts for each level, RPCL ordering + // and PLT markers. The block size is also optionally modifiable. + // Note: the images hence created are compatible with older versions of the viewer. + // Read the blocks and precincts size settings + S32 block_size = gSavedSettings.getS32("Jpeg2000BlocksSize"); + S32 precinct_size = gSavedSettings.getS32("Jpeg2000PrecinctsSize"); + llinfos << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << llendl; + compressedImage->initEncode(*raw_image, block_size, precinct_size); + } + + if (!compressedImage->encode(raw_image, 0.0f)) + { + llinfos << "convertToUploadFile : encode returns with error!!" << llendl; + // Clear up the pointer so we don't leak that one + compressedImage = NULL; + } return compressedImage; } -- cgit v1.2.3 From c6c1419faa6e4acef19b3ddfc6c89b4a10bca15f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 4 May 2011 22:43:51 -0700 Subject: EXP-664 : Make encoding parameters more resilient to bad entries, add levels as encoding parameters, update test applet to support this --- .../llimage_libtest/llimage_libtest.cpp | 31 ++++++++++++++---- indra/llimage/llimage.h | 13 ++++++++ indra/llimage/llimagej2c.cpp | 4 +-- indra/llimage/llimagej2c.h | 4 +-- indra/llimagej2coj/llimagej2coj.cpp | 2 +- indra/llimagej2coj/llimagej2coj.h | 2 +- indra/llkdu/llimagej2ckdu.cpp | 37 +++++++++++++++++++--- indra/llkdu/llimagej2ckdu.h | 3 +- indra/llkdu/tests/llimagej2ckdu_test.cpp | 1 + 9 files changed, 80 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 60ddf63b21..976aae08bb 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -70,6 +70,10 @@ static const char USAGE[] = "\n" " be used. Blocks must be smaller than precincts. Like precincts, this option adds\n" " PLT, tile markers and uses RPCL.\n" " Only valid for output j2c images. Default is 64.\n" +" -l, --levels \n" +" Number of decomposition levels (aka discard levels) in the output image.\n" +" The maximum number of levels authorized is 32.\n" +" Only valid for output j2c images. Default is 5.\n" " -rev, --reversible\n" " Set the compression to be lossless (reversible in j2c parlance).\n" " Only valid for output j2c images.\n" @@ -147,7 +151,7 @@ LLPointer load_image(const std::string &src_filename, int discard_le } // Save a raw image instance into a file -bool save_image(const std::string &dest_filename, LLPointer raw_image, int blocks_size, int precincts_size, bool reversible, bool output_stats) +bool save_image(const std::string &dest_filename, LLPointer raw_image, int blocks_size, int precincts_size, int levels, bool reversible, bool output_stats) { LLPointer image = create_image(dest_filename); @@ -156,9 +160,9 @@ bool save_image(const std::string &dest_filename, LLPointer raw_imag { // That method doesn't exist (and likely, doesn't make sense) for any other image file format // hence the required cryptic cast. - if ((blocks_size != -1) || (precincts_size != -1)) + if ((blocks_size != -1) || (precincts_size != -1) || (levels != 0)) { - ((LLImageJ2C*)(image.get()))->initEncode(*raw_image, blocks_size, precincts_size); + ((LLImageJ2C*)(image.get()))->initEncode(*raw_image, blocks_size, precincts_size, levels); } ((LLImageJ2C*)(image.get()))->setReversible(reversible); } @@ -306,6 +310,7 @@ int main(int argc, char** argv) int discard_level = -1; int precincts_size = -1; int blocks_size = -1; + int levels = 0; bool reversible = false; // Init whatever is necessary @@ -403,7 +408,6 @@ int main(int argc, char** argv) else { precincts_size = atoi(value_str.c_str()); - // *TODO: make sure precincts_size is a power of 2 } } else if (!strcmp(argv[arg], "--blocks") || !strcmp(argv[arg], "-b")) @@ -420,7 +424,22 @@ int main(int argc, char** argv) else { blocks_size = atoi(value_str.c_str()); - // *TODO: make sure blocks_size is a power of 2 + } + } + else if (!strcmp(argv[arg], "--levels") || !strcmp(argv[arg], "-l")) + { + std::string value_str; + if ((arg + 1) < argc) + { + value_str = argv[arg+1]; + } + if (((arg + 1) >= argc) || (value_str[0] == '-')) + { + std::cout << "No valid --levels argument given, default (5) will be used" << std::endl; + } + else + { + levels = atoi(value_str.c_str()); } } else if (!strcmp(argv[arg], "--reversible") || !strcmp(argv[arg], "-rev")) @@ -499,7 +518,7 @@ int main(int argc, char** argv) // Save file if (out_file != out_end) { - if (!save_image(*out_file, raw_image, blocks_size, precincts_size, reversible, image_stats)) + if (!save_image(*out_file, raw_image, blocks_size, precincts_size, levels, reversible, image_stats)) { std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl; } diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 18444f3934..c464c3b2b6 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -35,8 +35,21 @@ const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MAX_IMAGE_MIP = 11; // 2048x2048 + +// *TODO : Use MAX_IMAGE_MIP as max discard level and modify j2c management so that the number +// of levels is read from the header's file, not inferred from its size. const S32 MAX_DISCARD_LEVEL = 5; +// JPEG2000 size constraints +// Those are declared here as they are germane to other image constraints used in the viewer +// and declared right here. Some come from the JPEG2000 spec, some conventions specific to SL. +const S32 MAX_DECOMPOSITION_LEVELS = 32; // Number of decomposition levels cannot exceed 32 according to jpeg2000 spec +const S32 MIN_DECOMPOSITION_LEVELS = 5; // the SL viewer will *crash* trying to decode images with fewer than 5 decomposition levels (unless image is small that is) +const S32 MAX_PRECINCT_SIZE = 2048; // No reason to be bigger than MAX_IMAGE_SIZE +const S32 MIN_PRECINCT_SIZE = 4; // Can't be smaller than MIN_BLOCK_SIZE +const S32 MAX_BLOCK_SIZE = 64; // Max total block size is 4096, hence 64x64 when using square blocks +const S32 MIN_BLOCK_SIZE = 4; // Min block dim is 4 according to jpeg2000 spec + const S32 MIN_IMAGE_SIZE = (1<initDecode(*this,raw_image,discard_level,region); } -BOOL LLImageJ2C::initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size) +BOOL LLImageJ2C::initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) { - return mImpl->initEncode(*this,raw_image,blocks_size,precincts_size); + return mImpl->initEncode(*this,raw_image,blocks_size,precincts_size,levels); } BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time) diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index 6bba81aab5..914174fc57 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -57,7 +57,7 @@ public: /*virtual*/ void setLastError(const std::string& message, const std::string& filename = std::string()); BOOL initDecode(LLImageRaw &raw_image, int discard_level, int* region); - BOOL initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size); + BOOL initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels); // Encode with comment text BOOL encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time=0.0); @@ -120,7 +120,7 @@ protected: virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, BOOL reversible=FALSE) = 0; virtual BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL) = 0; - virtual BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1) = 0; + virtual BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1, int levels = 0) = 0; friend class LLImageJ2C; }; diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index 8288fa1f5c..d15824ce5a 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -113,7 +113,7 @@ BOOL LLImageJ2COJ::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int disca return FALSE; } -BOOL LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size) +BOOL LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) { // No specific implementation for this method in the OpenJpeg case return FALSE; diff --git a/indra/llimagej2coj/llimagej2coj.h b/indra/llimagej2coj/llimagej2coj.h index 9c7cc09fcb..40ad4edb00 100644 --- a/indra/llimagej2coj/llimagej2coj.h +++ b/indra/llimagej2coj/llimagej2coj.h @@ -40,7 +40,7 @@ protected: /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, BOOL reversible = FALSE); /*virtual*/ BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL); - /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1); + /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1, int levels = 0); }; #endif diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index ae456a48be..f83accf356 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -29,6 +29,7 @@ #include "lltimer.h" #include "llpointer.h" +#include "llmath.h" #include "llkdumem.h" @@ -192,7 +193,8 @@ mTileIndicesp(NULL), mRawImagep(NULL), mDecodeState(NULL), mBlocksSize(-1), -mPrecinctsSize(-1) +mPrecinctsSize(-1), +mLevels(0) { } @@ -328,10 +330,30 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int disc return initDecode(base,raw_image,0.0f,MODE_FAST,0,4,discard_level,region); } -BOOL LLImageJ2CKDU::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size) +BOOL LLImageJ2CKDU::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) { - mBlocksSize = blocks_size; mPrecinctsSize = precincts_size; + if (mPrecinctsSize != -1) + { + mPrecinctsSize = get_lower_power_two(mPrecinctsSize,MAX_PRECINCT_SIZE); + mPrecinctsSize = llmax(mPrecinctsSize,MIN_PRECINCT_SIZE); + } + mBlocksSize = blocks_size; + if (mBlocksSize != -1) + { + mBlocksSize = get_lower_power_two(mBlocksSize,MAX_BLOCK_SIZE); + mBlocksSize = llmax(mBlocksSize,MIN_BLOCK_SIZE); + if (mPrecinctsSize != -1) + { + mBlocksSize = llmin(mBlocksSize,mPrecinctsSize); // blocks *must* be smaller than precincts + } + } + mLevels = levels; + if (mLevels != 0) + { + mLevels = llmin(mLevels,MAX_DECOMPOSITION_LEVELS); + mLevels = llmax(MIN_DECOMPOSITION_LEVELS,mLevels); + } return TRUE; } @@ -373,10 +395,12 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco // Resize raw_image according to the image to be decoded kdu_dims dims; mCodeStreamp->get_dims(0,dims); + // *TODO: Use the real number of levels read from the file throughout the code instead of relying on an infered value from dimensions + //S32 levels = mCodeStreamp->get_min_dwt_levels(); S32 channels = base.getComponents() - first_channel; channels = llmin(channels,max_channel_count); raw_image.resize(dims.size.x, dims.size.y, channels); - // llinfos << "Resizing raw_image to " << dims.size.x << ":" << dims.size.y << llendl; + //llinfos << "j2c image dimension: width = " << dims.size.x << ", height = " << dims.size.y << ", channels = " << channels << ", levels = " << levels << llendl; if (!mTileIndicesp) { @@ -653,6 +677,11 @@ BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, co std::string Parts_string = llformat("ORGtparts=R"); codestream.access_siz()->parse_string(Parts_string.c_str()); } + if (mLevels != 0) + { + std::string levels_string = llformat("Clevels=%d",mLevels); + codestream.access_siz()->parse_string(levels_string.c_str()); + } codestream.access_siz()->finalize_all(); codestream.change_appearance(transpose,vflip,hflip); diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h index 9fce58b762..1489dbf704 100644 --- a/indra/llkdu/llimagej2ckdu.h +++ b/indra/llkdu/llimagej2ckdu.h @@ -59,7 +59,7 @@ protected: /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, BOOL reversible=FALSE); /*virtual*/ BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL); - /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1); + /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1, int levels = 0); private: BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count, int discard_level = -1, int* region = NULL); @@ -73,6 +73,7 @@ private: kdu_dims *mTileIndicesp; int mBlocksSize; int mPrecinctsSize; + int mLevels; // Temporary variables for in-progress decodes... LLImageRaw *mRawImagep; diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp index 7ac24a969a..ab60ab6d50 100644 --- a/indra/llkdu/tests/llimagej2ckdu_test.cpp +++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp @@ -134,6 +134,7 @@ kdu_params* kdu_params::access_cluster(const char*) { return NULL; } void kdu_codestream::set_fast() { } void kdu_codestream::set_fussy() { } void kdu_codestream::get_dims(int, kdu_dims&, bool ) { } +int kdu_codestream::get_min_dwt_levels() { return 5; } void kdu_codestream::change_appearance(bool, bool, bool) { } void kdu_codestream::get_tile_dims(kdu_coords, int, kdu_dims&, bool ) { } void kdu_codestream::destroy() { } -- cgit v1.2.3 From c03eb76bcf66665ee8a7618dbec0d13e3fc66c32 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 4 May 2011 23:20:15 -0700 Subject: EXP-664 : Fix call to initialization encoding --- indra/newview/llviewertexturelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 182cba0e8c..8cf9b98d5d 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -999,7 +999,7 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointer Date: Sat, 7 May 2011 11:09:34 -0700 Subject: EXP-664 : following richard codereview: use llclamp where appropriate --- indra/llkdu/llimagej2ckdu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index f83accf356..39ae09650e 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -351,8 +351,7 @@ BOOL LLImageJ2CKDU::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int bloc mLevels = levels; if (mLevels != 0) { - mLevels = llmin(mLevels,MAX_DECOMPOSITION_LEVELS); - mLevels = llmax(MIN_DECOMPOSITION_LEVELS,mLevels); + mLevels = llclamp(mLevels,MIN_DECOMPOSITION_LEVELS,MIN_DECOMPOSITION_LEVELS); } return TRUE; } -- cgit v1.2.3 From 3039663148b0adc64220964b10cad595e5137cc0 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 9 May 2011 15:10:56 -0700 Subject: EXP-802 Add a check box to enable/disable voice chat. --- indra/newview/llbottomtray.cpp | 11 ++++++++--- indra/newview/llfloatersounddevices.cpp | 2 +- .../skins/default/xui/en/floater_sound_devices.xml | 21 ++++++++++++++++++++- .../skins/minimal/xui/en/panel_bottomtray.xml | 2 +- 4 files changed, 30 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index c72cdfd1dc..f51552aae5 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -559,7 +559,7 @@ BOOL LLBottomTray::postBuild() else { LLTransientFloaterMgr::getInstance()->addControlView(getChild("speak_btn")); - LLTransientFloaterMgr::getInstance()->addControlView(getChild("speak_flyout_btn")); + LLTransientFloaterMgr::getInstance()->addControlView(getChild("flyout_btn")); } @@ -1591,7 +1591,7 @@ void LLBottomTray::initResizeStateContainers() // because it resets chatbar's width according to resize logic. void LLBottomTray::initButtonsVisibility() { - setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat")); + setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat") || !mSpeakBtn ); setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton")); setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton")); setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton")); @@ -1605,7 +1605,12 @@ void LLBottomTray::initButtonsVisibility() void LLBottomTray::setButtonsControlsAndListeners() { - gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); + // always show the speak panel if using the basic skin + if (mSpeakBtn) + { + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); + } + gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp index 3903b9b015..9fe7c7f9dd 100644 --- a/indra/newview/llfloatersounddevices.cpp +++ b/indra/newview/llfloatersounddevices.cpp @@ -56,7 +56,7 @@ BOOL LLFloaterSoundDevices::postBuild() { LLTransientDockableFloater::postBuild(); - LLView *anchor_panel = LLBottomTray::getInstance()->getChild("speak_flyout_btn"); + LLView *anchor_panel = LLBottomTray::getInstance()->getChild("flyout_btn"); setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP)); setIsChrome(TRUE); diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml index c7c7a05af2..304987c3d5 100644 --- a/indra/newview/skins/default/xui/en/floater_sound_devices.xml +++ b/indra/newview/skins/default/xui/en/floater_sound_devices.xml @@ -11,7 +11,7 @@ save_rect="true" single_instance="true" bevel_style="in" - height="140" + height="164" layout="topleft" name="floater_sound_devices" title="Sound Devices" @@ -25,4 +25,23 @@ left="2" top="26" class="panel_voice_device_settings"/> + Voice Chat + diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index 237af61717..d722c54081 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -115,7 +115,7 @@ top="5" left="0" height="23" - name="speak_flyout_btn" + name="flyout_btn" label="" tab_stop="false" tool_tip="Change your sound preferences" -- cgit v1.2.3 From 8e8eb76eb9d0efabc82fec194f6edb4838c49955 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 10 May 2011 08:21:21 -0400 Subject: CHOP-661: add and use code to listen on next available server port. In indra/llmessage/tests/testrunner.py, introduce new freeport() function to try a caller-specified expression (such as instantiating an object that will listen on a server port) with a range of candidate port numbers until the expression produces a value instead of EADDRINUSE exception. Change test_llsdmessage_peer.py and test_llxmlrpc_peer.py to use freeport() to construct their server class inline BEFORE launching the thread that will run it, then pass that server's serve_forever method to daemon thread. Also set os.environ["PORT"] to selected environment variable before running subject test program. In indra/llmessage/tests/commtest.h, introduce commtest_data::getport() to read port number from specified environment variable, throwing exception if variable not set or non-numeric. Construct default LLHost from getport("PORT") instead of hardcoded constant. Change indra/newview/tests/llxmlrpclistener_test.cpp to use commtest_data:: getport("PORT") instead of hardcoded constant. Also use LLSD::with() rather than older LLSD::insert() syntax. HOWEVER -- I am irritated to discover that llxmlrpclistener_test IS NOT RUN or even built by newview/CMakeLists.txt! It's not even commented out -- it's entirely deleted! I am determined to restore this test. However, as it will take some fiddling with new link-time dependencies, that will be a separate commit. --- indra/llmessage/tests/commtest.h | 20 ++++++- indra/llmessage/tests/test_llsdmessage_peer.py | 26 ++++++--- indra/llmessage/tests/testrunner.py | 81 ++++++++++++++++++++++++++ indra/newview/tests/llxmlrpclistener_test.cpp | 11 ++-- indra/newview/tests/test_llxmlrpc_peer.py | 21 ++++--- 5 files changed, 138 insertions(+), 21 deletions(-) (limited to 'indra') diff --git a/indra/llmessage/tests/commtest.h b/indra/llmessage/tests/commtest.h index 32035783e2..0fef596df2 100644 --- a/indra/llmessage/tests/commtest.h +++ b/indra/llmessage/tests/commtest.h @@ -35,6 +35,13 @@ #include "llhost.h" #include "stringize.h" #include +#include +#include + +struct CommtestError: public std::runtime_error +{ + CommtestError(const std::string& what): std::runtime_error(what) {} +}; /** * This struct is shared by a couple of standalone comm tests (ADD_COMM_BUILD_TEST). @@ -55,13 +62,24 @@ struct commtest_data replyPump("reply"), errorPump("error"), success(false), - host("127.0.0.1", 8000), + host("127.0.0.1", getport("PORT")), server(STRINGIZE("http://" << host.getString() << "/")) { replyPump.listen("self", boost::bind(&commtest_data::outcome, this, _1, true)); errorPump.listen("self", boost::bind(&commtest_data::outcome, this, _1, false)); } + static int getport(const std::string& var) + { + const char* port = getenv(var.c_str()); + if (! port) + { + throw CommtestError("missing $PORT environment variable"); + } + // This will throw, too, if the value of PORT isn't numeric. + return boost::lexical_cast(port); + } + bool outcome(const LLSD& _result, bool _success) { // std::cout << "commtest_data::outcome(" << _result << ", " << _success << ")\n"; diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index 580ee7f8b4..cea5032111 100644 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -38,7 +38,7 @@ mydir = os.path.dirname(__file__) # expected to be .../indra/llmessage/tes sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python")) from indra.util.fastest_elementtree import parse as xml_parse from indra.base import llsd -from testrunner import run, debug +from testrunner import freeport, run, debug class TestHTTPRequestHandler(BaseHTTPRequestHandler): """This subclass of BaseHTTPRequestHandler is to receive and echo @@ -97,6 +97,10 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): self.wfile.write(response) else: # fail requested status = data.get("status", 500) + # self.responses maps an int status to a (short, long) pair of + # strings. We want the longer string. That's why we pass a string + # pair to get(): the [1] will select the second string, whether it + # came from self.responses or from our default pair. reason = data.get("reason", self.responses.get(status, ("fail requested", @@ -113,11 +117,17 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): # Suppress error output as well pass -class TestHTTPServer(Thread): - def run(self): - httpd = HTTPServer(('127.0.0.1', 8000), TestHTTPRequestHandler) - debug("Starting HTTP server...\n") - httpd.serve_forever() - if __name__ == "__main__": - sys.exit(run(server=TestHTTPServer(name="httpd"), *sys.argv[1:])) + # Instantiate an HTTPServer(TestHTTPRequestHandler) on the first free port + # in the specified port range. Doing this inline is better than in a + # daemon thread: if it blows up here, we'll get a traceback. If it blew up + # in some other thread, the traceback would get eaten and we'd run the + # subject test program anyway. + httpd, port = freeport(xrange(8000, 8020), + lambda port: HTTPServer(('127.0.0.1', port), TestHTTPRequestHandler)) + # Pass the selected port number to the subject test program via the + # environment. We don't want to impose requirements on the test program's + # command-line parsing -- and anyway, for C++ integration tests, that's + # performed in TUT code rather than our own. + os.environ["PORT"] = str(port) + sys.exit(run(server=Thread(name="httpd", target=httpd.serve_forever), *sys.argv[1:])) diff --git a/indra/llmessage/tests/testrunner.py b/indra/llmessage/tests/testrunner.py index b70ce91ee7..8ff13e0426 100644 --- a/indra/llmessage/tests/testrunner.py +++ b/indra/llmessage/tests/testrunner.py @@ -29,6 +29,8 @@ $/LicenseInfo$ import os import sys +import errno +import socket def debug(*args): sys.stdout.writelines(args) @@ -36,6 +38,85 @@ def debug(*args): # comment out the line below to enable debug output debug = lambda *args: None +def freeport(portlist, expr): + """ + Find a free server port to use. Specifically, evaluate 'expr' (a + callable(port)) until it stops raising EADDRINUSE exception. + + Pass: + + portlist: an iterable (e.g. xrange()) of ports to try. If you exhaust the + range, freeport() lets the socket.error exception propagate. If you want + unbounded, you could pass itertools.count(baseport), though of course in + practice the ceiling is 2^16-1 anyway. But it seems prudent to constrain + the range much more sharply: if we're iterating an absurd number of times, + probably something else is wrong. + + expr: a callable accepting a port number, specifically one of the items + from portlist. If calling that callable raises socket.error with + EADDRINUSE, freeport() retrieves the next item from portlist and retries. + + Returns: (expr(port), port) + + port: the value from portlist for which expr(port) succeeded + + Raises: + + Any exception raised by expr(port) other than EADDRINUSE. + + socket.error if, for every item from portlist, expr(port) raises + socket.error. The exception you see is the one from the last item in + portlist. + + StopIteration if portlist is completely empty. + + Example: + + server, port = freeport(xrange(8000, 8010), + lambda port: HTTPServer(("localhost", port), + MyRequestHandler)) + # pass 'port' to client code + # call server.serve_forever() + """ + # If portlist is completely empty, let StopIteration propagate: that's an + # error because we can't return meaningful values. We have no 'port', + # therefore no 'expr(port)'. + portiter = iter(portlist) + port = portiter.next() + + while True: + try: + # If this value of port works, return as promised. + return expr(port), port + + except socket.error, err: + # Anything other than 'Address already in use', propagate + if err.args[0] != errno.EADDRINUSE: + raise + + # Here we want the next port from portiter. But on StopIteration, + # we want to raise the original exception rather than + # StopIteration. So save the original exc_info(). + type, value, tb = sys.exc_info() + try: + try: + port = portiter.next() + except StopIteration: + raise type, value, tb + finally: + # Clean up local traceback, see docs for sys.exc_info() + del tb + + # Recap of the control flow above: + # If expr(port) doesn't raise, return as promised. + # If expr(port) raises anything but EADDRINUSE, propagate that + # exception. + # If portiter.next() raises StopIteration -- that is, if the port + # value we just passed to expr(port) was the last available -- reraise + # the EADDRINUSE exception. + # If we've actually arrived at this point, portiter.next() delivered a + # new port value. Loop back to pass that to expr(port). + def run(*args, **kwds): """All positional arguments collectively form a command line, executed as a synchronous child process. diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp index 4d5df1043e..711c2a3d51 100644 --- a/indra/newview/tests/llxmlrpclistener_test.cpp +++ b/indra/newview/tests/llxmlrpclistener_test.cpp @@ -40,8 +40,10 @@ #include "llevents.h" #include "lleventfilter.h" #include "llsd.h" +#include "llhost.h" #include "llcontrol.h" #include "tests/wrapllerrs.h" +#include "tests/commtest.h" LLControlGroup gSavedSettings("Global"); @@ -54,7 +56,8 @@ namespace tut { data(): pumps(LLEventPumps::instance()), - uri("http://127.0.0.1:8000") + uri(std::string("http://") + + LLHost("127.0.0.1", commtest_data::getport("PORT")).getString()) { // These variables are required by machinery used by // LLXMLRPCTransaction. The values reflect reality for this test @@ -145,7 +148,7 @@ namespace tut pumps.obtain("LLXMLRPCTransaction").post(request); // Set the timer F32 timeout(10); - watchdog.eventAfter(timeout, LLSD().insert("timeout", 0)); + watchdog.eventAfter(timeout, LLSD().with("timeout", 0)); // and pump "mainloop" until we get something, whether from // LLXMLRPCListener or from the watchdog filter. LLTimer timer; @@ -182,7 +185,7 @@ namespace tut pumps.obtain("LLXMLRPCTransaction").post(request); // Set the timer F32 timeout(10); - watchdog.eventAfter(timeout, LLSD().insert("timeout", 0)); + watchdog.eventAfter(timeout, LLSD().with("timeout", 0)); // and pump "mainloop" until we get something, whether from // LLXMLRPCListener or from the watchdog filter. LLTimer timer; @@ -218,7 +221,7 @@ namespace tut pumps.obtain("LLXMLRPCTransaction").post(request); // Set the timer F32 timeout(10); - watchdog.eventAfter(timeout, LLSD().insert("timeout", 0)); + watchdog.eventAfter(timeout, LLSD().with("timeout", 0)); // and pump "mainloop" until we get something, whether from // LLXMLRPCListener or from the watchdog filter. LLTimer timer; diff --git a/indra/newview/tests/test_llxmlrpc_peer.py b/indra/newview/tests/test_llxmlrpc_peer.py index 1c7204a6b6..281b72a058 100644 --- a/indra/newview/tests/test_llxmlrpc_peer.py +++ b/indra/newview/tests/test_llxmlrpc_peer.py @@ -37,7 +37,7 @@ from SimpleXMLRPCServer import SimpleXMLRPCServer mydir = os.path.dirname(__file__) # expected to be .../indra/newview/tests/ sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python")) sys.path.insert(1, os.path.join(mydir, os.pardir, os.pardir, "llmessage", "tests")) -from testrunner import run, debug +from testrunner import freeport, run, debug class TestServer(SimpleXMLRPCServer): def _dispatch(self, method, params): @@ -66,11 +66,16 @@ class TestServer(SimpleXMLRPCServer): # Suppress error output as well pass -class ServerRunner(Thread): - def run(self): - server = TestServer(('127.0.0.1', 8000)) - debug("Starting XMLRPC server...\n") - server.serve_forever() - if __name__ == "__main__": - sys.exit(run(server=ServerRunner(name="xmlrpc"), *sys.argv[1:])) + # Instantiate a TestServer on the first free port in the specified port + # range. Doing this inline is better than in a daemon thread: if it blows + # up here, we'll get a traceback. If it blew up in some other thread, the + # traceback would get eaten and we'd run the subject test program anyway. + xmlrpcd, port = freeport(xrange(8000, 8020), + lambda port: TestServer(('127.0.0.1', port))) + # Pass the selected port number to the subject test program via the + # environment. We don't want to impose requirements on the test program's + # command-line parsing -- and anyway, for C++ integration tests, that's + # performed in TUT code rather than our own. + os.environ["PORT"] = str(port) + sys.exit(run(server=Thread(name="xmlrpc", target=xmlrpcd.serve_forever), *sys.argv[1:])) -- cgit v1.2.3 From f1c4c9d237eacfa68dbd3edf3f43d68941b55ce5 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 10 May 2011 17:11:05 -0700 Subject: EXP-806 FIX Server-side messages without a corresponding notification should show original, untranslated content --- indra/newview/llviewermessage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ef5968a5e2..fc11cbc28a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5366,6 +5366,12 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) { // notification was specified using the new mechanism, so we can just handle it here std::string notificationID; + msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID); + if (!LLNotifications::getInstance()->templateExists(notificationID)) + { + return false; + } + std::string llsdRaw; LLSD llsdBlock; msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID); -- cgit v1.2.3 From 9dbc3301f677316be3266caa792517f235438e81 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 11 May 2011 13:14:48 -0700 Subject: EXP-809 FIX Make Script Warning/Error window scrolling behavior match that of Chat history --- indra/newview/skins/default/xui/en/floater_script_debug_panel.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml index d1db5c17ba..ce96ea232e 100644 --- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml +++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml @@ -20,5 +20,6 @@ parse_highlights="true" read_only="true" width="420" + track_bottom="true" word_wrap="true" /> -- cgit v1.2.3 From a0267151c3f4bfcf04dd02b81eb8450fc86c7791 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 11 May 2011 16:43:42 -0700 Subject: EXP-813 FIX Login screen reloads when clicking on location slapp --- indra/newview/llpanellogin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 4ac3a248d3..27f341b4f6 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -769,7 +769,10 @@ void LLPanelLogin::loadLoginPage() gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); LLMediaCtrl* web_browser = sInstance->getChild("login_html"); - web_browser->navigateTo( oStr.str(), "text/html" ); + if (web_browser->getCurrentNavUrl() != oStr.str()) + { + web_browser->navigateTo( oStr.str(), "text/html" ); + } } void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) -- cgit v1.2.3 From c83eff097e673e8a640fbc0a32cd6f0b34b4a8cf Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 11 May 2011 17:46:51 -0700 Subject: EXP-760 Selecting No Device for output and input in Sound Devices in Basic mode still results in voice having input and output - also 2 default options --- indra/newview/llpanelvoicedevicesettings.cpp | 36 ++-------------------- .../skins/default/xui/en/panel_sound_devices.xml | 8 ----- 2 files changed, 2 insertions(+), 42 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 71bb4a5584..dc87bd0077 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -221,23 +221,7 @@ void LLPanelVoiceDeviceSettings::refresh() iter != LLVoiceClient::getInstance()->getCaptureDevices().end(); iter++) { - // Lets try to localize some system device names. EXT-8375 - std::string device_name = *iter; - LLStringUtil::toLower(device_name); //compare in low case - if ("default system device" == device_name) - { - device_name = getString(device_name); - } - else if ("no device" == device_name) - { - device_name = getString(device_name); - } - else - { - // restore original value - device_name = *iter; - } - mCtrlInputDevices->add(device_name, ADD_BOTTOM ); + mCtrlInputDevices->add( *iter, ADD_BOTTOM ); } if(!mCtrlInputDevices->setSimple(mInputDevice)) @@ -254,23 +238,7 @@ void LLPanelVoiceDeviceSettings::refresh() for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin(); iter != LLVoiceClient::getInstance()->getRenderDevices().end(); iter++) { - // Lets try to localize some system device names. EXT-8375 - std::string device_name = *iter; - LLStringUtil::toLower(device_name); //compare in low case - if ("default system device" == device_name) - { - device_name = getString(device_name); - } - else if ("no device" == device_name) - { - device_name = getString(device_name); - } - else - { - // restore original value - device_name = *iter; - } - mCtrlOutputDevices->add(device_name, ADD_BOTTOM ); + mCtrlOutputDevices->add( *iter, ADD_BOTTOM ); } if(!mCtrlOutputDevices->setSimple(mOutputDevice)) diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml index 9812281323..ccae7c5350 100644 --- a/indra/newview/skins/default/xui/en/panel_sound_devices.xml +++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml @@ -11,14 +11,6 @@ name="default_text"> Default - - Default system device - - - No device - Date: Wed, 11 May 2011 17:52:05 -0700 Subject: EXP-783 User can accept a call and see end call option in IM window but they are in nearby voice --- indra/newview/llvoicechannel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index a71539266d..b921b7a481 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -412,6 +412,7 @@ void LLVoiceChannel::doSetState(const EState& new_state) { EState old_state = mState; mState = new_state; + if (!mStateChangedCallback.empty()) mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent); } @@ -846,8 +847,11 @@ void LLVoiceChannelP2P::activate() // otherwise answering the call else { - LLVoiceClient::getInstance()->answerInvite(mSessionHandle); - + if (!LLVoiceClient::getInstance()->answerInvite(mSessionHandle)) + { + handleError(ERROR_UNKNOWN); + return; + } // using the session handle invalidates it. Clear it out here so we can't reuse it by accident. mSessionHandle.clear(); } -- cgit v1.2.3 From 506646b4d0619ed66cf0df481112300bc47c0ab8 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 12 May 2011 11:45:09 -0700 Subject: EXP-802 fixing voice chat enabled persistence --- indra/newview/app_settings/settings_minimal.xml | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index d3f0ec5dad..70a75cb4ca 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -45,15 +45,6 @@ Value 0 - EnableVoiceChat - - Comment - Enable talking to other residents with a microphone - Type - Boolean - Value - 1 - HelpURLFormat Comment -- cgit v1.2.3 From 166e4df2780ca004535d6f915417b36613de5b77 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 12 May 2011 18:42:44 -0700 Subject: EXP-818 FIX Use different settings to control search url for beta channel viewers --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llfloatersearch.cpp | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 33c5e533be..e6c2dc4413 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3910,6 +3910,17 @@ Value http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] + SearchURLBeta + + Comment + URL for Search website, displayed in the Find floater + Persist + 0 + Type + String + Value + http://beta.search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] + WebProfileURL Comment diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index d5806e375c..c8fe380710 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -38,6 +38,7 @@ #include "llui.h" #include "llviewercontrol.h" #include "llweb.h" +#include "llversioninfo.h" // support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps class LLSearchHandler : public LLCommandHandler @@ -203,7 +204,15 @@ void LLFloaterSearch::search(const LLSD &key) // get the search URL and expand all of the substitutions // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) - std::string url = gSavedSettings.getString("SearchURL"); + std::string url; + if (LLVersionInfo::getChannel().find("Beta") != std::string::npos) + { + url = gSavedSettings.getString("SearchURLBeta"); + } + else + { + url = gSavedSettings.getString("SearchURL"); + } url = LLWeb::expandURLSubstitutions(url, subs); // and load the URL in the web view -- cgit v1.2.3 From 039b6baf065a87d747647fb0477c799a9949ebf2 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 13 May 2011 11:01:36 -0700 Subject: EXP-783 User can accept a call and see end call option in IM window but they are in nearby voice --- indra/newview/llvoicechannel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b921b7a481..bd12328a6b 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -849,6 +849,8 @@ void LLVoiceChannelP2P::activate() { if (!LLVoiceClient::getInstance()->answerInvite(mSessionHandle)) { + mCallEndedByAgent = false; + mSessionHandle.clear(); handleError(ERROR_UNKNOWN); return; } -- cgit v1.2.3 From 92426cce0c412e2f7d6dbf8caca5647524968b3a Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 16 May 2011 14:57:15 -0400 Subject: remove new search in favor of moving to a project viewer --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llfloatersearch.cpp | 11 +---------- 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e6c2dc4413..33c5e533be 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3910,17 +3910,6 @@ Value http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] - SearchURLBeta - - Comment - URL for Search website, displayed in the Find floater - Persist - 0 - Type - String - Value - http://beta.search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD] - WebProfileURL Comment diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index c8fe380710..d5806e375c 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -38,7 +38,6 @@ #include "llui.h" #include "llviewercontrol.h" #include "llweb.h" -#include "llversioninfo.h" // support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps class LLSearchHandler : public LLCommandHandler @@ -204,15 +203,7 @@ void LLFloaterSearch::search(const LLSD &key) // get the search URL and expand all of the substitutions // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) - std::string url; - if (LLVersionInfo::getChannel().find("Beta") != std::string::npos) - { - url = gSavedSettings.getString("SearchURLBeta"); - } - else - { - url = gSavedSettings.getString("SearchURL"); - } + std::string url = gSavedSettings.getString("SearchURL"); url = LLWeb::expandURLSubstitutions(url, subs); // and load the URL in the web view -- cgit v1.2.3