summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llavataractions.cpp6
-rw-r--r--indra/newview/llfloatersearch.cpp24
-rw-r--r--indra/newview/llfloatersearch.h11
-rw-r--r--indra/newview/llfloaterwebcontent.cpp31
-rw-r--r--indra/newview/llfloaterwebcontent.h6
-rw-r--r--indra/newview/llinventorymodel.cpp14
-rw-r--r--indra/newview/llinventorymodel.h2
-rw-r--r--indra/newview/llweb.cpp2
8 files changed, 56 insertions, 40 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 5ccd5ff073..f22b02093f 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -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();
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index ce0bba802d..2a946b1edf 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -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;
diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h
index a4043b2353..35b268e1b2 100644
--- a/indra/newview/llfloatersearch.h
+++ b/indra/newview/llfloatersearch.h
@@ -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
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 8aeb5675a5..03e90a3d27 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -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)
{
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 2e3c6ffd84..36e214b7a9 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -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;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 50b5a2a5e5..e86c427ae2 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -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();
}
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index c3775ac088..e0e81f1006 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -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);
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index e4cdfaaaaf..6f7115ff6d 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -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