From 485c7ee0e2ebc2223c35fbb59a569ed889a1193c Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 1 Feb 2008 22:10:40 +0000 Subject: merge Branch_1-19-0-Viewer -r 78432:78989 -> release QA'd in QAR-186: DEV-9179: Commit translated and reviewed strings from 1.19 frozen branch pull DEV-8792 Place information teleport button hidden behind chat bar. DEV-9374: Remove "New Account..." and "Preferences" buttons from login screen for 1.19.0 DEV-9411 -- Update required version of Quicktime library to 7.4 for 1.19.0 Viewer DEV-9430 Viewer auth failed login screen is shown in the loginxui 1.19 viewer on failure to retrieve normal login screen - changed wording of error page DEV-8537 Chat console appearing underneath status buttons DEV-9283 Chatbar cant be open while in mouselook DEV-9226 Some Dazzle? icons have sneaked into the release branch DEV-9520 Menus and Other items minimise behind onscreen buttons DEV-9521 Unable to ctrl and click to select in the friends list DEV-9530 SEC-20 Exploit to force users to teleport to a location on profile open. DEV-6833 - Mature events icon and checkbox is missing from map legend Also: Added vc9 project files (+ minor changes for vc9) (steve) Modified vc project files to not include the path for flex / bison (steve) Added marker file deletion to crash logger to stop double reporting. (cube) --- indra/newview/llurldispatcher.cpp | 49 ++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 16 deletions(-) (limited to 'indra/newview/llurldispatcher.cpp') diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index ba8e77afdf..82b2b597ca 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -63,23 +63,24 @@ public: static bool isSLURLCommand(const std::string& url); - static bool dispatch(const std::string& url); - // returns true if handled + static bool dispatch(const std::string& url, bool from_external_browser); + // returns true if handled or explicitly blocked. static bool dispatchRightClick(const std::string& url); private: - static bool dispatchCore(const std::string& url, bool right_mouse); + static bool dispatchCore(const std::string& url, + bool from_external_browser, bool right_mouse); // handles both left and right click static bool dispatchHelp(const std::string& url, BOOL right_mouse); // Handles sl://app.floater.html.help by showing Help floater. // Returns true if handled. - static bool dispatchApp(const std::string& url, BOOL right_mouse); - // Handles secondlife://app/agent//about and similar + static bool dispatchApp(const std::string& url, bool from_external_browser, BOOL right_mouse); + // Handles secondlife:///app/agent//about and similar // by showing panel in Search floater. - // Returns true if handled. + // Returns true if handled or explicitly blocked. static bool dispatchRegion(const std::string& url, BOOL right_mouse); // handles secondlife://Ahern/123/45/67/ @@ -120,11 +121,11 @@ bool LLURLDispatcherImpl::isSLURLCommand(const std::string& url) } // static -bool LLURLDispatcherImpl::dispatchCore(const std::string& url, bool right_mouse) +bool LLURLDispatcherImpl::dispatchCore(const std::string& url, bool from_external_browser, bool right_mouse) { if (url.empty()) return false; if (dispatchHelp(url, right_mouse)) return true; - if (dispatchApp(url, right_mouse)) return true; + if (dispatchApp(url, from_external_browser, right_mouse)) return true; if (dispatchRegion(url, right_mouse)) return true; /* @@ -138,17 +139,20 @@ bool LLURLDispatcherImpl::dispatchCore(const std::string& url, bool right_mouse) } // static -bool LLURLDispatcherImpl::dispatch(const std::string& url) +bool LLURLDispatcherImpl::dispatch(const std::string& url, bool from_external_browser) { llinfos << "url: " << url << llendl; - return dispatchCore(url, false); // not right click + const bool right_click = false; + return dispatchCore(url, from_external_browser, right_click); } // static bool LLURLDispatcherImpl::dispatchRightClick(const std::string& url) { llinfos << "url: " << url << llendl; - return dispatchCore(url, true); // yes right click + const bool from_external_browser = false; + const bool right_click = true; + return dispatchCore(url, from_external_browser, right_click); } // static bool LLURLDispatcherImpl::dispatchHelp(const std::string& url, BOOL right_mouse) @@ -164,7 +168,9 @@ bool LLURLDispatcherImpl::dispatchHelp(const std::string& url, BOOL right_mouse) } // static -bool LLURLDispatcherImpl::dispatchApp(const std::string& url, BOOL right_mouse) +bool LLURLDispatcherImpl::dispatchApp(const std::string& url, + bool from_external_browser, + BOOL right_mouse) { if (!isSLURL(url)) { @@ -176,7 +182,8 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url, BOOL right_mouse) pathArray.erase(0); // erase "app" std::string cmd = pathArray.get(0); pathArray.erase(0); // erase "cmd" - bool handled = LLCommandDispatcher::dispatch(cmd, pathArray, uri.queryMap()); + bool handled = LLCommandDispatcher::dispatch( + cmd, from_external_browser, pathArray, uri.queryMap()); return handled; } @@ -298,7 +305,9 @@ std::string LLURLDispatcherImpl::stripProtocol(const std::string& url) class LLTeleportHandler : public LLCommandHandler { public: - LLTeleportHandler() : LLCommandHandler("teleport") { } + // not allowed from outside the app + LLTeleportHandler() : LLCommandHandler("teleport", false) { } + bool handle(const LLSD& tokens, const LLSD& queryMap) { // construct a "normal" SLURL, resolve the region to @@ -338,9 +347,9 @@ bool LLURLDispatcher::isSLURLCommand(const std::string& url) } // static -bool LLURLDispatcher::dispatch(const std::string& url) +bool LLURLDispatcher::dispatch(const std::string& url, bool from_external_browser) { - return LLURLDispatcherImpl::dispatch(url); + return LLURLDispatcherImpl::dispatch(url, from_external_browser); } // static bool LLURLDispatcher::dispatchRightClick(const std::string& url) @@ -348,6 +357,14 @@ bool LLURLDispatcher::dispatchRightClick(const std::string& url) return LLURLDispatcherImpl::dispatchRightClick(url); } +// static +bool LLURLDispatcher::dispatchFromTextEditor(const std::string& url) +{ + // text editors are by definition internal to our code + const bool from_external_browser = false; + return LLURLDispatcherImpl::dispatch(url, from_external_browser); +} + // static std::string LLURLDispatcher::buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z) { -- cgit v1.2.3