From b418328083db09f430e2e93e603d16ce7bca3e20 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 11 Dec 2009 10:50:48 -0800 Subject: When building llmediaplugintest on the mac, copy the llcommon dylib so it can actually run. --- indra/test_apps/llplugintest/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt index 0011daaec6..20ae1be1a2 100644 --- a/indra/test_apps/llplugintest/CMakeLists.txt +++ b/indra/test_apps/llplugintest/CMakeLists.txt @@ -338,6 +338,13 @@ add_custom_command(TARGET llmediaplugintest POST_BUILD DEPENDS ${BUILT_SLPLUGIN} ) +get_target_property(BUILT_LLCOMMON llcommon LOCATION) +add_custom_command(TARGET llmediaplugintest POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_LLCOMMON} ${PLUGINS_DESTINATION_DIR} + DEPENDS ${BUILT_LLCOMMON} +) + + if (DARWIN OR WINDOWS) get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION) add_custom_command(TARGET llmediaplugintest POST_BUILD -- cgit v1.2.3 From bf9609294fa0c5c4cf37e7b84f128cd05ec39403 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 11 Dec 2009 10:43:23 -0800 Subject: Enable plugins in the Mac build of the webkit plugin. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 276ad39dfb..ae4f4d810f 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -211,7 +211,7 @@ private: LLQtWebKit::getInstance()->enablePlugins(true); #elif LL_DARWIN // Disable plugins - LLQtWebKit::getInstance()->enablePlugins(false); + LLQtWebKit::getInstance()->enablePlugins(true); #elif LL_LINUX // Disable plugins LLQtWebKit::getInstance()->enablePlugins(false); -- cgit v1.2.3 From c0eb697a53b22e266fa5437edde59395afcd2c7b Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 14 Dec 2009 17:39:24 -0800 Subject: Change LLViewerMedia::isInterestingEnough() to also check selection If the object is in the selection, its interesting. Load its media data ASAP. Conceptually reviewed by monroe --- indra/newview/llviewermedia.cpp | 15 +++++++++++++-- indra/newview/llviewermedia.h | 2 +- indra/newview/llvovolume.cpp | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 367c0c8343..103a70e032 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -561,11 +561,22 @@ bool LLViewerMedia::getInWorldMediaDisabled() ////////////////////////////////////////////////////////////////////////////////////////// // static -bool LLViewerMedia::isInterestingEnough(const LLUUID &object_id, const F64 &object_interest) +bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest) { bool result = false; - if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object_id) + if (NULL == object) + { + result = false; + } + // Focused? Then it is interesting! + else if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object->getID()) + { + result = true; + } + // Selected? Then it is interesting! + // XXX Sadly, 'contains()' doesn't take a const :( + else if (LLSelectMgr::getInstance()->getSelection()->contains(const_cast(object))) { result = true; } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 26b822aba6..7151186089 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -112,7 +112,7 @@ class LLViewerMedia static void setInWorldMediaDisabled(bool disabled); static bool getInWorldMediaDisabled(); - static bool isInterestingEnough(const LLUUID& object_id, const F64 &object_interest); + static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); // Returns the priority-sorted list of all media impls. static impl_list &getPriorityList(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 801bd90423..d24edacd13 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -139,7 +139,7 @@ public: } virtual bool isInterestingEnough() const { - return LLViewerMedia::isInterestingEnough(mObject->getID(), getMediaInterest()); + return LLViewerMedia::isInterestingEnough(mObject, getMediaInterest()); } virtual std::string getCapabilityUrl(const std::string &name) const -- cgit v1.2.3 From 870d4449f5eec1c2a7e5e4627a0433846ab256aa Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 15 Dec 2009 16:00:28 +0000 Subject: EXT-3441: Support various substitutions for Search URL. The search URL is now specified in app_settings/settings.xml (instead of in floater_search.xml), and it is now defined more flexibly with support for various substitution strings, such as [QUERY], [AUTH_KEY], [MATURITY], [GODLIKE], etc. I pulled the common substitution code out into a new static method, LLWeb::expandURLSubstitutions(). This provides support for common strings like [VERSION], [CHANNEL], [LANGUAGE], [OS], etc. The Help and Home sidetray code has been updated to use this new function, to avoid replicating this behavior 3 times. I also cleaned up the app_settings/settings.xml file and removed the old search keys of: SearchURLDefault, SearchURLQuery, and SearchURLSuffix2. --- indra/newview/app_settings/settings.xml | 50 ++------- indra/newview/llfloatersearch.cpp | 38 +++---- indra/newview/llviewerhelp.cpp | 3 +- indra/newview/llviewerhelputil.cpp | 43 ++------ indra/newview/llviewerhelputil.h | 4 +- indra/newview/llviewerhome.cpp | 15 +-- indra/newview/llweb.cpp | 34 +++++- indra/newview/llweb.h | 5 +- .../skins/default/xui/en/floater_search.xml | 4 - indra/newview/tests/llviewerhelputil_test.cpp | 122 ++++++++++++--------- 10 files changed, 147 insertions(+), 171 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7ac7a09d56..f00b100217 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3587,6 +3587,17 @@ Value http://www.secondlife.com/ + SearchURL + + Comment + URL for Search website, displayed in the Find floater + Persist + 0 + Type + String + Value + http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_KEY]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE] + HighResSnapshot Comment @@ -7539,45 +7550,6 @@ Value 0 - SearchURLDefault - - Comment - URL to load for empty searches - Persist - 1 - HideFromEditor - 1 - Type - String - Value - http://search.secondlife.com/client_search.php? - - SearchURLQuery - - Comment - URL to use for searches - Persist - 1 - HideFromEditor - 1 - Type - String - Value - http://search.secondlife.com/client_search.php?q=[QUERY]&s=[COLLECTION]& - - SearchURLSuffix2 - - Comment - Parameters added to end of search queries - Persist - 1 - HideFromEditor - 1 - Type - String - Value - lang=[LANG]&mat=[MATURITY]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION] - SelectMovableOnly Comment diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index c658963708..b197ed0ac6 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -38,6 +38,8 @@ #include "lluri.h" #include "llagent.h" #include "llui.h" +#include "llviewercontrol.h" +#include "llweb.h" LLFloaterSearch::LLFloaterSearch(const LLSD& key) : LLFloater(key), @@ -65,7 +67,6 @@ BOOL LLFloaterSearch::postBuild() { mBrowser->addObserver(this); mBrowser->setTrusted(true); - mBrowser->setHomePageUrl(getString("search_url")); } return TRUE; @@ -113,33 +114,27 @@ void LLFloaterSearch::search(const LLSD &key) childHide("refresh_search"); mSearchGodLevel = gAgent.getGodLevel(); - // get the URL for the search page - std::string url = getString("search_url"); - if (! LLStringUtil::endsWith(url, "/")) - { - url += "/"; - } - // work out the subdir to use based on the requested category + LLSD subs; std::string category = key.has("category") ? key["category"].asString() : ""; if (mCategoryPaths.has(category)) { - url += mCategoryPaths[category].asString(); + subs["CATEGORY"] = mCategoryPaths[category].asString(); } else { - url += mCategoryPaths["all"].asString(); + subs["CATEGORY"] = mCategoryPaths["all"].asString(); } - // append the search query string + // add the search query string std::string search_text = key.has("id") ? key["id"].asString() : ""; - url += std::string("?q=") + LLURI::escape(search_text); + subs["QUERY"] = LLURI::escape(search_text); - // append the permissions token that login.cgi gave us + // add the permissions token that login.cgi gave us LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token"); - url += "&p=" + search_token.asString(); + subs["AUTH_KEY"] = search_token.asString(); - // also append the user's preferred maturity (can be changed via prefs) + // add the user's preferred maturity (can be changed via prefs) std::string maturity; if (gAgent.prefersAdult()) { @@ -153,14 +148,15 @@ void LLFloaterSearch::search(const LLSD &key) { maturity = "13"; // PG } - url += "&r=" + maturity; - - // add the current localization information - url += "&lang=" + LLUI::getLanguage(); + subs["MATURITY"] = maturity; // add the user's god status - std::string godlike = gAgent.isGodlike() ? "1" : "0"; - url += "&g=" + godlike; + subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0"; + + // get the search URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) + std::string url = gSavedSettings.getString("SearchURL"); + url = LLWeb::expandURLSubstitutions(url, subs); // and load the URL in the web view mBrowser->navigateTo(url); diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index b8f91697e5..5af79b4fd3 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -81,8 +81,7 @@ void LLViewerHelp::showTopic(const std::string &topic) // work out the URL for this topic and display it showHelp(); - const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo(); - std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo ); + std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic ); setRawURL( helpURL ); } diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp index df08470518..5ba4fc834c 100644 --- a/indra/newview/llviewerhelputil.cpp +++ b/indra/newview/llviewerhelputil.cpp @@ -34,12 +34,11 @@ #include "llviewerprecompiledheaders.h" #include "llviewerhelputil.h" -#include "llcontrol.h" +#include "llsd.h" #include "llstring.h" -#include "llsys.h" #include "lluri.h" -#include "llversioninfo.h" - +#include "llweb.h" +#include "llviewercontrol.h" ////////////////////////////////////////////// // Build a help URL from a topic and formatter @@ -59,40 +58,14 @@ std::string LLViewerHelpUtil::helpURLEncode( const std::string &component ) return escaped; } -static std::string buildHelpVersion( const U32 ver_int ) -{ - std::ostringstream ver_str; - ver_str << ver_int; - return ver_str.str(); // not encoded - numbers are rfc3986-safe -} - //static -std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic, - LLControlGroup &savedSettings, - const LLOSInfo &osinfo ) +std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic) { - std::string helpURL = savedSettings.getString("HelpURLFormat"); LLSD substitution; substitution["TOPIC"] = helpURLEncode(topic); - substitution["CHANNEL"] = helpURLEncode(savedSettings.getString("VersionChannelName")); - - substitution["VERSION"] = helpURLEncode(LLVersionInfo::getVersion()); - substitution["VERSION_MAJOR"] = buildHelpVersion(LLVersionInfo::getMajor()); - substitution["VERSION_MINOR"] = buildHelpVersion(LLVersionInfo::getMinor()); - substitution["VERSION_PATCH"] = buildHelpVersion(LLVersionInfo::getPatch()); - substitution["VERSION_BUILD"] = buildHelpVersion(LLVersionInfo::getBuild()); - - substitution["OS"] = helpURLEncode(osinfo.getOSStringSimple()); - - std::string language = savedSettings.getString("Language"); - if( language.empty() || language == "default" ) - { - language = savedSettings.getString("SystemLanguage"); - } - substitution["LANGUAGE"] = helpURLEncode(language); - - LLStringUtil::format(helpURL, substitution); - - return helpURL; + // get the help URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) + std::string helpURL = gSavedSettings.getString("HelpURLFormat"); + return LLWeb::expandURLSubstitutions(helpURL, substitution); } diff --git a/indra/newview/llviewerhelputil.h b/indra/newview/llviewerhelputil.h index 8ee0d96023..95e6744842 100644 --- a/indra/newview/llviewerhelputil.h +++ b/indra/newview/llviewerhelputil.h @@ -41,9 +41,7 @@ class LLViewerHelpUtil { public: static std::string helpURLEncode( const std::string &component ); - static std::string buildHelpURL( const std::string &topic, - LLControlGroup &savedSettings, - const LLOSInfo &osinfo); + static std::string buildHelpURL( const std::string &topic ); }; #endif // header guard diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp index 58630978c4..2bae07f665 100644 --- a/indra/newview/llviewerhome.cpp +++ b/indra/newview/llviewerhome.cpp @@ -35,12 +35,11 @@ #include "llviewerhome.h" #include "lllogininstance.h" +#include "llsd.h" #include "llui.h" #include "lluri.h" -#include "llsd.h" -#include "llversioninfo.h" #include "llviewercontrol.h" -#include "llviewernetwork.h" +#include "llweb.h" //static std::string LLViewerHome::getHomeURL() @@ -49,16 +48,12 @@ std::string LLViewerHome::getHomeURL() // this value from settings.xml and support various substitutions LLSD substitution; - substitution["VERSION"] = LLVersionInfo::getVersion(); - substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName")); - substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["AUTH_KEY"] = LLURI::escape(getAuthKey()); - substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + // get the home URL and expand all of the substitutions + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) std::string homeURL = gSavedSettings.getString("HomeSidePanelURL"); - LLStringUtil::format(homeURL, substitution); - - return homeURL; + return LLWeb::expandURLSubstitutions(homeURL, substitution); } //static diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 72431bd22f..045bef294e 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,12 +38,19 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() -#include "llviewerwindow.h" -#include "llviewercontrol.h" +#include "llalertdialog.h" +#include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" -#include "llalertdialog.h" +#include "lllogininstance.h" +#include "llsd.h" #include "lltoastalertpanel.h" +#include "llui.h" +#include "lluri.h" +#include "llversioninfo.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" +#include "llviewerwindow.h" class URLLoader : public LLAlertURLLoader { @@ -124,3 +131,24 @@ std::string LLWeb::escapeURL(const std::string& url) } return escaped_url; } + +//static +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) +{ + LLSD substitution = default_subs; + substitution["VERSION"] = LLVersionInfo::getVersion(); + substitution["VERSION_MAJOR"] = LLVersionInfo::getMajor(); + substitution["VERSION_MINOR"] = LLVersionInfo::getMinor(); + substitution["VERSION_PATCH"] = LLVersionInfo::getPatch(); + substitution["VERSION_BUILD"] = LLVersionInfo::getBuild(); + substitution["CHANNEL"] = LLVersionInfo::getChannel(); + substitution["LANGUAGE"] = LLUI::getLanguage(); + substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); + substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + + std::string expanded_url = url; + LLStringUtil::format(expanded_url, substitution); + + return LLWeb::escapeURL(expanded_url); +} diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h index 96a53db2ca..f4666c9280 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -57,8 +57,11 @@ public: /// Load the given url in the operating system's web browser static void loadURLExternal(const std::string& url); - // Returns escaped url (eg, " " to "%20") - used by all loadURL methods + /// Returns escaped url (eg, " " to "%20") - used by all loadURL methods static std::string escapeURL(const std::string& url); + /// Expands various strings like [LANG], [VERSION], etc. in a URL + static std::string expandURLSubstitutions(const std::string &url, + const LLSD &default_subs); }; #endif diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index e6bdcdf78e..9c1a5499db 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -12,10 +12,6 @@ single_instance="true" title="FIND" width="670"> - - http://int.searchwww-phx0.damballah.lindenlab.com/viewer - Loading... diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 68743357a6..ec612c4606 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -36,54 +36,59 @@ #include "../test/lltut.h" #include "../llviewerhelputil.h" -#include "../llversioninfo.h" +#include "../llweb.h" #include "llcontrol.h" -#include "llsys.h" #include -//---------------------------------------------------------------------------- -// Implementation of enough of LLControlGroup to support the tests: +// values for all of the supported substitutions parameters +static std::string gHelpURL; +static std::string gVersion; +static std::string gChannel; +static std::string gLanguage; +static std::string gGrid; +static std::string gOS; -static std::map test_stringvec; +//---------------------------------------------------------------------------- +// Mock objects for the dependencies of the code we're testing LLControlGroup::LLControlGroup(const std::string& name) - : LLInstanceTracker(name) -{ -} - -LLControlGroup::~LLControlGroup() -{ -} - -// Implementation of just the LLControlGroup methods we requre + : LLInstanceTracker(name) {} +LLControlGroup::~LLControlGroup() {} BOOL LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, - BOOL persist) -{ - test_stringvec[name] = initial_val; - return true; -} - -void LLControlGroup::setString(const std::string& name, const std::string& val) + BOOL persist) {return TRUE;} +void LLControlGroup::setString(const std::string& name, const std::string& val){} +std::string LLControlGroup::getString(const std::string& name) { - test_stringvec[name] = val; + if (name == "HelpURLFormat") + return gHelpURL; + return ""; } +LLControlGroup gSavedSettings("test"); -std::string LLControlGroup::getString(const std::string& name) +static void substitute_string(std::string &input, const std::string &search, const std::string &replace) { - return test_stringvec[name]; + size_t pos = input.find(search); + while (pos != std::string::npos) + { + input = input.replace(pos, search.size(), replace); + pos = input.find(search); + } } -S32 LLVersionInfo::getMajor() { return 2; } -S32 LLVersionInfo::getMinor() { return 0; } -S32 LLVersionInfo::getPatch() { return 0; } -S32 LLVersionInfo::getBuild() { return 200099; } -const std::string &LLVersionInfo::getVersion() +std::string LLWeb::expandURLSubstitutions(const std::string &url, + const LLSD &default_subs) { - static std::string version = "2.0.0.200099"; - return version; + std::string new_url = url; + substitute_string(new_url, "[TOPIC]", default_subs["TOPIC"].asString()); + substitute_string(new_url, "[VERSION]", gVersion); + substitute_string(new_url, "[CHANNEL]", gChannel); + substitute_string(new_url, "[LANGUAGE]", gLanguage); + substitute_string(new_url, "[GRID]", gGrid); + substitute_string(new_url, "[OS]", gOS); + return new_url; } //---------------------------------------------------------------------------- @@ -101,41 +106,52 @@ namespace tut template<> template<> void viewerhelputil_object_t::test<1>() { - LLOSInfo osinfo; - LLControlGroup cgr("test"); - cgr.declareString("HelpURLFormat", "fooformat", "declared_for_test", FALSE); - cgr.declareString("VersionChannelName", "foochannelname", "declared_for_test", FALSE); - cgr.declareString("Language", "foolanguage", "declared_for_test", FALSE); std::string topic("test_topic"); - std::string subresult; - cgr.setString("HelpURLFormat", "fooformat"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "fooformat"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("no substitution tags", subresult, "fooformat"); - cgr.setString("HelpURLFormat", ""); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = ""; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("blank substitution format", subresult, ""); - cgr.setString("HelpURLFormat", "[LANGUAGE]"); - cgr.setString("Language", ""); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[TOPIC]"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("topic name", subresult, "test_topic"); + + gHelpURL = "[LANGUAGE]"; + gLanguage = ""; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("simple substitution with blank", subresult, ""); - cgr.setString("HelpURLFormat", "[LANGUAGE]"); - cgr.setString("Language", "Esperanto"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[LANGUAGE]"; + gLanguage = "Esperanto"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("simple substitution", subresult, "Esperanto"); - cgr.setString("HelpURLFormat", "[XXX]"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "http://secondlife.com/[LANGUAGE]"; + gLanguage = "Gaelic"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("simple substitution with url", subresult, "http://secondlife.com/Gaelic"); + + gHelpURL = "[XXX]"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("unknown substitution", subresult, "[XXX]"); - cgr.setString("HelpURLFormat", "[LANGUAGE]/[LANGUAGE]"); - cgr.setString("Language", "Esperanto"); - subresult = LLViewerHelpUtil::buildHelpURL(topic, cgr, osinfo); + gHelpURL = "[LANGUAGE]/[LANGUAGE]"; + gLanguage = "Esperanto"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); ensure_equals("multiple substitution", subresult, "Esperanto/Esperanto"); + + gHelpURL = "http://[CHANNEL]/[VERSION]/[LANGUAGE]/[OS]/[GRID]/[XXX]"; + gChannel = "Second Life Test"; + gVersion = "2.0"; + gLanguage = "gaelic"; + gOS = "AmigaOS 2.1"; + gGrid = "mysim"; + subresult = LLViewerHelpUtil::buildHelpURL(topic); + ensure_equals("complex substitution", subresult, "http://Second Life Test/2.0/gaelic/AmigaOS 2.1/mysim/[XXX]"); } - } -- cgit v1.2.3 From 1f7bf9216869682aa88c9c92b6c15d2d5278902d Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 15 Dec 2009 12:41:20 -0800 Subject: New mac build of llqtwebkit. This build is based on the following: http://bitbucket.org/girish/llqtwebkit-4.6/ revision 08c337619f50 local change: comment out the definition of qt_sendSpontaneousEvent() in llembeddedbrowserwindow.cpp git://gitorious.org/~girish/qt/girishs-qt.git branch lindenqt revision b4820037eac5c52d44df99ec37a50edd1796c897 --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.xml b/install.xml index 2d60f07c11..8f56811634 100644 --- a/install.xml +++ b/install.xml @@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard darwin md5sum - 7f818f13faf7c02838fe66f7d27e1913 + e854fd009feeeb617ecfa68f7614ec17 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-darwin-20091124.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6+flash-darwin-20091215.tar.bz2 linux -- cgit v1.2.3 From 0f5a7575407bcab51678a4f05884835e502cd3d3 Mon Sep 17 00:00:00 2001 From: Ramzi Linden Date: Tue, 15 Dec 2009 13:12:16 -0800 Subject: L10N: some legacy strings were left in panel_preferences_setup.xml. At least I will make them consistent. --- indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index a7def5306e..a65f7d3a54 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -3,7 +3,7 @@ border="true" follows="left|top|right|bottom" height="408" - label="Input & Camera" + label="Setup" layout="topleft" left="102" name="Input panel" @@ -223,7 +223,7 @@ follows="left|top" height="23" label="Reset" - label_selected="Set" + label_selected="Reset" layout="topleft" left_pad="3" name="reset_cache" -- cgit v1.2.3 From eafd52200d1c101c918384066465638f400aa033 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Tue, 15 Dec 2009 16:20:17 -0500 Subject: fix for post merge compile error (minor) --- indra/newview/llweb.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 18f61501dc..f8bb7336db 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,7 +38,6 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() -#include "llalertdialog.h" #include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" -- cgit v1.2.3 From 710d2a6db367e0bc57b098f8ceced68b533674de Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Tue, 15 Dec 2009 14:44:41 -0800 Subject: Fixed an edge case that was triggering an error check when doing HTTP texture fetches. --- indra/newview/lltexturefetch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 85259fdc1e..9f69ed3964 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -887,6 +887,8 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { + // mFormattedImage gauranteed to not be NULL since cur_size != 0 + mLoadedDiscard = mFormattedImage->getDiscardLevel(); mState = DECODE_IMAGE; return false; // use what we have } -- cgit v1.2.3 From a81a2f19b21134fb52df1e1a735988a04aa0688a Mon Sep 17 00:00:00 2001 From: Runitai <> Date: Tue, 15 Dec 2009 16:47:48 -0600 Subject: EXT-3488 Fix for sky not being reflected in water any more. --- indra/newview/pipeline.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 282eddf380..73b5222ee3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7268,13 +7268,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) updateCull(camera, ref_result, 1); stateSort(camera, ref_result); } - else - { - gGL.setColorMask(true, true); - mWaterRef.clear(); - gGL.setColorMask(true, false); - } - + ref_mask = mRenderTypeMask; mRenderTypeMask = mask; } -- cgit v1.2.3 From dec9e56afe404ac8cbf2bacae87062bf091fdab1 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 15 Dec 2009 23:18:42 +0000 Subject: EXT-3180: Update Home sidetray to temporary URL. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f00b100217..032efb0c1a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3585,7 +3585,7 @@ Type String Value - http://www.secondlife.com/ + http://lecs.viewer-sidebar.secondlife.com.s3.amazonaws.com/sidebar.html SearchURL -- cgit v1.2.3 From 931591c0ab434cc330cfdfa324a27278bc4a1270 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 15 Dec 2009 23:45:38 +0000 Subject: EXT-3496: Add a common authentication key for search and home. Search and the Home sidetray now have their own specific authentication keys that they support from login.cgi, but they fallback to a common key as follows: Search: "search_token", fallback to "auth_token" Home: "home_sidetray_token", fallback to "auth_token" --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloatersearch.cpp | 7 ++++++- indra/newview/llviewerhome.cpp | 12 +++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 032efb0c1a..ff569ecffa 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3596,7 +3596,7 @@ Type String Value - http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_KEY]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE] + http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE] HighResSnapshot diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index b197ed0ac6..595d84f9f0 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -131,8 +131,13 @@ void LLFloaterSearch::search(const LLSD &key) subs["QUERY"] = LLURI::escape(search_text); // add the permissions token that login.cgi gave us + // We use "search_token", and fallback to "auth_token" if not present. LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token"); - subs["AUTH_KEY"] = search_token.asString(); + if (search_token.asString().empty()) + { + search_token = LLLoginInstance::getInstance()->getResponse("auth_token"); + } + subs["AUTH_TOKEN"] = search_token.asString(); // add the user's preferred maturity (can be changed via prefs) std::string maturity; diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp index 2bae07f665..6299b4fabd 100644 --- a/indra/newview/llviewerhome.cpp +++ b/indra/newview/llviewerhome.cpp @@ -48,7 +48,7 @@ std::string LLViewerHome::getHomeURL() // this value from settings.xml and support various substitutions LLSD substitution; - substitution["AUTH_KEY"] = LLURI::escape(getAuthKey()); + substitution["AUTH_TOKEN"] = LLURI::escape(getAuthKey()); // get the home URL and expand all of the substitutions // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) @@ -62,7 +62,13 @@ std::string LLViewerHome::getAuthKey() // return the value of the (optional) auth token returned by login.cgi // this lets the server provide an authentication token that we can // blindly pass to the Home web page for it to perform authentication. - static const std::string authKeyName("home_sidetray_token"); - return LLLoginInstance::getInstance()->getResponse(authKeyName); + // We use "home_sidetray_token", and fallback to "auth_token" if not + // present. + LLSD auth_token = LLLoginInstance::getInstance()->getResponse("home_sidetray_token"); + if (auth_token.asString().empty()) + { + auth_token = LLLoginInstance::getInstance()->getResponse("auth_token"); + } + return auth_token.asString(); } -- cgit v1.2.3 From fc40740e1e5a7fcb1ed8bf3b4b6eaffe7d3d9c07 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Tue, 15 Dec 2009 17:04:09 -0800 Subject: Add a PrimMediaMasterEnabled debug flag to allow us to disable the media data client Conceptually reviewed by Monroe --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llvovolume.cpp | 35 +++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f00b100217..9dfce27fad 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5470,6 +5470,17 @@ U32 Value 13 + + PrimMediaMasterEnabled + + Comment + Whether or not Media on a Prim is enabled. + Persist + 1 + Type + Boolean + Value + 1 PrimMediaControlsUseHoverControlSet diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d24edacd13..f98aa361e0 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -204,8 +204,8 @@ void LLVOVolume::markDead() if (!mDead) { LLMediaDataClientObject::ptr_t obj = new LLMediaDataClientObjectImpl(const_cast(this), false); - sObjectMediaClient->removeFromQueue(obj); - sObjectMediaNavigateClient->removeFromQueue(obj); + if (sObjectMediaClient) sObjectMediaClient->removeFromQueue(obj); + if (sObjectMediaNavigateClient) sObjectMediaNavigateClient->removeFromQueue(obj); // Detach all media impls from this object for(U32 i = 0 ; i < mMediaImplList.size() ; i++) @@ -222,15 +222,18 @@ void LLVOVolume::markDead() void LLVOVolume::initClass() { // gSavedSettings better be around - const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay"); - const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay"); - const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries"); - const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize"); - const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize"); - sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, - max_sorted_queue_size, max_round_robin_queue_size); - sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, - max_retries, max_sorted_queue_size, max_round_robin_queue_size); + if (gSavedSettings.getBOOL("PrimMediaMasterEnabled")) + { + const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay"); + const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay"); + const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries"); + const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize"); + const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize"); + sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries, + max_sorted_queue_size, max_round_robin_queue_size); + sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay, + max_retries, max_sorted_queue_size, max_round_robin_queue_size); + } } // static @@ -1719,14 +1722,15 @@ LLVector3 LLVOVolume::getApproximateFaceNormal(U8 face_id) void LLVOVolume::requestMediaDataUpdate(bool isNew) { - sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew)); + if (sObjectMediaClient) + sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew)); } bool LLVOVolume::isMediaDataBeingFetched() const { // I know what I'm doing by const_casting this away: this is just // a wrapper class that is only going to do a lookup. - return sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast(this), false)); + return (sObjectMediaClient) ? sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast(this), false)) : false; } void LLVOVolume::cleanUpMediaImpls() @@ -1925,7 +1929,7 @@ void LLVOVolume::mediaNavigated(LLViewerMediaImpl *impl, LLPluginClassMedia* plu // "bounce back" to the current URL from the media entry mediaNavigateBounceBack(face_index); } - else + else if (sObjectMediaNavigateClient) { llinfos << "broadcasting navigate with URI " << new_location << llendl; @@ -1994,7 +1998,8 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, void LLVOVolume::sendMediaDataUpdate() { - sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false)); + if (sObjectMediaClient) + sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false)); } void LLVOVolume::removeMediaImpl(S32 texture_index) -- cgit v1.2.3 From f923f896bca0d0d8459c35a5ef8e0d0171cbe664 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 15 Dec 2009 17:50:16 -0800 Subject: client changes to work with new version of Qt (4.6) and to do some cleanup at plugin exit so that cookies more betterer than what they did before. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 7 +++++-- indra/newview/CMakeLists.txt | 2 ++ indra/newview/viewer_manifest.py | 1 + indra/test_apps/llplugintest/CMakeLists.txt | 1 + install.xml | 4 ++-- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 276ad39dfb..76e2c080be 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -626,7 +626,11 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) } else if(message_name == "cleanup") { - // TODO: clean up here + // DTOR most likely won't be called but the recent change to the way this process + // is (not) killed means we see this message and can do what we need to here. + // Note: this cleanup is ultimately what writes cookies to the disk + LLQtWebKit::getInstance()->remObserver( mBrowserWindowId, this ); + LLQtWebKit::getInstance()->reset(); } else if(message_name == "shm_added") { @@ -635,7 +639,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) info.mSize = (size_t)message_in.getValueS32("size"); std::string name = message_in.getValue("name"); - // std::cerr << "MediaPluginWebKit::receiveMessage: shared memory added, name: " << name // << ", size: " << info.mSize // << ", address: " << info.mAddress diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 72630cc413..a6679c5fbf 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1784,6 +1784,7 @@ if (WINDOWS) qtnetworkd4.dll qtopengld4.dll qtwebkitd4.dll + qtxmlpatternsd4.dll ssleay32.dll ) copy_if_different( @@ -1803,6 +1804,7 @@ if (WINDOWS) qtnetwork4.dll qtopengl4.dll qtwebkit4.dll + qtxmlpatterns4.dll ssleay32.dll ) copy_if_different( diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 32fdd41be2..5090dc9ce4 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -324,6 +324,7 @@ class WindowsManifest(ViewerManifest): self.path("qtnetwork4.dll") self.path("qtopengl4.dll") self.path("qtwebkit4.dll") + self.path("qtxmlpatternsd4.dll") self.path("ssleay32.dll") self.end_prefix() diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt index 0011daaec6..12310f9ecd 100644 --- a/indra/test_apps/llplugintest/CMakeLists.txt +++ b/indra/test_apps/llplugintest/CMakeLists.txt @@ -435,6 +435,7 @@ if(WINDOWS) qtnetwork4.dll qtopengl4.dll qtwebkit4.dll + qtxmlpatterns4.dll ssleay32.dll ) copy_if_different( diff --git a/install.xml b/install.xml index 2d60f07c11..3ce7a37bde 100644 --- a/install.xml +++ b/install.xml @@ -962,9 +962,9 @@ anguage Infrstructure (CLI) international standard windows md5sum - 92cff05661b5547caae7cc6c66d09870 + 3846354e2e20a98c0401317eb114ff5e url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-20091123.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-qt4.6-20091215.tar.bz2 -- cgit v1.2.3 From c9a284fc69020f499ccb6d9fa877dad6864ec66f Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 15 Dec 2009 17:48:52 -0800 Subject: Updated llqtwebkit 4.6 build, with link-target and cookie-saving patches applied. --- install.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.xml b/install.xml index ede43ab4c8..2e317755da 100644 --- a/install.xml +++ b/install.xml @@ -948,9 +948,9 @@ anguage Infrstructure (CLI) international standard darwin md5sum - e854fd009feeeb617ecfa68f7614ec17 + 44fe5bca65db2951ce91b5b6c8596ee0 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6+flash-darwin-20091215.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-4.6-darwin-20091215.tar.bz2 linux -- cgit v1.2.3 From 966b2ebfe28d096791395188552f3fc18154247c Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 15 Dec 2009 21:02:16 -0800 Subject: Misnamed additional Qt/WebKit DLL. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5090dc9ce4..d6d6aa48d1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -324,7 +324,7 @@ class WindowsManifest(ViewerManifest): self.path("qtnetwork4.dll") self.path("qtopengl4.dll") self.path("qtwebkit4.dll") - self.path("qtxmlpatternsd4.dll") + self.path("qtxmlpatterns4.dll") self.path("ssleay32.dll") self.end_prefix() -- cgit v1.2.3