summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llversionviewer.h2
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.cpp8
-rw-r--r--indra/llmessage/llmessagethrottle.cpp31
-rw-r--r--indra/llmessage/llmessagethrottle.h4
-rw-r--r--indra/llui/llfloater.cpp3
-rw-r--r--indra/llui/llscrolllistctrl.cpp51
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/llappviewermacosx.cpp3
-rw-r--r--indra/newview/llcommandhandler.cpp45
-rw-r--r--indra/newview/llcommandhandler.h12
-rw-r--r--indra/newview/llfloaterevent.cpp3
-rw-r--r--indra/newview/llfloaterparcel.cpp3
-rw-r--r--indra/newview/llfloaterpreference.cpp3
-rw-r--r--indra/newview/llfloaterurldisplay.cpp12
-rw-r--r--indra/newview/llfloaterworldmap.cpp13
-rw-r--r--indra/newview/lloverlaybar.cpp23
-rw-r--r--indra/newview/lloverlaybar.h1
-rw-r--r--indra/newview/llpanelclassified.cpp8
-rw-r--r--indra/newview/llpanellogin.cpp24
-rw-r--r--indra/newview/llpanellogin.h3
-rw-r--r--indra/newview/llstartup.cpp16
-rw-r--r--indra/newview/llurldispatcher.cpp49
-rw-r--r--indra/newview/llurldispatcher.h9
-rw-r--r--indra/newview/llviewercamera.cpp4
-rw-r--r--indra/newview/llviewermenu.cpp11
-rw-r--r--indra/newview/llviewerwindow.cpp19
-rw-r--r--indra/newview/llvoiceclient.cpp4
28 files changed, 246 insertions, 124 deletions
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 04309b04fa..415f17f068 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -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";
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index df939a9c99..a20247866c 100755
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -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;
}
diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp
index c45feb22fc..912980d738 100644
--- a/indra/llmessage/llmessagethrottle.cpp
+++ b/indra/llmessage/llmessagethrottle.cpp
@@ -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.
diff --git a/indra/llmessage/llmessagethrottle.h b/indra/llmessage/llmessagethrottle.h
index b43b5a02ca..a3267e7d9d 100644
--- a/indra/llmessage/llmessagethrottle.h
+++ b/indra/llmessage/llmessagethrottle.h
@@ -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;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 76877c2dc4..0754d0eda9 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -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());
}
}
}
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index d6be3d045f..c29789e083 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -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())
+ selectItemAt(x, y, mask);
+ gFocusMgr.setMouseCapture(this);
+ mNeedsScroll = 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++)
{
- LLScrollListCell* cellp = item->getColumn(column_index);
- cellp->setValue(item_value);
- cellp->onCommit();
+ 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();
}
- //FIXME: find a better way to signal cell changes
- onCommit();
- return TRUE;
+ // 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;
}
}
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"