From 5c8f22c640fb6955bed345128163a5d5677d8a23 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 27 Jul 2011 15:34:58 -0700 Subject: fix for gcc --- indra/newview/llfloaterwebcontent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 8aeb5675a5..5269e9d1d7 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -53,7 +53,7 @@ LLFloaterWebContent::_Params::_Params() LLFloaterWebContent::LLFloaterWebContent( const Params& params ) : LLFloater( params ), - LLInstanceTracker(params.id()), + LLInstanceTracker(params.id()), mUUID(params.id().asString()) { mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this )); -- cgit v1.2.3 From 5e989213ad5869c21b3b595f3b4d63e31087f8d0 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Wed, 27 Jul 2011 16:24:08 -0700 Subject: CHOP-761 Items now disappear when the sim says so. --- indra/newview/llinventorymodel.cpp | 14 +++++++++----- indra/newview/llinventorymodel.h | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'indra/newview') 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); -- cgit v1.2.3 From ca9b47ba57efec8953474a5c215f1d7802d927bd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 28 Jul 2011 17:38:35 -0700 Subject: EXP-1055 FIX Profile button not toggled on when Profile open in Basic mode --- indra/newview/llavataractions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 5ccd5ff073..03abde938f 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -338,7 +338,7 @@ bool LLAvatarActions::profileVisible(const LLUUID& id) { LLSD sd; sd["id"] = id; - LLFloaterWebContent *browser = dynamic_cast (LLFloaterReg::findInstance("web_content", sd)); + LLFloaterWebContent *browser = dynamic_cast (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 (LLFloaterReg::findInstance("web_content", sd)); + LLFloaterWebContent *browser = dynamic_cast (LLFloaterReg::findInstance("profile", sd)); if (browser) { browser->closeFloater(); -- cgit v1.2.3 From 63a857f0c7f09c45eca9034c41ca1fdfc1ae95b5 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 28 Jul 2011 19:09:48 -0700 Subject: EXP-1054 FIX Entering search term in search box in Viewer UI does not produce search results if search window is already open use new parameters when opening existing floater --- indra/newview/llfloatersearch.cpp | 24 +++++++++++------------- indra/newview/llfloatersearch.h | 11 ++++++++--- 2 files changed, 19 insertions(+), 16 deletions(-) (limited to 'indra/newview') 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 { Optional category; Optional query; - _Params(); + SearchQuery(); + }; + + struct _Params : public LLInitParam::Block<_Params, LLFloaterWebContent::Params> + { + Optional 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 -- cgit v1.2.3 From feddda6740f55c5e872be4b608d516e86e0c4182 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 29 Jul 2011 16:38:07 -0700 Subject: EXP-1056 FIX Web popup issues with Web Content Browser changed browser id back to a string so it accepts malformed uuid strings coming from webkit - "{uuid}" instead of "uuid" --- indra/newview/llavataractions.cpp | 2 +- indra/newview/llfloaterwebcontent.cpp | 18 +++++++++--------- indra/newview/llfloaterwebcontent.h | 6 +++--- indra/newview/llweb.cpp | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 03abde938f..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 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)); diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 5269e9d1d7..500ddc3bc1 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(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,7 +219,7 @@ 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"); 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 + public LLInstanceTracker { public: LOG_CLASS(LLFloaterWebContent); @@ -49,8 +49,8 @@ public: { Optional url, target, - window_class; - Optional id; + window_class, + id; Optional show_chrome, allow_address_entry, trusted_content; 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 -- cgit v1.2.3 From c7a2f5c4fba4ec8a782f96aa379b1372ed31a317 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 29 Jul 2011 17:29:02 -0700 Subject: EXP-1057 FIX Cursor doesn't go to the input field on the Find Floater due to lack of window focus also allow right clip to copy url from disabled address bar --- indra/newview/llfloaterwebcontent.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 500ddc3bc1..03e90a3d27 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -223,12 +223,21 @@ void LLFloaterWebContent::open_media(const Params& p) mWebBrowser->setHomePageUrl(p.url, "text/html"); mWebBrowser->setTarget(p.target); mWebBrowser->navigateTo(p.url, "text/html"); - + set_current_url(p.url); getChild("status_bar")->setVisible(p.show_chrome); getChild("nav_controls")->setVisible(p.show_chrome); - getChild("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) { -- cgit v1.2.3