From 0f89155e295f632187704999d8ecc01f464a88d8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 6 Jan 2010 10:08:02 -0500 Subject: EXT-3934: On SRV timeout, don't fail, proceed with original URI. --- indra/viewer_components/login/lllogin.cpp | 7 +++++-- indra/viewer_components/login/tests/lllogin_test.cpp | 14 ++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 364088ab31..f5bda71846 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -160,8 +160,11 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential seconds_to_timeout = credentials["cfg_srv_timeout"].asReal(); } - filter.eventAfter(seconds_to_timeout, - getProgressEventLLSD("offline", "fail.login")); + // If the SRV request times out (e.g. EXT-3934), simulate response: an + // array containing our original URI. + LLSD fakeResponse(LLSD::emptyArray()); + fakeResponse.append(uri); + filter.eventAfter(seconds_to_timeout, fakeResponse); std::string srv_pump_name = "LLAres"; if(credentials.has("cfg_srv_pump")) diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 7159959a4f..8463e6d2ca 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -215,14 +215,14 @@ namespace tut void llviewerlogin_object::test<1>() { DEBUG; - // Testing login with immediate repsonses from Ares and XMLPRC + // Testing login with immediate responses from Ares and XMLPRC // The response from both requests will come before the post request exits. // This tests an edge case of the login state handling. LLEventStream llaresPump("LLAres"); // Dummy LLAres pump. LLEventStream xmlrpcPump("LLXMLRPCTransaction"); // Dummy XMLRPC pump bool respond_immediately = true; - // Have 'dummy ares' repsond immediately. + // Have 'dummy ares' respond immediately. LLAresListener dummyLLAres("dummy_llares", respond_immediately); dummyLLAres.listenTo(llaresPump); @@ -251,7 +251,7 @@ namespace tut DEBUG; // Tests a successful login in with delayed responses. // Also includes 'failure' that cause the login module - // To re-attempt connection, once from a basic failure + // to re-attempt connection, once from a basic failure // and once from the 'indeterminate' response. set_test_name("LLLogin multiple srv uris w/ success"); @@ -464,6 +464,12 @@ namespace tut LLSD frame_event; mainloop.post(frame_event); - ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login"); + // In this state we have NOT sent a reply from LLAresListener -- in + // fact there's no such object. Nonetheless, we expect the timeout to + // have stepped the login module forward to try to authenticate with + // the original URI. + ensure_equals("Auth state", listener.lastEvent()["change"].asString(), "authenticating"); + ensure_equals("Attempt", listener.lastEvent()["data"]["attempt"].asInteger(), 1); + ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); } } -- cgit v1.2.3 From c55cb905fbe0964b08725291377d0e4c181b33a9 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Wed, 6 Jan 2010 12:24:14 -0500 Subject: EXT-3668- Trash icon now disables if nothing selected in appearance side panel. Remove link and delete outfit also correspondingly auto enable / disable properly now. -Reviewed by nyx --- indra/newview/llpaneloutfitsinventory.cpp | 29 +++++++++++++++++++--- indra/newview/llpaneloutfitsinventory.h | 1 + .../en/panel_outfits_inventory_gear_default.xml | 6 ++--- 3 files changed, 29 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 8e14074de1..4e26314fc3 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -303,6 +303,8 @@ void LLPanelOutfitsInventory::onClipboardAction(const LLSD& userdata) { std::string command_name = userdata.asString(); getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); + updateListCommands(); + updateVerbs(); } void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) @@ -343,6 +345,8 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) { onClipboardAction("delete"); } + updateListCommands(); + updateVerbs(); } BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) @@ -354,9 +358,9 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderView *folder = getActivePanel()->getRootFolder(); if (folder) { - can_delete = TRUE; std::set selection_set; folder->getSelectionList(selection_set); + can_delete = (selection_set.size() > 0); for (std::set::iterator iter = selection_set.begin(); iter != selection_set.end(); ++iter) @@ -375,9 +379,9 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) LLFolderView *folder = getActivePanel()->getRootFolder(); if (folder) { - can_delete = TRUE; std::set selection_set; folder->getSelectionList(selection_set); + can_delete = (selection_set.size() > 0); for (std::set::iterator iter = selection_set.begin(); iter != selection_set.end(); ++iter) @@ -391,10 +395,14 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) } return FALSE; } + if (command_name == "rename" || + command_name == "delete_outfit") + { + return (getCorrectListenerForAction() != NULL) && hasItemsSelected(); + } if (command_name == "edit" || command_name == "wear" || - command_name == "add" || - command_name == "remove" + command_name == "add" ) { return (getCorrectListenerForAction() != NULL); @@ -402,6 +410,19 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) return TRUE; } +bool LLPanelOutfitsInventory::hasItemsSelected() +{ + bool has_items_selected = false; + LLFolderView *folder = getActivePanel()->getRootFolder(); + if (folder) + { + std::set selection_set; + folder->getSelectionList(selection_set); + has_items_selected = (selection_set.size() > 0); + } + return has_items_selected; +} + bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept) { *accept = ACCEPT_NO; diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 1e084750a0..77ed15dd96 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -114,6 +114,7 @@ protected: BOOL isActionEnabled(const LLSD& command_name); void onCustomAction(const LLSD& command_name); bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); + bool hasItemsSelected(); private: LLPanel* mListCommands; LLMenuGL* mMenuGearDefault; diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml index 7b88fca7c3..56d4528a40 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml @@ -54,7 +54,7 @@ parameter="rename" /> + parameter="delete_outfit" /> -- cgit v1.2.3 From a84beb2a4373d71b0ff171883af9645f9a98e26f Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Wed, 6 Jan 2010 12:25:23 -0500 Subject: EXT-3692: Buy & Pay buttons on side panel object profile now only enabled when you can pay or buy the object. -Reviewed by nyx --- indra/newview/llsidepaneltaskinfo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 50cec3184d..0b8f66c5f3 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -215,6 +215,10 @@ void LLSidepanelTaskInfo::disableAll() childSetVisible("E:", FALSE); childSetVisible("N:", FALSE); childSetVisible("F:", FALSE); + + mOpenBtn->setEnabled(FALSE); + mPayBtn->setEnabled(FALSE); + mBuyBtn->setEnabled(FALSE); } void LLSidepanelTaskInfo::refresh() @@ -1119,6 +1123,8 @@ void LLSidepanelTaskInfo::updateVerbs() */ mOpenBtn->setEnabled(enable_object_open()); + mPayBtn->setEnabled(enable_pay_object()); + mBuyBtn->setEnabled(enable_buy_object()); } void LLSidepanelTaskInfo::onOpenButtonClicked() -- cgit v1.2.3 From 84ff7485ae161fe35963da2f35e111b685719ece Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Wed, 6 Jan 2010 13:13:59 -0500 Subject: Minor merge fix of redundant test --- indra/newview/llpaneloutfitsinventory.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 2d4c034f8f..29fa4b319c 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -363,7 +363,7 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) { const std::string command_name = userdata.asString(); - if (command_name == "delete") + if (command_name == "delete" || command_name == "remove") { BOOL can_delete = FALSE; LLFolderView *folder = getActivePanel()->getRootFolder(); @@ -423,7 +423,6 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "edit" || - command_name == "wear" || command_name == "add" ) { -- cgit v1.2.3 From 2978609575eac6067b84fb4734228a81014ae26f Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 6 Jan 2010 11:38:00 -0800 Subject: Fix for EXT-3730 (Current (temporary) Find URL returns an HTTP status code of 500 (Internal server error)) We now no longer check the error code returned from the MIME type probe. If we have a mime type, use it, regardless of the status. If not, default to the web plugin and let it handle error reporting. --- indra/newview/llviewermedia.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 6e11788e0a..7e8c8eb92e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -170,12 +170,15 @@ public: // accept this and go past it in the MIME type probe // 302 means the resource can be found temporarily in a different place - added this for join.secondlife.com // 499 is a code specifc to join.secondlife.com (????) apparently safe to ignore - if( ((status >= 200) && (status < 300)) || - ((status >= 400) && (status < 499)) || - (status == 500) || - (status == 302) || - (status == 499) - ) +// if( ((status >= 200) && (status < 300)) || +// ((status >= 400) && (status < 499)) || +// (status == 500) || +// (status == 302) || +// (status == 499) +// ) + // We now no longer check the error code returned from the probe. + // If we have a mime type, use it. If not, default to the web plugin and let it handle error reporting. + if(1) { // The probe was successful. if(mime_type.empty()) -- cgit v1.2.3 From 7586d8fcfde811cb04fb1c95aa0aa235b8df6aff Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 6 Jan 2010 12:01:39 -0800 Subject: fix for EXT-2903 ([BSI] Activating inspector while "Zoomed into Media" results in broken inspector) Media Focus and the inspector were fighting over the object selection. Fixed by calling LLViewerMediaFocus::clearFocus() right before setting the selection in LLInspectObject::onOpen(). --- indra/newview/llinspectobject.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index cb35a287e9..b3bac0453a 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -41,6 +41,7 @@ #include "llslurl.h" #include "llviewermenu.h" // handle_object_touch(), handle_buy() #include "llviewermedia.h" +#include "llviewermediafocus.h" #include "llviewerobjectlist.h" // to select the requested object // Linden libraries @@ -214,6 +215,10 @@ void LLInspectObject::onOpen(const LLSD& data) LLViewerObject* obj = gObjectList.findObject( mObjectID ); if (obj) { + // Media focus and this code fight over the select manager. + // Make sure any media is unfocused before changing the selection here. + LLViewerMediaFocus::getInstance()->clearFocus(); + LLSelectMgr::instance().deselectAll(); mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj); -- cgit v1.2.3