diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/Variables.cmake | 2 | ||||
-rw-r--r-- | indra/integration_tests/llimage_libtest/llimage_libtest.cpp | 23 | ||||
-rw-r--r-- | indra/llkdu/llimagej2ckdu.cpp | 23 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 33 | ||||
-rw-r--r-- | indra/newview/app_settings/settings_minimal.xml | 33 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfloatersearch.cpp | 7 | ||||
-rw-r--r-- | indra/newview/lllogininstance.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 99 | ||||
-rw-r--r-- | indra/newview/llsidetray.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 44 |
12 files changed, 231 insertions, 59 deletions
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 77dd34d122..b6710300bb 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -102,7 +102,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.2") - set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "DWARF with dSYM File") + set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) # NOTE: To attempt an i386/PPC Universal build, add this on the configure line: # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc' diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 0151016862..60ddf63b21 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -70,6 +70,9 @@ 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" +" -rev, --reversible\n" +" Set the compression to be lossless (reversible in j2c parlance).\n" +" Only valid for output j2c images.\n" " -log, --logmetrics <metric>\n" " Log performance data for <metric>. Results in <metric>.slp\n" " Note: so far, only ImageCompressionTester has been tested.\n" @@ -144,16 +147,20 @@ LLPointer<LLImageRaw> 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<LLImageRaw> raw_image, int blocks_size, int precincts_size, bool output_stats) +bool save_image(const std::string &dest_filename, LLPointer<LLImageRaw> raw_image, int blocks_size, int precincts_size, bool reversible, bool output_stats) { LLPointer<LLImageFormatted> image = create_image(dest_filename); // Set the image codestream parameters on output in the case of a j2c image - if ((image->getCodec() == IMG_CODEC_J2C) && ((blocks_size != -1) || (precincts_size != -1))) + if (image->getCodec() == IMG_CODEC_J2C) { // That method doesn't exist (and likely, doesn't make sense) for any other image file format // hence the required cryptic cast. - ((LLImageJ2C*)(image.get()))->initEncode(*raw_image, blocks_size, precincts_size); + if ((blocks_size != -1) || (precincts_size != -1)) + { + ((LLImageJ2C*)(image.get()))->initEncode(*raw_image, blocks_size, precincts_size); + } + ((LLImageJ2C*)(image.get()))->setReversible(reversible); } if (!image->encode(raw_image, 0.0f)) @@ -299,6 +306,7 @@ int main(int argc, char** argv) int discard_level = -1; int precincts_size = -1; int blocks_size = -1; + bool reversible = false; // Init whatever is necessary ll_init_apr(); @@ -415,6 +423,10 @@ int main(int argc, char** argv) // *TODO: make sure blocks_size is a power of 2 } } + else if (!strcmp(argv[arg], "--reversible") || !strcmp(argv[arg], "-rev")) + { + reversible = true; + } else if (!strcmp(argv[arg], "--logmetrics") || !strcmp(argv[arg], "-log")) { // '--logmetrics' needs to be specified with a named test metric argument @@ -474,7 +486,7 @@ int main(int argc, char** argv) std::list<std::string>::iterator out_file = output_filenames.begin(); std::list<std::string>::iterator in_end = input_filenames.end(); std::list<std::string>::iterator out_end = output_filenames.end(); - for (; in_file != in_end; ++in_file) + for (; in_file != in_end; ++in_file, ++out_file) { // Load file LLPointer<LLImageRaw> raw_image = load_image(*in_file, discard_level, region, image_stats); @@ -487,7 +499,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, image_stats)) + if (!save_image(*out_file, raw_image, blocks_size, precincts_size, reversible, image_stats)) { std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl; } @@ -495,7 +507,6 @@ int main(int argc, char** argv) { std::cout << *in_file << " -> " << *out_file << std::endl; } - ++out_file; } } diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 5b2c045841..ae456a48be 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -545,18 +545,10 @@ BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, co // Construct the `kdu_codestream' object and parse all remaining arguments U32 max_output_size = base.getWidth()*base.getHeight()*base.getComponents(); - if (max_output_size < 1000) - { - max_output_size = 1000; - } + max_output_size = (max_output_size < 1000 ? 1000 : max_output_size); U8 *output_buffer = new U8[max_output_size]; - - U32 output_size = max_output_size; // gets modified - LLKDUMemTarget output(output_buffer, output_size, base.getWidth()*base.getHeight()*base.getComponents()); - if (output_size > max_output_size) - { - llerrs << llformat("LLImageJ2C::encode output_size(%d) > max_output_size(%d)", output_size,max_output_size) << llendl; - } + U32 output_size = 0; // Address updated by LLKDUMemTarget to give the final compressed buffer size + LLKDUMemTarget output(output_buffer, output_size, max_output_size); kdu_codestream codestream; codestream.create(&transformed_siz,&output); @@ -583,10 +575,13 @@ BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, co if (reversible) { - // If we're doing reversible (i.e. lossless compression), assumes we're not using quality layers. - // Yes, I know this is incorrect! - // *TODO: Indeed, this is incorrect and unecessary... Try using the regular layer setting... codestream.access_siz()->parse_string("Creversible=yes"); + // *TODO: we should use yuv in reversible mode and one level since those images are small. + // Don't turn this on now though as both create problems on decoding for the moment + //codestream.access_siz()->parse_string("Clevels=1"); + //codestream.access_siz()->parse_string("Cycc=no"); + // If we're doing reversible (i.e. lossless compression), assumes we're not using quality layers. + // *TODO: this is incorrect and unecessary. Try using the regular layer setting. codestream.access_siz()->parse_string("Clayers=1"); num_layer_specs = 1; layer_bytes[0] = 0; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b602362cd0..f2a0e5ac19 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12586,6 +12586,39 @@ <key>Value</key> <integer>1</integer> </map> + <key>EnableInventory</key> + <map> + <key>Comment</key> + <string>Enable opening inventory from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>EnableSearch</key> + <map> + <key>Comment</key> + <string>Enable opening search from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>EnableAppearance</key> + <map> + <key>Comment</key> + <string>Enable opening appearance from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>SearchFromAddressBar</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index 490da2c9d4..bc97ec00e9 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -303,6 +303,39 @@ <key>Value</key> <integer>0</integer> </map> + <key>EnableInventory</key> + <map> + <key>Comment</key> + <string>Enable opening inventory from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>EnableSearch</key> + <map> + <key>Comment</key> + <string>Enable opening search from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>EnableAppearance</key> + <map> + <key>Comment</key> + <string>Enable opening appearance from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DoubleClickShowWorldMap</key> <map> <key>Comment</key> diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1cf552e42c..f9e850899a 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -110,6 +110,12 @@ public: { // support secondlife:///app/appearance/show, but for now we just // make all secondlife:///app/appearance SLapps behave this way + if (!LLUI::sSettingGroups["config"]->getBOOL("EnableAppearance")) + { + LLNotificationsUtil::add("NoAppearance", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit")); + return true; + } + LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD()); return true; } diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 2041fac8d8..d5806e375c 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -31,6 +31,7 @@ #include "llfloaterreg.h" #include "llfloatersearch.h" #include "llmediactrl.h" +#include "llnotificationsutil.h" #include "lllogininstance.h" #include "lluri.h" #include "llagent.h" @@ -46,6 +47,12 @@ public: LLSearchHandler() : LLCommandHandler("search", UNTRUSTED_THROTTLE) { } bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { + if (!LLUI::sSettingGroups["config"]->getBOOL("EnableSearch")) + { + LLNotificationsUtil::add("NoSearch", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit")); + return true; + } + const size_t parts = tokens.size(); // get the (optional) category for the search diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index abcd8588dc..36c5d12897 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -558,6 +558,18 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia requested_options.append("buddy-list"); requested_options.append("newuser-config"); requested_options.append("ui-config"); + + //send this info to login.cgi for stats gathering + //since viewerstats isn't reliable enough + if (gSavedSettings.getString("SessionSettingsFile").empty()) + { + requested_options.append("advanced-mode"); + } + else + { + requested_options.append("basic-mode"); + } + #endif requested_options.append("max-agent-groups"); requested_options.append("map-server-url"); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 4f18ee1da2..e4c2293938 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -1192,6 +1192,38 @@ void LLSideTray::reshape(S32 width, S32 height, BOOL called_from_parent) arrange(); } +// This is just LLView::findChildView specialized to restrict the search to LLPanels. +// Optimization for EXT-4068 to avoid searching down to the individual item level +// when inventories are large. +LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse) +{ + for (LLView::child_list_const_iter_t child_it = panel->beginChild(); + child_it != panel->endChild(); ++child_it) + { + LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it); + if (!child_panel) + continue; + if (child_panel->getName() == name) + return child_panel; + } + if (recurse) + { + for (LLView::child_list_const_iter_t child_it = panel->beginChild(); + child_it != panel->endChild(); ++child_it) + { + LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it); + if (!child_panel) + continue; + LLPanel *found_panel = findChildPanel(child_panel,name,recurse); + if (found_panel) + { + return found_panel; + } + } + } + return NULL; +} + /** * Activate tab with "panel_name" panel * if no such tab - return false, otherwise true. @@ -1221,23 +1253,50 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para return new_panel; } -void LLSideTray::hidePanel(const std::string& panel_name) +bool LLSideTray::hidePanel(const std::string& panel_name) { + bool panelHidden = false; + LLPanel* panelp = getPanel(panel_name); + if (panelp) { - if(isTabAttached(panel_name)) + LLView* parentp = panelp->getParent(); + + // Collapse the side bar if the panel or the panel's parent is an attached tab + if (isTabAttached(panel_name) || (parentp && isTabAttached(parentp->getName()))) { collapseSideBar(); + panelHidden = true; } else { - LLFloaterReg::hideInstance("side_bar_tab", panel_name); + panelHidden = LLFloaterReg::hideInstance("side_bar_tab", panel_name); + + if (!panelHidden) + { + // Look up the panel in the list of detached tabs. + for (child_vector_const_iter_t child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it) + { + LLPanel *detached_panel = dynamic_cast<LLPanel*>(*child_it); + + if (detached_panel) + { + // Hide this detached panel if it is a parent of our panel + if (findChildPanel(detached_panel, panel_name, true) != NULL) + { + panelHidden = LLFloaterReg::hideInstance("side_bar_tab", detached_panel->getName()); + break; + } + } + } + } } } + + return panelHidden; } - void LLSideTray::togglePanel(LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params) { if(!sub_panel) @@ -1255,38 +1314,6 @@ void LLSideTray::togglePanel(LLPanel* &sub_panel, const std::string& panel_name, } } -// This is just LLView::findChildView specialized to restrict the search to LLPanels. -// Optimization for EXT-4068 to avoid searching down to the individual item level -// when inventories are large. -LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse) -{ - for (LLView::child_list_const_iter_t child_it = panel->beginChild(); - child_it != panel->endChild(); ++child_it) - { - LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it); - if (!child_panel) - continue; - if (child_panel->getName() == name) - return child_panel; - } - if (recurse) - { - for (LLView::child_list_const_iter_t child_it = panel->beginChild(); - child_it != panel->endChild(); ++child_it) - { - LLPanel *child_panel = dynamic_cast<LLPanel*>(*child_it); - if (!child_panel) - continue; - LLPanel *found_panel = findChildPanel(child_panel,name,recurse); - if (found_panel) - { - return found_panel; - } - } - } - return NULL; -} - LLPanel* LLSideTray::getPanel(const std::string& panel_name) { // Look up the panel in the list of detached tabs. diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 1dddd9e9bc..46765bfbcc 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -104,7 +104,7 @@ public: */ LLPanel* showPanel (const std::string& panel_name, const LLSD& params = LLSD()); - void hidePanel (const std::string& panel_name); + bool hidePanel (const std::string& panel_name); /** * Toggling Side Tray tab which contains "sub_panel" child of "panel_name" panel. diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 519514d99c..68011ebf07 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -183,6 +183,12 @@ public: return false; } + if (!LLUI::sSettingGroups["config"]->getBOOL("EnableInventory")) + { + LLNotificationsUtil::add("NoInventory", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit")); + return true; + } + // support secondlife:///app/inventory/show if (params[0].asString() == "show") { diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 318bc9251f..3fb3717e68 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7214,7 +7214,49 @@ The site at '<nolink>[HOST_NAME]</nolink>' in realm ' yestext="Quit" notext="Don't Quit"/> </notification> - + + <notification + name="NoInventory" + label="" + type="alertmodal" + unique="true"> + <tag>fail</tag> + <tag>confirm</tag> + Viewing inventory is only available in Advanced mode. Would you like to logout and change modes? + <usetemplate + name="okcancelbuttons" + yestext="Quit" + notext="Don't Quit"/> + </notification> + + <notification + name="NoAppearance" + label="" + type="alertmodal" + unique="true"> + <tag>fail</tag> + <tag>confirm</tag> + The appearance editor is only available in Advanced mode. Would you like to logout and change modes? + <usetemplate + name="okcancelbuttons" + yestext="Quit" + notext="Don't Quit"/> + </notification> + + <notification + name="NoSearch" + label="" + type="alertmodal" + unique="true"> + <tag>fail</tag> + <tag>confirm</tag> + Search is only available in Advanced mode. Would you like to logout and change modes? + <usetemplate + name="okcancelbuttons" + yestext="Quit" + notext="Don't Quit"/> + </notification> + <global name="UnsupportedCPU"> - Your CPU speed does not meet the minimum requirements. </global> |