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)master
parent
b302f15dee
commit
485c7ee0e2
|
|
@ -35,7 +35,7 @@
|
|||
const S32 LL_VERSION_MAJOR = 1;
|
||||
const S32 LL_VERSION_MINOR = 19;
|
||||
const S32 LL_VERSION_PATCH = 0;
|
||||
const S32 LL_VERSION_BUILD = 78408;
|
||||
const S32 LL_VERSION_BUILD = 0;
|
||||
|
||||
const char * const LL_CHANNEL = "Second Life Release";
|
||||
|
||||
|
|
|
|||
|
|
@ -316,5 +316,13 @@ bool LLCrashLogger::init()
|
|||
gServicePump = new LLPumpIO(gAPRPoolp);
|
||||
gServicePump->prime(gAPRPoolp);
|
||||
LLHTTPClient::setPump(*gServicePump);
|
||||
|
||||
//If we've opened the crash logger, assume we can delete the marker file if it exists
|
||||
if( gDirUtilp )
|
||||
{
|
||||
LLString marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
|
||||
ll_apr_file_remove( marker_file );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,18 @@
|
|||
#include "llframetimer.h"
|
||||
|
||||
// This is used for the stl search_n function.
|
||||
#if _MSC_VER >= 1500 // VC9 has a bug in search_n
|
||||
struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool >
|
||||
{
|
||||
bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const
|
||||
{
|
||||
return a.getHash() == b.getHash();
|
||||
}
|
||||
};
|
||||
#else
|
||||
bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b)
|
||||
{ return a.getHash() == b.getHash(); }
|
||||
{ return a.getHash() == b.getHash(); }
|
||||
#endif
|
||||
|
||||
const U64 SEC_TO_USEC = 1000000;
|
||||
|
||||
|
|
@ -113,9 +123,14 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const char* mesg)
|
|||
LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
|
||||
|
||||
// Check if this message is already in the list.
|
||||
message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
|
||||
1, entry, eq_message_throttle_entry);
|
||||
|
||||
#if _MSC_VER >= 1500 // VC9 has a bug in search_n
|
||||
// SJB: This *should* work but has not been tested yet *TODO: Test!
|
||||
message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
|
||||
std::bind2nd(eq_message_throttle_entry(), entry));
|
||||
#else
|
||||
message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
|
||||
1, entry, eq_message_throttle_entry);
|
||||
#endif
|
||||
if (found == message_list->end())
|
||||
{
|
||||
// This message was not found. Add it to the list.
|
||||
|
|
@ -142,9 +157,15 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c
|
|||
LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
|
||||
|
||||
// Check if this message is already in the list.
|
||||
#if _MSC_VER >= 1500 // VC9 has a bug in search_n
|
||||
// SJB: This *should* work but has not been tested yet *TODO: Test!
|
||||
message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
|
||||
std::bind2nd(eq_message_throttle_entry(), entry));
|
||||
#else
|
||||
message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
|
||||
1, entry, eq_message_throttle_entry);
|
||||
|
||||
#endif
|
||||
|
||||
if (found == message_list->end())
|
||||
{
|
||||
// This message was not found. Add it to the list.
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public:
|
|||
LLMessageThrottleEntry(const size_t hash, const U64 entry_time)
|
||||
: mHash(hash), mEntryTime(entry_time) {}
|
||||
|
||||
size_t getHash() { return mHash; }
|
||||
U64 getEntryTime() { return mEntryTime; }
|
||||
size_t getHash() const { return mHash; }
|
||||
U64 getEntryTime() const { return mEntryTime; }
|
||||
protected:
|
||||
size_t mHash;
|
||||
U64 mEntryTime;
|
||||
|
|
|
|||
|
|
@ -2252,7 +2252,8 @@ void LLFloaterView::refresh()
|
|||
LLFloater* floaterp = (LLFloater*)*child_it;
|
||||
if( floaterp->getVisible() )
|
||||
{
|
||||
adjustToFitScreen(floaterp, TRUE);
|
||||
// minimized floaters are kept fully onscreen
|
||||
adjustToFitScreen(floaterp, !floaterp->isMinimized());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1669,7 +1669,7 @@ void LLScrollListCtrl::drawItems()
|
|||
{
|
||||
// Draw background of selected item
|
||||
bg_color = mBgSelectedColor;
|
||||
fg_color = mFgSelectedColor;
|
||||
fg_color = (item->getEnabled() ? mFgSelectedColor : mFgDisabledColor);
|
||||
}
|
||||
else if (mHighlightedItem == line && mCanSelect)
|
||||
{
|
||||
|
|
@ -1979,33 +1979,38 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
|
|||
LLScrollListCell* hit_cell = hit_item->getColumn(column_index);
|
||||
if (!hit_cell) return FALSE;
|
||||
|
||||
// select item (thus deselecting any currently selected item)
|
||||
// only if item is not already selected
|
||||
if (!hit_item->getSelected())
|
||||
{
|
||||
selectItemAt(x, y, mask);
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
mNeedsScroll = TRUE;
|
||||
}
|
||||
|
||||
// if cell handled click directly (i.e. clicked on an embedded checkbox)
|
||||
if (hit_cell->handleClick())
|
||||
{
|
||||
// propagate value of this cell to other selected items
|
||||
// and commit the respective widgets
|
||||
LLSD item_value = hit_cell->getValue();
|
||||
for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++)
|
||||
// if item not currently selected, select it
|
||||
if (!hit_item->getSelected())
|
||||
{
|
||||
LLScrollListItem* item = *iter;
|
||||
if (item->getSelected())
|
||||
{
|
||||
LLScrollListCell* cellp = item->getColumn(column_index);
|
||||
cellp->setValue(item_value);
|
||||
cellp->onCommit();
|
||||
}
|
||||
selectItemAt(x, y, mask);
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
mNeedsScroll = TRUE;
|
||||
}
|
||||
//FIXME: find a better way to signal cell changes
|
||||
onCommit();
|
||||
return TRUE;
|
||||
// otherwise we already have this item selected
|
||||
// so propagate state of cell to rest of selected column
|
||||
else
|
||||
{
|
||||
// propagate value of this cell to other selected items
|
||||
// and commit the respective widgets
|
||||
LLSD item_value = hit_cell->getValue();
|
||||
for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++)
|
||||
{
|
||||
LLScrollListItem* item = *iter;
|
||||
if (item->getSelected())
|
||||
{
|
||||
LLScrollListCell* cellp = item->getColumn(column_index);
|
||||
cellp->setValue(item_value);
|
||||
cellp->onCommit();
|
||||
}
|
||||
}
|
||||
//FIXME: find a better way to signal cell changes
|
||||
onCommit();
|
||||
}
|
||||
// eat click (e.g. do not trigger double click callback)
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2013,7 +2018,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
|
|||
selectItemAt(x, y, mask);
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
mNeedsScroll = TRUE;
|
||||
// do not stop click processing (click callback, etc)
|
||||
// do not eat click (allow double click callback)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.";
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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*)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue