diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-02-01 22:10:40 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-02-01 22:10:40 +0000 |
commit | 485c7ee0e2ebc2223c35fbb59a569ed889a1193c (patch) | |
tree | 35f827e55eecf91dab0a1c701a5645c0edf3335f /indra/newview | |
parent | b302f15deea0f4f7f5de75bfd3776c17021b6444 (diff) |
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)
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/English.lproj/InfoPlist.strings | 4 | ||||
-rw-r--r-- | indra/newview/Info-SecondLife.plist | 2 | ||||
-rw-r--r-- | indra/newview/llappviewermacosx.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llcommandhandler.cpp | 45 | ||||
-rw-r--r-- | indra/newview/llcommandhandler.h | 12 | ||||
-rw-r--r-- | indra/newview/llfloaterevent.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterparcel.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterurldisplay.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 13 | ||||
-rw-r--r-- | indra/newview/lloverlaybar.cpp | 23 | ||||
-rw-r--r-- | indra/newview/lloverlaybar.h | 1 | ||||
-rw-r--r-- | indra/newview/llpanelclassified.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llpanellogin.h | 3 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llurldispatcher.cpp | 49 | ||||
-rw-r--r-- | indra/newview/llurldispatcher.h | 9 | ||||
-rw-r--r-- | indra/newview/llviewercamera.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 4 |
22 files changed, 179 insertions, 92 deletions
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index e71617850a..8944cb8d81 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.19.0.78408"; -CFBundleGetInfoString = "Second Life version 1.19.0.78408, Copyright 2004-2007 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.19.0.0"; +CFBundleGetInfoString = "Second Life version 1.19.0.0, Copyright 2004-2007 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index e007e6f62a..5956f9bd8d 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>1.19.0.78408</string> + <string>1.19.0.0</string> <key>CSResourcesFileMapped</key> <true/> </dict> diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index e80491e786..11605ecf73 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -172,7 +172,8 @@ OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) if(result == noErr) { std::string url = buffer; - LLURLDispatcher::dispatch(url); + const bool from_external_browser = true; + LLURLDispatcher::dispatch(url, from_external_browser); } return(result); diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index 95a30e8903..8b86b1be5d 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -40,16 +40,21 @@ //--------------------------------------------------------------------------- // Underlying registry for command handlers, not directly accessible. //--------------------------------------------------------------------------- +struct LLCommandHandlerInfo +{ + bool mAllowFromExternalBrowser; + LLCommandHandler* mHandler; // safe, all of these are static objects +}; class LLCommandHandlerRegistry { public: static LLCommandHandlerRegistry& instance(); - void add(const char* cmd, LLCommandHandler* handler); - bool dispatch(const std::string& cmd, const LLSD& params, const LLSD& queryMap); + void add(const char* cmd, bool allow_from_external_browser, LLCommandHandler* handler); + bool dispatch(const std::string& cmd, bool from_external_browser, const LLSD& params, const LLSD& queryMap); private: - std::map<std::string, LLCommandHandler*> mMap; + std::map<std::string, LLCommandHandlerInfo> mMap; }; // static @@ -62,29 +67,40 @@ LLCommandHandlerRegistry& LLCommandHandlerRegistry::instance() return instance; } -void LLCommandHandlerRegistry::add(const char* cmd, LLCommandHandler* handler) +void LLCommandHandlerRegistry::add(const char* cmd, bool allow_from_external_browser, LLCommandHandler* handler) { - mMap[cmd] = handler; + LLCommandHandlerInfo info; + info.mAllowFromExternalBrowser = allow_from_external_browser; + info.mHandler = handler; + + mMap[cmd] = info; } bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, + bool from_external_browser, const LLSD& params, const LLSD& queryMap) { - std::map<std::string, LLCommandHandler*>::iterator it = mMap.find(cmd); + std::map<std::string, LLCommandHandlerInfo>::iterator it = mMap.find(cmd); if (it == mMap.end()) return false; - LLCommandHandler* handler = it->second; - if (!handler) return false; - return handler->handle(params, queryMap); + const LLCommandHandlerInfo& info = it->second; + if (from_external_browser && !info.mAllowFromExternalBrowser) + { + // block request from external browser, but report as + // "handled" because it was well formatted. + return true; + } + if (!info.mHandler) return false; + return info.mHandler->handle(params, queryMap); } //--------------------------------------------------------------------------- // Automatic registration of commands, runs before main() //--------------------------------------------------------------------------- -LLCommandHandler::LLCommandHandler(const char* cmd) +LLCommandHandler::LLCommandHandler(const char* cmd, bool allow_from_external_browser) { - LLCommandHandlerRegistry::instance().add(cmd, this); + LLCommandHandlerRegistry::instance().add(cmd, allow_from_external_browser, this); } LLCommandHandler::~LLCommandHandler() @@ -98,7 +114,10 @@ LLCommandHandler::~LLCommandHandler() //--------------------------------------------------------------------------- // static -bool LLCommandDispatcher::dispatch(const std::string& cmd, const LLSD& params, const LLSD& queryMap) +bool LLCommandDispatcher::dispatch(const std::string& cmd, + bool from_external_browser, + const LLSD& params, const LLSD& queryMap) { - return LLCommandHandlerRegistry::instance().dispatch(cmd, params, queryMap); + return LLCommandHandlerRegistry::instance().dispatch( + cmd, from_external_browser, params, queryMap); } diff --git a/indra/newview/llcommandhandler.h b/indra/newview/llcommandhandler.h index 0cb9d123fa..8fe40a9a02 100644 --- a/indra/newview/llcommandhandler.h +++ b/indra/newview/llcommandhandler.h @@ -40,8 +40,9 @@ class LLFooHandler : public LLCommandHandler { public: // Inform the system you handle commands starting - // with "foo" - LLFooHandler() : LLCommandHandler("foo") { } + // with "foo" and they are not allowed from external web + // browser links. + LLFooHandler() : LLCommandHandler("foo", false) { } // Your code here bool handle(const LLSD& tokens, const LLSD& queryMap) @@ -59,9 +60,11 @@ LLFooHandler gFooHandler; class LLCommandHandler { public: - LLCommandHandler(const char* command); + LLCommandHandler(const char* command, bool allow_from_external_browser); // Automatically registers object to get called when - // command is executed. + // command is executed. All commands can be processed + // in links from LLWebBrowserCtrl, but some (like teleport) + // should not be allowed from outside the app. virtual ~LLCommandHandler(); @@ -78,6 +81,7 @@ class LLCommandDispatcher { public: static bool dispatch(const std::string& cmd, + bool from_external_browser, const LLSD& params, const LLSD& queryMap); // Execute a command registered via the above mechanism, diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index dfe739cb58..7c76923190 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -54,7 +54,8 @@ LLMap< U32, LLFloaterEventInfo* > gEventInfoInstances; class LLEventHandler : public LLCommandHandler { public: - LLEventHandler() : LLCommandHandler("event") { } + // don't allow from external browsers + LLEventHandler() : LLCommandHandler("event", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { if (tokens.size() < 2) diff --git a/indra/newview/llfloaterparcel.cpp b/indra/newview/llfloaterparcel.cpp index 8d3164c765..bca4f4f42f 100644 --- a/indra/newview/llfloaterparcel.cpp +++ b/indra/newview/llfloaterparcel.cpp @@ -51,7 +51,8 @@ LLMap< const LLUUID, LLFloaterParcelInfo* > gPlaceInfoInstances; class LLParcelHandler : public LLCommandHandler { public: - LLParcelHandler() : LLCommandHandler("parcel") { } + // don't allow from external browsers + LLParcelHandler() : LLCommandHandler("parcel", false) { } bool handle(const LLSD& params, const LLSD& queryMap) { if (params.size() < 2) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c2780cb8e0..8d77d79d83 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -95,7 +95,8 @@ LLFloaterPreference* LLFloaterPreference::sInstance = NULL; class LLPreferencesHandler : public LLCommandHandler { public: - LLPreferencesHandler() : LLCommandHandler("preferences") { } + // don't allow from external browsers + LLPreferencesHandler() : LLCommandHandler("preferences", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { LLFloaterPreference::show(NULL); diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp index 45fa14bc0a..e0d547b34e 100644 --- a/indra/newview/llfloaterurldisplay.cpp +++ b/indra/newview/llfloaterurldisplay.cpp @@ -48,6 +48,18 @@ LLFloaterURLDisplay::LLFloaterURLDisplay(const LLSD& sd) mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterURLDisplay::createPlaceDetail, this); gUICtrlFactory->buildFloater(this, "floater_preview_url.xml", &getFactoryMap()); this->setVisible(false); + + // If positioned at 0,0 the teleport button is behind the toolbar. + LLRect r = getRect(); + if (r.mBottom == 0 && r.mLeft == 0) + { + // first use, center it + center(); + } + else + { + gFloaterView->adjustToFitScreen(this, FALSE); + } } LLFloaterURLDisplay::~LLFloaterURLDisplay() diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index ce5a94520c..9f9396a2d0 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -272,14 +272,6 @@ BOOL LLFloaterWorldMap::postBuild() setDefaultBtn(NULL); - if ( gAgent.isTeen() ) - { - // Hide Mature Events controls - childHide("events_mature_icon"); - childHide("events_mature_label"); - childHide("event_mature_chk"); - } - mZoomTimer.stop(); return TRUE; @@ -460,6 +452,11 @@ void LLFloaterWorldMap::draw() return; } + // Hide/Show Mature Events controls + childSetVisible("events_mature_icon", !gAgent.isTeen()); + childSetVisible("events_mature_label", !gAgent.isTeen()); + childSetVisible("event_mature_chk", !gAgent.isTeen()); + // On orientation island, users don't have a home location yet, so don't // let them teleport "home". It dumps them in an often-crowed welcome // area (infohub) and they get confused. JC diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index e7c313638b..15195d8f02 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -193,15 +193,6 @@ void LLOverlayBar::layoutButtons() } } -void LLOverlayBar::draw() -{ - childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); - - // draw children on top - LLPanel::draw(); -} - - // Per-frame updates of visibility void LLOverlayBar::refresh() { @@ -266,8 +257,6 @@ void LLOverlayBar::refresh() buttons_changed = TRUE; } - // update "remotes" - childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); enableMediaButtons(); moveChildToBackOfTabGroup(mMediaRemote); @@ -276,13 +265,21 @@ void LLOverlayBar::refresh() // turn off the whole bar in mouselook if (gAgent.cameraMouselook()) { - setVisible(FALSE); + childSetVisible("media_remote_container", FALSE); + childSetVisible("voice_remote_container", FALSE); + childSetVisible("state_buttons", FALSE); } else { - setVisible(TRUE); + // update "remotes" + childSetVisible("media_remote_container", TRUE); + childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); + childSetVisible("state_buttons", TRUE); } + // always let user toggle into and out of chatbar + childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); + if (buttons_changed) { layoutButtons(); diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h index 18ff07e71b..90886e1c72 100644 --- a/indra/newview/lloverlaybar.h +++ b/indra/newview/lloverlaybar.h @@ -61,7 +61,6 @@ public: virtual LLString getWidgetTag() const; /*virtual*/ void refresh(); - /*virtual*/ void draw(); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 8332cdc166..f84ae06416 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -112,9 +112,8 @@ static LLDispatchClassifiedClickThrough sClassifiedClickThrough; class LLClassifiedTeleportHandler : public LLCommandHandler { public: - // Inform the system you handle commands starting - // with "foo" - LLClassifiedTeleportHandler() : LLCommandHandler("classifiedteleport") { } + // don't allow from external browsers because it moves you immediately + LLClassifiedTeleportHandler() : LLCommandHandler("classifiedteleport", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { @@ -137,7 +136,8 @@ public: const bool from_search = true; LLPanelClassified::sendClassifiedClickMessage(classified_id, "teleport", from_search); // Invoke teleport - return LLURLDispatcher::dispatch(url); + const bool from_external_browser = false; + return LLURLDispatcher::dispatch(url, from_external_browser); } }; // Creating the object registers with the dispatcher. diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 1167a23217..bc6f6fedd8 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -91,7 +91,8 @@ BOOL LLPanelLogin::sCapslockDidNotification = FALSE; class LLLoginRefreshHandler : public LLCommandHandler { public: - LLLoginRefreshHandler() : LLCommandHandler("login_refresh") { } + // don't allow from external browsers + LLLoginRefreshHandler() : LLCommandHandler("login_refresh", false) { } bool handle(const LLSD& tokens, const LLSD& queryMap) { #if LL_LIBXUL_ENABLED @@ -401,16 +402,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, combo->setCommitCallback( &LLPanelGeneral::set_start_location ); } - - childSetAction("new_account_btn", onClickNewAccount, this); - childSetVisible("new_account_btn", !gHideLinks); childSetAction("connect_btn", onClickConnect, this); setDefaultBtn("connect_btn"); - childSetAction("preferences_btn", LLFloaterPreference::show, this); - childSetAction("quit_btn", onClickQuit, this); LLTextBox* version_text = LLUICtrlFactory::getTextBoxByName(this, "version_text"); @@ -446,6 +442,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "login_html"); if ( web_browser ) { + // Need to handle login secondlife:///app/ URLs + web_browser->setOpenAppSLURLs( true ); + // observe browser events web_browser->addObserver( this ); @@ -504,6 +503,17 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) else // the site is not available (missing page, server down, other badness) { +#if !USE_VIEWER_AUTH + if ( web_browser ) + { + // hide browser control (revealing default one) + web_browser->setVisible( FALSE ); + + // mark as unavailable + mHtmlAvailable = FALSE; + } +#else + if ( web_browser ) { web_browser->navigateToLocalPage( "loading-error" , "index.html" ); @@ -511,7 +521,9 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) // mark as available mHtmlAvailable = TRUE; } +#endif } + #else mHtmlAvailable = FALSE; #endif diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index ed883dfb51..3deb6fee51 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -51,7 +51,8 @@ class LLComboBox; class LLLoginHandler : public LLCommandHandler { public: - LLLoginHandler() : LLCommandHandler("login") { } + // allow from external browsers + LLLoginHandler() : LLCommandHandler("login", true) { } bool handle(const LLSD& tokens, const LLSD& queryMap); bool parseDirectLogin(std::string url); void parse(const LLSD& queryMap); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8570055f87..20e4eee396 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -888,7 +888,9 @@ BOOL idle_startup() //For HTML parsing in text boxes. LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") ); - LLTextEditor::setURLCallbacks ( &LLWeb::loadURL, &LLURLDispatcher::dispatch, &LLURLDispatcher::dispatch ); + LLTextEditor::setURLCallbacks ( &LLWeb::loadURL, + &LLURLDispatcher::dispatchFromTextEditor, + &LLURLDispatcher::dispatchFromTextEditor ); //------------------------------------------------- // Handle startup progress screen @@ -1825,8 +1827,8 @@ BOOL idle_startup() } else { - //llinfos << "######### QuickTime version (hex) is " << std::hex << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; - //llinfos << "######### QuickTime version is " << std::dec << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + llinfos << "QUICKTIME> QuickTime version (hex) is " << std::hex << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + llinfos << "QUICKTIME> QuickTime version is " << std::dec << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; if ( LLMediaEngine::getInstance()->getQuickTimeVersion() < LL_MIN_QUICKTIME_VERSION ) { // turn off QuickTime if version is less than required @@ -1842,6 +1844,8 @@ BOOL idle_startup() }; }; #elif LL_DARWIN + llinfos << "QUICKTIME> QuickTime version (hex) is " << std::hex << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; + llinfos << "QUICKTIME> QuickTime version is " << std::dec << LLMediaEngine::getInstance()->getQuickTimeVersion() << llendl; if ( LLMediaEngine::getInstance()->getQuickTimeVersion() < LL_MIN_QUICKTIME_VERSION ) { // turn off QuickTime if version is less than required @@ -3791,7 +3795,8 @@ bool LLStartUp::dispatchURL() // ok, if we've gotten this far and have a startup URL if (!sSLURLCommand.empty()) { - LLURLDispatcher::dispatch(sSLURLCommand); + const bool from_external_browser = true; + LLURLDispatcher::dispatch(sSLURLCommand, from_external_browser); } else if (LLURLSimString::parse()) { @@ -3807,7 +3812,8 @@ bool LLStartUp::dispatchURL() || (dy*dy > SLOP*SLOP) ) { std::string url = LLURLSimString::getURL(); - LLURLDispatcher::dispatch(url); + const bool from_external_browser = true; + LLURLDispatcher::dispatch(url, from_external_browser); } return true; } 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/<agent_id>/about and similar + static bool dispatchApp(const std::string& url, bool from_external_browser, BOOL right_mouse); + // Handles secondlife:///app/agent/<agent_id>/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) @@ -349,6 +358,14 @@ bool LLURLDispatcher::dispatchRightClick(const std::string& 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) { std::string slurl = SLURL_SLURL_PREFIX + regionname + llformat("/%d/%d/%d",x,y,z); diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h index bcd19ee691..a8629626b1 100644 --- a/indra/newview/llurldispatcher.h +++ b/indra/newview/llurldispatcher.h @@ -40,18 +40,21 @@ public: static bool isSLURLCommand(const std::string& url); // Is this a special secondlife://app/ URL? - static bool dispatch(const std::string& url); + static bool dispatch(const std::string& url, bool from_external_browser); // At startup time and on clicks in internal web browsers, // teleport, open map, or run requested command. // Handles: // secondlife://RegionName/123/45/67/ - // secondlife://app/agent/3d6181b0-6a4b-97ef-18d8-722652995cf1/show + // secondlife:///app/agent/3d6181b0-6a4b-97ef-18d8-722652995cf1/show // sl://app/foo/bar // Returns true if someone handled the URL. + static bool dispatchRightClick(const std::string& url); - // builds: http://slurl.com/secondlife/RegionName/x/y/z/ + static bool dispatchFromTextEditor(const std::string& url); + static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z); + // builds: http://slurl.com/secondlife/RegionName/x/y/z/ }; #endif diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index d4075b9c47..b71d9d954b 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -29,11 +29,11 @@ * $/LicenseInfo$ */ -#include <iomanip> // for setprecision #include "llviewerprecompiledheaders.h" - #include "llviewercamera.h" +#include <iomanip> // for setprecision + #include "llquaternion.h" #include "llagent.h" diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1825c03255..f732b0fda0 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5372,13 +5372,17 @@ class LLShowFloater : public view_listener_t else if (floater_name == "help in-world") { #if LL_LIBXUL_ENABLED - LLFloaterHtml::getInstance()->show( "in-world_help" ); + const bool open_app_slurls = true; + LLFloaterHtml::getInstance()->show( + "in-world_help", open_app_slurls ); #endif } else if (floater_name == "help additional") { #if LL_LIBXUL_ENABLED - LLFloaterHtml::getInstance()->show( "additional_help" ); + const bool open_app_slurls = true; + LLFloaterHtml::getInstance()->show( + "additional_help", open_app_slurls ); #endif } else if (floater_name == "complaint reporter") @@ -7169,7 +7173,8 @@ void handle_load_from_xml(void*) void handle_slurl_test(void*) { - LLFloaterHtml::getInstance()->show("http://secondlife.com/app/search/slurls.html", "SLURL Test"); + LLFloaterHtml::getInstance()->show( + "http://secondlife.com/app/search/slurls.html", "SLURL Test", true); } void handle_rebake_textures(void*) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6dab10b339..49d4d72647 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -266,7 +266,7 @@ const S32 PICK_DIAMETER = 2 * PICK_HALF_WIDTH+1; const F32 MIN_DISPLAY_SCALE = 0.85f; -const S32 CONSOLE_BOTTOM_PAD = 20; +const S32 CONSOLE_BOTTOM_PAD = 40; #ifdef SABINRIG /// ALL RIG STUFF @@ -1417,7 +1417,8 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data) case SLURL_MESSAGE_TYPE: // received URL std::string url = (const char*)data; - if (LLURLDispatcher::dispatch(url)) + const bool from_external_browser = true; + if (LLURLDispatcher::dispatch(url, from_external_browser)) { // bring window to foreground, as it has just been "launched" from a URL mWindow->bringToFront(); @@ -3019,9 +3020,19 @@ BOOL LLViewerWindow::handlePerFrameHover() gFloaterView->setRect(floater_rect); } - if (gOverlayBar->getVisible()) + // snap floaters to top of chat bar/button strip + LLView* chatbar_and_buttons = gOverlayBar->getChildByName("chatbar_and_buttons", TRUE); + if (chatbar_and_buttons) { - gFloaterView->setSnapOffsetBottom(gHUDView->getRect().mBottom); + // convert top/left corner of chatbar/buttons container to gFloaterView-relative coordinates + S32 top, left; + chatbar_and_buttons->localPointToOtherView( + chatbar_and_buttons->getLocalBoundingRect().mLeft, + chatbar_and_buttons->getLocalBoundingRect().mTop, + &left, + &top, + gFloaterView); + gFloaterView->setSnapOffsetBottom(top); } else { diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 2b151a5902..48b8ea8c60 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -29,11 +29,11 @@ * $/LicenseInfo$ */ -#include <boost/tokenizer.hpp> - #include "llviewerprecompiledheaders.h" #include "llvoiceclient.h" +#include <boost/tokenizer.hpp> + #include "llsdutil.h" #include "llvoavatar.h" |