summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml37
-rw-r--r--indra/newview/app_settings/settings_per_account.xml11
-rwxr-xr-xindra/newview/llavataractions.cpp15
-rw-r--r--indra/newview/llfloaterproperties.cpp20
-rw-r--r--indra/newview/llfloatersearch.cpp67
-rw-r--r--indra/newview/llfloatersearch.h28
-rw-r--r--indra/newview/llfloaterwebcontent.cpp204
-rw-r--r--indra/newview/llfloaterwebcontent.h31
-rw-r--r--indra/newview/llfolderview.cpp14
-rw-r--r--indra/newview/llfolderviewitem.cpp6
-rw-r--r--indra/newview/llfolderviewitem.h4
-rw-r--r--indra/newview/llinventorybridge.cpp10
-rw-r--r--indra/newview/llinventorymodel.cpp88
-rw-r--r--indra/newview/llinventorymodel.h3
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp6
-rw-r--r--indra/newview/llinventorypanel.cpp12
-rw-r--r--indra/newview/llinventorypanel.h3
-rw-r--r--indra/newview/llmediactrl.cpp9
-rw-r--r--indra/newview/llmediactrl.h6
-rw-r--r--indra/newview/llnavigationbar.cpp2
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp15
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp43
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.h17
-rw-r--r--indra/newview/llpreview.cpp19
-rw-r--r--indra/newview/llprogressview.cpp89
-rw-r--r--indra/newview/llprogressview.h5
-rw-r--r--indra/newview/llsidepanelinventory.cpp12
-rw-r--r--indra/newview/llstartup.cpp8
-rw-r--r--indra/newview/llvieweraudio.cpp16
-rw-r--r--indra/newview/llviewerfloaterreg.cpp16
-rw-r--r--indra/newview/llviewermedia.cpp24
-rw-r--r--indra/newview/llviewermedia.h2
-rw-r--r--indra/newview/llviewerwindow.cpp8
-rw-r--r--indra/newview/llviewerwindow.h1
-rw-r--r--indra/newview/llweb.cpp31
-rw-r--r--indra/newview/llworldmapview.cpp4
-rw-r--r--indra/newview/skins/default/colors.xml2
-rw-r--r--indra/newview/skins/default/textures/widgets/Badge_Background_New.pngbin0 -> 1369 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml86
-rw-r--r--indra/newview/skins/default/xui/en/floater_web_content.xml5
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/en/widgets/badge.xml3
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml11
43 files changed, 642 insertions, 361 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 34b4fc66e5..01842d1037 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16,8 +16,10 @@
<key>AFKTimeout</key>
<map>
<key>Comment</key>
- <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never).
- Valid values are: 0, 120, 300, 600, 1800</string>
+ <string>
+ Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never).
+ Valid values are: 0, 120, 300, 600, 1800
+</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -4455,17 +4457,6 @@
<key>Value</key>
<real>2.0</real>
</map>
- <key>LastInventoryInboxExpand</key>
- <map>
- <key>Comment</key>
- <string>The last time the received items inbox was expanded.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string />
- </map>
<key>LCDDestination</key>
<map>
<key>Comment</key>
@@ -6076,10 +6067,12 @@
<key>ToastButtonWidth</key>
<map>
<key>Comment</key>
- <string>Default width of buttons in the toast.
+ <string>
+ Default width of buttons in the toast.
Notes:
If required width will be less then this one, a button will be reshaped to default size , otherwise to required
- Change of this parameter will affect the layout of buttons in notification toast.</string>
+ Change of this parameter will affect the layout of buttons in notification toast.
+</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -6621,7 +6614,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <string>0</string>
+ <integer>0</integer>
</map>
<key>PrecachingDelay</key>
<map>
@@ -7371,8 +7364,10 @@
<key>RenderPerformanceTest</key>
<map>
<key>Comment</key>
- <string>Disable rendering of everything but in-world content for
- performance testing</string>
+ <string>
+ Disable rendering of everything but in-world content for
+ performance testing
+</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -13470,9 +13465,9 @@
<integer>650</integer>
<integer>490</integer>
<integer>0</integer>
- </array>
- </map>
- <key>HelpFloaterOpen</key>
+ </array>
+ </map>
+ <key>HelpFloaterOpen</key>
<map>
<key>Comment</key>
<string>Show Help Floater on login?</string>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index ff24efaf2c..1142f01232 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -33,6 +33,17 @@
<key>Value</key>
<string />
</map>
+ <key>LastInventoryInboxExpand</key>
+ <map>
+ <key>Comment</key>
+ <string>The last time the received items inbox was expanded.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>LastLogoff</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 8344b08bfb..f22b02093f 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -316,7 +316,12 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
// PROFILES: open in webkit window
const bool show_chrome = false;
static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
- LLFloaterWebContent::create(url, "", agent_id.asString(), show_chrome, profile_rect);
+ LLFloaterWebContent::create(LLFloaterWebContent::Params().
+ url(url).
+ id(agent_id.asString()).
+ show_chrome(show_chrome).
+ window_class("profile").
+ preferred_media_size(profile_rect));
}
// static
@@ -331,7 +336,9 @@ void LLAvatarActions::showProfile(const LLUUID& id)
//static
bool LLAvatarActions::profileVisible(const LLUUID& id)
{
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", id.asString()));
+ LLSD sd;
+ sd["id"] = id;
+ LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
return browser && browser->isShown();
}
@@ -339,7 +346,9 @@ bool LLAvatarActions::profileVisible(const LLUUID& id)
//static
void LLAvatarActions::hideProfile(const LLUUID& id)
{
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", id.asString()));
+ LLSD sd;
+ sd["id"] = id;
+ LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
if (browser)
{
browser->closeFloater();
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index dd12fa64d3..3f00ba39c7 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -887,18 +887,14 @@ void LLFloaterProperties::dirtyAll()
LLMultiProperties::LLMultiProperties()
: LLMultiFloater(LLSD())
{
- // *TODO: There should be a .xml file for this
- const LLRect& nextrect = LLFloaterReg::getFloaterRect("properties"); // place where the next properties should show up
- if (nextrect.getWidth() > 0)
- {
- setRect(nextrect);
- }
- else
- {
- // start with a small rect in the top-left corner ; will get resized
- LLRect rect;
- rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 20, 20);
- setRect(rect);
+ // start with a small rect in the top-left corner ; will get resized
+ LLRect rect;
+ rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 20, 20);
+ setRect(rect);
+ LLFloater* last_floater = LLFloaterReg::getLastFloaterInGroup("properties");
+ if (last_floater)
+ {
+ stackWith(*last_floater);
}
setTitle(LLTrans::getString("MultiPropertiesTitle"));
buildTabContainer();
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index d5806e375c..2a946b1edf 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -70,21 +70,24 @@ public:
}
// create the LLSD arguments for the search floater
- LLSD args;
- args["category"] = category;
- args["id"] = LLURI::unescape(search_text);
+ LLFloaterSearch::Params p;
+ p.search.category = category;
+ p.search.query = LLURI::unescape(search_text);
// open the search floater and perform the requested search
- LLFloaterReg::showInstance("search", args);
+ LLFloaterReg::showInstance("search", p);
return true;
}
};
LLSearchHandler gSearchHandler;
-LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
- LLFloater(key),
- LLViewerMediaObserver(),
- mBrowser(NULL),
+LLFloaterSearch::SearchQuery::SearchQuery()
+: category("category", ""),
+ query("query")
+{}
+
+LLFloaterSearch::LLFloaterSearch(const Params& key) :
+ LLFloaterWebContent(key),
mSearchGodLevel(0)
{
// declare a map that transforms a category name into
@@ -102,53 +105,45 @@ LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
BOOL LLFloaterSearch::postBuild()
{
- mBrowser = getChild<LLMediaCtrl>("browser");
- mBrowser->addObserver(this);
+ LLFloaterWebContent::postBuild();
+ mWebBrowser->addObserver(this);
return TRUE;
}
void LLFloaterSearch::onOpen(const LLSD& key)
{
- search(key);
+ Params p(key);
+ p.trusted_content = true;
+ p.allow_address_entry = false;
+
+ LLFloaterWebContent::onOpen(p);
+ search(p.search);
}
void LLFloaterSearch::onClose(bool app_quitting)
{
+ LLFloaterWebContent::onClose(app_quitting);
// tear down the web view so we don't show the previous search
// result when the floater is opened next time
destroy();
}
-void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event)
-{
- switch (event)
- {
- case MEDIA_EVENT_NAVIGATE_BEGIN:
- getChild<LLUICtrl>("status_text")->setValue(getString("loading_text"));
- break;
-
- case MEDIA_EVENT_NAVIGATE_COMPLETE:
- getChild<LLUICtrl>("status_text")->setValue(getString("done_text"));
- break;
-
- default:
- break;
- }
-}
-
void LLFloaterSearch::godLevelChanged(U8 godlevel)
{
// search results can change based upon god level - if the user
// changes god level, then give them a warning (we don't refresh
// the search as this might undo any page navigation or
// AJAX-driven changes since the last search).
- getChildView("refresh_search")->setVisible( (godlevel != mSearchGodLevel));
+
+ //FIXME: set status bar text
+
+ //getChildView("refresh_search")->setVisible( (godlevel != mSearchGodLevel));
}
-void LLFloaterSearch::search(const LLSD &key)
+void LLFloaterSearch::search(const SearchQuery &p)
{
- if (! mBrowser)
+ if (! mWebBrowser || !p.validateBlock())
{
return;
}
@@ -159,10 +154,9 @@ void LLFloaterSearch::search(const LLSD &key)
// work out the subdir to use based on the requested category
LLSD subs;
- std::string category = key.has("category") ? key["category"].asString() : "";
- if (mCategoryPaths.has(category))
+ if (mCategoryPaths.has(p.category))
{
- subs["CATEGORY"] = mCategoryPaths[category].asString();
+ subs["CATEGORY"] = mCategoryPaths[p.category].asString();
}
else
{
@@ -170,8 +164,7 @@ void LLFloaterSearch::search(const LLSD &key)
}
// add the search query string
- std::string search_text = key.has("id") ? key["id"].asString() : "";
- subs["QUERY"] = LLURI::escape(search_text);
+ subs["QUERY"] = LLURI::escape(p.query);
// add the permissions token that login.cgi gave us
// We use "search_token", and fallback to "auth_token" if not present.
@@ -207,5 +200,5 @@ void LLFloaterSearch::search(const LLSD &key)
url = LLWeb::expandURLSubstitutions(url, subs);
// and load the URL in the web view
- mBrowser->navigateTo(url, "text/html");
+ mWebBrowser->navigateTo(url, "text/html");
}
diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h
index ba4dc4c0fa..35b268e1b2 100644
--- a/indra/newview/llfloatersearch.h
+++ b/indra/newview/llfloatersearch.h
@@ -28,7 +28,7 @@
#ifndef LL_LLFLOATERSEARCH_H
#define LL_LLFLOATERSEARCH_H
-#include "llfloater.h"
+#include "llfloaterwebcontent.h"
#include "llviewermediaobserver.h"
#include <string>
@@ -43,11 +43,25 @@ class LLMediaCtrl;
/// so that the user can click on teleport links in search results.
///
class LLFloaterSearch :
- public LLFloater,
- public LLViewerMediaObserver
+ public LLFloaterWebContent
{
public:
- LLFloaterSearch(const LLSD& key);
+ struct SearchQuery : public LLInitParam::Block<SearchQuery>
+ {
+ Optional<std::string> category;
+ Optional<std::string> query;
+
+ SearchQuery();
+ };
+
+ struct _Params : public LLInitParam::Block<_Params, LLFloaterWebContent::Params>
+ {
+ Optional<SearchQuery> search;
+ };
+
+ typedef LLSDParamAdapter<_Params> Params;
+
+ LLFloaterSearch(const Params& key);
/// show the search floater with a new search
/// see search() for details on the key parameter.
@@ -60,7 +74,7 @@ public:
/// - "id": specifies the text phrase to search for
/// - "category": one of "all" (default), "people", "places",
/// "events", "groups", "wiki", "destinations", "classifieds"
- void search(const LLSD &key);
+ void search(const SearchQuery &query);
/// changing godmode can affect the search results that are
/// returned by the search website - use this method to tell the
@@ -70,10 +84,6 @@ public:
private:
/*virtual*/ BOOL postBuild();
- // inherited from LLViewerMediaObserver
- /*virtual*/ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event);
-
- LLMediaCtrl *mBrowser;
LLSD mCategoryPaths;
U8 mSearchGodLevel;
};
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 43eecbf048..03e90a3d27 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -40,8 +40,21 @@
#include "llfloaterwebcontent.h"
-LLFloaterWebContent::LLFloaterWebContent( const LLSD& key )
- : LLFloater( key )
+LLFloaterWebContent::_Params::_Params()
+: url("url"),
+ target("target"),
+ id("id"),
+ window_class("window_class", "web_content"),
+ show_chrome("show_chrome", true),
+ allow_address_entry("allow_address_entry", true),
+ preferred_media_size("preferred_media_size"),
+ trusted_content("trusted_content", false)
+{}
+
+LLFloaterWebContent::LLFloaterWebContent( const Params& params )
+: LLFloater( params ),
+ LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
+ mUUID(params.id())
{
mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this ));
@@ -54,9 +67,9 @@ LLFloaterWebContent::LLFloaterWebContent( const LLSD& key )
BOOL LLFloaterWebContent::postBuild()
{
// these are used in a bunch of places so cache them
- mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" );
- mAddressCombo = getChild< LLComboBox >( "address" );
- mStatusBarText = getChild< LLTextBox >( "statusbartext" );
+ mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" );
+ mAddressCombo = getChild< LLComboBox >( "address" );
+ mStatusBarText = getChild< LLTextBox >( "statusbartext" );
mStatusBarProgress = getChild<LLProgressBar>("statusbarprogress" );
// observe browser events
@@ -75,6 +88,20 @@ BOOL LLFloaterWebContent::postBuild()
return TRUE;
}
+bool LLFloaterWebContent::matchesKey(const LLSD& key)
+{
+ LLUUID id = key["id"];
+ if (id.notNull())
+ {
+ return id == mKey["id"].asUUID();
+ }
+ else
+ {
+ return key["target"].asString() == mKey["target"].asString();
+ }
+}
+
+
void LLFloaterWebContent::initializeURLHistory()
{
// start with an empty list
@@ -86,10 +113,8 @@ void LLFloaterWebContent::initializeURLHistory()
// Get all of the entries in the "browser" collection
LLSD browser_history = LLURLHistory::getURLHistory("browser");
- LLSD::array_iterator iter_history =
- browser_history.beginArray();
- LLSD::array_iterator end_history =
- browser_history.endArray();
+ LLSD::array_iterator iter_history = browser_history.beginArray();
+ LLSD::array_iterator end_history = browser_history.endArray();
for(; iter_history != end_history; ++iter_history)
{
std::string url = (*iter_history).asString();
@@ -99,30 +124,25 @@ void LLFloaterWebContent::initializeURLHistory()
}
//static
-void LLFloaterWebContent::create( const std::string &url, const std::string& target, const std::string& uuid, bool show_chrome, const LLRect& preferred_media_size)
+LLFloater* LLFloaterWebContent::create( Params p)
{
- lldebugs << "url = " << url << ", target = " << target << ", uuid = " << uuid << llendl;
+ lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl;
- std::string tag = target;
+ if (!p.id.isProvided())
+ {
+ p.id = LLUUID::generateNewID().asString();
+ }
- if(target.empty() || target == "_blank")
+ if(p.target().empty() || p.target() == "_blank")
{
- if(!uuid.empty())
- {
- tag = uuid;
- }
- else
- {
- // create a unique tag for this instance
- LLUUID id;
- id.generate();
- tag = id.asString();
- }
+ p.target = p.id();
}
S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
- if(LLFloaterReg::findInstance("web_content", tag) != NULL)
+ LLSD sd;
+ sd["target"] = p.target;
+ if(LLFloaterReg::findInstance(p.window_class, sd) != NULL)
{
// There's already a web browser for this tag, so we won't be opening a new window.
}
@@ -131,12 +151,12 @@ void LLFloaterWebContent::create( const std::string &url, const std::string& tar
// showInstance will open a new window. Figure out how many web browsers are already open,
// and close the least recently opened one if this will put us over the limit.
- LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList("web_content");
+ LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList(p.window_class);
lldebugs << "total instance count is " << instances.size() << llendl;
for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
{
- lldebugs << " " << (*iter)->getKey() << llendl;
+ lldebugs << " " << (*iter)->getKey()["target"] << llendl;
}
if(instances.size() >= (size_t)browser_window_limit)
@@ -146,63 +166,26 @@ void LLFloaterWebContent::create( const std::string &url, const std::string& tar
}
}
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::showInstance("web_content", tag));
- llassert(browser);
- if(browser)
- {
- browser->mUUID = uuid;
-
- // tell the browser instance to load the specified URL
- browser->open_media(url, target);
- LLViewerMedia::proxyWindowOpened(target, uuid);
-
- browser->getChild<LLLayoutPanel>("status_bar")->setVisible(show_chrome);
- browser->getChild<LLLayoutPanel>("nav_controls")->setVisible(show_chrome);
-
- if (!show_chrome)
- {
- browser->setResizeLimits(100, 100);
- }
-
- if (!preferred_media_size.isEmpty())
- {
- //ignore x, y for now
- browser->geometryChanged(browser->getRect().mLeft, browser->getRect().mBottom, preferred_media_size.getWidth(), preferred_media_size.getHeight());
- }
- }
+ return LLFloaterReg::showInstance(p.window_class, p);
}
//static
void LLFloaterWebContent::closeRequest(const std::string &uuid)
{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("web_content");
- lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ LLFloaterWebContent* floaterp = getInstance(uuid);
+ if (floaterp)
{
- LLFloaterWebContent* i = dynamic_cast<LLFloaterWebContent*>(*iter);
- lldebugs << " " << i->mUUID << llendl;
- if (i && i->mUUID == uuid)
- {
- i->closeFloater(false);
- return;
- }
- }
+ floaterp->closeFloater(false);
+ }
}
//static
void LLFloaterWebContent::geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height)
{
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("web_content");
- lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ LLFloaterWebContent* floaterp = getInstance(uuid);
+ if (floaterp)
{
- LLFloaterWebContent* i = dynamic_cast<LLFloaterWebContent*>(*iter);
- lldebugs << " " << i->mUUID << llendl;
- if (i && i->mUUID == uuid)
- {
- i->geometryChanged(x, y, width, height);
- return;
- }
+ floaterp->geometryChanged(x, y, width, height);
}
}
@@ -216,24 +199,77 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
getWindow()->getSize(&window_size);
// Adjust width and height for the size of the chrome on the web Browser window.
- width += getRect().getWidth() - mWebBrowser->getRect().getWidth();
- height += getRect().getHeight() - mWebBrowser->getRect().getHeight();
+ LLRect browser_rect;
+ mWebBrowser->localRectToOtherView(mWebBrowser->getLocalRect(), &browser_rect, this);
+ S32 requested_browser_bottom = window_size.mY - (y + height);
LLRect geom;
- geom.setOriginAndSize(x, window_size.mY - (y + height), width, height);
+ geom.setOriginAndSize(x - browser_rect.mLeft,
+ requested_browser_bottom - browser_rect.mBottom,
+ width + getRect().getWidth() - browser_rect.getWidth(),
+ height + getRect().getHeight() - browser_rect.getHeight());
lldebugs << "geometry change: " << geom << llendl;
-
- setShape(geom);
+
+ LLRect new_rect;
+ getParent()->screenRectToLocal(geom, &new_rect);
+ setShape(new_rect);
}
-void LLFloaterWebContent::open_media(const std::string& web_url, const std::string& target)
+void LLFloaterWebContent::open_media(const Params& p)
{
// Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
- mWebBrowser->setHomePageUrl(web_url, "text/html");
- mWebBrowser->setTarget(target);
- mWebBrowser->navigateTo(web_url, "text/html");
- set_current_url(web_url);
+ LLViewerMedia::proxyWindowOpened(p.target(), p.id());
+ mWebBrowser->setHomePageUrl(p.url, "text/html");
+ mWebBrowser->setTarget(p.target);
+ mWebBrowser->navigateTo(p.url, "text/html");
+
+ set_current_url(p.url);
+
+ getChild<LLLayoutPanel>("status_bar")->setVisible(p.show_chrome);
+ getChild<LLLayoutPanel>("nav_controls")->setVisible(p.show_chrome);
+ bool address_entry_enabled = p.allow_address_entry && !p.trusted_content;
+ // disable components of combo box so that we can still select and copy text from address bar (a disabled line editor still allows this, but not if its parent is disabled)
+ getChildView("address")->getChildView("Combo Text Entry")->setEnabled(address_entry_enabled);
+ getChildView("address")->getChildView("Combobox Button")->setEnabled(address_entry_enabled);
+ getChildView("address")->getChildView("ComboBox")->setEnabled(address_entry_enabled);
+
+ if (!address_entry_enabled)
+ {
+ mWebBrowser->setFocus(TRUE);
+ }
+
+ if (!p.show_chrome)
+ {
+ setResizeLimits(100, 100);
+ }
+
+ if (!p.preferred_media_size().isEmpty())
+ {
+ LLLayoutStack::updateClass();
+ LLRect browser_rect = mWebBrowser->calcScreenRect();
+ LLCoordWindow window_size;
+ getWindow()->getSize(&window_size);
+
+ geometryChanged(browser_rect.mLeft, window_size.mY - browser_rect.mTop, p.preferred_media_size().getWidth(), p.preferred_media_size().getHeight());
+ }
+
+}
+
+void LLFloaterWebContent::onOpen(const LLSD& key)
+{
+ Params params(key);
+
+ if (!params.validateBlock())
+ {
+ closeFloater();
+ return;
+ }
+
+ mWebBrowser->setTrustedContent(params.trusted_content);
+
+ // tell the browser instance to load the specified URL
+ open_media(params);
}
//virtual
@@ -246,7 +282,7 @@ void LLFloaterWebContent::onClose(bool app_quitting)
// virtual
void LLFloaterWebContent::draw()
{
- // this is asychronous so we need to keep checking
+ // this is asynchronous so we need to keep checking
getChildView( "back" )->setEnabled( mWebBrowser->canNavigateBack() );
getChildView( "forward" )->setEnabled( mWebBrowser->canNavigateForward() );
@@ -388,7 +424,7 @@ void LLFloaterWebContent::onClickStop()
// still should happen when we catch the navigate complete event
// but sometimes (don't know why) that event isn't sent from Qt
- // and we getto a point where the stop button stays active.
+ // and we ghetto a point where the stop button stays active.
getChildView("reload")->setVisible( true );
getChildView("stop")->setVisible( false );
}
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 56b6ef12c8..36e214b7a9 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -29,6 +29,7 @@
#include "llfloater.h"
#include "llmediactrl.h"
+#include "llsdparam.h"
class LLMediaCtrl;
class LLComboBox;
@@ -38,24 +39,45 @@ class LLIconCtrl;
class LLFloaterWebContent :
public LLFloater,
- public LLViewerMediaObserver
+ public LLViewerMediaObserver,
+ public LLInstanceTracker<LLFloaterWebContent, std::string>
{
public:
LOG_CLASS(LLFloaterWebContent);
- LLFloaterWebContent(const LLSD& key);
+
+ struct _Params : public LLInitParam::Block<_Params>
+ {
+ Optional<std::string> url,
+ target,
+ window_class,
+ id;
+ Optional<bool> show_chrome,
+ allow_address_entry,
+ trusted_content;
+ Optional<LLRect> preferred_media_size;
+
+ _Params();
+ };
+
+ typedef LLSDParamAdapter<_Params> Params;
+
+ LLFloaterWebContent(const Params& params);
void initializeURLHistory();
- static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null, bool show_chrome = true, const LLRect& preferred_media_size = LLRect() );
+ static LLFloater* create(Params);
static void closeRequest(const std::string &uuid);
static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
void geometryChanged(S32 x, S32 y, S32 width, S32 height);
/* virtual */ BOOL postBuild();
+ /* virtual */ void onOpen(const LLSD& key);
+ /* virtual */ bool matchesKey(const LLSD& key);
/* virtual */ void onClose(bool app_quitting);
/* virtual */ void draw();
+protected:
// inherited from LLViewerMediaObserver
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
@@ -66,8 +88,7 @@ public:
void onEnterAddress();
void onPopExternal();
-private:
- void open_media(const std::string& media_url, const std::string& target);
+ void open_media(const Params& );
void set_current_url(const std::string& url);
LLMediaCtrl* mWebBrowser;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index e90b6c1c3d..7581fa91c5 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -402,6 +402,16 @@ static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange");
// This view grows and shinks to enclose all of its children items and folders.
S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_generation )
{
+ if (getListener()->getUUID().notNull())
+ {
+ if (mNeedsSort)
+ {
+ mFolders.sort(mSortFunction);
+ mItems.sort(mSortFunction);
+ mNeedsSort = false;
+ }
+ }
+
LLFastTimer t2(FTM_ARRANGE);
filter_generation = mFilter->getMinRequiredGeneration();
@@ -1916,8 +1926,8 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
}
else
{
- handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
- }
+ handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ }
}
if (handled)
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 6e4f55fb2f..e2b7c45eab 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -286,7 +286,7 @@ void LLFolderViewItem::refreshFromListener()
time_t creation_date = mListener->getCreationDate();
if (mCreationDate != creation_date)
{
- mCreationDate = mListener->getCreationDate();
+ setCreationDate(mListener->getCreationDate());
dirtyFilter();
}
if (mRoot->useLabelSuffix())
@@ -2430,7 +2430,7 @@ time_t LLFolderViewFolder::getCreationDate() const
if (item_creation_date)
{
- mCreationDate = item_creation_date;
+ setCreationDate(item_creation_date);
break;
}
}
@@ -2446,7 +2446,7 @@ time_t LLFolderViewFolder::getCreationDate() const
if (folder_creation_date)
{
- mCreationDate = folder_creation_date;
+ setCreationDate(folder_creation_date);
break;
}
}
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index e2f94a2b63..f70e63ecdf 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -173,6 +173,8 @@ protected:
static LLFontGL* getLabelFontForStyle(U8 style);
+ virtual void setCreationDate(time_t creation_date_utc) const { mCreationDate = creation_date_utc; }
+
public:
BOOL postBuild();
@@ -228,7 +230,7 @@ public:
void deselectItem();
// this method is used to select this element
- void selectItem();
+ virtual void selectItem();
// gets multiple-element selection
virtual std::set<LLUUID> getSelectionList() const;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 9f093b8a34..ff328fd071 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2483,8 +2483,6 @@ void LLFolderBridge::staticFolderOptionsMenu()
void LLFolderBridge::folderOptionsMenu()
{
- menuentry_vec_t disabled_items;
-
LLInventoryModel* model = getInventoryModel();
if(!model) return;
@@ -2516,7 +2514,7 @@ void LLFolderBridge::folderOptionsMenu()
if (!isItemRemovable())
{
- disabled_items.push_back(std::string("Delete"));
+ mDisabledItems.push_back(std::string("Delete"));
}
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -2557,18 +2555,18 @@ void LLFolderBridge::folderOptionsMenu()
mItems.push_back(std::string("Remove From Outfit"));
if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID))
{
- disabled_items.push_back(std::string("Remove From Outfit"));
+ mDisabledItems.push_back(std::string("Remove From Outfit"));
}
if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
{
- disabled_items.push_back(std::string("Replace Outfit"));
+ mDisabledItems.push_back(std::string("Replace Outfit"));
}
mItems.push_back(std::string("Outfit Separator"));
}
LLMenuGL* menup = dynamic_cast<LLMenuGL*>(mMenu.get());
if (menup)
{
- hide_context_entries(*menup, mItems, disabled_items, TRUE);
+ hide_context_entries(*menup, mItems, mDisabledItems, TRUE);
// Reposition the menu, in case we're adding items to an existing menu.
menup->needsArrange();
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 21d5de9a5b..e86c427ae2 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2168,6 +2168,9 @@ void LLInventoryModel::registerCallbacks(LLMessageSystem* msg)
msg->setHandlerFuncFast(_PREHASH_RemoveInventoryFolder,
processRemoveInventoryFolder,
NULL);
+ msg->setHandlerFuncFast(_PREHASH_RemoveInventoryObjects,
+ processRemoveInventoryObjects,
+ NULL);
//msg->setHandlerFuncFast(_PREHASH_ExchangeCallingCard,
// processExchangeCallingcard,
// NULL);
@@ -2284,26 +2287,21 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
}
// static
-void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
+void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg, const char* msg_label)
{
- lldebugs << "LLInventoryModel::processRemoveInventoryItem()" << llendl;
- LLUUID agent_id, item_id;
- msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
- if(agent_id != gAgent.getID())
- {
- llwarns << "Got a RemoveInventoryItem for the wrong agent."
- << llendl;
- return;
- }
- S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
+ LLUUID item_id;
+ S32 count = msg->getNumberOfBlocksFast(msg_label);
+ lldebugs << "Message has " << count << " item blocks" << llendl;
uuid_vec_t item_ids;
update_map_t update;
for(S32 i = 0; i < count; ++i)
{
- msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_ItemID, item_id, i);
+ msg->getUUIDFast(msg_label, _PREHASH_ItemID, item_id, i);
+ lldebugs << "Checking for item-to-be-removed " << item_id << llendl;
LLViewerInventoryItem* itemp = gInventory.getItem(item_id);
if(itemp)
{
+ lldebugs << "Item will be removed " << item_id << llendl;
// we only bother with the delete and account if we found
// the item - this is usually a back-up for permissions,
// so frequently the item will already be gone.
@@ -2314,8 +2312,24 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
gInventory.accountForUpdate(update);
for(uuid_vec_t::iterator it = item_ids.begin(); it != item_ids.end(); ++it)
{
+ lldebugs << "Calling deleteObject " << *it << llendl;
gInventory.deleteObject(*it);
}
+}
+
+// static
+void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
+{
+ lldebugs << "LLInventoryModel::processRemoveInventoryItem()" << llendl;
+ LLUUID agent_id, item_id;
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
+ if(agent_id != gAgent.getID())
+ {
+ llwarns << "Got a RemoveInventoryItem for the wrong agent."
+ << llendl;
+ return;
+ }
+ LLInventoryModel::removeInventoryItem(agent_id, msg, _PREHASH_InventoryData);
gInventory.notifyObservers();
}
@@ -2380,18 +2394,10 @@ void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg,
}
// static
-void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
- void**)
+void LLInventoryModel::removeInventoryFolder(LLUUID agent_id,
+ LLMessageSystem* msg)
{
- lldebugs << "LLInventoryModel::processRemoveInventoryFolder()" << llendl;
- LLUUID agent_id, folder_id;
- msg->getUUIDFast(_PREHASH_FolderData, _PREHASH_AgentID, agent_id);
- if(agent_id != gAgent.getID())
- {
- llwarns << "Got a RemoveInventoryFolder for the wrong agent."
- << llendl;
- return;
- }
+ LLUUID folder_id;
uuid_vec_t folder_ids;
update_map_t update;
S32 count = msg->getNumberOfBlocksFast(_PREHASH_FolderData);
@@ -2410,6 +2416,42 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
{
gInventory.deleteObject(*it);
}
+}
+
+// static
+void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg,
+ void**)
+{
+ lldebugs << "LLInventoryModel::processRemoveInventoryFolder()" << llendl;
+ LLUUID agent_id, session_id;
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
+ if(agent_id != gAgent.getID())
+ {
+ llwarns << "Got a RemoveInventoryFolder for the wrong agent."
+ << llendl;
+ return;
+ }
+ LLInventoryModel::removeInventoryFolder( agent_id, msg );
+ gInventory.notifyObservers();
+}
+
+// static
+void LLInventoryModel::processRemoveInventoryObjects(LLMessageSystem* msg,
+ void**)
+{
+ lldebugs << "LLInventoryModel::processRemoveInventoryObjects()" << llendl;
+ LLUUID agent_id, session_id;
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
+ msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
+ if(agent_id != gAgent.getID())
+ {
+ llwarns << "Got a RemoveInventoryObjects for the wrong agent."
+ << llendl;
+ return;
+ }
+ LLInventoryModel::removeInventoryFolder( agent_id, msg );
+ LLInventoryModel::removeInventoryItem( agent_id, msg, _PREHASH_ItemData );
gInventory.notifyObservers();
}
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 15da09990f..e0e81f1006 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -492,9 +492,12 @@ protected:
//--------------------------------------------------------------------
public:
static void processUpdateCreateInventoryItem(LLMessageSystem* msg, void**);
+ static void removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg, const char* msg_label);
static void processRemoveInventoryItem(LLMessageSystem* msg, void**);
static void processUpdateInventoryFolder(LLMessageSystem* msg, void**);
+ static void removeInventoryFolder(LLUUID agent_id, LLMessageSystem* msg);
static void processRemoveInventoryFolder(LLMessageSystem* msg, void**);
+ static void processRemoveInventoryObjects(LLMessageSystem* msg, void**);
static void processSaveAssetIntoInventory(LLMessageSystem* msg, void**);
static void processBulkUpdateInventory(LLMessageSystem* msg, void**);
static void processInventoryDescendents(LLMessageSystem* msg, void**);
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index afaf660cb7..91fdd67806 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -105,7 +105,7 @@ BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const
void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive)
{
- if (!mAllFoldersFetched)
+ if (!mAllFoldersFetched || cat_id.notNull())
{
LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL;
@@ -211,7 +211,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
// Double timeouts on failure.
mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f);
mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f);
- llinfos << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ lldebugs << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
// fetch is no longer considered "timely" although we will wait for full time-out.
mTimelyFetchPending = FALSE;
}
@@ -280,7 +280,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch()
// Shrink timeouts based on success.
mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f);
mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f);
- //llinfos << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
+ lldebugs << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl;
}
mTimelyFetchPending = FALSE;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 702e8d5a1f..d5d40ca65d 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -902,6 +902,18 @@ void LLInventoryPanel::onFocusReceived()
LLPanel::onFocusReceived();
}
+bool LLInventoryPanel::addBadge(LLBadge * badge)
+{
+ bool badge_added = false;
+
+ if (acceptsBadge())
+ {
+ badge_added = badge->addToView(mFolderRoot);
+ }
+
+ return badge_added;
+}
+
void LLInventoryPanel::openAllFolders()
{
mFolderRoot->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index a4287a438e..7676bbb6d7 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -125,6 +125,9 @@ public:
/*virtual*/ void onFocusLost();
/*virtual*/ void onFocusReceived();
+ // LLBadgeHolder methods
+ bool addBadge(LLBadge * badge);
+
// Call this method to set the selection.
void openAllFolders();
void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 03ccabc994..1eb786f433 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -1164,3 +1164,12 @@ void LLMediaCtrl::hideNotification()
mWindowShade->hide();
}
}
+
+void LLMediaCtrl::setTrustedContent(bool trusted)
+{
+ mTrusted = trusted;
+ if (mMediaSource)
+ {
+ mMediaSource->setTrustedBrowser(trusted);
+ }
+}
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 28666e620f..0e4a5b1d65 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -149,6 +149,8 @@ public:
void showNotification(boost::shared_ptr<class LLNotification> notify);
void hideNotification();
+ void setTrustedContent(bool trusted);
+
// over-rides
virtual BOOL handleKeyHere( KEY key, MASK mask);
virtual void handleVisibilityChange ( BOOL new_visibility );
@@ -164,6 +166,8 @@ public:
// Incoming media event dispatcher
virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
+ LLUUID getTextureID() {return mMediaTextureID;}
+
protected:
void convertInputCoords(S32& x, S32& y);
@@ -176,7 +180,7 @@ public:
LLViewBorder* mBorder;
bool mFrequentUpdates;
bool mForceUpdate;
- const bool mTrusted;
+ bool mTrusted;
std::string mHomePageUrl;
std::string mHomePageMimeType;
std::string mCurrentNavUrl;
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index b8832dfd8e..9d54ad7463 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -716,7 +716,7 @@ void LLNavigationBar::handleLoginComplete()
void LLNavigationBar::invokeSearch(std::string search_text)
{
- LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("id", LLSD(search_text)));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "all").with("query", LLSD(search_text)));
}
void LLNavigationBar::clearHistoryCache()
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 9f05a61812..069a46604d 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -27,15 +27,14 @@
#include "llviewerprecompiledheaders.h"
#include "llpanelmarketplaceinbox.h"
+#include "llpanelmarketplaceinboxinventory.h"
#include "llappviewer.h"
#include "llbutton.h"
#include "llinventorypanel.h"
#include "llfolderview.h"
#include "llsidepanelinventory.h"
-
-
-#define SUPPORTING_FRESH_ITEM_COUNT 0
+#include "llviewercontrol.h"
static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
@@ -54,6 +53,10 @@ LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
{
+ if (getChild<LLButton>("inbox_btn")->getToggleState())
+ {
+ gSavedPerAccountSettings.setString("LastInventoryInboxExpand", LLDate::now().asString());
+ }
}
// virtual
@@ -157,10 +160,10 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const
for (; folders_it != folders_end; ++folders_it)
{
- const LLFolderViewFolder * folder = *folders_it;
+ const LLFolderViewFolder * folder_view = *folders_it;
+ const LLInboxFolderViewFolder * inbox_folder_view = dynamic_cast<const LLInboxFolderViewFolder*>(folder_view);
- // TODO: Replace this check with new "fresh" flag
- if (folder->getCreationDate() > 1500)
+ if (inbox_folder_view && inbox_folder_view->isFresh())
{
fresh_item_count++;
}
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index b644f0e5cb..2c97d539a1 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -141,9 +141,11 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge
LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p)
: LLFolderViewFolder(p)
, LLBadgeOwner(getHandle())
- , mFresh(false)
+ , mFresh(true)
{
+#if SUPPORTING_FRESH_ITEM_COUNT
initBadgeParams(p.new_badge());
+#endif
}
LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
@@ -151,17 +153,56 @@ LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
}
// virtual
+time_t LLInboxFolderViewFolder::getCreationDate() const
+{
+ time_t ret_val = LLFolderViewFolder::getCreationDate();
+
+ if (!mCreationDate)
+ {
+ updateFlag();
+ }
+
+ return ret_val;
+}
+
+// virtual
void LLInboxFolderViewFolder::draw()
{
+#if SUPPORTING_FRESH_ITEM_COUNT
if (!badgeHasParent())
{
addBadgeToParentPanel();
}
setBadgeVisibility(mFresh);
+#endif
LLFolderViewFolder::draw();
}
+void LLInboxFolderViewFolder::updateFlag() const
+{
+ LLDate saved_freshness_date = LLDate(gSavedPerAccountSettings.getString("LastInventoryInboxExpand"));
+ mFresh = (mCreationDate > saved_freshness_date.secondsSinceEpoch());
+}
+
+void LLInboxFolderViewFolder::selectItem()
+{
+ mFresh = false;
+ LLFolderViewFolder::selectItem();
+}
+
+void LLInboxFolderViewFolder::toggleOpen()
+{
+ mFresh = false;
+ LLFolderViewFolder::toggleOpen();
+}
+
+void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) const
+{
+ mCreationDate = creation_date_utc;
+ updateFlag();
+}
+
// eof
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h
index 8f198c41c1..8946b9dc98 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.h
+++ b/indra/newview/llpanelmarketplaceinboxinventory.h
@@ -32,6 +32,11 @@
#include "llinventorypanel.h"
#include "llfolderviewitem.h"
+
+#define SUPPORTING_FRESH_ITEM_COUNT 0
+
+
+
class LLInboxInventoryPanel : public LLInventoryPanel
{
public:
@@ -66,11 +71,21 @@ public:
LLInboxFolderViewFolder(const Params& p);
~LLInboxFolderViewFolder();
+
+ time_t getCreationDate() const;
void draw();
+ void updateFlag() const;
+ void selectItem();
+ void toggleOpen();
+
+ bool isFresh() const { return mFresh; }
+
protected:
- bool mFresh;
+ void setCreationDate(time_t creation_date_utc) const;
+
+ mutable bool mFresh;
};
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index a90f23d637..119fc95cf0 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -444,18 +444,15 @@ void LLPreview::handleReshape(const LLRect& new_rect, bool by_user)
LLMultiPreview::LLMultiPreview()
: LLMultiFloater(LLSD())
{
- // *TODO: There should be a .xml file for this
- const LLRect& nextrect = LLFloaterReg::getFloaterRect("preview"); // place where the next preview should show up
- if (nextrect.getWidth() > 0)
- {
- setRect(nextrect);
- }
- else
+ // start with a rect in the top-left corner ; will get resized
+ LLRect rect;
+ rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 400);
+ setRect(rect);
+
+ LLFloater* last_floater = LLFloaterReg::getLastFloaterInGroup("preview");
+ if (last_floater)
{
- // start with a rect in the top-left corner ; will get resized
- LLRect rect;
- rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 400);
- setRect(rect);
+ stackWith(*last_floater);
}
setTitle(LLTrans::getString("MultiPreviewTitle"));
buildTabContainer();
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 028891a90e..a1f38f1854 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -50,6 +50,7 @@
#include "llappviewer.h"
#include "llweb.h"
#include "lluictrlfactory.h"
+#include "llpanellogin.h"
LLProgressView* LLProgressView::sInstance = NULL;
@@ -66,7 +67,9 @@ LLProgressView::LLProgressView()
mMediaCtrl( NULL ),
mMouseDownInActiveArea( false ),
mUpdateEvents("LLProgressView"),
- mFadeToWorldTimer()
+ mFadeToWorldTimer(),
+ mFadeFromLoginTimer(),
+ mStartupComplete(false)
{
mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1));
}
@@ -79,10 +82,13 @@ BOOL LLProgressView::postBuild()
mMediaCtrl = getChild<LLMediaCtrl>("login_media_panel");
mMediaCtrl->setVisible( false ); // hidden initially
mMediaCtrl->addObserver( this ); // watch events
+
+ LLViewerMedia::setOnlyAudibleMediaTextureID(mMediaCtrl->getTextureID());
mCancelBtn = getChild<LLButton>("cancel_btn");
mCancelBtn->setClickedCallback( LLProgressView::onCancelButtonClicked, NULL );
mFadeToWorldTimer.stop();
+ mFadeFromLoginTimer.stop();
getChild<LLTextBox>("title_text")->setText(LLStringExplicit(LLAppViewer::instance()->getSecondLifeTitle()));
@@ -130,18 +136,34 @@ void LLProgressView::revealIntroPanel()
// if user hasn't yet seen intro video
std::string intro_url = gSavedSettings.getString("PostFirstLoginIntroURL");
if ( intro_url.length() > 0 &&
+ gSavedSettings.getBOOL("BrowserJavascriptEnabled") &&
gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == FALSE )
{
+ // hide the progress bar
+ getChild<LLView>("stack1")->setVisible(false);
+
// navigate to intro URL and reveal widget
mMediaCtrl->navigateTo( intro_url );
mMediaCtrl->setVisible( TRUE );
+
// flag as having seen the new user post login intro
gSavedSettings.setBOOL("PostFirstLoginIntroViewed", TRUE );
+
+ mMediaCtrl->setFocus(TRUE);
}
- else
+
+ mFadeFromLoginTimer.start();
+}
+
+void LLProgressView::setStartupComplete()
+{
+ mStartupComplete = true;
+
+ // if we are not showing a video, fade into world
+ if (!mMediaCtrl->getVisible())
{
- // start the timer that will control the fade through to the world view
+ mFadeFromLoginTimer.stop();
mFadeToWorldTimer.start();
}
}
@@ -162,17 +184,15 @@ void LLProgressView::setVisible(BOOL visible)
}
}
-void LLProgressView::draw()
-{
- static LLTimer timer;
- // Paint bitmap if we've got one
+void LLProgressView::drawStartTexture(F32 alpha)
+{
glPushMatrix();
if (gStartTexture)
{
LLGLSUIDefault gls_ui;
gGL.getTexUnit(0)->bind(gStartTexture.get());
- gGL.color4f(1.f, 1.f, 1.f, 1.f);
+ gGL.color4f(1.f, 1.f, 1.f, alpha);
F32 image_aspect = (F32)gStartImageWidth / (F32)gStartImageHeight;
S32 width = getRect().getWidth();
S32 height = getRect().getHeight();
@@ -198,6 +218,33 @@ void LLProgressView::draw()
gl_rect_2d(getRect());
}
glPopMatrix();
+}
+
+
+void LLProgressView::draw()
+{
+ static LLTimer timer;
+
+ if (mFadeFromLoginTimer.getStarted())
+ {
+ F32 alpha = clamp_rescale(mFadeFromLoginTimer.getElapsedTimeF32(), 0.f, FADE_TO_WORLD_TIME, 0.f, 1.f);
+ LLViewDrawContext context(alpha);
+
+ if (!mMediaCtrl->getVisible())
+ {
+ drawStartTexture(alpha);
+ }
+
+ LLPanel::draw();
+
+ if (mFadeFromLoginTimer.getElapsedTimeF32() > FADE_TO_WORLD_TIME )
+ {
+ mFadeFromLoginTimer.stop();
+ LLPanelLogin::closePanel();
+ }
+
+ return;
+ }
// handle fade out to world view when we're asked to
if (mFadeToWorldTimer.getStarted())
@@ -205,6 +252,8 @@ void LLProgressView::draw()
// draw fading panel
F32 alpha = clamp_rescale(mFadeToWorldTimer.getElapsedTimeF32(), 0.f, FADE_TO_WORLD_TIME, 1.f, 0.f);
LLViewDrawContext context(alpha);
+
+ drawStartTexture(alpha);
LLPanel::draw();
// faded out completely - remove panel and reveal world
@@ -212,6 +261,8 @@ void LLProgressView::draw()
{
mFadeToWorldTimer.stop();
+ LLViewerMedia::setOnlyAudibleMediaTextureID(LLUUID::null);
+
// Fade is complete, release focus
gFocusMgr.releaseFocusIfNeeded( this );
@@ -235,6 +286,7 @@ void LLProgressView::draw()
return;
}
+ drawStartTexture(1.0f);
// draw children
LLPanel::draw();
}
@@ -349,9 +401,26 @@ bool LLProgressView::onAlertModal(const LLSD& notify)
void LLProgressView::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
{
+ // the intro web content calls javascript::window.close() when it's done
if( event == MEDIA_EVENT_CLOSE_REQUEST )
{
- // the intro web content calls javascript::window.close() when it's done
- mFadeToWorldTimer.start();
+ if (mStartupComplete)
+ {
+ //make sure other timer has stopped
+ mFadeFromLoginTimer.stop();
+ mFadeToWorldTimer.start();
+ }
+ else
+ {
+ // hide the media ctrl and wait for startup to be completed before fading to world
+ mMediaCtrl->setVisible(false);
+ if (mMediaCtrl->getMediaPlugin())
+ {
+ mMediaCtrl->getMediaPlugin()->stop();
+ }
+
+ // show the progress bar
+ getChild<LLView>("stack1")->setVisible(true);
+ }
}
}
diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h
index 73dd478e98..fac00ad04d 100644
--- a/indra/newview/llprogressview.h
+++ b/indra/newview/llprogressview.h
@@ -48,6 +48,7 @@ public:
BOOL postBuild();
/*virtual*/ void draw();
+ void drawStartTexture(F32 alpha);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
@@ -65,6 +66,8 @@ public:
// turns on (under certain circumstances) the into video after login
void revealIntroPanel();
+ void setStartupComplete();
+
void setCancelButtonVisible(BOOL b, const std::string& label);
static void onCancelButtonClicked( void* );
@@ -82,8 +85,10 @@ protected:
std::string mMessage;
LLButton* mCancelBtn;
LLFrameTimer mFadeToWorldTimer;
+ LLFrameTimer mFadeFromLoginTimer;
LLRect mOutlineRect;
bool mMouseDownInActiveArea;
+ bool mStartupComplete;
// The LLEventStream mUpdateEvents depends upon this class being a singleton
// to avoid pump name conflicts.
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 65655f82cd..6f809ba3ca 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -61,8 +61,6 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_
// Constants
//
-static const char * const INBOX_EXPAND_TIME_SETTING = "LastInventoryInboxExpand";
-
static const char * const INBOX_BUTTON_NAME = "inbox_btn";
static const char * const OUTBOX_BUTTON_NAME = "outbox_btn";
@@ -404,7 +402,7 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id)
// Expand the inbox since we have fresh items
LLPanelMarketplaceInbox * inbox = findChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
- if (inbox && (inbox->getFreshItemCount() > 0))
+ if (inbox)
{
getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true);
onToggleInboxBtn();
@@ -458,13 +456,9 @@ void LLSidepanelInventory::onToggleInboxBtn()
LLButton* otherButton = getChild<LLButton>(OUTBOX_BUTTON_NAME);
LLLayoutPanel* otherPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME);
- bool inboxExpanded = manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel);
+ manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel);
- if (inboxExpanded)
- {
- // Save current time as a setting for future new-ness tests
- gSavedSettings.setString(INBOX_EXPAND_TIME_SETTING, LLDate::now().asString());
- }
+ gSavedPerAccountSettings.setString("LastInventoryInboxExpand", LLDate::now().asString());
}
void LLSidepanelInventory::onToggleOutboxBtn()
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 46ff3d808a..e4bf668275 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -897,7 +897,7 @@ bool idle_startup()
if (show_connect_box)
{
LLSLURL slurl;
- LLPanelLogin::closePanel();
+ //LLPanelLogin::closePanel();
}
@@ -944,6 +944,8 @@ bool idle_startup()
gViewerWindow->setShowProgress(TRUE);
gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Quit"));
+ gViewerWindow->revealIntroPanel();
+
// Poke the VFS, which could potentially block for a while if
// Windows XP is acting up
set_startup_status(0.07f, LLTrans::getString("LoginVerifyingCache"), LLStringUtil::null);
@@ -1981,8 +1983,8 @@ bool idle_startup()
gViewerWindow->getWindow()->resetBusyCount();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
- gViewerWindow->revealIntroPanel();
- //gViewerWindow->setShowProgress(FALSE); // reveal intro video now handles this
+ //gViewerWindow->revealIntroPanel();
+ gViewerWindow->setStartupComplete();
gViewerWindow->setProgressCancelButtonVisible(FALSE);
// We're not away from keyboard, even though login might have taken
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index b19c738ed2..f7fa5690d6 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -36,6 +36,7 @@
#include "llviewerwindow.h"
#include "llvoiceclient.h"
#include "llviewermedia.h"
+#include "llprogressview.h"
/////////////////////////////////////////////////////////
@@ -101,7 +102,16 @@ void audio_update_volume(bool force_update)
{
F32 master_volume = gSavedSettings.getF32("AudioLevelMaster");
BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");
- if (!gViewerWindow->getActive() && (gSavedSettings.getBOOL("MuteWhenMinimized")))
+
+ LLProgressView* progress = gViewerWindow->getProgressView();
+ BOOL progress_view_visible = FALSE;
+
+ if (progress)
+ {
+ progress_view_visible = progress->getVisible();
+ }
+
+ if (!gViewerWindow->getActive() && gSavedSettings.getBOOL("MuteWhenMinimized"))
{
mute_audio = TRUE;
}
@@ -114,7 +124,7 @@ void audio_update_volume(bool force_update)
gAudiop->setDopplerFactor(gSavedSettings.getF32("AudioLevelDoppler"));
gAudiop->setRolloffFactor(gSavedSettings.getF32("AudioLevelRolloff"));
- gAudiop->setMuted(mute_audio);
+ gAudiop->setMuted(mute_audio || progress_view_visible);
if (force_update)
{
@@ -136,7 +146,7 @@ void audio_update_volume(bool force_update)
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
music_volume = mute_volume * master_volume * music_volume;
- gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume );
+ gAudiop->setInternetStreamGain ( music_muted || progress_view_visible ? 0.f : music_volume );
}
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 26f05337a4..dd0989d608 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -246,15 +246,11 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("publish_classified", "floater_publish_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPublishClassifiedFloater>);
LLFloaterReg::add("telehubs", "floater_telehub.xml",&LLFloaterReg::build<LLFloaterTelehub>);
- LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml",
- &LLFloaterReg::build<LLFloaterTestInspectors>);
+ LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml", &LLFloaterReg::build<LLFloaterTestInspectors>);
//LLFloaterReg::add("test_list_view", "floater_test_list_view.xml",&LLFloaterReg::build<LLFloaterTestListView>);
- LLFloaterReg::add("test_textbox", "floater_test_textbox.xml",
- &LLFloaterReg::build<LLFloater>);
- LLFloaterReg::add("test_text_editor", "floater_test_text_editor.xml",
- &LLFloaterReg::build<LLFloater>);
- LLFloaterReg::add("test_widgets", "floater_test_widgets.xml",
- &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("test_textbox", "floater_test_textbox.xml", &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("test_text_editor", "floater_test_text_editor.xml", &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", &LLFloaterReg::build<LLFloater>);
LLFloaterReg::add("top_objects", "floater_top_objects.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTopObjects>);
LLFloaterReg::add("reporter", "floater_report_abuse.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterReporter>);
@@ -274,7 +270,9 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
- LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
+ LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
+ LLFloaterReg::add("profile", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>);
+
LLFloaterUIPreviewUtil::registerFloater();
LLFloaterReg::add("upload_anim", "floater_animation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload");
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 1be58eae45..384f7cd61d 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -344,6 +344,8 @@ static LLViewerMedia::impl_id_map sViewerMediaTextureIDMap;
static LLTimer sMediaCreateTimer;
static const F32 LLVIEWERMEDIA_CREATE_DELAY = 1.0f;
static F32 sGlobalVolume = 1.0f;
+static bool sForceUpdate = false;
+static LLUUID sOnlyAudibleTextureID = LLUUID::null;
static F64 sLowestLoadableImplInterest = 0.0f;
static bool sAnyMediaShowing = false;
static boost::signals2::connection sTeleportFinishConnection;
@@ -606,7 +608,7 @@ bool LLViewerMedia::textureHasMedia(const LLUUID& texture_id)
// static
void LLViewerMedia::setVolume(F32 volume)
{
- if(volume != sGlobalVolume)
+ if(volume != sGlobalVolume || sForceUpdate)
{
sGlobalVolume = volume;
impl_list::iterator iter = sViewerMediaImplList.begin();
@@ -617,6 +619,8 @@ void LLViewerMedia::setVolume(F32 volume)
LLViewerMediaImpl* pimpl = *iter;
pimpl->updateVolume();
}
+
+ sForceUpdate = false;
}
}
@@ -1626,6 +1630,15 @@ void LLViewerMedia::onTeleportFinished()
gSavedSettings.setBOOL("MediaTentativeAutoPlay", true);
}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
+void LLViewerMedia::setOnlyAudibleMediaTextureID(const LLUUID& texture_id)
+{
+ sOnlyAudibleTextureID = texture_id;
+ sForceUpdate = true;
+}
+
//////////////////////////////////////////////////////////////////////////////////////////
// LLViewerMediaImpl
//////////////////////////////////////////////////////////////////////////////////////////
@@ -2188,7 +2201,14 @@ void LLViewerMediaImpl::updateVolume()
}
}
- mMediaSource->setVolume(volume);
+ if (sOnlyAudibleTextureID == LLUUID::null || sOnlyAudibleTextureID == mTextureId)
+ {
+ mMediaSource->setVolume(volume);
+ }
+ else
+ {
+ mMediaSource->setVolume(0.0f);
+ }
}
}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index a70c6f4887..aeac6ba29a 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -160,6 +160,8 @@ public:
static void createSpareBrowserMediaSource();
static LLPluginClassMedia* getSpareBrowserMediaSource();
+
+ static void setOnlyAudibleMediaTextureID(const LLUUID& texture_id);
private:
static void setOpenIDCookie();
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index d7509b4e41..8d4f9b346f 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4538,6 +4538,14 @@ void LLViewerWindow::setShowProgress(const BOOL show)
}
}
+void LLViewerWindow::setStartupComplete()
+{
+ if (mProgressView)
+ {
+ mProgressView->setStartupComplete();
+ }
+}
+
BOOL LLViewerWindow::getShowProgress() const
{
return (mProgressView && mProgressView->getVisible());
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index ff49ed1f62..edd241a742 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -272,6 +272,7 @@ public:
void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null );
LLProgressView *getProgressView() const;
void revealIntroPanel();
+ void setStartupComplete();
void updateObjectUnderCursor();
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index b73017a51a..6f7115ff6d 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -81,19 +81,20 @@ void LLWeb::initClass()
// static
void LLWeb::loadURL(const std::string& url, const std::string& target, const std::string& uuid)
{
- if(target == "_internal")
- {
- // Force load in the internal browser, as if with a blank target.
- loadURLInternal(url, "", uuid);
- }
- else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external"))
- {
- loadURLExternal(url);
- }
- else
- {
- loadURLInternal(url, target, uuid);
- }
+ loadWebURL(url, target, uuid);
+ //if(target == "_internal")
+ //{
+ // // Force load in the internal browser, as if with a blank target.
+ // loadURLInternal(url, "", uuid);
+ //}
+ //else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external"))
+ //{
+ // loadURLExternal(url);
+ //}
+ //else
+ //{
+ // loadURLInternal(url, target, uuid);
+ //}
}
// static
@@ -124,17 +125,15 @@ void LLWeb::loadURLInternal(const std::string &url, const std::string& target, c
// Explicitly open a Web URL using the Web content floater
void LLWeb::loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
{
- LLFloaterWebContent::create(url, target, uuid);
+ LLFloaterWebContent::create(LLFloaterWebContent::Params().url(url).target(target).id(uuid));
}
-
// static
void LLWeb::loadURLExternal(const std::string& url, const std::string& uuid)
{
loadURLExternal(url, true, uuid);
}
-
// static
void LLWeb::loadURLExternal(const std::string& url, bool async, const std::string& uuid)
{
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 8cdb615686..265d5dc801 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -1752,13 +1752,13 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
case MAP_ITEM_LAND_FOR_SALE_ADULT:
{
LLFloaterReg::hideInstance("world_map");
- LLFloaterReg::showInstance("search", LLSD().with("category", "destinations").with("id", id));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "destinations").with("query", id));
break;
}
case MAP_ITEM_CLASSIFIED:
{
LLFloaterReg::hideInstance("world_map");
- LLFloaterReg::showInstance("search", LLSD().with("category", "classifieds").with("id", id));
+ LLFloaterReg::showInstance("search", LLSD().with("category", "classifieds").with("query", id));
break;
}
default:
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 76965ad14b..31b6fc77f5 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -134,7 +134,7 @@
reference="AvatarListItemIconOfflineColor" />
<color
name="BadgeImageColor"
- value="0.44 0.69 0.56 1.0" />
+ value="1.0 0.40 0.0 1.0" />
<color
name="BadgeBorderColor"
value="0.9 0.9 0.9 1.0" />
diff --git a/indra/newview/skins/default/textures/widgets/Badge_Background_New.png b/indra/newview/skins/default/textures/widgets/Badge_Background_New.png
new file mode 100644
index 0000000000..9f114f2e4a
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Badge_Background_New.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index c7b26c59c7..114b3a72e0 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -1,72 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- legacy_header_height="13"
- can_resize="true"
- height="600"
- layout="topleft"
- min_height="400"
- min_width="450"
- name="floater_search"
- help_topic="floater_search"
- save_rect="true"
- save_visibility="true"
- single_instance="true"
- title="FIND"
- width="650">
- <floater.string
- name="loading_text">
- Loading...
- </floater.string>
- <floater.string
- name="done_text">
- Done
- </floater.string>
- <layout_stack
- height="580"
- follows="left|right|top|bottom"
- layout="topleft"
- left="10"
- name="stack1"
- top="20"
- width="630">
- <layout_panel
- height="570"
- layout="topleft"
- left_delta="0"
- top_delta="0"
- name="browser_layout"
- user_resize="false"
- width="630">
- <web_browser
- tab_stop="true"
- trusted_content="true"
- follows="left|right|top|bottom"
- layout="topleft"
- left="0"
- name="browser"
- top="0"
- height="540"
- width="630" />
- <text
- follows="bottom|left"
- height="16"
- layout="topleft"
- left_delta="0"
- name="status_text"
- top_pad="10"
- width="150" />
- <text
- visible="false"
- follows="bottom|right"
- height="16"
- left_delta="0"
- name="refresh_search"
- left_pad="0"
- right="-10"
- halign="right"
- width="450">
- Redo search to reflect current God level
- </text>
- </layout_panel>
- </layout_stack>
-</floater>
+ legacy_header_height="18"
+ can_resize="true"
+ height="775"
+ layout="topleft"
+ min_height="400"
+ min_width="500"
+ name="floater_web_content"
+ help_topic="floater_web_content"
+ save_rect="true"
+ auto_tile="true"
+ save_visibility="true"
+ title=""
+ initial_mime_type="text/html"
+ width="780"
+ filename="floater_web_content.xml"/>
+ tab_stop="true" \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index 69e6057556..0eda9ae62a 100644
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -40,6 +40,7 @@
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
+ chrome="true"
hover_glow_amount="0.15"
tool_tip="Navigate back"
follows="left|top"
@@ -58,6 +59,7 @@
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
+ chrome="true"
tool_tip="Navigate forward"
follows="left|top"
height="22"
@@ -75,6 +77,7 @@
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
+ chrome="true"
tool_tip="Stop navigation"
enabled="true"
follows="left|top"
@@ -93,6 +96,7 @@
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
+ chrome="true"
tool_tip="Reload page"
follows="left|top"
height="22"
@@ -137,6 +141,7 @@
image_disabled_selected="PushButton_Disabled"
image_selected="PushButton_Selected"
image_unselected="PushButton_Off"
+ chrome="true"
tool_tip="Open current URL in your desktop browser"
follows="right|top"
enabled="true"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 6e2596a49e..1030c56439 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4991,19 +4991,19 @@ Would you like to automatically wear the clothing you are about to create?
name="NotAgeVerified"
type="alertmodal">
<tag>fail</tag>
-You must be age-verified to visit this area. Do you want to go to the [SECOND_LIFE] website and verify your age?
+To access adult content and areas in Second Life you must be at least 18 years old. Please visit our age verification page to confirm you are over 18.
+Note this will launch your web browser.
[_URL]
<tag>confirm</tag>
<url option="0" name="url">
-
- https://secondlife.com/account/verification.php
+ https://secondlife.com/my/account/verification.php
</url>
<usetemplate
ignoretext="I have not verified my age"
name="okcancelignore"
- notext="No"
- yestext="Yes"/>
+ notext="Cancel"
+ yestext="Go to Age Verification"/>
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/widgets/badge.xml b/indra/newview/skins/default/xui/en/widgets/badge.xml
index f77c4b7178..2d4c02b092 100644
--- a/indra/newview/skins/default/xui/en/widgets/badge.xml
+++ b/indra/newview/skins/default/xui/en/widgets/badge.xml
@@ -7,11 +7,14 @@
image="Badge_Background"
image_color="BadgeImageColor"
label_color="BadgeLabelColor"
+ label_offset_horiz="0"
+ label_offset_vert="0"
location="top_left"
location_percent_hcenter="85"
location_percent_vcenter="85"
padding_horiz="7"
padding_vert="4"
requests_front="true"
+ mouse_opaque="false"
>
</badge>
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
index 2c987b158d..95f5cf2ecd 100644
--- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
@@ -6,5 +6,14 @@
item_top_pad="4"
selection_image="Rounded_Square"
>
- <new_badge label="New" location="right" location_percent_hcenter="70" />
+ <new_badge
+ label="New"
+ label_offset_horiz="-1"
+ location="right"
+ padding_horiz="4"
+ padding_vert="1"
+ location_percent_hcenter="70"
+ border_image=""
+ image="Badge_Background_New"
+ />
</inbox_folder_view_folder>