Pull from richard/viewer-experience

meow-7.2.2
Merov Linden 2011-08-02 15:07:35 -07:00
commit 0b81c19cbe
16 changed files with 223 additions and 190 deletions

View File

@ -138,9 +138,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>6299f1fd01147820e05195b84a3fe1d7</string>
<string>e6caaeea16131e1f2343ecd7765e3147</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-ares/rev/233053/arch/Darwin/installer/ares-1.7.4-darwin-20110616.tar.bz2</string>
<string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/ares-1.7.1-darwin-20110217.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -150,9 +150,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>b62efd5a68e5dd38314f60a20e651d43</string>
<string>0745872db83d45f4ab3bdc697d98e264</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-ares/rev/233053/arch/Linux/installer/ares-1.7.4-linux-20110616.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-ares/rev/223275/arch/Linux/installer/ares-1.7.1-linux-20110310.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -162,9 +162,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>c2f4ea23619f3d453e799d6e89ff6930</string>
<string>1dcec6babd249a2597114d4ac226c461</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-ares/rev/233053/arch/CYGWIN/installer/ares-1.7.4-windows-20110616.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-ares/rev/220963/arch/CYGWIN/installer/ares-1.7.1-windows-20110211.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -282,9 +282,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>463e4cc99ec8659eeee518beb41f31b6</string>
<string>aaea644191807f51051cefa2fac11069</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-curl/rev/236200/arch/Darwin/installer/curl-7.21.1-darwin-20110719.tar.bz2</string>
<string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/curl-7.21.1-darwin-20110316.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -306,9 +306,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>23d603a7bb864d0a8b6001f19a1b7335</string>
<string>fea96aa2a7d513397317194f3d6c979b</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-curl/rev/236200/arch/CYGWIN/installer/curl-7.21.1-windows-20110719.tar.bz2</string>
<string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/curl-7.21.1-windows-20110211.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -1206,9 +1206,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>c6c28da2f262b4a146a90724b635f13f</string>
<string>a7c80fd8516df3b879b669b2b220067f</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/236284/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20110720.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/232420/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20110608.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -1218,9 +1218,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>67505bb5e72ed5912c818d506e9eac22</string>
<string>c05a33ee8b6f253b5a744596dfc3707d</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/236284/arch/Linux/installer/llqtwebkit-4.7.1-linux-20110720.tar.bz2</string>
<string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-qt4.6-20101013.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -1230,9 +1230,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>433e15cbb4d59aae9be10c18d19b094e</string>
<string>b9cc0333cc274c9cc40256ab7146b4fc</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/236284/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20110720.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/232420/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20110608.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -1359,6 +1359,54 @@
</map>
</map>
</map>
<key>openSSL</key>
<map>
<key>license</key>
<string>openSSL</string>
<key>license_file</key>
<string>LICENSES/openssl.txt</string>
<key>name</key>
<string>openSSL</string>
<key>platforms</key>
<map>
<key>darwin</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>facee34b8bd57ad602157e65a5af1a49</string>
<key>url</key>
<string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/openssl-0.9.8q-darwin-20110211.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>3d40be8566fa4b9df9a38e2a0f9ea467</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-openssl/rev/226882/arch/Linux/installer/openssl-1.0.0d-linux-20110418.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>774c7f0a0312bee3054757a623e227bc</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-openssl/rev/220986/arch/CYGWIN/installer/openssl-0.9.8q-windows-20110211.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
</map>
<key>openal_soft</key>
<map>
<key>license</key>
@ -1447,54 +1495,6 @@
</map>
</map>
</map>
<key>openssl</key>
<map>
<key>license</key>
<string>openssl</string>
<key>license_file</key>
<string>LICENSES/openssl.txt</string>
<key>name</key>
<string>openssl</string>
<key>platforms</key>
<map>
<key>darwin</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>1aecd89fee54741f2c4fd65c082d2604</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-openssl/rev/227862/arch/Darwin/installer/openssl-1.0.0d-darwin-20110427.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>eab3a49d1ef77a651a3896d1d4864a78</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-openssl/rev/227862/arch/Linux/installer/openssl-1.0.0d-linux-20110427.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>8ba049ecc76bb1adf3ab3e5bad64c39e</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-openssl/rev/227862/arch/CYGWIN/installer/openssl-1.0.0d-windows-20110427.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
</map>
<key>pcre</key>
<map>
<key>license</key>
@ -1907,12 +1907,12 @@
<map>
<key>build</key>
<map>
<key>command</key>
<string>xcodebuild</string>
<key>filters</key>
<array>
<string>setenv</string>
</array>
<key>command</key>
<string>xcodebuild</string>
<key>options</key>
<array>
<string>-configuration Debug</string>
@ -1961,12 +1961,12 @@
<map>
<key>build</key>
<map>
<key>command</key>
<string>xcodebuild</string>
<key>filters</key>
<array>
<string>setenv</string>
</array>
<key>command</key>
<string>xcodebuild</string>
<key>options</key>
<array>
<string>-configuration RelWithDebInfo</string>
@ -2017,12 +2017,12 @@
<map>
<key>build</key>
<map>
<key>command</key>
<string>xcodebuild</string>
<key>filters</key>
<array>
<string>setenv</string>
</array>
<key>command</key>
<string>xcodebuild</string>
<key>options</key>
<array>
<string>-configuration Release</string>

View File

@ -7,7 +7,7 @@ set(OpenSSL_FIND_REQUIRED ON)
if (STANDALONE)
include(FindOpenSSL)
else (STANDALONE)
use_prebuilt_binary(openssl)
use_prebuilt_binary(openSSL)
if (WINDOWS)
set(OPENSSL_LIBRARIES ssleay32 libeay32)
else (WINDOWS)

View File

@ -38,6 +38,7 @@
#include "llimagetga.h"
#include "llimagej2c.h"
#include "lldir.h"
#include "lldiriterator.h"
// system libraries
#include <iostream>
@ -201,7 +202,8 @@ void store_input_file(std::list<std::string> &input_filenames, const std::string
{
// If file name is a pattern, iterate to get each file name and store
std::string next_name;
while (gDirUtilp->getNextFileInDir(dir,name,next_name))
LLDirIterator iter(dir, name);
while (iter.next(next_name))
{
std::string file_name = dir + gDirUtilp->getDirDelimiter() + next_name;
input_filenames.push_back(file_name);

View File

@ -56,7 +56,9 @@ public:
class instance_iter : public boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag>
{
public:
instance_iter(typename InstanceMap::iterator& it)
typedef boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag> super_t;
instance_iter(const typename InstanceMap::iterator& it)
: mIterator(it)
{
++sIterationNestDepth;
@ -67,6 +69,7 @@ public:
--sIterationNestDepth;
}
private:
friend class boost::iterator_core_access;
@ -87,17 +90,26 @@ public:
class key_iter : public boost::iterator_facade<key_iter, KEY, boost::forward_traversal_tag>
{
public:
typedef boost::iterator_facade<key_iter, KEY, boost::forward_traversal_tag> super_t;
key_iter(typename InstanceMap::iterator& it)
: mIterator(it)
{
++sIterationNestDepth;
}
key_iter(const key_iter& other)
: mIterator(other.mIterator)
{
++sIterationNestDepth;
}
~key_iter()
{
--sIterationNestDepth;
}
private:
friend class boost::iterator_core_access;
@ -198,7 +210,7 @@ public:
class instance_iter : public boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag>
{
public:
instance_iter(typename InstanceSet::iterator& it)
instance_iter(const typename InstanceSet::iterator& it)
: mIterator(it)
{
++sIterationNestDepth;

View File

@ -90,79 +90,79 @@ namespace tut
ensure_equals(Keyed::instanceCount(), 0);
}
template<> template<>
void object::test<2>()
{
ensure_equals(Unkeyed::instanceCount(), 0);
{
Unkeyed one;
ensure_equals(Unkeyed::instanceCount(), 1);
Unkeyed* found = Unkeyed::getInstance(&one);
ensure_equals(found, &one);
{
boost::scoped_ptr<Unkeyed> two(new Unkeyed);
ensure_equals(Unkeyed::instanceCount(), 2);
Unkeyed* found = Unkeyed::getInstance(two.get());
ensure_equals(found, two.get());
}
ensure_equals(Unkeyed::instanceCount(), 1);
}
ensure_equals(Unkeyed::instanceCount(), 0);
}
// template<> template<>
// void object::test<2>()
// {
// ensure_equals(Unkeyed::instanceCount(), 0);
// {
// Unkeyed one;
// ensure_equals(Unkeyed::instanceCount(), 1);
// Unkeyed* found = Unkeyed::getInstance(&one);
// ensure_equals(found, &one);
// {
// boost::scoped_ptr<Unkeyed> two(new Unkeyed);
// ensure_equals(Unkeyed::instanceCount(), 2);
// Unkeyed* found = Unkeyed::getInstance(two.get());
// ensure_equals(found, two.get());
// }
// ensure_equals(Unkeyed::instanceCount(), 1);
// }
// ensure_equals(Unkeyed::instanceCount(), 0);
// }
template<> template<>
void object::test<3>()
{
Keyed one("one"), two("two"), three("three");
// We don't want to rely on the underlying container delivering keys
// in any particular order. That allows us the flexibility to
// reimplement LLInstanceTracker using, say, a hash map instead of a
// std::map. We DO insist that every key appear exactly once.
typedef std::vector<std::string> StringVector;
StringVector keys(Keyed::beginKeys(), Keyed::endKeys());
std::sort(keys.begin(), keys.end());
StringVector::const_iterator ki(keys.begin());
ensure_equals(*ki++, "one");
ensure_equals(*ki++, "three");
ensure_equals(*ki++, "two");
// Use ensure() here because ensure_equals would want to display
// mismatched values, and frankly that wouldn't help much.
ensure("didn't reach end", ki == keys.end());
// template<> template<>
// void object::test<3>()
// {
// Keyed one("one"), two("two"), three("three");
// // We don't want to rely on the underlying container delivering keys
// // in any particular order. That allows us the flexibility to
// // reimplement LLInstanceTracker using, say, a hash map instead of a
// // std::map. We DO insist that every key appear exactly once.
// typedef std::vector<std::string> StringVector;
// StringVector keys(Keyed::beginKeys(), Keyed::endKeys());
// std::sort(keys.begin(), keys.end());
// StringVector::const_iterator ki(keys.begin());
// ensure_equals(*ki++, "one");
// ensure_equals(*ki++, "three");
// ensure_equals(*ki++, "two");
// // Use ensure() here because ensure_equals would want to display
// // mismatched values, and frankly that wouldn't help much.
// ensure("didn't reach end", ki == keys.end());
// Use a somewhat different approach to order independence with
// beginInstances(): explicitly capture the instances we know in a
// set, and delete them as we iterate through.
typedef std::set<Keyed*> InstanceSet;
InstanceSet instances;
instances.insert(&one);
instances.insert(&two);
instances.insert(&three);
for (Keyed::instance_iter ii(Keyed::beginInstances()), iend(Keyed::endInstances());
ii != iend; ++ii)
{
Keyed& ref = *ii;
ensure_equals("spurious instance", instances.erase(&ref), 1);
}
ensure_equals("unreported instance", instances.size(), 0);
}
// // Use a somewhat different approach to order independence with
// // beginInstances(): explicitly capture the instances we know in a
// // set, and delete them as we iterate through.
// typedef std::set<Keyed*> InstanceSet;
// InstanceSet instances;
// instances.insert(&one);
// instances.insert(&two);
// instances.insert(&three);
// for (Keyed::instance_iter ii(Keyed::beginInstances()), iend(Keyed::endInstances());
// ii != iend; ++ii)
// {
// Keyed& ref = *ii;
// ensure_equals("spurious instance", instances.erase(&ref), 1);
// }
// ensure_equals("unreported instance", instances.size(), 0);
// }
template<> template<>
void object::test<4>()
{
Unkeyed one, two, three;
typedef std::set<Unkeyed*> KeySet;
KeySet instances;
instances.insert(&one);
instances.insert(&two);
instances.insert(&three);
{
for (Unkeyed::instance_iter ii(Unkeyed::beginInstances()), iend(Unkeyed::endInstances()); ii != iend; ++ii)
{
Unkeyed& ref = *ii;
ensure_equals("spurious instance", instances.erase(&ref), 1);
}
}
ensure_equals("unreported instance", instances.size(), 0);
}
// template<> template<>
// void object::test<4>()
// {
// Unkeyed one, two, three;
// typedef std::set<Unkeyed*> KeySet;
//
// KeySet instances;
// instances.insert(&one);
// instances.insert(&two);
// instances.insert(&three);
//for (Unkeyed::instance_iter ii(Unkeyed::beginInstances()), iend(Unkeyed::endInstances()); ii != iend; ++ii)
//{
// Unkeyed& ref = *ii;
// ensure_equals("spurious instance", instances.erase(&ref), 1);
//}
// ensure_equals("unreported instance", instances.size(), 0);
// }
} // namespace tut

View File

@ -791,8 +791,10 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
// if selection has changed, pop open list
else if (mList->getLastSelectedItem() != last_selected_item ||
(key == KEY_DOWN || key == KEY_UP) && !mList->isEmpty())
else if (mList->getLastSelectedItem() != last_selected_item
|| ((key == KEY_DOWN || key == KEY_UP)
&& mList->getCanSelect()
&& !mList->isEmpty()))
{
showList();
}

View File

@ -3107,4 +3107,5 @@ void LLFloater::stackWith(LLFloater& other)
mRectControl.clear(); // don't save rect of stacked floaters
setShape(next_rect);
}
}

View File

@ -214,7 +214,7 @@ LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key,
LLFloater* instance = getInstance(name, key);
if (instance)
{
instance->openFloater(instance->mKey);
instance->openFloater(key);
if (focus)
instance->setFocus(TRUE);
}

View File

@ -318,7 +318,7 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
LLFloaterWebContent::create(LLFloaterWebContent::Params().
url(url).
id(agent_id).
id(agent_id.asString()).
show_chrome(show_chrome).
window_class("profile").
preferred_media_size(profile_rect));
@ -338,7 +338,7 @@ bool LLAvatarActions::profileVisible(const LLUUID& id)
{
LLSD sd;
sd["id"] = id;
LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", sd));
LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
return browser && browser->isShown();
}
@ -348,7 +348,7 @@ void LLAvatarActions::hideProfile(const LLUUID& id)
{
LLSD sd;
sd["id"] = id;
LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("web_content", sd));
LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
if (browser)
{
browser->closeFloater();

View File

@ -71,8 +71,8 @@ public:
// create the LLSD arguments for the search floater
LLFloaterSearch::Params p;
p.category = category;
p.query = LLURI::unescape(search_text);
p.search.category = category;
p.search.query = LLURI::unescape(search_text);
// open the search floater and perform the requested search
LLFloaterReg::showInstance("search", p);
@ -81,14 +81,10 @@ public:
};
LLSearchHandler gSearchHandler;
LLFloaterSearch::_Params::_Params()
LLFloaterSearch::SearchQuery::SearchQuery()
: category("category", ""),
query("query")
{
trusted_content = true;
allow_address_entry = false;
}
{}
LLFloaterSearch::LLFloaterSearch(const Params& key) :
LLFloaterWebContent(key),
@ -117,8 +113,12 @@ BOOL LLFloaterSearch::postBuild()
void LLFloaterSearch::onOpen(const LLSD& key)
{
LLFloaterWebContent::onOpen(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)
@ -141,10 +141,8 @@ void LLFloaterSearch::godLevelChanged(U8 godlevel)
//getChildView("refresh_search")->setVisible( (godlevel != mSearchGodLevel));
}
void LLFloaterSearch::search(const LLSD &key)
void LLFloaterSearch::search(const SearchQuery &p)
{
Params p(key);
if (! mWebBrowser || !p.validateBlock())
{
return;

View File

@ -46,12 +46,17 @@ class LLFloaterSearch :
public LLFloaterWebContent
{
public:
struct _Params : public LLInitParam::Block<_Params, LLFloaterWebContent::Params>
struct SearchQuery : public LLInitParam::Block<SearchQuery>
{
Optional<std::string> category;
Optional<std::string> query;
_Params();
SearchQuery();
};
struct _Params : public LLInitParam::Block<_Params, LLFloaterWebContent::Params>
{
Optional<SearchQuery> search;
};
typedef LLSDParamAdapter<_Params> Params;
@ -69,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

View File

@ -53,8 +53,8 @@ LLFloaterWebContent::_Params::_Params()
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
LLInstanceTracker(params.id()),
mUUID(params.id().asString())
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 ));
@ -126,16 +126,16 @@ void LLFloaterWebContent::initializeURLHistory()
//static
LLFloater* LLFloaterWebContent::create( Params p)
{
lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id().asString() << llendl;
lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl;
if (!p.id.isProvided())
{
p.id = LLUUID::generateNewID();
p.id = LLUUID::generateNewID().asString();
}
if(!p.target.isProvided() || p.target() == "_blank")
if(p.target().empty() || p.target() == "_blank")
{
p.target = p.id().asString();
p.target = p.id();
}
S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
@ -172,7 +172,7 @@ LLFloater* LLFloaterWebContent::create( Params p)
//static
void LLFloaterWebContent::closeRequest(const std::string &uuid)
{
LLFloaterWebContent* floaterp = getInstance(LLUUID(uuid));
LLFloaterWebContent* floaterp = getInstance(uuid);
if (floaterp)
{
floaterp->closeFloater(false);
@ -182,7 +182,7 @@ void LLFloaterWebContent::closeRequest(const std::string &uuid)
//static
void LLFloaterWebContent::geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height)
{
LLFloaterWebContent* floaterp = getInstance(LLUUID(uuid));
LLFloaterWebContent* floaterp = getInstance(uuid);
if (floaterp)
{
floaterp->geometryChanged(x, y, width, height);
@ -219,16 +219,25 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
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.
LLViewerMedia::proxyWindowOpened(p.target(), p.id().asString());
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);
getChild<LLUICtrl>("address")->setEnabled(p.allow_address_entry && !p.trusted_content);
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)
{

View File

@ -40,7 +40,7 @@ class LLIconCtrl;
class LLFloaterWebContent :
public LLFloater,
public LLViewerMediaObserver,
public LLInstanceTracker<LLFloaterWebContent, LLUUID>
public LLInstanceTracker<LLFloaterWebContent, std::string>
{
public:
LOG_CLASS(LLFloaterWebContent);
@ -49,8 +49,8 @@ public:
{
Optional<std::string> url,
target,
window_class;
Optional<LLUUID> id;
window_class,
id;
Optional<bool> show_chrome,
allow_address_entry,
trusted_content;

View File

@ -2287,18 +2287,21 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
}
// static
void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg)
void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg, const char* msg_label)
{
LLUUID item_id;
S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
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.
@ -2309,6 +2312,7 @@ void LLInventoryModel::removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg
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);
}
}
@ -2325,7 +2329,7 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**)
<< llendl;
return;
}
LLInventoryModel::removeInventoryItem(agent_id, msg);
LLInventoryModel::removeInventoryItem(agent_id, msg, _PREHASH_InventoryData);
gInventory.notifyObservers();
}
@ -2447,7 +2451,7 @@ void LLInventoryModel::processRemoveInventoryObjects(LLMessageSystem* msg,
return;
}
LLInventoryModel::removeInventoryFolder( agent_id, msg );
LLInventoryModel::removeInventoryItem( agent_id, msg );
LLInventoryModel::removeInventoryItem( agent_id, msg, _PREHASH_ItemData );
gInventory.notifyObservers();
}

View File

@ -492,7 +492,7 @@ protected:
//--------------------------------------------------------------------
public:
static void processUpdateCreateInventoryItem(LLMessageSystem* msg, void**);
static void removeInventoryItem(LLUUID agent_id, LLMessageSystem* msg);
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);

View File

@ -125,7 +125,7 @@ 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(LLFloaterWebContent::Params().url(url).target(target).id(LLUUID(uuid)));
LLFloaterWebContent::create(LLFloaterWebContent::Params().url(url).target(target).id(uuid));
}
// static