From 10d92237adca8bffc82c887dbd37b988602b2d59 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 15 Sep 2011 16:39:46 -0700 Subject: * Re-enabling outbox --- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llsidepanelinventory.cpp | 2 +- indra/newview/llviewermedia.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a36aa3dedf..5482b07ce5 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -71,7 +71,7 @@ #include "llwearablelist.h" // Marketplace outbox current disabled -#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_PANEL +#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_PANEL typedef std::pair<LLUUID, LLUUID> two_uuids_t; typedef std::list<two_uuids_t> two_uuids_list_t; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index bd62b5c101..ec1de4af21 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -68,7 +68,7 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_ #define AUTO_EXPAND_INBOX 0 // Temporarily disabling the outbox until we straighten out the API -#define ENABLE_MERCHANT_OUTBOX_PANEL 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU +#define ENABLE_MERCHANT_OUTBOX_PANEL 1 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 13dbc5e386..e7f05dcaa3 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1368,7 +1368,7 @@ void LLViewerMedia::removeCookie(const std::string &name, const std::string &dom // This is defined in two files but I don't want to create a dependence between this and llsidepanelinventory // just to be able to temporarily disable the outbox. -#define ENABLE_INVENTORY_DISPLAY_OUTBOX 0 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU +#define ENABLE_INVENTORY_DISPLAY_OUTBOX 1 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU class LLInventoryUserStatusResponder : public LLHTTPClient::Responder { -- cgit v1.2.3 From 5af39ea28be1a76ec0c3042a0bf34e7d64835c18 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 16 Sep 2011 11:46:37 -0700 Subject: EXP-1169 FIX -- No synch error icon given on Outbox on Agni where API does not exist * Moved marketplace URL related functions into a new file llmarketplacefunctions.cpp/h. This will the future home of more marketplace-related functions. * Disabled sync button when the marketplace API is unavailable. --- indra/newview/CMakeLists.txt | 2 + indra/newview/llmarketplacefunctions.cpp | 80 +++++++++++++++++++++++++++++ indra/newview/llmarketplacefunctions.h | 42 ++++++++++++++++ indra/newview/llpanelmarketplaceoutbox.cpp | 22 ++------ indra/newview/llviewermedia.cpp | 81 +++++++++++++----------------- 5 files changed, 165 insertions(+), 62 deletions(-) create mode 100644 indra/newview/llmarketplacefunctions.cpp create mode 100644 indra/newview/llmarketplacefunctions.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 11b19ca4fe..8c1f98979b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -310,6 +310,7 @@ set(viewer_SOURCE_FILES llmaniprotate.cpp llmanipscale.cpp llmaniptranslate.cpp + llmarketplacefunctions.cpp llmediactrl.cpp llmediadataclient.cpp llmemoryview.cpp @@ -873,6 +874,7 @@ set(viewer_HEADER_FILES llmaniprotate.h llmanipscale.h llmaniptranslate.h + llmarketplacefunctions.h llmediactrl.h llmediadataclient.h llmemoryview.h diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp new file mode 100644 index 0000000000..599731a641 --- /dev/null +++ b/indra/newview/llmarketplacefunctions.cpp @@ -0,0 +1,80 @@ +/** + * @file llmarketplacefunctions.cpp + * @brief Implementation of assorted functions related to the marketplace + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llmarketplacefunctions.h" + +#include "llagent.h" +#include "llviewernetwork.h" + + +std::string getMarketplaceBaseURL() +{ + std::string url = "https://marketplace.secondlife.com/"; + + if (!LLGridManager::getInstance()->isInProductionGrid()) + { + std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); + url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str()); + } + + url += "api/1/users/"; + url += gAgent.getID().getString(); + + return url; +} + +std::string getMarketplaceURL_InventoryImport() +{ + std::string url = getMarketplaceBaseURL(); + + url += "/inventory_import"; + + return url; +} + +std::string getMarketplaceURL_UserStatus() +{ + std::string url = getMarketplaceBaseURL(); + + url += "/user_status"; + + return url; +} + + +static bool gMarketplaceSyncEnabled = false; + +bool getMarketplaceSyncEnabled() +{ + return gMarketplaceSyncEnabled; +} + +void setMarketplaceSyncEnabled(bool syncEnabled) +{ + gMarketplaceSyncEnabled = syncEnabled; +} diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h new file mode 100644 index 0000000000..e80e6a471c --- /dev/null +++ b/indra/newview/llmarketplacefunctions.h @@ -0,0 +1,42 @@ +/** + * @file llmarketplacefunctions.h + * @brief Miscellaneous marketplace-related functions and classes + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLMARKETPLACEFUNCTIONS_H +#define LL_LLMARKETPLACEFUNCTIONS_H + + +std::string getMarketplaceURL_InventoryImport(); +std::string getMarketplaceURL_UserStatus(); + +bool getMarketplaceSyncEnabled(); +void setMarketplaceSyncEnabled(bool syncEnabled); + + +#endif // LL_LLMARKETPLACEFUNCTIONS_H + + + diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index 73fb92ff72..2764527c44 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -35,6 +35,7 @@ #include "lleventcoro.h" #include "llinventorypanel.h" #include "llloadingindicator.h" +#include "llmarketplacefunctions.h" #include "llnotificationsutil.h" #include "llpanelmarketplaceinbox.h" #include "llsdutil.h" @@ -82,7 +83,7 @@ void LLPanelMarketplaceOutbox::handleLoginComplete() { mSyncButton = getChild<LLButton>("outbox_sync_btn"); mSyncButton->setCommitCallback(boost::bind(&LLPanelMarketplaceOutbox::onSyncButtonClicked, this)); - mSyncButton->setEnabled(!isOutboxEmpty()); + mSyncButton->setEnabled(getMarketplaceSyncEnabled() && !isOutboxEmpty()); mSyncIndicator = getChild<LLLoadingIndicator>("outbox_sync_indicator"); } @@ -223,20 +224,7 @@ void LLPanelMarketplaceOutbox::onSyncButtonClicked() updateSyncButtonStatus(); // Make the url for the inventory import request - std::string url = "https://marketplace.secondlife.com/"; - - if (!LLGridManager::getInstance()->isInProductionGrid()) - { - std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); - url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str()); - - // TEMP for Jim's pdp - //url = "http://pdp24.lindenlab.com:3000/"; - } - - url += "api/1/users/"; - url += gAgent.getID().getString(); - url += "/inventory_import"; + std::string url = getMarketplaceURL_InventoryImport(); llinfos << "http get: " << url << llendl; LLHTTPClient::get(url, new LLInventorySyncResponder(this), LLViewerMedia::getHeaders()); @@ -311,7 +299,7 @@ void LLPanelMarketplaceOutbox::updateSyncButtonStatus() mSyncIndicator->setVisible(false); mSyncButton->setVisible(true); - mSyncButton->setEnabled(!isOutboxEmpty()); + mSyncButton->setEnabled(getMarketplaceSyncEnabled() && !isOutboxEmpty()); } } @@ -352,7 +340,7 @@ void LLPanelMarketplaceOutbox::draw() if (!isSyncInProgress()) { - mSyncButton->setEnabled(not_empty); + mSyncButton->setEnabled(getMarketplaceSyncEnabled() && not_empty); } LLPanel::draw(); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index e7f05dcaa3..b60881b5f1 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -26,51 +26,49 @@ #include "llviewerprecompiledheaders.h" +#include "llviewermedia.h" + #include "llagent.h" #include "llagentcamera.h" -#include "llviewermedia.h" -#include "llviewermediafocus.h" -#include "llmimetypes.h" +#include "llappviewer.h" +#include "llaudioengine.h" // for gAudiop +#include "llcallbacklist.h" +#include "lldir.h" +#include "lldiriterator.h" +#include "llevent.h" // LLSimpleListener +#include "llfilepicker.h" +#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows. +#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows. +#include "llfocusmgr.h" +#include "llkeyboard.h" +#include "lllogininstance.h" +#include "llmarketplacefunctions.h" #include "llmediaentry.h" +#include "llmimetypes.h" +#include "llmutelist.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" +#include "llpanelprofile.h" +#include "llparcel.h" +#include "llpluginclassmedia.h" +#include "llplugincookiestore.h" +#include "llurldispatcher.h" +#include "lluuid.h" #include "llversioninfo.h" #include "llviewercontrol.h" -#include "llviewertexture.h" +#include "llviewermediafocus.h" #include "llviewerparcelmedia.h" #include "llviewerparcelmgr.h" +#include "llviewerregion.h" +#include "llviewertexture.h" #include "llviewertexturelist.h" -#include "llvovolume.h" -#include "llpluginclassmedia.h" -#include "llplugincookiestore.h" #include "llviewerwindow.h" -#include "llfocusmgr.h" -#include "llcallbacklist.h" -#include "llparcel.h" -#include "llaudioengine.h" // for gAudiop -#include "llurldispatcher.h" #include "llvoavatar.h" #include "llvoavatarself.h" -#include "llviewerregion.h" +#include "llvovolume.h" #include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this! -#include "llfilepicker.h" -#include "llnotifications.h" -#include "lldir.h" -#include "lldiriterator.h" -#include "llevent.h" // LLSimpleListener -#include "llnotificationsutil.h" -#include "lluuid.h" -#include "llkeyboard.h" -#include "llmutelist.h" -#include "llpanelprofile.h" -#include "llappviewer.h" -#include "lllogininstance.h" -//#include "llfirstuse.h" -#include "llviewernetwork.h" #include "llwindow.h" - -#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows. -#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows. - #include <boost/bind.hpp> // for SkinFolder listener #include <boost/signals2.hpp> @@ -1394,14 +1392,20 @@ public: #if ENABLE_INVENTORY_DISPLAY_OUTBOX gSavedSettings.setBOOL("InventoryDisplayOutbox", true); #endif + + setMarketplaceSyncEnabled(true); } else if (status == 401) { // API is available for use but OpenID authorization failed gSavedSettings.setBOOL("InventoryDisplayInbox", true); + + setMarketplaceSyncEnabled(false); } else { + setMarketplaceSyncEnabled(false); + // API in unavailable llinfos << "Marketplace API is unavailable -- Inbox may be disabled, status = " << status << ", reason = " << reason << llendl; } @@ -1411,20 +1415,7 @@ public: void doOnetimeEarlyHTTPRequests() { - std::string url = "https://marketplace.secondlife.com/"; - - if (!LLGridManager::getInstance()->isInProductionGrid()) - { - std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); - url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str()); - - // TEMP for Jim's pdp - //url = "http://pdp24.lindenlab.com:3000/"; - } - - url += "api/1/users/"; - url += gAgent.getID().getString(); - url += "/user_status"; + std::string url = getMarketplaceURL_UserStatus(); llinfos << "http get: " << url << llendl; LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), LLViewerMedia::getHeaders()); -- cgit v1.2.3 From 9740887b90791b3fad37e58ab9e2ac772e8d2e95 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 14 Nov 2011 14:40:58 -0800 Subject: Build fix from bad merge --- indra/newview/llviewermedia.cpp | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 47aa2d8656..6fc4dd25af 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -33,37 +33,14 @@ #include "llappviewer.h" #include "llaudioengine.h" // for gAudiop #include "llcallbacklist.h" -#include "llparcel.h" -#include "llaudioengine.h" // for gAudiop -#include "llurldispatcher.h" -#include "llvoavatar.h" -#include "llvoavatarself.h" -#include "llviewerregion.h" -#include "llwebprofile.h" -#include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this! -#include "llfilepicker.h" -#include "llnotifications.h" #include "lldir.h" #include "lldiriterator.h" #include "llevent.h" // LLSimpleListener #include "llfilepicker.h" -#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows. -#include "llnotificationsutil.h" -#include "lluuid.h" -#include "llkeyboard.h" -#include "llmutelist.h" -#include "llpanelprofile.h" -#include "llappviewer.h" -#include "lllogininstance.h" -//#include "llfirstuse.h" -#include "llviewernetwork.h" -#include "llwindow.h" - - #include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows. #include "llfocusmgr.h" #include "llkeyboard.h" -#include "lllogininstance.h" +#include "lllogininstance.h" #include "llmarketplacefunctions.h" #include "llmediaentry.h" #include "llmimetypes.h" @@ -77,8 +54,9 @@ #include "llurldispatcher.h" #include "lluuid.h" #include "llversioninfo.h" -#include "llviewercontrol.h" #include "llviewermediafocus.h" +#include "llviewercontrol.h" +#include "llviewernetwork.h" #include "llviewerparcelmedia.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" @@ -88,6 +66,7 @@ #include "llvoavatar.h" #include "llvoavatarself.h" #include "llvovolume.h" +#include "llwebprofile.h" #include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this! #include "llwindow.h" -- cgit v1.2.3 From c24645f7b51ea27e1686bbe72470a9f3c09fc676 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 14 Nov 2011 14:41:26 -0800 Subject: Updated url for damballah to use secondlife-staging --- indra/newview/llmarketplacefunctions.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 599731a641..99b0389413 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -38,8 +38,16 @@ std::string getMarketplaceBaseURL() if (!LLGridManager::getInstance()->isInProductionGrid()) { - std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); - url = llformat("https://marketplace.%s.lindenlab.com/", utf8str_tolower(gridLabel).c_str()); + std::string gridLabel = utf8str_tolower(LLGridManager::getInstance()->getGridLabel()); + + if (gridLabel == "damballah") + { + url = "https://marketplace.secondlife-staging.com/"; + } + else + { + url = llformat("https://marketplace.%s.lindenlab.com/", gridLabel.c_str()); + } } url += "api/1/users/"; @@ -67,7 +75,7 @@ std::string getMarketplaceURL_UserStatus() } -static bool gMarketplaceSyncEnabled = false; +static bool gMarketplaceSyncEnabled = true; bool getMarketplaceSyncEnabled() { -- cgit v1.2.3 From 570d02dc7e41c3e08477e7f759d632db78690eb4 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 29 Nov 2011 16:57:37 -0800 Subject: Initial merchant outbox button --- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/commands.xml | 10 ++ indra/newview/llfloateroutbox.cpp | 68 +++++++++++ indra/newview/llfloateroutbox.h | 56 +++++++++ indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/skins/default/textures/textures.xml | 1 + .../default/textures/toolbar_icons/outbox.png | Bin 0 -> 2987 bytes .../default/xui/en/floater_merchant_outbox.xml | 134 +++++++++++++++++++++ .../skins/default/xui/en/floater_toybox.xml | 12 +- indra/newview/skins/default/xui/en/strings.xml | 2 + 10 files changed, 281 insertions(+), 6 deletions(-) create mode 100644 indra/newview/llfloateroutbox.cpp create mode 100644 indra/newview/llfloateroutbox.h create mode 100644 indra/newview/skins/default/textures/toolbar_icons/outbox.png create mode 100644 indra/newview/skins/default/xui/en/floater_merchant_outbox.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 26e6c485f3..83db4548de 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -216,6 +216,7 @@ set(viewer_SOURCE_FILES llfloaternotificationsconsole.cpp llfloaterobjectweights.cpp llfloateropenobject.cpp + llfloateroutbox.cpp llfloaterpay.cpp llfloaterperms.cpp llfloaterpostprocess.cpp @@ -789,6 +790,7 @@ set(viewer_HEADER_FILES llfloaternotificationsconsole.h llfloaterobjectweights.h llfloateropenobject.h + llfloateroutbox.h llfloaterpay.h llfloaterperms.h llfloaterpostprocess.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index a44b895f7b..c12d22adc3 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -135,6 +135,16 @@ is_running_function="Floater.IsOpen" is_running_parameters="moveview" /> + <command name="outbox" + available_in_toybox="true" + icon="Command_Outbox_Icon" + label_ref="Command_Outbox_Label" + tooltip_ref="Command_Outbox_Tooltip" + execute_function="Floater.ToggleOrBringToFront" + execute_parameters="outbox" + is_running_function="Floater.IsOpen" + is_running_parameters="outbox" + /> <command name="people" available_in_toybox="true" icon="Command_People_Icon" diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp new file mode 100644 index 0000000000..8fea3d674e --- /dev/null +++ b/indra/newview/llfloateroutbox.cpp @@ -0,0 +1,68 @@ +/** + * @file llfloateroutbox.cpp + * @brief Implementation of the merchant outbox window + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloateroutbox.h" + +#include "llfloaterreg.h" +#include "lltransientfloatermgr.h" + + +///---------------------------------------------------------------------------- +/// LLFloaterOutbox +///---------------------------------------------------------------------------- + +LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) + : LLFloater(key) + , mPanelOutboxInventory(NULL) +{ + LLTransientFloaterMgr::getInstance()->addControlView(this); +} + +LLFloaterOutbox::~LLFloaterOutbox() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(this); +} + +BOOL LLFloaterOutbox::postBuild() +{ + return TRUE; +} + +void LLFloaterOutbox::onOpen(const LLSD& key) +{ + //LLFirstUse::useInventory(); +} + +void LLFloaterOutbox::onClose(bool app_quitting) +{ + LLFloater::onClose(app_quitting); + if (mKey.asInteger() > 1) + { + destroy(); + } +} diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h new file mode 100644 index 0000000000..cb5c2be81c --- /dev/null +++ b/indra/newview/llfloateroutbox.h @@ -0,0 +1,56 @@ +/** + * @file llfloateroutbox.h + * @brief LLFloaterOutbox + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * ABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATEROUTBOX_H +#define LL_LLFLOATEROUTBOX_H + +#include "llfloater.h" +#include "llfoldertype.h" + +class LLInventoryPanel; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFloaterOutbox +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLFloaterOutbox : public LLFloater +{ +public: + LLFloaterOutbox(const LLSD& key); + ~LLFloaterOutbox(); + + BOOL postBuild(); + + // Inherited functionality + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); + +private: + LLInventoryPanel* mPanelOutboxInventory; +}; + +#endif // LL_LLFLOATEROUTBOX_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index acbc5f8fb6..24070018c2 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -82,6 +82,7 @@ #include "llfloaternotificationsconsole.h" #include "llfloaterobjectweights.h" #include "llfloateropenobject.h" +#include "llfloateroutbox.h" #include "llfloaterpay.h" #include "llfloaterperms.h" #include "llfloaterpostprocess.h" @@ -237,6 +238,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterObjectWeights>); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>); + LLFloaterReg::add("outbox", "floater_merchant_outbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOutbox>); LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>); LLFloaterPayUtil::registerFloater(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 8702ebde2a..5da1276881 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -137,6 +137,7 @@ with the same filename but different name <texture name="Command_MiniCart_Icon" file_name="toolbar_icons/mini_cart.png" preload="true" /> <texture name="Command_MiniMap_Icon" file_name="toolbar_icons/mini_map.png" preload="true" /> <texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" /> + <texture name="Command_Outbox_Icon" file_name="toolbar_icons/outbox.png" preload="true" /> <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" /> <texture name="Command_Picks_Icon" file_name="toolbar_icons/picks.png" preload="true" /> <texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" /> diff --git a/indra/newview/skins/default/textures/toolbar_icons/outbox.png b/indra/newview/skins/default/textures/toolbar_icons/outbox.png new file mode 100644 index 0000000000..9fcf46794d Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/outbox.png differ diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml new file mode 100644 index 0000000000..2f8a83c072 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<floater + open_positioning="cascading" + can_close="true" + can_resize="true" + height="400" + help_topic="floater_merchant_outbox" + min_width="333" + min_height="440" + name="floater_merchant_outbox" + save_rect="true" + save_visibility="true" + reuse_instance="true" + title="MERCHANT OUTBOX" + width="333" > + <panel + follows="all" + layout="topleft" + left="0" + name="marketplace_outbox" + class="panel_marketplace_outbox" + top="0" + label="" + height="400" + width="330"> + <string name="OutboxLabelWithArg">Merchant outbox ([NUM])</string> + <string name="OutboxLabelNoArg">Merchant outbox</string> + <button + label="Merchant outbox" + font="SansSerifMedium" + name="outbox_btn" + height="35" + width="308" + image_unselected="MarketplaceBtn_Off" + image_selected="MarketplaceBtn_Selected" + halign="left" + handle_right_mouse="false" + follows="top|left|right" + is_toggle="true" + tab_stop="false" + pad_left="35" + top="0" + left="10" /> + <button + image_unselected="OutboxPush_Off" + image_selected="OutboxPush_Selected" + image_hover_selected="OutboxPush_Selected_Over" + image_hover_unselected="OutboxPush_Over" + image_disabled_selected="OutboxPush_Selected_Disabled" + image_disabled="OutboxPush_Disabled" + image_pressed="OutboxPush_Press" + image_pressed_selected="OutboxPush_Selected_Press" + label="" + tool_tip="Push to my Marketplace Storefront" + is_toggle="false" + name="outbox_sync_btn" + follows="top|right" + tab_stop="false" + halign="center" + top="6" + left="-50" + height="23" + width="32" + enabled="false" /> + <loading_indicator + follows="top|right" + name="outbox_sync_indicator" + top="6" + left="-50" + height="23" + width="32" + images_per_sec="1.15" + tab_stop="false" + visible="false"> + <images> + <image name="OutboxPush_Progress_1"/> + <image name="OutboxPush_Progress_2"/> + <image name="OutboxPush_Progress_3"/> + <image name="OutboxPush_Progress_4"/> + <image name="OutboxPush_Progress_5"/> + <image name="OutboxPush_Progress_6"/> + </images> + </loading_indicator> + <panel + follows="all" + left="10" + bottom="400" + width="308" + top="35" + bg_opaque_color="InventoryBackgroundColor" + background_visible="true" + background_opaque="true" + > + <panel + name="outbox_inventory_placeholder_panel" + follows="all" + layout="topleft" + top="0" + left="0" + width="308" + height="365" + bg_opaque_color="InventoryBackgroundColor" + background_visible="true" + background_opaque="true" + > + <text + name="outbox_inventory_placeholder_title" + type="string" + follows="all" + layout="topleft" + top="10" + left="0" + width="308" + height="25" + wrap="true" + halign="center" + font="SansSerifBold"> + Loading... + </text> + <text + name="outbox_inventory_placeholder_text" + type="string" + follows="all" + layout="topleft" + top="35" + left="0" + width="308" + height="130" + wrap="true" + halign="left" /> + </panel> + </panel> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 493d44a9cf..72e6187a14 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -5,7 +5,7 @@ can_minimize="false" can_resize="false" default_tab_group="1" - height="330" + height="375" help_topic="toybox" layout="topleft" legacy_header_height="18" @@ -46,7 +46,7 @@ Buttons will appear as shown or as icon-only depending on each toolbar's settings. </text> <toolbar - bottom="265" + bottom="310" button_display_mode="icons_with_text" follows="all" left="20" @@ -82,11 +82,11 @@ <panel bevel_style="none" border="true" - bottom="266" + bottom="311" follows="left|bottom|right" left="20" right="-20" - top="266" /> + top="311" /> <button follows="left|bottom|right" height="23" @@ -95,7 +95,7 @@ layout="topleft" left="185" name="btn_clear_all" - top="285" + top="330" width="130"> <button.commit_callback function="Toybox.ClearAll" /> </button> @@ -107,7 +107,7 @@ layout="topleft" left="335" name="btn_restore_defaults" - top="285" + top="330" width="130"> <button.commit_callback function="Toybox.RestoreDefaults" /> </button> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index befcc5dd87..105c6095e6 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3675,6 +3675,7 @@ Try enclosing path to the editor with double quotes. <string name="Command_Marketplace_Label">Marketplace</string> <string name="Command_MiniMap_Label">Mini-map</string> <string name="Command_Move_Label">Move</string> + <string name="Command_Outbox_Label">Merchant outbox</string> <string name="Command_People_Label">People</string> <string name="Command_Picks_Label">Picks</string> <string name="Command_Places_Label">Places</string> @@ -3700,6 +3701,7 @@ Try enclosing path to the editor with double quotes. <string name="Command_Marketplace_Tooltip">Go shopping</string> <string name="Command_MiniMap_Tooltip">Show nearby people</string> <string name="Command_Move_Tooltip">Moving your avatar</string> + <string name="Command_Outbox_Tooltip">Transfer items to your marketplace for sale</string> <string name="Command_People_Tooltip">Friends, groups, and nearby people</string> <string name="Command_Picks_Tooltip">Places to show as favorites in your profile</string> <string name="Command_Places_Tooltip">Places you've saved</string> -- cgit v1.2.3 From 591891306366e683416b187207fa2b94bdc263a8 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 5 Dec 2011 13:37:37 -0800 Subject: First pass at connecting to the new marketplace API --- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llmarketplacefunctions.cpp | 24 ++-- indra/newview/llmarketplacefunctions.h | 17 ++- indra/newview/llpanelmarketplaceoutbox.cpp | 158 ++++++++++++++++----- indra/newview/llpanelmarketplaceoutbox.h | 19 ++- indra/newview/llsidepanelinventory.cpp | 2 +- indra/newview/llviewermedia.cpp | 61 -------- .../newview/skins/default/xui/en/notifications.xml | 18 ++- .../skins/default/xui/en/sidepanel_inventory.xml | 4 +- 9 files changed, 170 insertions(+), 135 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0eaa0a4627..017dabe2ad 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -71,7 +71,7 @@ #include "llwearablelist.h" // Marketplace outbox current disabled -#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_PANEL +#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL typedef std::pair<LLUUID, LLUUID> two_uuids_t; typedef std::list<two_uuids_t> two_uuids_list_t; diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 99b0389413..1c189f6ee2 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -50,8 +50,9 @@ std::string getMarketplaceBaseURL() } } - url += "api/1/users/"; + url += "api/1/"; url += gAgent.getID().getString(); + url += "/inventory"; return url; } @@ -60,29 +61,20 @@ std::string getMarketplaceURL_InventoryImport() { std::string url = getMarketplaceBaseURL(); - url += "/inventory_import"; - - return url; -} - -std::string getMarketplaceURL_UserStatus() -{ - std::string url = getMarketplaceBaseURL(); - - url += "/user_status"; + url += "/import"; return url; } -static bool gMarketplaceSyncEnabled = true; +static bool gMarketplaceImportEnabled = true; -bool getMarketplaceSyncEnabled() +bool getMarketplaceImportEnabled() { - return gMarketplaceSyncEnabled; + return gMarketplaceImportEnabled; } -void setMarketplaceSyncEnabled(bool syncEnabled) +void setMarketplaceImportEnabled(bool importEnabled) { - gMarketplaceSyncEnabled = syncEnabled; + gMarketplaceImportEnabled = importEnabled; } diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index e80e6a471c..fda2fbb935 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -30,11 +30,20 @@ std::string getMarketplaceURL_InventoryImport(); -std::string getMarketplaceURL_UserStatus(); - -bool getMarketplaceSyncEnabled(); -void setMarketplaceSyncEnabled(bool syncEnabled); +bool getMarketplaceImportEnabled(); +void setMarketplaceImportEnabled(bool syncEnabled); + +namespace MarketplaceErrorCodes +{ + enum eCodes + { + IMPORT_DONE = 200, + IMPORT_PROCESSING = 202, + IMPORT_DONE_WITH_ERRORS = 409, + IMPORT_JOB_FAILED = 410, + }; +} #endif // LL_LLMARKETPLACEFUNCTIONS_H diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index 0ad4d56051..3c8817c199 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -59,9 +59,12 @@ const LLPanelMarketplaceOutbox::Params& LLPanelMarketplaceOutbox::getDefaultPara LLPanelMarketplaceOutbox::LLPanelMarketplaceOutbox(const Params& p) : LLPanel(p) , mInventoryPanel(NULL) - , mSyncButton(NULL) - , mSyncIndicator(NULL) - , mSyncInProgress(false) + , mImportButton(NULL) + , mImportFrameTimer(0) + , mImportGetPending(false) + , mImportIndicator(NULL) + , mImportInProgress(false) + , mOutboxButton(NULL) { } @@ -81,11 +84,13 @@ BOOL LLPanelMarketplaceOutbox::postBuild() void LLPanelMarketplaceOutbox::handleLoginComplete() { - mSyncButton = getChild<LLButton>("outbox_sync_btn"); - mSyncButton->setCommitCallback(boost::bind(&LLPanelMarketplaceOutbox::onSyncButtonClicked, this)); - mSyncButton->setEnabled(getMarketplaceSyncEnabled() && !isOutboxEmpty()); + mImportButton = getChild<LLButton>("outbox_import_btn"); + mImportButton->setCommitCallback(boost::bind(&LLPanelMarketplaceOutbox::onImportButtonClicked, this)); + mImportButton->setEnabled(getMarketplaceImportEnabled() && !isOutboxEmpty()); - mSyncIndicator = getChild<LLLoadingIndicator>("outbox_sync_indicator"); + mImportIndicator = getChild<LLLoadingIndicator>("outbox_import_indicator"); + + mOutboxButton = getChild<LLButton>("outbox_btn"); } void LLPanelMarketplaceOutbox::onFocusReceived() @@ -164,9 +169,9 @@ bool LLPanelMarketplaceOutbox::isOutboxEmpty() const return (getTotalItemCount() == 0); } -bool LLPanelMarketplaceOutbox::isSyncInProgress() const +bool LLPanelMarketplaceOutbox::isImportInProgress() const { - return mSyncInProgress; + return mImportInProgress; } @@ -185,25 +190,55 @@ void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) waitForEventOn(self, "mainloop"); } - outboxPanel->onSyncComplete(true, LLSD::emptyMap()); + outboxPanel->onImportPostComplete(MarketplaceErrorCodes::IMPORT_DONE, LLSD::emptyMap()); gTimeDelayDebugFunc = ""; } -class LLInventorySyncResponder : public LLHTTPClient::Responder +class LLInventoryImportPostResponder : public LLHTTPClient::Responder { public: - LLInventorySyncResponder(LLPanelMarketplaceOutbox * outboxPanel) + LLInventoryImportPostResponder(LLPanelMarketplaceOutbox * outboxPanel) : LLCurl::Responder() , mOutboxPanel(outboxPanel) { } - + void completed(U32 status, const std::string& reason, const LLSD& content) { - llinfos << "inventory_import complete status: " << status << ", reason: " << reason << llendl; + llinfos << "inventory/import post status: " << status << ", reason: " << reason << llendl; + + if (isGoodStatus(status)) + { + // Complete success + llinfos << "success" << llendl; + } + else + { + llwarns << "failed" << llendl; + } + + mOutboxPanel->onImportPostComplete(status, content); + } + +private: + LLPanelMarketplaceOutbox * mOutboxPanel; +}; +class LLInventoryImportGetResponder : public LLHTTPClient::Responder +{ +public: + LLInventoryImportGetResponder(LLPanelMarketplaceOutbox * outboxPanel) + : LLCurl::Responder() + , mOutboxPanel(outboxPanel) + { + } + + void completed(U32 status, const std::string& reason, const LLSD& content) + { + llinfos << "inventory/import get status: " << status << ", reason: " << reason << llendl; + if (isGoodStatus(status)) { // Complete success @@ -214,37 +249,67 @@ public: llwarns << "failed" << llendl; } - mOutboxPanel->onSyncComplete(isGoodStatus(status), content); + mOutboxPanel->onImportGetComplete(status, content); } private: LLPanelMarketplaceOutbox * mOutboxPanel; }; -void LLPanelMarketplaceOutbox::onSyncButtonClicked() +void LLPanelMarketplaceOutbox::onImportButtonClicked() { - // Get the sync animation going - mSyncInProgress = true; - updateSyncButtonStatus(); + // Get the import animation going + mImportInProgress = true; + mImportFrameTimer = 0; + + updateImportButtonStatus(); // Make the url for the inventory import request std::string url = getMarketplaceURL_InventoryImport(); - llinfos << "http get: " << url << llendl; - LLHTTPClient::get(url, new LLInventorySyncResponder(this), LLViewerMedia::getHeaders()); + llinfos << "http post: " << url << llendl; + LLHTTPClient::post(url, LLSD(), new LLInventoryImportPostResponder(this), LLViewerMedia::getHeaders()); // Set a timer (for testing only) //gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this)); } -void LLPanelMarketplaceOutbox::onSyncComplete(bool goodStatus, const LLSD& content) +void LLPanelMarketplaceOutbox::onImportPostComplete(U32 status, const LLSD& content) { - mSyncInProgress = false; - updateSyncButtonStatus(); + llinfos << "onImportPostComplete status = " << status << llendl; + llinfos << "onImportPostComplete content = " << content.asString() << llendl; +} + +void LLPanelMarketplaceOutbox::onImportGetComplete(U32 status, const LLSD& content) +{ + mImportGetPending = false; + mImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING); + updateImportButtonStatus(); + + if (!mImportInProgress) + { + if (status == MarketplaceErrorCodes::IMPORT_DONE) + { + LLNotificationsUtil::add("OutboxImportComplete", LLSD::emptyMap(), LLSD::emptyMap()); + } + else if (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) + { + LLNotificationsUtil::add("OutboxImportHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); + } + else + { + llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); + LLNotificationsUtil::add("OutboxImportFailed", LLSD::emptyMap(), LLSD::emptyMap()); + } + } + + return; + + const LLSD& errors_list = content["errors"]; - if (goodStatus && (errors_list.size() == 0)) + if (errors_list.size() == 0) { LLNotificationsUtil::add("OutboxUploadComplete", LLSD::emptyMap(), LLSD::emptyMap()); } @@ -287,23 +352,23 @@ void LLPanelMarketplaceOutbox::onSyncComplete(bool goodStatus, const LLSD& conte } } -void LLPanelMarketplaceOutbox::updateSyncButtonStatus() +void LLPanelMarketplaceOutbox::updateImportButtonStatus() { - if (isSyncInProgress()) + if (isImportInProgress()) { - mSyncButton->setVisible(false); + mImportButton->setVisible(false); - mSyncIndicator->setVisible(true); - mSyncIndicator->reset(); - mSyncIndicator->start(); + mImportIndicator->setVisible(true); + mImportIndicator->reset(); + mImportIndicator->start(); } else { - mSyncIndicator->stop(); - mSyncIndicator->setVisible(false); + mImportIndicator->stop(); + mImportIndicator->setVisible(false); - mSyncButton->setVisible(true); - mSyncButton->setEnabled(getMarketplaceSyncEnabled() && !isOutboxEmpty()); + mImportButton->setVisible(true); + mImportButton->setEnabled(getMarketplaceImportEnabled() && !isOutboxEmpty()); } } @@ -335,17 +400,32 @@ void LLPanelMarketplaceOutbox::draw() LLStringUtil::format_map_t args; args["[NUM]"] = item_count_str; - getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelWithArg", args)); + mOutboxButton->setLabel(getString("OutboxLabelWithArg", args)); } else { - getChild<LLButton>("outbox_btn")->setLabel(getString("OutboxLabelNoArg")); + mOutboxButton->setLabel(getString("OutboxLabelNoArg")); } - if (!isSyncInProgress()) + if (!isImportInProgress()) { - mSyncButton->setEnabled(getMarketplaceSyncEnabled() && not_empty); + mImportButton->setEnabled(getMarketplaceImportEnabled() && not_empty); } + else + { + ++mImportFrameTimer; + + if ((mImportFrameTimer % 50 == 0) && !mImportGetPending) + { + mImportGetPending = true; + + std::string url = getMarketplaceURL_InventoryImport(); + + llinfos << "http get: " << url << llendl; + LLHTTPClient::get(url, new LLInventoryImportGetResponder(this), LLViewerMedia::getHeaders()); + } + } + LLPanel::draw(); } diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h index c6b4a5abe2..a776ee0919 100644 --- a/indra/newview/llpanelmarketplaceoutbox.h +++ b/indra/newview/llpanelmarketplaceoutbox.h @@ -59,9 +59,10 @@ public: U32 getTotalItemCount() const; bool isOutboxEmpty() const; - bool isSyncInProgress() const; + bool isImportInProgress() const; - void onSyncComplete(bool goodStatus, const LLSD& content); + void onImportPostComplete(U32 status, const LLSD& content); + void onImportGetComplete(U32 status, const LLSD& content); /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -70,8 +71,8 @@ public: std::string& tooltip_msg); protected: - void onSyncButtonClicked(); - void updateSyncButtonStatus(); + void onImportButtonClicked(); + void updateImportButtonStatus(); void handleLoginComplete(); void onFocusReceived(); @@ -80,9 +81,13 @@ protected: private: LLInventoryPanel * mInventoryPanel; - LLButton * mSyncButton; - LLLoadingIndicator * mSyncIndicator; - bool mSyncInProgress; + LLButton * mImportButton; + U32 mImportFrameTimer; + bool mImportGetPending; + LLLoadingIndicator * mImportIndicator; + bool mImportInProgress; + + LLButton * mOutboxButton; }; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index d556b8523e..19a81b93bf 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -69,7 +69,7 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_ #define AUTO_EXPAND_INBOX 0 // Temporarily disabling the outbox until we straighten out the API -#define ENABLE_MERCHANT_OUTBOX_PANEL 1 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU +#define ENABLE_MERCHANT_OUTBOX_PANEL 1 // keep in sync with ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index a5bd0223cc..02d8036666 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1386,64 +1386,6 @@ void LLViewerMedia::removeCookie(const std::string &name, const std::string &dom } -// This is defined in two files but I don't want to create a dependence between this and llsidepanelinventory -// just to be able to temporarily disable the outbox. -#define ENABLE_INVENTORY_DISPLAY_OUTBOX 1 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU - -class LLInventoryUserStatusResponder : public LLHTTPClient::Responder -{ -public: - LLInventoryUserStatusResponder() - : LLCurl::Responder() - { - } - - void completed(U32 status, const std::string& reason, const LLSD& content) - { - if (isGoodStatus(status)) - { - std::string merchantStatus = content[gAgent.getID().getString()].asString(); - llinfos << "Marketplace merchant status: " << merchantStatus << llendl; - - // Save the merchant status before turning on the display - gSavedSettings.setString("InventoryMarketplaceUserStatus", merchantStatus); - - // Complete success - gSavedSettings.setBOOL("InventoryDisplayInbox", true); - -#if ENABLE_INVENTORY_DISPLAY_OUTBOX - gSavedSettings.setBOOL("InventoryDisplayOutbox", true); -#endif - - setMarketplaceSyncEnabled(true); - } - else if (status == 401) - { - // API is available for use but OpenID authorization failed - gSavedSettings.setBOOL("InventoryDisplayInbox", true); - - setMarketplaceSyncEnabled(false); - } - else - { - setMarketplaceSyncEnabled(false); - - // API in unavailable - llinfos << "Marketplace API is unavailable -- Inbox may be disabled, status = " << status << ", reason = " << reason << llendl; - } - } -}; - - -void doOnetimeEarlyHTTPRequests() -{ - std::string url = getMarketplaceURL_UserStatus(); - - llinfos << "http get: " << url << llendl; - LLHTTPClient::get(url, new LLInventoryUserStatusResponder(), LLViewerMedia::getHeaders()); -} - - LLSD LLViewerMedia::getHeaders() { LLSD headers = LLSD::emptyMap(); @@ -1502,9 +1444,6 @@ void LLViewerMedia::setOpenIDCookie() LLHTTPClient::get(profile_url, new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()), headers); - - // FUI: No longer perform the user_status query - //doOnetimeEarlyHTTPRequests(); } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index d925bf8f96..46a6da2450 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -213,9 +213,9 @@ Save changes to current clothing/body part? <notification icon="alertmodal.tga" - name="OutboxUploadComplete" + name="OutboxImportComplete" type="alertmodal"> -Marketplace upload complete. +Marketplace import complete. <usetemplate name="okbutton" yestext="Hooray!"/> @@ -223,14 +223,24 @@ Marketplace upload complete. <notification icon="alertmodal.tga" - name="OutboxUploadHadErrors" + name="OutboxImportHadErrors" type="alertmodal"> -Marketplace upload completed with errors! Please correct the problems in your outbox and retry. Thanks. +Marketplace import completed with errors! Please correct the problems in your outbox and retry. Thanks. <usetemplate name="okbutton" yestext="Boo!"/> </notification> + <notification + icon="alertmodal.tga" + name="OutboxImportFailed" + type="alertmodal"> +Marketplace import failed! Please try again later. Thanks. + <usetemplate + name="okbutton" + yestext="Rats!"/> + </notification> + <notification diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index b52784d6bc..9f3c57fa0f 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -205,7 +205,7 @@ label="" tool_tip="Push to my Marketplace Storefront" is_toggle="false" - name="outbox_sync_btn" + name="outbox_import_btn" follows="top|right" tab_stop="false" halign="center" @@ -216,7 +216,7 @@ enabled="false" /> <loading_indicator follows="top|right" - name="outbox_sync_indicator" + name="outbox_import_indicator" top="6" left="-50" height="23" -- cgit v1.2.3 From 3236cbd585860f76a14c4837c70cb5823a4fd7d5 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 5 Dec 2011 14:23:49 -0800 Subject: Windows build fix --- indra/newview/llpanelmarketplaceoutbox.cpp | 89 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 46 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index 3c8817c199..6a2bf58701 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -303,53 +303,50 @@ void LLPanelMarketplaceOutbox::onImportGetComplete(U32 status, const LLSD& conte } } - return; - - - - const LLSD& errors_list = content["errors"]; - - if (errors_list.size() == 0) - { - LLNotificationsUtil::add("OutboxUploadComplete", LLSD::emptyMap(), LLSD::emptyMap()); - } - else - { - LLNotificationsUtil::add("OutboxUploadHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); - } - - llinfos << "Marketplace upload llsd:" << llendl; - llinfos << ll_pretty_print_sd(content) << llendl; - llinfos << llendl; - const LLSD& imported_list = content["imported"]; - LLSD::array_const_iterator it = imported_list.beginArray(); - for ( ; it != imported_list.endArray(); ++it) - { - LLUUID imported_folder = (*it).asUUID(); - llinfos << "Successfully uploaded folder " << imported_folder.asString() << " to marketplace." << llendl; - } - - for (it = errors_list.beginArray(); it != errors_list.endArray(); ++it) - { - const LLSD& item_error_map = (*it); - - LLUUID error_folder = item_error_map["folder_id"].asUUID(); - const std::string& error_string = item_error_map["identifier"].asString(); - LLUUID error_item = item_error_map["item_id"].asUUID(); - const std::string& error_item_name = item_error_map["item_name"].asString(); - const std::string& error_message = item_error_map["message"].asString(); - - llinfos << "Error item " << error_folder.asString() << ", " << error_string << ", " - << error_item.asString() << ", " << error_item_name << ", " << error_message << llendl; - - LLFolderViewFolder * item_folder = mInventoryPanel->getRootFolder()->getFolderByID(error_folder); - LLOutboxFolderViewFolder * outbox_item_folder = dynamic_cast<LLOutboxFolderViewFolder *>(item_folder); - - llassert(outbox_item_folder); - - outbox_item_folder->setErrorString(error_string); - } + //const LLSD& errors_list = content["errors"]; + + //if (errors_list.size() == 0) + //{ + // LLNotificationsUtil::add("OutboxUploadComplete", LLSD::emptyMap(), LLSD::emptyMap()); + //} + //else + //{ + // LLNotificationsUtil::add("OutboxUploadHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); + //} + + //llinfos << "Marketplace upload llsd:" << llendl; + //llinfos << ll_pretty_print_sd(content) << llendl; + //llinfos << llendl; + + //const LLSD& imported_list = content["imported"]; + //LLSD::array_const_iterator it = imported_list.beginArray(); + //for ( ; it != imported_list.endArray(); ++it) + //{ + // LLUUID imported_folder = (*it).asUUID(); + // llinfos << "Successfully uploaded folder " << imported_folder.asString() << " to marketplace." << llendl; + //} + + //for (it = errors_list.beginArray(); it != errors_list.endArray(); ++it) + //{ + // const LLSD& item_error_map = (*it); + + // LLUUID error_folder = item_error_map["folder_id"].asUUID(); + // const std::string& error_string = item_error_map["identifier"].asString(); + // LLUUID error_item = item_error_map["item_id"].asUUID(); + // const std::string& error_item_name = item_error_map["item_name"].asString(); + // const std::string& error_message = item_error_map["message"].asString(); + + // llinfos << "Error item " << error_folder.asString() << ", " << error_string << ", " + // << error_item.asString() << ", " << error_item_name << ", " << error_message << llendl; + // + // LLFolderViewFolder * item_folder = mInventoryPanel->getRootFolder()->getFolderByID(error_folder); + // LLOutboxFolderViewFolder * outbox_item_folder = dynamic_cast<LLOutboxFolderViewFolder *>(item_folder); + + // llassert(outbox_item_folder); + + // outbox_item_folder->setErrorString(error_string); + //} } void LLPanelMarketplaceOutbox::updateImportButtonStatus() -- cgit v1.2.3 From a255fadfab359931d591c6a874abbea5fcf13526 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 6 Dec 2011 11:19:58 -0800 Subject: Updated to trigger a 'get' to establish marketplace session cookie when outbox panel created. --- indra/newview/llmarketplacefunctions.cpp | 4 +- indra/newview/llpanelmarketplaceoutbox.cpp | 194 +++++++++++++-------- indra/newview/llpanelmarketplaceoutbox.h | 6 +- indra/newview/llviewermedia.cpp | 1 + .../newview/skins/default/xui/en/notifications.xml | 2 +- 5 files changed, 129 insertions(+), 78 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 1c189f6ee2..2f8c5bc9ee 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -52,7 +52,7 @@ std::string getMarketplaceBaseURL() url += "api/1/"; url += gAgent.getID().getString(); - url += "/inventory"; + url += "/inventory/"; return url; } @@ -61,7 +61,7 @@ std::string getMarketplaceURL_InventoryImport() { std::string url = getMarketplaceBaseURL(); - url += "/import"; + url += "import/"; return url; } diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index 6a2bf58701..99d744891a 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -140,6 +140,11 @@ LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel() // Hide the placeholder text outbox_inventory_placeholder->setVisible(FALSE); + // Establish marketplace cookies for http client + establishMarketplaceSessionCookie(); + + updateImportButtonStatus(); + return mInventoryPanel; } @@ -195,6 +200,28 @@ void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) gTimeDelayDebugFunc = ""; } +std::string gImportPollingFunc = ""; + +void importPoll(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) +{ + waitForEventOn(self, "mainloop"); + + while (outboxPanel->isImportInProgress()) + { + LLTimer delayTimer; + delayTimer.reset(); + delayTimer.setTimerExpirySec(5.0f); + + while (!delayTimer.hasExpired()) + { + waitForEventOn(self, "mainloop"); + } + + //outboxPanel-> + } + + gImportPollingFunc = ""; +} class LLInventoryImportPostResponder : public LLHTTPClient::Responder { @@ -207,16 +234,16 @@ public: void completed(U32 status, const std::string& reason, const LLSD& content) { - llinfos << "inventory/import post status: " << status << ", reason: " << reason << llendl; + llinfos << "*** Marketplace *** " << "inventory/import post status: " << status << ", reason: " << reason << llendl; if (isGoodStatus(status)) { // Complete success - llinfos << "success" << llendl; + llinfos << "*** Marketplace *** " << "success" << llendl; } else { - llwarns << "failed" << llendl; + llwarns << "*** Marketplace *** " << "failed" << llendl; } mOutboxPanel->onImportPostComplete(status, content); @@ -229,64 +256,119 @@ private: class LLInventoryImportGetResponder : public LLHTTPClient::Responder { public: - LLInventoryImportGetResponder(LLPanelMarketplaceOutbox * outboxPanel) + LLInventoryImportGetResponder(LLPanelMarketplaceOutbox * outboxPanel, bool ignoreResults) : LLCurl::Responder() + , mIgnoreResults(ignoreResults) , mOutboxPanel(outboxPanel) { } void completed(U32 status, const std::string& reason, const LLSD& content) { - llinfos << "inventory/import get status: " << status << ", reason: " << reason << llendl; + llinfos << "*** Marketplace *** " << "inventory/import get status: " << status << ", reason: " << reason << llendl; if (isGoodStatus(status)) { // Complete success - llinfos << "success" << llendl; + llinfos << "*** Marketplace *** " << "success" << llendl; } else { - llwarns << "failed" << llendl; + llwarns << "*** Marketplace *** " << "failed" << llendl; } - mOutboxPanel->onImportGetComplete(status, content); + mOutboxPanel->onImportGetComplete(status, content, mIgnoreResults); } private: + bool mIgnoreResults; LLPanelMarketplaceOutbox * mOutboxPanel; }; -void LLPanelMarketplaceOutbox::onImportButtonClicked() +void LLPanelMarketplaceOutbox::importPostTrigger() { - // Get the import animation going mImportInProgress = true; mImportFrameTimer = 0; - - updateImportButtonStatus(); - + // Make the url for the inventory import request std::string url = getMarketplaceURL_InventoryImport(); - - llinfos << "http post: " << url << llendl; - LLHTTPClient::post(url, LLSD(), new LLInventoryImportPostResponder(this), LLViewerMedia::getHeaders()); - + + LLSD headers = LLViewerMedia::getHeaders(); + headers["Connection"] = "Keep-Alive"; + + llinfos << "*** Marketplace *** " << "http post: " << url << llendl; + llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; + + LLHTTPClient::post(url, LLSD(), new LLInventoryImportPostResponder(this), headers); + // Set a timer (for testing only) //gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this)); } +void LLPanelMarketplaceOutbox::importGetTrigger() +{ + mImportGetPending = true; + + std::string url = getMarketplaceURL_InventoryImport(); + LLSD headers = LLViewerMedia::getHeaders(); + + llinfos << "*** Marketplace *** " << "http get: " << url << llendl; + llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; + + const bool do_not_ignore_results = false; + + LLHTTPClient::get(url, new LLInventoryImportGetResponder(this, do_not_ignore_results), headers); +} + +void LLPanelMarketplaceOutbox::establishMarketplaceSessionCookie() +{ + mImportInProgress = true; + mImportGetPending = true; + + std::string url = getMarketplaceURL_InventoryImport(); + LLSD headers = LLViewerMedia::getHeaders(); + + const bool ignore_results = true; + + LLHTTPClient::get(url, new LLInventoryImportGetResponder(this, ignore_results), headers); +} + void LLPanelMarketplaceOutbox::onImportPostComplete(U32 status, const LLSD& content) { - llinfos << "onImportPostComplete status = " << status << llendl; - llinfos << "onImportPostComplete content = " << content.asString() << llendl; + llinfos << "*** Marketplace *** " << "status = " << status << llendl; + llinfos << "*** Marketplace *** " << "content = " << ll_pretty_print_sd(content) << llendl; + + mImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE); + updateImportButtonStatus(); + + if (!mImportInProgress) + { + char status_string[16]; + sprintf(status_string, "%d", status); + + LLSD subs; + subs["ERROR_CODE"] = status_string; + + LLNotificationsUtil::add("OutboxImportFailed", subs, LLSD::emptyMap()); + } + + // The POST request returns the IMPORT_DONE code on success + //if (status == MarketplaceErrorCodes::IMPORT_DONE) + //{ + // gImportPollingFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox importPoll", boost::bind(&importPoll, _1, this)); + //} } -void LLPanelMarketplaceOutbox::onImportGetComplete(U32 status, const LLSD& content) +void LLPanelMarketplaceOutbox::onImportGetComplete(U32 status, const LLSD& content, bool ignoreResults) { + llinfos << "*** Marketplace *** " << "status = " << status << llendl; + llinfos << "*** Marketplace *** " << "content = " << ll_pretty_print_sd(content) << llendl; + mImportGetPending = false; mImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING); updateImportButtonStatus(); - if (!mImportInProgress) + if (!mImportInProgress && !ignoreResults) { if (status == MarketplaceErrorCodes::IMPORT_DONE) { @@ -298,55 +380,16 @@ void LLPanelMarketplaceOutbox::onImportGetComplete(U32 status, const LLSD& conte } else { - llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); + char status_string[16]; + sprintf(status_string, "%d", status); + + LLSD subs; + subs["ERROR_CODE"] = status_string; + + //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); LLNotificationsUtil::add("OutboxImportFailed", LLSD::emptyMap(), LLSD::emptyMap()); } } - - - //const LLSD& errors_list = content["errors"]; - - //if (errors_list.size() == 0) - //{ - // LLNotificationsUtil::add("OutboxUploadComplete", LLSD::emptyMap(), LLSD::emptyMap()); - //} - //else - //{ - // LLNotificationsUtil::add("OutboxUploadHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); - //} - - //llinfos << "Marketplace upload llsd:" << llendl; - //llinfos << ll_pretty_print_sd(content) << llendl; - //llinfos << llendl; - - //const LLSD& imported_list = content["imported"]; - //LLSD::array_const_iterator it = imported_list.beginArray(); - //for ( ; it != imported_list.endArray(); ++it) - //{ - // LLUUID imported_folder = (*it).asUUID(); - // llinfos << "Successfully uploaded folder " << imported_folder.asString() << " to marketplace." << llendl; - //} - - //for (it = errors_list.beginArray(); it != errors_list.endArray(); ++it) - //{ - // const LLSD& item_error_map = (*it); - - // LLUUID error_folder = item_error_map["folder_id"].asUUID(); - // const std::string& error_string = item_error_map["identifier"].asString(); - // LLUUID error_item = item_error_map["item_id"].asUUID(); - // const std::string& error_item_name = item_error_map["item_name"].asString(); - // const std::string& error_message = item_error_map["message"].asString(); - - // llinfos << "Error item " << error_folder.asString() << ", " << error_string << ", " - // << error_item.asString() << ", " << error_item_name << ", " << error_message << llendl; - // - // LLFolderViewFolder * item_folder = mInventoryPanel->getRootFolder()->getFolderByID(error_folder); - // LLOutboxFolderViewFolder * outbox_item_folder = dynamic_cast<LLOutboxFolderViewFolder *>(item_folder); - - // llassert(outbox_item_folder); - - // outbox_item_folder->setErrorString(error_string); - //} } void LLPanelMarketplaceOutbox::updateImportButtonStatus() @@ -380,12 +423,21 @@ U32 LLPanelMarketplaceOutbox::getTotalItemCount() const if (outbox_folder) { item_count += outbox_folder->getFoldersCount(); + item_count += outbox_folder->getItemsCount(); } } return item_count; } +void LLPanelMarketplaceOutbox::onImportButtonClicked() +{ + importPostTrigger(); + + // Get the import animation going + updateImportButtonStatus(); +} + void LLPanelMarketplaceOutbox::draw() { const U32 item_count = getTotalItemCount(); @@ -414,15 +466,9 @@ void LLPanelMarketplaceOutbox::draw() if ((mImportFrameTimer % 50 == 0) && !mImportGetPending) { - mImportGetPending = true; - - std::string url = getMarketplaceURL_InventoryImport(); - - llinfos << "http get: " << url << llendl; - LLHTTPClient::get(url, new LLInventoryImportGetResponder(this), LLViewerMedia::getHeaders()); + importGetTrigger(); } } - LLPanel::draw(); } diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h index a776ee0919..9cbb9cf21b 100644 --- a/indra/newview/llpanelmarketplaceoutbox.h +++ b/indra/newview/llpanelmarketplaceoutbox.h @@ -62,7 +62,7 @@ public: bool isImportInProgress() const; void onImportPostComplete(U32 status, const LLSD& content); - void onImportGetComplete(U32 status, const LLSD& content); + void onImportGetComplete(U32 status, const LLSD& content, bool ignoreResults); /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -77,6 +77,10 @@ protected: void handleLoginComplete(); void onFocusReceived(); void onSelectionChange(); + + void importPostTrigger(); + void importGetTrigger(); + void establishMarketplaceSessionCookie(); private: LLInventoryPanel * mInventoryPanel; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 02d8036666..eb7a4aa538 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1390,6 +1390,7 @@ LLSD LLViewerMedia::getHeaders() { LLSD headers = LLSD::emptyMap(); headers["Accept"] = "*/*"; + headers["Content-Type"] = "application/xml"; headers["Cookie"] = sOpenIDCookie; headers["User-Agent"] = getCurrentUserAgent(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 46a6da2450..8d0d76b58e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -235,7 +235,7 @@ Marketplace import completed with errors! Please correct the problems in your o icon="alertmodal.tga" name="OutboxImportFailed" type="alertmodal"> -Marketplace import failed! Please try again later. Thanks. +Marketplace import failed with error [ERROR_CODE]! Please try again later. Thanks. <usetemplate name="okbutton" yestext="Rats!"/> -- cgit v1.2.3 From 40f9de414fbd5755b7c040f786030157cf083771 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 6 Dec 2011 11:45:21 -0800 Subject: Added code to set up the marketplace session cookie and use it for subsequent posts and gets to the inventory import API --- indra/newview/llpanelmarketplaceoutbox.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index 99d744891a..d4b0bead4c 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -50,6 +50,8 @@ static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox"); +static std::string sMarketplaceCookie; + const LLPanelMarketplaceOutbox::Params& LLPanelMarketplaceOutbox::getDefaultParams() { return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceOutbox>(); @@ -263,6 +265,15 @@ public: { } + void completedHeader(U32 status, const std::string& reason, const LLSD& content) + { + std::string cookie = content["set-cookie"].asString(); + + llinfos << "*** Marketplace *** " << "inventory/import headers set-cookie: " << cookie << llendl; + + sMarketplaceCookie = cookie; + } + void completed(U32 status, const std::string& reason, const LLSD& content) { llinfos << "*** Marketplace *** " << "inventory/import get status: " << status << ", reason: " << reason << llendl; @@ -295,6 +306,7 @@ void LLPanelMarketplaceOutbox::importPostTrigger() LLSD headers = LLViewerMedia::getHeaders(); headers["Connection"] = "Keep-Alive"; + headers["Cookie"] = sMarketplaceCookie; llinfos << "*** Marketplace *** " << "http post: " << url << llendl; llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; @@ -311,6 +323,7 @@ void LLPanelMarketplaceOutbox::importGetTrigger() std::string url = getMarketplaceURL_InventoryImport(); LLSD headers = LLViewerMedia::getHeaders(); + headers["Cookie"] = sMarketplaceCookie; llinfos << "*** Marketplace *** " << "http get: " << url << llendl; llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; -- cgit v1.2.3 From 83cc0becf859275a810da4ce0ccb0d7f8147d614 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 6 Dec 2011 11:51:09 -0800 Subject: Turning off marketplace logging verbosity by default --- indra/newview/llpanelmarketplaceoutbox.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index d4b0bead4c..d7e4ed8bec 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -48,9 +48,14 @@ #include "llfolderview.h" #include "llinventoryfunctions.h" + +// Turn this on to get a bunch of console output for marketplace API calls, headers and status +#define DEBUG_MARKETPLACE_HTTP_API 0 + + static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox"); -static std::string sMarketplaceCookie; +static std::string sMarketplaceCookie = ""; const LLPanelMarketplaceOutbox::Params& LLPanelMarketplaceOutbox::getDefaultParams() { @@ -236,6 +241,7 @@ public: void completed(U32 status, const std::string& reason, const LLSD& content) { +#if DEBUG_MARKETPLACE_HTTP_API llinfos << "*** Marketplace *** " << "inventory/import post status: " << status << ", reason: " << reason << llendl; if (isGoodStatus(status)) @@ -247,6 +253,7 @@ public: { llwarns << "*** Marketplace *** " << "failed" << llendl; } +#endif // DEBUG_MARKETPLACE_HTTP_API mOutboxPanel->onImportPostComplete(status, content); } @@ -269,13 +276,16 @@ public: { std::string cookie = content["set-cookie"].asString(); +#if DEBUG_MARKETPLACE_HTTP_API llinfos << "*** Marketplace *** " << "inventory/import headers set-cookie: " << cookie << llendl; +#endif // DEBUG_MARKETPLACE_HTTP_API sMarketplaceCookie = cookie; } void completed(U32 status, const std::string& reason, const LLSD& content) { +#if DEBUG_MARKETPLACE_HTTP_API llinfos << "*** Marketplace *** " << "inventory/import get status: " << status << ", reason: " << reason << llendl; if (isGoodStatus(status)) @@ -287,6 +297,7 @@ public: { llwarns << "*** Marketplace *** " << "failed" << llendl; } +#endif // DEBUG_MARKETPLACE_HTTP_API mOutboxPanel->onImportGetComplete(status, content, mIgnoreResults); } @@ -308,8 +319,10 @@ void LLPanelMarketplaceOutbox::importPostTrigger() headers["Connection"] = "Keep-Alive"; headers["Cookie"] = sMarketplaceCookie; +#if DEBUG_MARKETPLACE_HTTP_API llinfos << "*** Marketplace *** " << "http post: " << url << llendl; llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; +#endif // DEBUG_MARKETPLACE_HTTP_API LLHTTPClient::post(url, LLSD(), new LLInventoryImportPostResponder(this), headers); @@ -325,8 +338,10 @@ void LLPanelMarketplaceOutbox::importGetTrigger() LLSD headers = LLViewerMedia::getHeaders(); headers["Cookie"] = sMarketplaceCookie; +#if DEBUG_MARKETPLACE_HTTP_API llinfos << "*** Marketplace *** " << "http get: " << url << llendl; llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; +#endif // DEBUG_MARKETPLACE_HTTP_API const bool do_not_ignore_results = false; @@ -348,8 +363,10 @@ void LLPanelMarketplaceOutbox::establishMarketplaceSessionCookie() void LLPanelMarketplaceOutbox::onImportPostComplete(U32 status, const LLSD& content) { +#if DEBUG_MARKETPLACE_HTTP_API llinfos << "*** Marketplace *** " << "status = " << status << llendl; llinfos << "*** Marketplace *** " << "content = " << ll_pretty_print_sd(content) << llendl; +#endif // DEBUG_MARKETPLACE_HTTP_API mImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE); updateImportButtonStatus(); @@ -374,8 +391,10 @@ void LLPanelMarketplaceOutbox::onImportPostComplete(U32 status, const LLSD& cont void LLPanelMarketplaceOutbox::onImportGetComplete(U32 status, const LLSD& content, bool ignoreResults) { +#if DEBUG_MARKETPLACE_HTTP_API llinfos << "*** Marketplace *** " << "status = " << status << llendl; llinfos << "*** Marketplace *** " << "content = " << ll_pretty_print_sd(content) << llendl; +#endif // DEBUG_MARKETPLACE_HTTP_API mImportGetPending = false; mImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING); -- cgit v1.2.3 From 35020db3a9310742c9759673e3aa1bbb1d7aa02f Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 7 Dec 2011 15:04:39 -0800 Subject: Refactored marketplace inventory import HTTP requests and surrounding support to remove it from the UI panel code. --- indra/newview/llappviewer.cpp | 4 + indra/newview/llmarketplacefunctions.cpp | 302 ++++++++++++++++++++++++++-- indra/newview/llmarketplacefunctions.h | 43 +++- indra/newview/llpanelmarketplaceoutbox.cpp | 304 ++++------------------------- indra/newview/llpanelmarketplaceoutbox.h | 14 +- 5 files changed, 362 insertions(+), 305 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cbaddd74c4..401e9ef600 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -45,6 +45,7 @@ #include "llwindow.h" #include "llviewerstats.h" #include "llviewerstatsrecorder.h" +#include "llmarketplacefunctions.h" #include "llmd5.h" #include "llmeshrepository.h" #include "llpumpio.h" @@ -4393,6 +4394,9 @@ void LLAppViewer::idle() // update media focus LLViewerMediaFocus::getInstance()->update(); + + // Update marketplace importer + LLMarketplaceInventoryImporter::update(); // objects and camera should be in sync, do LOD calculations now { diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 2f8c5bc9ee..b9e02a36b4 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -29,52 +29,312 @@ #include "llmarketplacefunctions.h" #include "llagent.h" +#include "llhttpclient.h" +#include "llviewermedia.h" #include "llviewernetwork.h" -std::string getMarketplaceBaseURL() +// +// Helpers +// + +namespace LLMarketplaceImport { - std::string url = "https://marketplace.secondlife.com/"; + // Basic interface for this namespace + + bool inProgress(); + bool resultPending(); + U32 getResultStatus(); + const LLSD& getResults(); + + void establishMarketplaceSessionCookie(); + void pollStatus(); + void triggerImport(); + + // Internal state variables + + static std::string sMarketplaceCookie = ""; + static bool sImportInProgress = false; + static bool sImportGetPending = false; + static U32 sImportResultStatus = 0; + static LLSD sImportResults = LLSD::emptyMap(); + + + // Internal helper functions + + std::string getBaseURL() + { + std::string url = "https://marketplace.secondlife.com/"; + + if (!LLGridManager::getInstance()->isInProductionGrid()) + { + std::string gridLabel = utf8str_tolower(LLGridManager::getInstance()->getGridLabel()); + + if (gridLabel == "damballah") + { + url = "https://marketplace.secondlife-staging.com/"; + } + else + { + url = llformat("https://marketplace.%s.lindenlab.com/", gridLabel.c_str()); + } + } + + url += "api/1/"; + url += gAgent.getID().getString(); + url += "/inventory/"; + + return url; + } + + std::string getInventoryImportURL() + { + std::string url = getBaseURL(); - if (!LLGridManager::getInstance()->isInProductionGrid()) + url += "import/"; + + return url; + } + + // Responders + + class LLImportPostResponder : public LLHTTPClient::Responder + { + public: + LLImportPostResponder() : LLCurl::Responder() {} + + void completed(U32 status, const std::string& reason, const LLSD& content) + { + sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE); + sImportResultStatus = status; + } + }; + + class LLImportGetResponder : public LLHTTPClient::Responder + { + public: + LLImportGetResponder() : LLCurl::Responder() {} + + void completedHeader(U32 status, const std::string& reason, const LLSD& content) + { + sMarketplaceCookie = content["set-cookie"].asString(); + } + + void completed(U32 status, const std::string& reason, const LLSD& content) + { + sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING); + sImportGetPending = false; + sImportResultStatus = status; + sImportResults = content; + } + }; + + // Coroutine testing +/* + std::string gTimeDelayDebugFunc = ""; + + void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) { - std::string gridLabel = utf8str_tolower(LLGridManager::getInstance()->getGridLabel()); + waitForEventOn(self, "mainloop"); + + LLTimer delayTimer; + delayTimer.reset(); + delayTimer.setTimerExpirySec(5.0f); - if (gridLabel == "damballah") + while (!delayTimer.hasExpired()) { - url = "https://marketplace.secondlife-staging.com/"; + waitForEventOn(self, "mainloop"); } - else + + outboxPanel->onImportPostComplete(MarketplaceErrorCodes::IMPORT_DONE, LLSD::emptyMap()); + + gTimeDelayDebugFunc = ""; + } + + std::string gImportPollingFunc = ""; + + void importPoll(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) + { + waitForEventOn(self, "mainloop"); + + while (outboxPanel->isImportInProgress()) { - url = llformat("https://marketplace.%s.lindenlab.com/", gridLabel.c_str()); + LLTimer delayTimer; + delayTimer.reset(); + delayTimer.setTimerExpirySec(5.0f); + + while (!delayTimer.hasExpired()) + { + waitForEventOn(self, "mainloop"); + } + + //outboxPanel-> } + + gImportPollingFunc = ""; } + +*/ + + // Basic API - url += "api/1/"; - url += gAgent.getID().getString(); - url += "/inventory/"; + bool inProgress() + { + return sImportInProgress; + } + + bool resultPending() + { + return sImportGetPending; + } + + U32 getResultStatus() + { + return sImportResultStatus; + } + + const LLSD& getResults() + { + return sImportResults; + } + + void establishMarketplaceSessionCookie() + { + sImportInProgress = true; + sImportGetPending = true; + + std::string url = getInventoryImportURL(); + + LLHTTPClient::get(url, new LLImportGetResponder(), LLViewerMedia::getHeaders()); + } + + void pollStatus() + { + sImportGetPending = true; - return url; + std::string url = getInventoryImportURL(); + + // Make the headers for the post + LLSD headers = LLSD::emptyMap(); + headers["Accept"] = "*/*"; + headers["Cookie"] = sMarketplaceCookie; + headers["Content-Type"] = "application/xml"; + headers["User-Agent"] = LLViewerMedia::getCurrentUserAgent(); + + LLHTTPClient::get(url, new LLImportGetResponder(), headers); + } + + void triggerImport() + { + sImportInProgress = true; + sImportResultStatus = MarketplaceErrorCodes::IMPORT_PROCESSING; + sImportResults = LLSD::emptyMap(); + + std::string url = getInventoryImportURL(); + + // Make the headers for the post + LLSD headers = LLSD::emptyMap(); + headers["Accept"] = "*/*"; + headers["Connection"] = "Keep-Alive"; + headers["Cookie"] = sMarketplaceCookie; + headers["Content-Type"] = "application/xml"; + headers["User-Agent"] = LLViewerMedia::getCurrentUserAgent(); + + LLHTTPClient::post(url, LLSD(), new LLImportPostResponder(), headers); + + // Set a timer (for testing only) + //gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this)); + } } -std::string getMarketplaceURL_InventoryImport() + +// +// Interface class +// + + +//static +void LLMarketplaceInventoryImporter::update() { - std::string url = getMarketplaceBaseURL(); + if (instanceExists()) + { + LLMarketplaceInventoryImporter::instance().updateImport(); + } +} - url += "import/"; +LLMarketplaceInventoryImporter::LLMarketplaceInventoryImporter() + : mImportInProgress(false) + , mInitialized(false) + , mStatusChangedSignal(NULL) + , mStatusReportSignal(NULL) +{ +} - return url; +void LLMarketplaceInventoryImporter::initialize() +{ + if (!mInitialized) + { + LLMarketplaceImport::establishMarketplaceSessionCookie(); + } } +boost::signals2::connection LLMarketplaceInventoryImporter::setStatusChangedCallback(const status_changed_signal_t::slot_type& cb) +{ + if (mStatusChangedSignal == NULL) + { + mStatusChangedSignal = new status_changed_signal_t(); + } -static bool gMarketplaceImportEnabled = true; + return mStatusChangedSignal->connect(cb); +} -bool getMarketplaceImportEnabled() +boost::signals2::connection LLMarketplaceInventoryImporter::setStatusReportCallback(const status_report_signal_t::slot_type& cb) { - return gMarketplaceImportEnabled; + if (mStatusReportSignal == NULL) + { + mStatusReportSignal = new status_report_signal_t(); + } + + return mStatusReportSignal->connect(cb); } -void setMarketplaceImportEnabled(bool importEnabled) +bool LLMarketplaceInventoryImporter::triggerImport() { - gMarketplaceImportEnabled = importEnabled; + LLMarketplaceImport::triggerImport(); + + return LLMarketplaceImport::inProgress(); } + +void LLMarketplaceInventoryImporter::updateImport() +{ + const bool in_progress = LLMarketplaceImport::inProgress(); + + if (in_progress && !LLMarketplaceImport::resultPending()) + { + LLMarketplaceImport::pollStatus(); + } + + if (mImportInProgress != in_progress) + { + mImportInProgress = in_progress; + + if (mStatusChangedSignal) + { + (*mStatusChangedSignal)(mImportInProgress); + } + + // If we are no longer in progress, report results + if (!mImportInProgress && mStatusReportSignal) + { + if (mInitialized) + { + (*mStatusReportSignal)(LLMarketplaceImport::getResultStatus(), LLMarketplaceImport::getResults()); + } + else + { + mInitialized = true; + } + } + } +} + diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index fda2fbb935..5ca0bdfe77 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -29,14 +29,16 @@ #define LL_LLMARKETPLACEFUNCTIONS_H -std::string getMarketplaceURL_InventoryImport(); +#include <llsd.h> +#include <boost/function.hpp> +#include <boost/signals2.hpp> + +#include "llsingleton.h" -bool getMarketplaceImportEnabled(); -void setMarketplaceImportEnabled(bool syncEnabled); namespace MarketplaceErrorCodes { - enum eCodes + enum eCode { IMPORT_DONE = 200, IMPORT_PROCESSING = 202, @@ -45,7 +47,38 @@ namespace MarketplaceErrorCodes }; } -#endif // LL_LLMARKETPLACEFUNCTIONS_H +class LLMarketplaceInventoryImporter + : public LLSingleton<LLMarketplaceInventoryImporter> +{ +public: + static void update(); + + LLMarketplaceInventoryImporter(); + + void initialize(); + + typedef boost::signals2::signal<void (bool)> status_changed_signal_t; + typedef boost::signals2::signal<void (U32, const LLSD&)> status_report_signal_t; + boost::signals2::connection setStatusChangedCallback(const status_changed_signal_t::slot_type& cb); + boost::signals2::connection setStatusReportCallback(const status_report_signal_t::slot_type& cb); + + bool triggerImport(); + bool isImportInProgress() const { return mImportInProgress; } + +protected: + void updateImport(); + +private: + bool mImportInProgress; + bool mInitialized; + + status_changed_signal_t * mStatusChangedSignal; + status_report_signal_t * mStatusReportSignal; +}; + + + +#endif // LL_LLMARKETPLACEFUNCTIONS_H diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index d7e4ed8bec..e3af7fd906 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -55,8 +55,6 @@ static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox"); -static std::string sMarketplaceCookie = ""; - const LLPanelMarketplaceOutbox::Params& LLPanelMarketplaceOutbox::getDefaultParams() { return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceOutbox>(); @@ -67,10 +65,7 @@ LLPanelMarketplaceOutbox::LLPanelMarketplaceOutbox(const Params& p) : LLPanel(p) , mInventoryPanel(NULL) , mImportButton(NULL) - , mImportFrameTimer(0) - , mImportGetPending(false) , mImportIndicator(NULL) - , mImportInProgress(false) , mOutboxButton(NULL) { } @@ -93,7 +88,7 @@ void LLPanelMarketplaceOutbox::handleLoginComplete() { mImportButton = getChild<LLButton>("outbox_import_btn"); mImportButton->setCommitCallback(boost::bind(&LLPanelMarketplaceOutbox::onImportButtonClicked, this)); - mImportButton->setEnabled(getMarketplaceImportEnabled() && !isOutboxEmpty()); + mImportButton->setEnabled(!isOutboxEmpty()); mImportIndicator = getChild<LLLoadingIndicator>("outbox_import_indicator"); @@ -147,286 +142,73 @@ LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel() // Hide the placeholder text outbox_inventory_placeholder->setVisible(FALSE); - // Establish marketplace cookies for http client - establishMarketplaceSessionCookie(); + // Set up marketplace importer + LLMarketplaceInventoryImporter::getInstance()->initialize(); + LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLPanelMarketplaceOutbox::importStatusChanged, this, _1)); + LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLPanelMarketplaceOutbox::importReportResults, this, _1, _2)); updateImportButtonStatus(); return mInventoryPanel; } -BOOL LLPanelMarketplaceOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) +void LLPanelMarketplaceOutbox::importReportResults(U32 status, const LLSD& content) { - BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - - if (!handled && mInventoryPanel && mInventoryPanel->getRootFolder()) + if (status == MarketplaceErrorCodes::IMPORT_DONE) { - handled = mInventoryPanel->getRootFolder()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); - - if (handled) - { - mInventoryPanel->getRootFolder()->setDragAndDropThisFrame(); - } + LLNotificationsUtil::add("OutboxImportComplete", LLSD::emptyMap(), LLSD::emptyMap()); } - - return handled; -} - -bool LLPanelMarketplaceOutbox::isOutboxEmpty() const -{ - return (getTotalItemCount() == 0); -} - -bool LLPanelMarketplaceOutbox::isImportInProgress() const -{ - return mImportInProgress; -} - - -std::string gTimeDelayDebugFunc = ""; - -void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) -{ - waitForEventOn(self, "mainloop"); - - LLTimer delayTimer; - delayTimer.reset(); - delayTimer.setTimerExpirySec(5.0f); - - while (!delayTimer.hasExpired()) + else if (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) { - waitForEventOn(self, "mainloop"); + LLNotificationsUtil::add("OutboxImportHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); } - - outboxPanel->onImportPostComplete(MarketplaceErrorCodes::IMPORT_DONE, LLSD::emptyMap()); - - gTimeDelayDebugFunc = ""; -} - -std::string gImportPollingFunc = ""; - -void importPoll(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) -{ - waitForEventOn(self, "mainloop"); - - while (outboxPanel->isImportInProgress()) + else { - LLTimer delayTimer; - delayTimer.reset(); - delayTimer.setTimerExpirySec(5.0f); + char status_string[16]; + sprintf(status_string, "%d", status); - while (!delayTimer.hasExpired()) - { - waitForEventOn(self, "mainloop"); - } + LLSD subs; + subs["ERROR_CODE"] = status_string; - //outboxPanel-> + //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); + LLNotificationsUtil::add("OutboxImportFailed", LLSD::emptyMap(), LLSD::emptyMap()); } - - gImportPollingFunc = ""; } -class LLInventoryImportPostResponder : public LLHTTPClient::Responder +void LLPanelMarketplaceOutbox::importStatusChanged(bool inProgress) { -public: - LLInventoryImportPostResponder(LLPanelMarketplaceOutbox * outboxPanel) - : LLCurl::Responder() - , mOutboxPanel(outboxPanel) - { - } - - void completed(U32 status, const std::string& reason, const LLSD& content) - { -#if DEBUG_MARKETPLACE_HTTP_API - llinfos << "*** Marketplace *** " << "inventory/import post status: " << status << ", reason: " << reason << llendl; - - if (isGoodStatus(status)) - { - // Complete success - llinfos << "*** Marketplace *** " << "success" << llendl; - } - else - { - llwarns << "*** Marketplace *** " << "failed" << llendl; - } -#endif // DEBUG_MARKETPLACE_HTTP_API - - mOutboxPanel->onImportPostComplete(status, content); - } - -private: - LLPanelMarketplaceOutbox * mOutboxPanel; -}; + updateImportButtonStatus(); +} -class LLInventoryImportGetResponder : public LLHTTPClient::Responder +BOOL LLPanelMarketplaceOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) { -public: - LLInventoryImportGetResponder(LLPanelMarketplaceOutbox * outboxPanel, bool ignoreResults) - : LLCurl::Responder() - , mIgnoreResults(ignoreResults) - , mOutboxPanel(outboxPanel) - { - } + BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - void completedHeader(U32 status, const std::string& reason, const LLSD& content) + if (!handled && mInventoryPanel && mInventoryPanel->getRootFolder()) { - std::string cookie = content["set-cookie"].asString(); - -#if DEBUG_MARKETPLACE_HTTP_API - llinfos << "*** Marketplace *** " << "inventory/import headers set-cookie: " << cookie << llendl; -#endif // DEBUG_MARKETPLACE_HTTP_API - - sMarketplaceCookie = cookie; - } + handled = mInventoryPanel->getRootFolder()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); - void completed(U32 status, const std::string& reason, const LLSD& content) - { -#if DEBUG_MARKETPLACE_HTTP_API - llinfos << "*** Marketplace *** " << "inventory/import get status: " << status << ", reason: " << reason << llendl; - - if (isGoodStatus(status)) - { - // Complete success - llinfos << "*** Marketplace *** " << "success" << llendl; - } - else + if (handled) { - llwarns << "*** Marketplace *** " << "failed" << llendl; + mInventoryPanel->getRootFolder()->setDragAndDropThisFrame(); } -#endif // DEBUG_MARKETPLACE_HTTP_API - - mOutboxPanel->onImportGetComplete(status, content, mIgnoreResults); - } - -private: - bool mIgnoreResults; - LLPanelMarketplaceOutbox * mOutboxPanel; -}; - -void LLPanelMarketplaceOutbox::importPostTrigger() -{ - mImportInProgress = true; - mImportFrameTimer = 0; - - // Make the url for the inventory import request - std::string url = getMarketplaceURL_InventoryImport(); - - LLSD headers = LLViewerMedia::getHeaders(); - headers["Connection"] = "Keep-Alive"; - headers["Cookie"] = sMarketplaceCookie; - -#if DEBUG_MARKETPLACE_HTTP_API - llinfos << "*** Marketplace *** " << "http post: " << url << llendl; - llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; -#endif // DEBUG_MARKETPLACE_HTTP_API - - LLHTTPClient::post(url, LLSD(), new LLInventoryImportPostResponder(this), headers); - - // Set a timer (for testing only) - //gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this)); -} - -void LLPanelMarketplaceOutbox::importGetTrigger() -{ - mImportGetPending = true; - - std::string url = getMarketplaceURL_InventoryImport(); - LLSD headers = LLViewerMedia::getHeaders(); - headers["Cookie"] = sMarketplaceCookie; - -#if DEBUG_MARKETPLACE_HTTP_API - llinfos << "*** Marketplace *** " << "http get: " << url << llendl; - llinfos << "*** Marketplace *** " << "headers: " << ll_pretty_print_sd(headers) << llendl; -#endif // DEBUG_MARKETPLACE_HTTP_API - - const bool do_not_ignore_results = false; - - LLHTTPClient::get(url, new LLInventoryImportGetResponder(this, do_not_ignore_results), headers); -} - -void LLPanelMarketplaceOutbox::establishMarketplaceSessionCookie() -{ - mImportInProgress = true; - mImportGetPending = true; - - std::string url = getMarketplaceURL_InventoryImport(); - LLSD headers = LLViewerMedia::getHeaders(); - - const bool ignore_results = true; - - LLHTTPClient::get(url, new LLInventoryImportGetResponder(this, ignore_results), headers); -} - -void LLPanelMarketplaceOutbox::onImportPostComplete(U32 status, const LLSD& content) -{ -#if DEBUG_MARKETPLACE_HTTP_API - llinfos << "*** Marketplace *** " << "status = " << status << llendl; - llinfos << "*** Marketplace *** " << "content = " << ll_pretty_print_sd(content) << llendl; -#endif // DEBUG_MARKETPLACE_HTTP_API - - mImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE); - updateImportButtonStatus(); - - if (!mImportInProgress) - { - char status_string[16]; - sprintf(status_string, "%d", status); - - LLSD subs; - subs["ERROR_CODE"] = status_string; - - LLNotificationsUtil::add("OutboxImportFailed", subs, LLSD::emptyMap()); } - // The POST request returns the IMPORT_DONE code on success - //if (status == MarketplaceErrorCodes::IMPORT_DONE) - //{ - // gImportPollingFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox importPoll", boost::bind(&importPoll, _1, this)); - //} + return handled; } -void LLPanelMarketplaceOutbox::onImportGetComplete(U32 status, const LLSD& content, bool ignoreResults) +bool LLPanelMarketplaceOutbox::isOutboxEmpty() const { -#if DEBUG_MARKETPLACE_HTTP_API - llinfos << "*** Marketplace *** " << "status = " << status << llendl; - llinfos << "*** Marketplace *** " << "content = " << ll_pretty_print_sd(content) << llendl; -#endif // DEBUG_MARKETPLACE_HTTP_API - - mImportGetPending = false; - mImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING); - updateImportButtonStatus(); - - if (!mImportInProgress && !ignoreResults) - { - if (status == MarketplaceErrorCodes::IMPORT_DONE) - { - LLNotificationsUtil::add("OutboxImportComplete", LLSD::emptyMap(), LLSD::emptyMap()); - } - else if (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) - { - LLNotificationsUtil::add("OutboxImportHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); - } - else - { - char status_string[16]; - sprintf(status_string, "%d", status); - - LLSD subs; - subs["ERROR_CODE"] = status_string; - - //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); - LLNotificationsUtil::add("OutboxImportFailed", LLSD::emptyMap(), LLSD::emptyMap()); - } - } + return (getTotalItemCount() == 0); } void LLPanelMarketplaceOutbox::updateImportButtonStatus() { - if (isImportInProgress()) + if (LLMarketplaceInventoryImporter::instance().isImportInProgress()) { mImportButton->setVisible(false); @@ -440,7 +222,7 @@ void LLPanelMarketplaceOutbox::updateImportButtonStatus() mImportIndicator->setVisible(false); mImportButton->setVisible(true); - mImportButton->setEnabled(getMarketplaceImportEnabled() && !isOutboxEmpty()); + mImportButton->setEnabled(!isOutboxEmpty()); } } @@ -464,7 +246,7 @@ U32 LLPanelMarketplaceOutbox::getTotalItemCount() const void LLPanelMarketplaceOutbox::onImportButtonClicked() { - importPostTrigger(); + LLMarketplaceInventoryImporter::instance().triggerImport(); // Get the import animation going updateImportButtonStatus(); @@ -488,19 +270,5 @@ void LLPanelMarketplaceOutbox::draw() mOutboxButton->setLabel(getString("OutboxLabelNoArg")); } - if (!isImportInProgress()) - { - mImportButton->setEnabled(getMarketplaceImportEnabled() && not_empty); - } - else - { - ++mImportFrameTimer; - - if ((mImportFrameTimer % 50 == 0) && !mImportGetPending) - { - importGetTrigger(); - } - } - LLPanel::draw(); } diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h index 9cbb9cf21b..6f038118b3 100644 --- a/indra/newview/llpanelmarketplaceoutbox.h +++ b/indra/newview/llpanelmarketplaceoutbox.h @@ -59,10 +59,6 @@ public: U32 getTotalItemCount() const; bool isOutboxEmpty() const; - bool isImportInProgress() const; - - void onImportPostComplete(U32 status, const LLSD& content); - void onImportGetComplete(U32 status, const LLSD& content, bool ignoreResults); /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, @@ -78,18 +74,14 @@ protected: void onFocusReceived(); void onSelectionChange(); - void importPostTrigger(); - void importGetTrigger(); - void establishMarketplaceSessionCookie(); - + void importReportResults(U32 status, const LLSD& content); + void importStatusChanged(bool inProgress); + private: LLInventoryPanel * mInventoryPanel; LLButton * mImportButton; - U32 mImportFrameTimer; - bool mImportGetPending; LLLoadingIndicator * mImportIndicator; - bool mImportInProgress; LLButton * mOutboxButton; }; -- cgit v1.2.3 From 67f1321f31d5988e7b383cfbf4fbd6537f3d2710 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 8 Dec 2011 16:46:30 -0800 Subject: Initial functional merchant outbox floater --- indra/newview/llfloateroutbox.cpp | 309 ++++++++++++++++++++- indra/newview/llfloateroutbox.h | 44 ++- indra/newview/llmarketplacefunctions.cpp | 7 +- indra/newview/llsidepanelinventory.cpp | 2 +- .../default/xui/en/floater_merchant_outbox.xml | 137 ++++----- 5 files changed, 416 insertions(+), 83 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 8fea3d674e..79cd90ba1c 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -29,40 +29,333 @@ #include "llfloateroutbox.h" #include "llfloaterreg.h" +#include "llfolderview.h" +#include "llinventoryobserver.h" +#include "llinventorypanel.h" +#include "llloadingindicator.h" +#include "llmarketplacefunctions.h" +#include "llnotificationsutil.h" +#include "lltextbox.h" #include "lltransientfloatermgr.h" +#include "lltrans.h" +#include "llviewernetwork.h" +///---------------------------------------------------------------------------- +/// LLOutboxAddedObserver helper class +///---------------------------------------------------------------------------- + +class LLOutboxAddedObserver : public LLInventoryCategoryAddedObserver +{ +public: + LLOutboxAddedObserver(LLFloaterOutbox * outboxFloater) + : LLInventoryCategoryAddedObserver() + , mOutboxFloater(outboxFloater) + { + } + + void done() + { + for (cat_vec_t::iterator it = mAddedCategories.begin(); it != mAddedCategories.end(); ++it) + { + LLViewerInventoryCategory* added_category = *it; + + LLFolderType::EType added_category_type = added_category->getPreferredType(); + + if (added_category_type == LLFolderType::FT_OUTBOX) + { + mOutboxFloater->setupOutbox(added_category->getUUID()); + } + } + } + +private: + LLFloaterOutbox * mOutboxFloater; +}; + ///---------------------------------------------------------------------------- /// LLFloaterOutbox ///---------------------------------------------------------------------------- LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) : LLFloater(key) - , mPanelOutboxInventory(NULL) + , mCategoriesObserver(NULL) + , mCategoryAddedObserver(NULL) + , mOutboxId(LLUUID::null) + , mOutboxInventoryPanel(NULL) + , mOutboxItemCount(0) + , mInventoryDisablePanel(NULL) + , mInventoryFolderCountText(NULL) + , mInventoryImportInProgress(NULL) + , mInventoryPlaceholder(NULL) + , mInventoryText(NULL) + , mInventoryTitle(NULL) + , mImportButton(NULL) { - LLTransientFloaterMgr::getInstance()->addControlView(this); } LLFloaterOutbox::~LLFloaterOutbox() { - LLTransientFloaterMgr::getInstance()->removeControlView(this); +// delete mCategoriesObserver; +// delete mCategoryAddedObserver; } BOOL LLFloaterOutbox::postBuild() { + mInventoryDisablePanel = getChild<LLView>("outbox_inventory_disable_panel"); + mInventoryFolderCountText = getChild<LLTextBox>("outbox_folder_count"); + mInventoryImportInProgress = getChild<LLLoadingIndicator>("import_progress_indicator"); + mInventoryPlaceholder = getChild<LLView>("outbox_inventory_placeholder_panel"); + mInventoryText = mInventoryPlaceholder->getChild<LLTextBox>("outbox_inventory_placeholder_text"); + mInventoryTitle = mInventoryPlaceholder->getChild<LLTextBox>("outbox_inventory_placeholder_title"); + + mImportButton = getChild<LLButton>("outbox_import_btn"); + mImportButton->setCommitCallback(boost::bind(&LLFloaterOutbox::onImportButtonClicked, this)); + return TRUE; } void LLFloaterOutbox::onOpen(const LLSD& key) { - //LLFirstUse::useInventory(); + // + // Initialize the marketplace import API + // + + LLMarketplaceInventoryImporter::getInstance()->initialize(); + LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); + LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); + + // + // Look for an outbox and set up the inventory API + // + + const bool do_not_create_folder = false; + const bool do_not_find_in_library = false; + + const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder, do_not_find_in_library); + + if (outbox_id.isNull()) + { + // Observe category creation to catch outbox creation + mCategoryAddedObserver = new LLOutboxAddedObserver(this); + gInventory.addObserver(mCategoryAddedObserver); + } + else + { + setupOutbox(outbox_id); + } + + updateView(); +} + +void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) +{ + llassert(mOutboxId.isNull()); + llassert(mCategoriesObserver == NULL); + + mOutboxId = outboxId; + + // No longer need to observe new category creation + if (mCategoryAddedObserver != NULL) + { + gInventory.removeObserver(mCategoryAddedObserver); + } + + // Create observer for outbox modifications + mCategoriesObserver = new LLInventoryCategoriesObserver(); + gInventory.addObserver(mCategoriesObserver); + + mCategoriesObserver->addCategory(mOutboxId, boost::bind(&LLFloaterOutbox::onOutboxChanged, this)); + + // + // Set up the outbox inventory view + // + + mOutboxInventoryPanel = + LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_outbox_inventory.xml", + mInventoryPlaceholder->getParent(), + LLInventoryPanel::child_registry_t::instance()); + + llassert(mOutboxInventoryPanel); + + // Reshape the inventory to the proper size + LLRect inventory_placeholder_rect = mInventoryPlaceholder->getRect(); + mOutboxInventoryPanel->setShape(inventory_placeholder_rect); + + // Set the sort order newest to oldest + mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE); + mOutboxInventoryPanel->getFilter()->markDefault(); + + // Set selection callback for proper update of inventory status buttons + //mOutboxInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceOutbox::onSelectionChange, this)); + + // Set up the note to display when the outbox is empty + mOutboxInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryOutboxNoItems"); +} + +void LLFloaterOutbox::updateView() +{ + if (mOutboxItemCount > 0) + { + mOutboxInventoryPanel->setVisible(TRUE); + mInventoryPlaceholder->setVisible(FALSE); + } + else + { + mOutboxInventoryPanel->setVisible(FALSE); + mInventoryPlaceholder->setVisible(TRUE); + + std::string outbox_text; + std::string outbox_title; + std::string outbox_tooltip; + + if (mOutboxId.notNull()) + { + outbox_text = LLTrans::getString("InventoryOutboxNoItems"); + outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle"); + outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip"); + } + else + { + // + // The string to become a merchant contains 3 URL's which need the domain name patched in. + // + + std::string domain = "secondlife.com"; + + if (!LLGridManager::getInstance()->isInProductionGrid()) + { + std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); + domain = llformat("%s.lindenlab.com", utf8str_tolower(gridLabel).c_str()); + } + + LLStringUtil::format_map_t domain_arg; + domain_arg["[DOMAIN_NAME]"] = domain; + + std::string marketplace_url = LLTrans::getString("MarketplaceURL", domain_arg); + std::string marketplace_url_create = LLTrans::getString("MarketplaceURL_CreateStore", domain_arg); + std::string marketplace_url_info = LLTrans::getString("MarketplaceURL_LearnMore", domain_arg); + + LLStringUtil::format_map_t args1, args2, args3; + args1["[MARKETPLACE_URL]"] = marketplace_url; + args2["[LEARN_MORE_URL]"] = marketplace_url_info; + args3["[CREATE_STORE_URL]"] = marketplace_url_create; + + // NOTE: This is dumb, ridiculous and very finicky. The order of these is very important + // to have these three string substitutions work properly. + outbox_text = LLTrans::getString("InventoryOutboxNotMerchant", args1); + LLStringUtil::format(outbox_text, args2); + LLStringUtil::format(outbox_text, args3); + + outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle"); + outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip"); + } + + mInventoryText->setValue(outbox_text); + mInventoryTitle->setValue(outbox_title); + mInventoryPlaceholder->getParent()->setToolTip(outbox_tooltip); + } +} + +BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + // Pass drag and drop to this floater to the outbox inventory control + + S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft; + S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom; + + return mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); +} + +void LLFloaterOutbox::onImportButtonClicked() +{ + LLMarketplaceInventoryImporter::instance().triggerImport(); +} + +void LLFloaterOutbox::onOutboxChanged() +{ + llassert(!mOutboxId.isNull()); + + U32 item_count = 0; + + const LLFolderViewFolder * outbox_folder = mOutboxInventoryPanel->getRootFolder(); + + if (outbox_folder) + { + item_count += outbox_folder->getFoldersCount(); + item_count += outbox_folder->getItemsCount(); + } + + mOutboxItemCount = item_count; + + switch (mOutboxItemCount) + { + case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; + case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; + default: + { + std::string item_count_str = llformat("%d", mOutboxItemCount); + + LLStringUtil::format_map_t args; + args["[NUM]"] = item_count_str; + + mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); + break; + } + } + + mImportButton->setEnabled(mOutboxItemCount > 0); + + updateView(); } -void LLFloaterOutbox::onClose(bool app_quitting) +void LLFloaterOutbox::importReportResults(U32 status, const LLSD& content) { - LLFloater::onClose(app_quitting); - if (mKey.asInteger() > 1) + if (status == MarketplaceErrorCodes::IMPORT_DONE) + { + LLNotificationsUtil::add("OutboxImportComplete", LLSD::emptyMap(), LLSD::emptyMap()); + } + else if (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) + { + LLNotificationsUtil::add("OutboxImportHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); + } + else { - destroy(); + char status_string[16]; + sprintf(status_string, "%d", status); + + LLSD subs; + subs["ERROR_CODE"] = status_string; + + //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); + LLNotificationsUtil::add("OutboxImportFailed", LLSD::emptyMap(), LLSD::emptyMap()); } } + +void LLFloaterOutbox::importStatusChanged(bool inProgress) +{ + if (inProgress) + { + mImportButton->setEnabled(false); + + mInventoryDisablePanel->setVisible(true); + + mInventoryImportInProgress->setVisible(true); + mInventoryImportInProgress->reset(); + mInventoryImportInProgress->start(); + } + else + { + mImportButton->setEnabled(mOutboxItemCount > 0); + + mInventoryDisablePanel->setVisible(false); + + mInventoryImportInProgress->stop(); + mInventoryImportInProgress->setVisible(false); + } +} + diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index cb5c2be81c..1e8567ef12 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -31,7 +31,15 @@ #include "llfloater.h" #include "llfoldertype.h" + +class LLButton; +class LLInventoryCategoriesObserver; +class LLInventoryCategoryAddedObserver; class LLInventoryPanel; +class LLLoadingIndicator; +class LLTextBox; +class LLView; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFloaterOutbox @@ -42,15 +50,43 @@ class LLFloaterOutbox : public LLFloater public: LLFloaterOutbox(const LLSD& key); ~LLFloaterOutbox(); + + void setupOutbox(const LLUUID& outboxId); + // virtuals BOOL postBuild(); + void onOpen(const LLSD& key); + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); - // Inherited functionality - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); +protected: + void importReportResults(U32 status, const LLSD& content); + void importStatusChanged(bool inProgress); + + void onImportButtonClicked(); + void onOutboxChanged(); + + void updateView(); private: - LLInventoryPanel* mPanelOutboxInventory; + LLInventoryCategoriesObserver * mCategoriesObserver; + LLInventoryCategoryAddedObserver * mCategoryAddedObserver; + + LLUUID mOutboxId; + LLInventoryPanel * mOutboxInventoryPanel; + U32 mOutboxItemCount; + + LLView * mInventoryDisablePanel; + LLTextBox * mInventoryFolderCountText; + LLLoadingIndicator * mInventoryImportInProgress; + LLView * mInventoryPlaceholder; + LLTextBox * mInventoryText; + LLTextBox * mInventoryTitle; + + LLButton * mImportButton; }; #endif // LL_LLFLOATEROUTBOX_H diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index b9e02a36b4..9c67c589b8 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -55,6 +55,7 @@ namespace LLMarketplaceImport static std::string sMarketplaceCookie = ""; static bool sImportInProgress = false; + static bool sImportPostPending = false; static bool sImportGetPending = false; static U32 sImportResultStatus = 0; static LLSD sImportResults = LLSD::emptyMap(); @@ -106,6 +107,7 @@ namespace LLMarketplaceImport void completed(U32 status, const std::string& reason, const LLSD& content) { sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE); + sImportPostPending = false; sImportResultStatus = status; } }; @@ -185,7 +187,7 @@ namespace LLMarketplaceImport bool resultPending() { - return sImportGetPending; + return (sImportPostPending || sImportGetPending); } U32 getResultStatus() @@ -226,7 +228,8 @@ namespace LLMarketplaceImport void triggerImport() { - sImportInProgress = true; + sImportInProgress = true; + sImportPostPending = true; sImportResultStatus = MarketplaceErrorCodes::IMPORT_PROCESSING; sImportResults = LLSD::emptyMap(); diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 19a81b93bf..9c551be2d5 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -926,7 +926,7 @@ U32 LLSidepanelInventory::getSelectedCount() { selection_list = mInventoryPanelInbox->getRootFolder()->getSelectionList(); - count += selection_list.size(); + count += selection_list.size(); } if ((count == 0) && mOutboxEnabled && (mInventoryPanelOutbox != NULL)) diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index 2f8a83c072..86e27cbc71 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -3,90 +3,33 @@ open_positioning="cascading" can_close="true" can_resize="true" - height="400" + height="440" help_topic="floater_merchant_outbox" - min_width="333" - min_height="440" + min_width="300" + min_height="240" name="floater_merchant_outbox" save_rect="true" save_visibility="true" reuse_instance="true" title="MERCHANT OUTBOX" width="333" > + <string name="OutboxFolderCount0">0 folders</string> + <string name="OutboxFolderCount1">1 folder</string> + <string name="OutboxFolderCountN">[NUM] folders</string> <panel follows="all" layout="topleft" left="0" - name="marketplace_outbox" - class="panel_marketplace_outbox" top="0" label="" - height="400" - width="330"> - <string name="OutboxLabelWithArg">Merchant outbox ([NUM])</string> - <string name="OutboxLabelNoArg">Merchant outbox</string> - <button - label="Merchant outbox" - font="SansSerifMedium" - name="outbox_btn" - height="35" - width="308" - image_unselected="MarketplaceBtn_Off" - image_selected="MarketplaceBtn_Selected" - halign="left" - handle_right_mouse="false" - follows="top|left|right" - is_toggle="true" - tab_stop="false" - pad_left="35" - top="0" - left="10" /> - <button - image_unselected="OutboxPush_Off" - image_selected="OutboxPush_Selected" - image_hover_selected="OutboxPush_Selected_Over" - image_hover_unselected="OutboxPush_Over" - image_disabled_selected="OutboxPush_Selected_Disabled" - image_disabled="OutboxPush_Disabled" - image_pressed="OutboxPush_Press" - image_pressed_selected="OutboxPush_Selected_Press" - label="" - tool_tip="Push to my Marketplace Storefront" - is_toggle="false" - name="outbox_sync_btn" - follows="top|right" - tab_stop="false" - halign="center" - top="6" - left="-50" - height="23" - width="32" - enabled="false" /> - <loading_indicator - follows="top|right" - name="outbox_sync_indicator" - top="6" - left="-50" - height="23" - width="32" - images_per_sec="1.15" - tab_stop="false" - visible="false"> - <images> - <image name="OutboxPush_Progress_1"/> - <image name="OutboxPush_Progress_2"/> - <image name="OutboxPush_Progress_3"/> - <image name="OutboxPush_Progress_4"/> - <image name="OutboxPush_Progress_5"/> - <image name="OutboxPush_Progress_6"/> - </images> - </loading_indicator> + height="440" + width="333"> <panel follows="all" left="10" bottom="400" - width="308" - top="35" + width="313" + top="0" bg_opaque_color="InventoryBackgroundColor" background_visible="true" background_opaque="true" @@ -98,7 +41,7 @@ top="0" left="0" width="308" - height="365" + height="400" bg_opaque_color="InventoryBackgroundColor" background_visible="true" background_opaque="true" @@ -129,6 +72,64 @@ wrap="true" halign="left" /> </panel> + </panel> + <panel + name="outbox_inventory_disable_panel" + follows="all" + left="0" + bottom="440" + width="333" + top="0" + bg_opaque_color="White_50" + background_visible="true" + background_opaque="true" + visible="false" + /> + <loading_indicator + follows="all" + height="65" + layout="topleft" + left="140" + name="import_progress_indicator" + top="180" + visible="false" + width="45" /> + <panel + follows="bottom|left|right" + left="10" + bottom="435" + width="313" + top="405" + bg_opaque_color="InventoryBackgroundColor" + background_visible="true" + background_opaque="true" + > + <text + name="outbox_folder_count" + type="string" + follows="all" + layout="topleft" + top="7" + left="5" + width="100" + height="20" + wrap="true" + halign="left" + valign="baseline" + font="SansSerifBold" /> + <button + label="Send to Marketplace" + tool_tip="Push to my Marketplace Storefront" + is_toggle="false" + name="outbox_import_btn" + follows="bottom|right" + tab_stop="false" + halign="center" + top="3" + left="110" + height="25" + width="200" + enabled="false" /> </panel> </panel> </floater> -- cgit v1.2.3 From a7b04c9dd44274b3548402de2f4a9b8bc20e3e50 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 9 Dec 2011 10:31:16 -0800 Subject: * Removed old inventory window outbox. * Added centered progress indicator for outbox. --- indra/newview/llfloateroutbox.cpp | 38 +-- indra/newview/llfloateroutbox.h | 2 +- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llinventorypanel.cpp | 9 +- indra/newview/llpanelmaininventory.cpp | 2 +- indra/newview/llpanelmarketplaceinbox.cpp | 2 +- indra/newview/llpanelmarketplaceoutbox.cpp | 4 +- indra/newview/llsidepanelinventory.cpp | 272 +-------------------- indra/newview/llsidepanelinventory.h | 14 +- .../default/xui/en/floater_merchant_outbox.xml | 60 +++-- .../skins/default/xui/en/sidepanel_inventory.xml | 135 +--------- 11 files changed, 80 insertions(+), 460 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 79cd90ba1c..6a3eaba016 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -32,7 +32,6 @@ #include "llfolderview.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" -#include "llloadingindicator.h" #include "llmarketplacefunctions.h" #include "llnotificationsutil.h" #include "lltextbox.h" @@ -96,15 +95,24 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) LLFloaterOutbox::~LLFloaterOutbox() { -// delete mCategoriesObserver; -// delete mCategoryAddedObserver; + if (mCategoriesObserver && gInventory.containsObserver(mCategoriesObserver)) + { + gInventory.removeObserver(mCategoriesObserver); + } + delete mCategoriesObserver; + + if (mCategoryAddedObserver && gInventory.containsObserver(mCategoryAddedObserver)) + { + gInventory.removeObserver(mCategoryAddedObserver); + } + delete mCategoryAddedObserver; } BOOL LLFloaterOutbox::postBuild() { mInventoryDisablePanel = getChild<LLView>("outbox_inventory_disable_panel"); mInventoryFolderCountText = getChild<LLTextBox>("outbox_folder_count"); - mInventoryImportInProgress = getChild<LLLoadingIndicator>("import_progress_indicator"); + mInventoryImportInProgress = getChild<LLView>("import_progress_indicator"); mInventoryPlaceholder = getChild<LLView>("outbox_inventory_placeholder_panel"); mInventoryText = mInventoryPlaceholder->getChild<LLTextBox>("outbox_inventory_placeholder_text"); mInventoryTitle = mInventoryPlaceholder->getChild<LLTextBox>("outbox_inventory_placeholder_title"); @@ -264,6 +272,11 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, std::string& tooltip_msg) { // Pass drag and drop to this floater to the outbox inventory control + + if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress()) + { + return FALSE; + } S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft; S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom; @@ -317,11 +330,11 @@ void LLFloaterOutbox::importReportResults(U32 status, const LLSD& content) { if (status == MarketplaceErrorCodes::IMPORT_DONE) { - LLNotificationsUtil::add("OutboxImportComplete", LLSD::emptyMap(), LLSD::emptyMap()); + LLNotificationsUtil::add("OutboxImportComplete"); } else if (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) { - LLNotificationsUtil::add("OutboxImportHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); + LLNotificationsUtil::add("OutboxImportHadErrors"); } else { @@ -329,10 +342,10 @@ void LLFloaterOutbox::importReportResults(U32 status, const LLSD& content) sprintf(status_string, "%d", status); LLSD subs; - subs["ERROR_CODE"] = status_string; + subs["[ERROR_CODE]"] = status_string; //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); - LLNotificationsUtil::add("OutboxImportFailed", LLSD::emptyMap(), LLSD::emptyMap()); + LLNotificationsUtil::add("OutboxImportFailed", subs); } } @@ -343,19 +356,14 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) mImportButton->setEnabled(false); mInventoryDisablePanel->setVisible(true); - mInventoryImportInProgress->setVisible(true); - mInventoryImportInProgress->reset(); - mInventoryImportInProgress->start(); } else { - mImportButton->setEnabled(mOutboxItemCount > 0); - + mInventoryImportInProgress->setVisible(false); mInventoryDisablePanel->setVisible(false); - mInventoryImportInProgress->stop(); - mInventoryImportInProgress->setVisible(false); + mImportButton->setEnabled(mOutboxItemCount > 0); } } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 1e8567ef12..9b6568c69c 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -81,7 +81,7 @@ private: LLView * mInventoryDisablePanel; LLTextBox * mInventoryFolderCountText; - LLLoadingIndicator * mInventoryImportInProgress; + LLView * mInventoryImportInProgress; LLView * mInventoryPlaceholder; LLTextBox * mInventoryText; LLTextBox * mInventoryTitle; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 017dabe2ad..33b9af7a78 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -71,7 +71,7 @@ #include "llwearablelist.h" // Marketplace outbox current disabled -#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 // keep in sync with ENABLE_MERCHANT_OUTBOX_PANEL +#define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 typedef std::pair<LLUUID, LLUUID> two_uuids_t; typedef std::list<two_uuids_t> two_uuids_list_t; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 80b53d5702..af1d2b8528 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1157,7 +1157,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id); bool in_inbox = false; - bool in_outbox = false; LLViewerInventoryCategory * parent_cat = NULL; @@ -1173,10 +1172,9 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L if (parent_cat) { in_inbox = (LLFolderType::FT_INBOX == parent_cat->getPreferredType()); - in_outbox = (LLFolderType::FT_OUTBOX == parent_cat->getPreferredType()); } - if (in_inbox || in_outbox) + if (in_inbox) { LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); LLInventoryPanel * inventory_panel = NULL; @@ -1186,11 +1184,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L sidepanel_inventory->openInbox(); inventory_panel = sidepanel_inventory->getInboxPanel(); } - else - { - sidepanel_inventory->openOutbox(); - inventory_panel = sidepanel_inventory->getOutboxPanel(); - } if (inventory_panel) { diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 68ef13cd68..374afb90be 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -593,7 +593,7 @@ void LLPanelMainInventory::onFocusReceived() return; } - sidepanel_inventory->clearSelections(false, true, true); + sidepanel_inventory->clearSelections(false, true); } void LLPanelMainInventory::setFilterTextFromFilter() diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 7cb4bbf891..a5e964f563 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -109,7 +109,7 @@ void LLPanelMarketplaceInbox::onFocusReceived() LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); if (sidepanel_inventory) { - sidepanel_inventory->clearSelections(true, false, true); + sidepanel_inventory->clearSelections(true, false); } gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index e3af7fd906..6c2363eb7f 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -84,6 +84,8 @@ BOOL LLPanelMarketplaceOutbox::postBuild() return TRUE; } +// DO WE NEED THIS FILE AT ALL? + void LLPanelMarketplaceOutbox::handleLoginComplete() { mImportButton = getChild<LLButton>("outbox_import_btn"); @@ -100,7 +102,7 @@ void LLPanelMarketplaceOutbox::onFocusReceived() LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); if (sidepanel_inventory) { - sidepanel_inventory->clearSelections(true, true, false); + sidepanel_inventory->clearSelections(true, true); } } diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 9c551be2d5..eade91798b 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -47,7 +47,6 @@ #include "lloutfitobserver.h" #include "llpanelmaininventory.h" #include "llpanelmarketplaceinbox.h" -#include "llpanelmarketplaceoutbox.h" #include "llselectmgr.h" #include "llsidepaneliteminfo.h" #include "llsidepaneltaskinfo.h" @@ -68,26 +67,17 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_ // No longer want the inbox panel to auto-expand since it creates issues with the "new" tag time stamp #define AUTO_EXPAND_INBOX 0 -// Temporarily disabling the outbox until we straighten out the API -#define ENABLE_MERCHANT_OUTBOX_PANEL 1 // keep in sync with ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU - static const char * const INBOX_BUTTON_NAME = "inbox_btn"; -static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; - static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel"; -static const char * const OUTBOX_LAYOUT_PANEL_NAME = "outbox_layout_panel"; - static const char * const INBOX_OUTBOX_LAYOUT_PANEL_NAME = "inbox_outbox_layout_panel"; static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel"; static const char * const INBOX_INVENTORY_PANEL = "inventory_inbox"; -static const char * const OUTBOX_INVENTORY_PANEL = "inventory_outbox"; static const char * const INBOX_OUTBOX_LAYOUT_STACK_NAME = "inbox_outbox_layout_stack"; static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; -static const char * const MARKETPLACE_OUTBOX_PANEL = "marketplace_outbox"; // // Helpers @@ -116,10 +106,6 @@ public: mSidepanelInventory->enableInbox(true); mSidepanelInventory->observeInboxModifications(added_category->getUUID()); break; - case LLFolderType::FT_OUTBOX: - mSidepanelInventory->enableOutbox(true); - mSidepanelInventory->observeOutboxModifications(added_category->getUUID()); - break; default: break; } @@ -138,10 +124,8 @@ LLSidepanelInventory::LLSidepanelInventory() : LLPanel() , mItemPanel(NULL) , mInventoryPanelInbox(NULL) - , mInventoryPanelOutbox(NULL) , mPanelMainInventory(NULL) , mInboxEnabled(false) - , mOutboxEnabled(false) , mCategoriesObserver(NULL) , mInboxOutboxAddedObserver(NULL) { @@ -172,15 +156,6 @@ void handleInventoryDisplayInboxChanged() } } -void handleInventoryDisplayOutboxChanged() -{ - LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); - if (sidepanel_inventory) - { - sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox")); - } -} - BOOL LLSidepanelInventory::postBuild() { // UI elements from inventory panel @@ -255,30 +230,23 @@ BOOL LLSidepanelInventory::postBuild() LLLayoutStack* inout_stack = getChild<LLLayoutStack>(INBOX_OUTBOX_LAYOUT_STACK_NAME); - // Collapse both inbox and outbox panels + // Collapse inbox panel inout_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true); - inout_stack->collapsePanel(getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME), true); // Set up button states and callbacks LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME); - LLButton * outbox_button = getChild<LLButton>(OUTBOX_BUTTON_NAME); inbox_button->setToggleState(false); - outbox_button->setToggleState(false); - inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); - outbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleOutboxBtn, this)); - // Set the inbox and outbox visible based on debug settings (final setting comes from http request below) + // Set the inbox visible based on debug settings (final setting comes from http request below) enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); - enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox")); - // Trigger callback for after login so we can setup to track inbox and outbox changes after initial inventory load + // Trigger callback for after login so we can setup to track inbox changes after initial inventory load LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInboxOutbox, this)); } gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged)); - gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged)); // Update the verbs buttons state. updateVerbs(); @@ -289,40 +257,27 @@ BOOL LLSidepanelInventory::postBuild() void LLSidepanelInventory::updateInboxOutbox() { // - // Track inbox and outbox folder changes + // Track inbox folder changes // const bool do_not_create_folder = false; const bool do_not_find_in_library = false; const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, do_not_create_folder, do_not_find_in_library); - const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder, do_not_find_in_library); // Set up observer to listen for creation of inbox and outbox if at least one of them doesn't exist - if (inbox_id.isNull() || outbox_id.isNull()) + if (inbox_id.isNull()) { observeInboxOutboxCreation(); } - // Set up observer for inbox changes, if we have an inbox already - if (!inbox_id.isNull()) + else { // Enable the display of the inbox if it exists enableInbox(true); observeInboxModifications(inbox_id); } - -#if ENABLE_MERCHANT_OUTBOX_PANEL - // Set up observer for outbox changes, if we have an outbox already - if (!outbox_id.isNull()) - { - // Enable the display of the outbox if it exists - enableOutbox(true); - - observeOutboxModifications(outbox_id); - } -#endif } void LLSidepanelInventory::observeInboxOutboxCreation() @@ -342,7 +297,7 @@ void LLSidepanelInventory::observeInboxOutboxCreation() void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID) { // - // Track inbox and outbox folder changes + // Track inbox folder changes // if (inboxID.isNull()) @@ -373,35 +328,6 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID) mInventoryPanelInbox = inbox->setupInventoryPanel(); } - -void LLSidepanelInventory::observeOutboxModifications(const LLUUID& outboxID) -{ - // - // Track outbox folder changes - // - - if (outboxID.isNull()) - { - llwarns << "Attempting to track modifications to non-existant outbox" << llendl; - return; - } - - if (mCategoriesObserver == NULL) - { - mCategoriesObserver = new LLInventoryCategoriesObserver(); - gInventory.addObserver(mCategoriesObserver); - } - - mCategoriesObserver->addCategory(outboxID, boost::bind(&LLSidepanelInventory::onOutboxChanged, this, outboxID)); - - // - // Set up the outbox inventory view - // - - LLPanelMarketplaceOutbox * outbox = getChild<LLPanelMarketplaceOutbox>(MARKETPLACE_OUTBOX_PANEL); - mInventoryPanelOutbox = outbox->setupInventoryPanel(); -} - void LLSidepanelInventory::enableInbox(bool enabled) { mInboxEnabled = enabled; @@ -414,39 +340,6 @@ void LLSidepanelInventory::enableInbox(bool enabled) LLLayoutPanel * inout_layout_panel = getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME); inout_layout_panel->setVisible(TRUE); - - if (mOutboxEnabled) - { - S32 inbox_min_dim = inbox_layout_panel->getMinDim(); - S32 outbox_min_dim = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME)->getMinDim(); - - inout_layout_panel->setMinDim(inbox_min_dim + outbox_min_dim); - } - } -} - -void LLSidepanelInventory::enableOutbox(bool enabled) -{ - mOutboxEnabled = enabled; - - LLLayoutPanel * outbox_layout_panel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME); - outbox_layout_panel->setVisible(enabled); - - if (mOutboxEnabled) - { - LLLayoutPanel * inout_layout_panel = getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME); - - inout_layout_panel->setVisible(TRUE); - - if (mInboxEnabled) - { - S32 inbox_min_dim = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME)->getMinDim(); - S32 outbox_min_dim = outbox_layout_panel->getMinDim(); - - inout_layout_panel->setMinDim(inbox_min_dim + outbox_min_dim); - } - - updateOutboxUserStatus(); } } @@ -459,30 +352,12 @@ void LLSidepanelInventory::openInbox() } } -void LLSidepanelInventory::openOutbox() -{ - if (mOutboxEnabled) - { - getChild<LLButton>(OUTBOX_BUTTON_NAME)->setToggleState(true); - onToggleOutboxBtn(); - } -} - void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) { // Trigger a load of the entire inbox so we always know the contents and their creation dates for sorting LLInventoryModelBackgroundFetch::instance().start(inbox_id); #if AUTO_EXPAND_INBOX - // If the outbox is expanded, don't auto-expand the inbox - if (mOutboxEnabled) - { - if (getChild<LLButton>(OUTBOX_BUTTON_NAME)->getToggleState()) - { - return; - } - } - // Expand the inbox since we have fresh items and the outbox is not expanded if (mInboxEnabled) { @@ -492,21 +367,9 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) #endif } -void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id) -{ - // Expand the outbox since we have new items in it - if (mOutboxEnabled) - { - getChild<LLButton>(OUTBOX_BUTTON_NAME)->setToggleState(true); - onToggleOutboxBtn(); - } -} - -bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel, - LLButton * otherButton, LLLayoutPanel * otherPanel) +bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel) { bool expand = pressedButton->getToggleState(); - bool otherExpanded = otherButton->getToggleState(); LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME); LLLayoutStack* inout_stack = getChild<LLLayoutStack>(INBOX_OUTBOX_LAYOUT_STACK_NAME); @@ -516,27 +379,12 @@ bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLL inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, expand); inv_stack->collapsePanel(inout_panel, !expand); - // Collapse other marketplace panel if it is expanded - if (expand && otherExpanded) - { - // Reshape pressedPanel to the otherPanel's height so we preserve the marketplace panel size - pressedPanel->reshape(pressedPanel->getRect().getWidth(), otherPanel->getRect().getHeight()); - - inout_stack->collapsePanel(otherPanel, true); - otherButton->setToggleState(false); - } - else { // NOTE: This is an attempt to reshape the inventory panel to the proper size but it doesn't seem to propagate // properly to the child panels. S32 new_height = inout_panel->getRect().getHeight(); - if (otherPanel->getVisible()) - { - new_height -= otherPanel->getMinDim(); - } - pressedPanel->reshape(pressedPanel->getRect().getWidth(), new_height); } @@ -550,10 +398,8 @@ void LLSidepanelInventory::onToggleInboxBtn() { LLButton* inboxButton = getChild<LLButton>(INBOX_BUTTON_NAME); LLLayoutPanel* inboxPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME); - LLButton* outboxButton = getChild<LLButton>(OUTBOX_BUTTON_NAME); - LLLayoutPanel* outboxPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME); - const bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel); + const bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel); if (inbox_expanded && inboxPanel->isInVisibleChain()) { @@ -561,16 +407,6 @@ void LLSidepanelInventory::onToggleInboxBtn() } } -void LLSidepanelInventory::onToggleOutboxBtn() -{ - LLButton* inboxButton = getChild<LLButton>(INBOX_BUTTON_NAME); - LLLayoutPanel* inboxPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME); - LLButton* outboxButton = getChild<LLButton>(OUTBOX_BUTTON_NAME); - LLLayoutPanel* outboxPanel = getChild<LLLayoutPanel>(OUTBOX_LAYOUT_PANEL_NAME); - - manageInboxOutboxPanels(outboxButton, outboxPanel, inboxButton, inboxPanel); -} - void LLSidepanelInventory::onOpen(const LLSD& key) { LLFirstUse::newInventory(false); @@ -740,77 +576,6 @@ void LLSidepanelInventory::showInventoryPanel() updateVerbs(); } -void LLSidepanelInventory::updateOutboxUserStatus() -{ - const bool isMerchant = (gSavedSettings.getString("InventoryMarketplaceUserStatus") == "merchant"); - const bool hasOutbox = !gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false).isNull(); - - LLView * outbox_placeholder = getChild<LLView>("outbox_inventory_placeholder_panel"); - LLView * outbox_placeholder_parent = outbox_placeholder->getParent(); - - LLTextBox * outbox_title_box = outbox_placeholder->getChild<LLTextBox>("outbox_inventory_placeholder_title"); - LLTextBox * outbox_text_box = outbox_placeholder->getChild<LLTextBox>("outbox_inventory_placeholder_text"); - - std::string outbox_text; - std::string outbox_title; - std::string outbox_tooltip; - - if (isMerchant) - { - if (hasOutbox) - { - outbox_text = LLTrans::getString("InventoryOutboxNoItems"); - outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle"); - outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip"); - } - else - { - outbox_text = LLTrans::getString("InventoryOutboxCreationError"); - outbox_title = LLTrans::getString("InventoryOutboxCreationErrorTitle"); - outbox_tooltip = LLTrans::getString("InventoryOutboxCreationErrorTooltip"); - } - } - else - { - // - // The string to become a merchant contains 3 URL's which need the domain name patched in. - // - - std::string domain = "secondlife.com"; - - if (!LLGridManager::getInstance()->isInProductionGrid()) - { - std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); - domain = llformat("%s.lindenlab.com", utf8str_tolower(gridLabel).c_str()); - } - - LLStringUtil::format_map_t domain_arg; - domain_arg["[DOMAIN_NAME]"] = domain; - - std::string marketplace_url = LLTrans::getString("MarketplaceURL", domain_arg); - std::string marketplace_url_create = LLTrans::getString("MarketplaceURL_CreateStore", domain_arg); - std::string marketplace_url_info = LLTrans::getString("MarketplaceURL_LearnMore", domain_arg); - - LLStringUtil::format_map_t args1, args2, args3; - args1["[MARKETPLACE_URL]"] = marketplace_url; - args2["[LEARN_MORE_URL]"] = marketplace_url_info; - args3["[CREATE_STORE_URL]"] = marketplace_url_create; - - // NOTE: This is dumb, ridiculous and very finicky. The order of these is very important - // to have these three string substitutions work properly. - outbox_text = LLTrans::getString("InventoryOutboxNotMerchant", args1); - LLStringUtil::format(outbox_text, args2); - LLStringUtil::format(outbox_text, args3); - - outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle"); - outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip"); - } - - outbox_text_box->setValue(outbox_text); - outbox_title_box->setValue(outbox_title); - outbox_placeholder_parent->setToolTip(outbox_tooltip); -} - void LLSidepanelInventory::updateVerbs() { mInfoBtn->setEnabled(FALSE); @@ -929,13 +694,6 @@ U32 LLSidepanelInventory::getSelectedCount() count += selection_list.size(); } - if ((count == 0) && mOutboxEnabled && (mInventoryPanelOutbox != NULL)) - { - selection_list = mInventoryPanelOutbox->getRootFolder()->getSelectionList(); - - count += selection_list.size(); - } - return count; } @@ -957,7 +715,7 @@ BOOL LLSidepanelInventory::isMainInventoryPanelActive() const return mInventoryPanel->getVisible(); } -void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox, bool clearOutbox) +void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox) { if (clearMain) { @@ -974,11 +732,6 @@ void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox, bool mInventoryPanelInbox->clearSelection(); } - if (clearOutbox && mOutboxEnabled && (mInventoryPanelOutbox != NULL)) - { - mInventoryPanelOutbox->clearSelection(); - } - updateVerbs(); } @@ -991,10 +744,5 @@ std::set<LLUUID> LLSidepanelInventory::getInboxOrOutboxSelectionList() inventory_selected_uuids = mInventoryPanelInbox->getRootFolder()->getSelectionList(); } - if (inventory_selected_uuids.empty() && mOutboxEnabled && (mInventoryPanelOutbox != NULL)) - { - inventory_selected_uuids = mInventoryPanelOutbox->getRootFolder()->getSelectionList(); - } - return inventory_selected_uuids; } diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 2c6f807013..915db727d6 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -52,19 +52,17 @@ private: public: void observeInboxOutboxCreation(); void observeInboxModifications(const LLUUID& inboxID); - void observeOutboxModifications(const LLUUID& outboxID); /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any. LLInventoryPanel* getInboxPanel() const { return mInventoryPanelInbox; } - LLInventoryPanel* getOutboxPanel() const { return mInventoryPanelOutbox; } LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; } BOOL isMainInventoryPanelActive() const; - void clearSelections(bool clearMain, bool clearInbox, bool clearOutbox); + void clearSelections(bool clearMain, bool clearInbox); std::set<LLUUID> getInboxOrOutboxSelectionList(); void showItemInfoPanel(); @@ -75,18 +73,13 @@ public: bool canShare(); void onToggleInboxBtn(); - void onToggleOutboxBtn(); void enableInbox(bool enabled); - void enableOutbox(bool enabled); void openInbox(); - void openOutbox(); bool isInboxEnabled() const { return mInboxEnabled; } - bool isOutboxEnabled() const { return mOutboxEnabled; } - void updateOutboxUserStatus(); void updateVerbs(); protected: @@ -100,9 +93,8 @@ protected: bool canWearSelected(); // check whether selected items can be worn void onInboxChanged(const LLUUID& inbox_id); - void onOutboxChanged(const LLUUID& outbox_id); - bool manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel, LLButton * otherButton, LLLayoutPanel * otherPanel); + bool manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel); // // UI Elements @@ -110,7 +102,6 @@ protected: private: LLPanel* mInventoryPanel; // Main inventory view LLInventoryPanel* mInventoryPanelInbox; - LLInventoryPanel* mInventoryPanelOutbox; LLSidepanelItemInfo* mItemPanel; // Individual item view LLSidepanelTaskInfo* mTaskPanel; // Individual in-world object view LLPanelMainInventory* mPanelMainInventory; @@ -135,7 +126,6 @@ private: LLButton* mShopBtn; bool mInboxEnabled; - bool mOutboxEnabled; LLInventoryCategoriesObserver* mCategoriesObserver; LLInboxOutboxAddedObserver* mInboxOutboxAddedObserver; diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index 86e27cbc71..f0b29f2248 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -6,7 +6,7 @@ height="440" help_topic="floater_merchant_outbox" min_width="300" - min_height="240" + min_height="100" name="floater_merchant_outbox" save_rect="true" save_visibility="true" @@ -49,7 +49,7 @@ <text name="outbox_inventory_placeholder_title" type="string" - follows="all" + follows="top|left|right" layout="topleft" top="10" left="0" @@ -63,7 +63,7 @@ <text name="outbox_inventory_placeholder_text" type="string" - follows="all" + follows="top|left|right" layout="topleft" top="35" left="0" @@ -73,27 +73,6 @@ halign="left" /> </panel> </panel> - <panel - name="outbox_inventory_disable_panel" - follows="all" - left="0" - bottom="440" - width="333" - top="0" - bg_opaque_color="White_50" - background_visible="true" - background_opaque="true" - visible="false" - /> - <loading_indicator - follows="all" - height="65" - layout="topleft" - left="140" - name="import_progress_indicator" - top="180" - visible="false" - width="45" /> <panel follows="bottom|left|right" left="10" @@ -116,7 +95,7 @@ wrap="true" halign="left" valign="baseline" - font="SansSerifBold" /> + font="SansSerif" /> <button label="Send to Marketplace" tool_tip="Push to my Marketplace Storefront" @@ -131,5 +110,36 @@ width="200" enabled="false" /> </panel> + <panel + name="outbox_inventory_disable_panel" + follows="all" + left="0" + bottom="440" + width="333" + top="0" + bg_opaque_color="White_50" + background_visible="true" + background_opaque="true" + visible="false" + /> + <layout_stack name="import_progress_indicator" orientation="vertical" left="0" height="440" top="0" width="333" follows="all" visible="false"> + <layout_panel /> + <layout_panel height="45" auto_resize="false"> + <layout_stack orientation="horizontal" left="0" height="45" top="0" width="333" follows="all"> + <layout_panel width="0" /> + <layout_panel width="45" auto_resize="false"> + <loading_indicator + height="45" + layout="topleft" + left="0" + top="0" + width="45" + /> + </layout_panel> + <layout_panel width="0" /> + </layout_stack> + </layout_panel> + <layout_panel /> + </layout_stack> </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 9f3c57fa0f..0b14fd0459 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -153,139 +153,8 @@ </panel> </panel> </layout_panel> - <layout_panel - width="330" - layout="topleft" - auto_resize="true" - user_resize="false" - follows="all" - name="outbox_layout_panel" - visible="false" - min_dim="35" - max_dim="200" - expanded_min_dim="90" - height="200"> - <panel - follows="all" - layout="topleft" - left="0" - name="marketplace_outbox" - class="panel_marketplace_outbox" - top="0" - label="" - height="200" - width="330"> - <string name="OutboxLabelWithArg">Merchant outbox ([NUM])</string> - <string name="OutboxLabelNoArg">Merchant outbox</string> - <button - label="Merchant outbox" - font="SansSerifMedium" - name="outbox_btn" - height="35" - width="308" - image_unselected="MarketplaceBtn_Off" - image_selected="MarketplaceBtn_Selected" - halign="left" - handle_right_mouse="false" - follows="top|left|right" - is_toggle="true" - tab_stop="false" - pad_left="35" - top="0" - left="10" /> - <button - image_unselected="OutboxPush_Off" - image_selected="OutboxPush_Selected" - image_hover_selected="OutboxPush_Selected_Over" - image_hover_unselected="OutboxPush_Over" - image_disabled_selected="OutboxPush_Selected_Disabled" - image_disabled="OutboxPush_Disabled" - image_pressed="OutboxPush_Press" - image_pressed_selected="OutboxPush_Selected_Press" - label="" - tool_tip="Push to my Marketplace Storefront" - is_toggle="false" - name="outbox_import_btn" - follows="top|right" - tab_stop="false" - halign="center" - top="6" - left="-50" - height="23" - width="32" - enabled="false" /> - <loading_indicator - follows="top|right" - name="outbox_import_indicator" - top="6" - left="-50" - height="23" - width="32" - images_per_sec="1.15" - tab_stop="false" - visible="false"> - <images> - <image name="OutboxPush_Progress_1"/> - <image name="OutboxPush_Progress_2"/> - <image name="OutboxPush_Progress_3"/> - <image name="OutboxPush_Progress_4"/> - <image name="OutboxPush_Progress_5"/> - <image name="OutboxPush_Progress_6"/> - </images> - </loading_indicator> - <panel - follows="all" - left="10" - bottom="200" - width="308" - top="35" - bg_opaque_color="InventoryBackgroundColor" - background_visible="true" - background_opaque="true" - > - <panel - name="outbox_inventory_placeholder_panel" - follows="all" - layout="topleft" - top="0" - left="0" - width="308" - height="165" - bg_opaque_color="InventoryBackgroundColor" - background_visible="true" - background_opaque="true" - > - <text - name="outbox_inventory_placeholder_title" - type="string" - follows="all" - layout="topleft" - top="10" - left="0" - width="308" - height="25" - wrap="true" - halign="center" - font="SansSerifBold"> - Loading... - </text> - <text - name="outbox_inventory_placeholder_text" - type="string" - follows="all" - layout="topleft" - top="35" - left="0" - width="308" - height="130" - wrap="true" - halign="left" /> - </panel> - </panel> - </panel> - </layout_panel> - </layout_stack> - </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> <panel follows="bottom|left|right" -- cgit v1.2.3 From 8878a5e561f292a8afcd933eaafb2c4c65b7bf7f Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 9 Dec 2011 12:29:33 -0800 Subject: * Changed background opacity of outbox and inventory to match. * Removed superfluous marketplace layout stack, leftover from inbox/outbox in same inventory window. --- indra/newview/llavataractions.cpp | 2 +- indra/newview/llfloateroutbox.cpp | 40 +++++----- indra/newview/llfloateroutbox.h | 1 - indra/newview/llsidepanelinventory.cpp | 92 +++++++--------------- indra/newview/llsidepanelinventory.h | 14 ++-- .../default/xui/en/floater_merchant_outbox.xml | 20 +---- .../skins/default/xui/en/panel_main_inventory.xml | 7 -- .../default/xui/en/panel_outbox_inventory.xml | 1 - .../skins/default/xui/en/sidepanel_inventory.xml | 50 +++--------- 9 files changed, 69 insertions(+), 158 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 8ca621538f..e7e098e423 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -707,7 +707,7 @@ std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs() LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); if (sidepanel_inventory) { - inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList(); + inventory_selected_uuids = sidepanel_inventory->getInboxSelectionList(); } } diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 6a3eaba016..619be87187 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -83,7 +83,6 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) , mOutboxId(LLUUID::null) , mOutboxInventoryPanel(NULL) , mOutboxItemCount(0) - , mInventoryDisablePanel(NULL) , mInventoryFolderCountText(NULL) , mInventoryImportInProgress(NULL) , mInventoryPlaceholder(NULL) @@ -110,7 +109,6 @@ LLFloaterOutbox::~LLFloaterOutbox() BOOL LLFloaterOutbox::postBuild() { - mInventoryDisablePanel = getChild<LLView>("outbox_inventory_disable_panel"); mInventoryFolderCountText = getChild<LLTextBox>("outbox_folder_count"); mInventoryImportInProgress = getChild<LLView>("import_progress_indicator"); mInventoryPlaceholder = getChild<LLView>("outbox_inventory_placeholder_panel"); @@ -136,21 +134,24 @@ void LLFloaterOutbox::onOpen(const LLSD& key) // // Look for an outbox and set up the inventory API // - - const bool do_not_create_folder = false; - const bool do_not_find_in_library = false; - - const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder, do_not_find_in_library); - if (outbox_id.isNull()) - { - // Observe category creation to catch outbox creation - mCategoryAddedObserver = new LLOutboxAddedObserver(this); - gInventory.addObserver(mCategoryAddedObserver); - } - else + if (mOutboxId.isNull()) { - setupOutbox(outbox_id); + const bool do_not_create_folder = false; + const bool do_not_find_in_library = false; + + const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, do_not_create_folder, do_not_find_in_library); + + if (outbox_id.isNull()) + { + // Observe category creation to catch outbox creation + mCategoryAddedObserver = new LLOutboxAddedObserver(this); + gInventory.addObserver(mCategoryAddedObserver); + } + else + { + setupOutbox(outbox_id); + } } updateView(); @@ -164,10 +165,11 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) mOutboxId = outboxId; // No longer need to observe new category creation - if (mCategoryAddedObserver != NULL) + if (mCategoryAddedObserver && gInventory.containsObserver(mCategoryAddedObserver)) { gInventory.removeObserver(mCategoryAddedObserver); - } + delete mCategoryAddedObserver; + } // Create observer for outbox modifications mCategoriesObserver = new LLInventoryCategoriesObserver(); @@ -286,6 +288,8 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, void LLFloaterOutbox::onImportButtonClicked() { + mOutboxInventoryPanel->clearSelection(); + LLMarketplaceInventoryImporter::instance().triggerImport(); } @@ -355,13 +359,11 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) { mImportButton->setEnabled(false); - mInventoryDisablePanel->setVisible(true); mInventoryImportInProgress->setVisible(true); } else { mInventoryImportInProgress->setVisible(false); - mInventoryDisablePanel->setVisible(false); mImportButton->setEnabled(mOutboxItemCount > 0); } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 9b6568c69c..3d2ce86144 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -79,7 +79,6 @@ private: LLInventoryPanel * mOutboxInventoryPanel; U32 mOutboxItemCount; - LLView * mInventoryDisablePanel; LLTextBox * mInventoryFolderCountText; LLView * mInventoryImportInProgress; LLView * mInventoryPlaceholder; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index eade91798b..5cda381d10 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -69,12 +69,10 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_ static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel"; -static const char * const INBOX_OUTBOX_LAYOUT_PANEL_NAME = "inbox_outbox_layout_panel"; static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel"; static const char * const INBOX_INVENTORY_PANEL = "inventory_inbox"; -static const char * const INBOX_OUTBOX_LAYOUT_STACK_NAME = "inbox_outbox_layout_stack"; static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; @@ -83,10 +81,10 @@ static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; // Helpers // -class LLInboxOutboxAddedObserver : public LLInventoryCategoryAddedObserver +class LLInboxAddedObserver : public LLInventoryCategoryAddedObserver { public: - LLInboxOutboxAddedObserver(LLSidepanelInventory * sidepanelInventory) + LLInboxAddedObserver(LLSidepanelInventory * sidepanelInventory) : LLInventoryCategoryAddedObserver() , mSidepanelInventory(sidepanelInventory) { @@ -127,7 +125,7 @@ LLSidepanelInventory::LLSidepanelInventory() , mPanelMainInventory(NULL) , mInboxEnabled(false) , mCategoriesObserver(NULL) - , mInboxOutboxAddedObserver(NULL) + , mInboxAddedObserver(NULL) { //buildFromFile( "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() } @@ -140,11 +138,11 @@ LLSidepanelInventory::~LLSidepanelInventory() } delete mCategoriesObserver; - if (mInboxOutboxAddedObserver && gInventory.containsObserver(mInboxOutboxAddedObserver)) + if (mInboxAddedObserver && gInventory.containsObserver(mInboxAddedObserver)) { - gInventory.removeObserver(mInboxOutboxAddedObserver); + gInventory.removeObserver(mInboxAddedObserver); } - delete mInboxOutboxAddedObserver; + delete mInboxAddedObserver; } void handleInventoryDisplayInboxChanged() @@ -217,21 +215,16 @@ BOOL LLSidepanelInventory::postBuild() } } - // Marketplace inbox/outbox setup + // Received items inbox setup { LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME); // Disable user_resize on main inventory panel by default inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false); - inv_stack->setPanelUserResize(INBOX_OUTBOX_LAYOUT_PANEL_NAME, false); - - // Collapse marketplace panel by default - inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME), true); - - LLLayoutStack* inout_stack = getChild<LLLayoutStack>(INBOX_OUTBOX_LAYOUT_STACK_NAME); + inv_stack->setPanelUserResize(INBOX_LAYOUT_PANEL_NAME, false); // Collapse inbox panel - inout_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true); + inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true); // Set up button states and callbacks LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME); @@ -243,7 +236,7 @@ BOOL LLSidepanelInventory::postBuild() enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); // Trigger callback for after login so we can setup to track inbox changes after initial inventory load - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInboxOutbox, this)); + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInbox, this)); } gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged)); @@ -254,7 +247,7 @@ BOOL LLSidepanelInventory::postBuild() return TRUE; } -void LLSidepanelInventory::updateInboxOutbox() +void LLSidepanelInventory::updateInbox() { // // Track inbox folder changes @@ -265,10 +258,10 @@ void LLSidepanelInventory::updateInboxOutbox() const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, do_not_create_folder, do_not_find_in_library); - // Set up observer to listen for creation of inbox and outbox if at least one of them doesn't exist + // Set up observer to listen for creation of inbox if at least one of them doesn't exist if (inbox_id.isNull()) { - observeInboxOutboxCreation(); + observeInboxCreation(); } // Set up observer for inbox changes, if we have an inbox already else @@ -280,17 +273,17 @@ void LLSidepanelInventory::updateInboxOutbox() } } -void LLSidepanelInventory::observeInboxOutboxCreation() +void LLSidepanelInventory::observeInboxCreation() { // - // Set up observer to track inbox and outbox folder creation + // Set up observer to track inbox folder creation // - if (mInboxOutboxAddedObserver == NULL) + if (mInboxAddedObserver == NULL) { - mInboxOutboxAddedObserver = new LLInboxOutboxAddedObserver(this); + mInboxAddedObserver = new LLInboxAddedObserver(this); - gInventory.addObserver(mInboxOutboxAddedObserver); + gInventory.addObserver(mInboxAddedObserver); } } @@ -334,13 +327,6 @@ void LLSidepanelInventory::enableInbox(bool enabled) LLLayoutPanel * inbox_layout_panel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME); inbox_layout_panel->setVisible(enabled); - - if (mInboxEnabled) - { - LLLayoutPanel * inout_layout_panel = getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME); - - inout_layout_panel->setVisible(TRUE); - } } void LLSidepanelInventory::openInbox() @@ -358,7 +344,7 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) LLInventoryModelBackgroundFetch::instance().start(inbox_id); #if AUTO_EXPAND_INBOX - // Expand the inbox since we have fresh items and the outbox is not expanded + // Expand the inbox since we have fresh items if (mInboxEnabled) { getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true); @@ -367,39 +353,19 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) #endif } -bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel) -{ - bool expand = pressedButton->getToggleState(); - - LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME); - LLLayoutStack* inout_stack = getChild<LLLayoutStack>(INBOX_OUTBOX_LAYOUT_STACK_NAME); - LLLayoutPanel* inout_panel = getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME); - - // Enable user_resize on main inventory panel only when a marketplace box is expanded - inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, expand); - inv_stack->collapsePanel(inout_panel, !expand); - - { - // NOTE: This is an attempt to reshape the inventory panel to the proper size but it doesn't seem to propagate - // properly to the child panels. - - S32 new_height = inout_panel->getRect().getHeight(); - - pressedPanel->reshape(pressedPanel->getRect().getWidth(), new_height); - } - - // Expand/collapse the indicated panel - inout_stack->collapsePanel(pressedPanel, !expand); - - return expand; -} - void LLSidepanelInventory::onToggleInboxBtn() { LLButton* inboxButton = getChild<LLButton>(INBOX_BUTTON_NAME); LLLayoutPanel* inboxPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME); - - const bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel); + LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME); + + const bool inbox_expanded = inboxButton->getToggleState(); + + // Enable user_resize on main inventory panel only when inbox is expanded + inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, inbox_expanded); + + // Expand/collapse the indicated panel + inv_stack->collapsePanel(inboxPanel, !inbox_expanded); if (inbox_expanded && inboxPanel->isInVisibleChain()) { @@ -735,7 +701,7 @@ void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox) updateVerbs(); } -std::set<LLUUID> LLSidepanelInventory::getInboxOrOutboxSelectionList() +std::set<LLUUID> LLSidepanelInventory::getInboxSelectionList() { std::set<LLUUID> inventory_selected_uuids; diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 915db727d6..a33607f50d 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -31,7 +31,7 @@ class LLButton; class LLFolderViewItem; -class LLInboxOutboxAddedObserver; +class LLInboxAddedObserver; class LLInventoryCategoriesObserver; class LLInventoryItem; class LLInventoryPanel; @@ -47,10 +47,10 @@ public: virtual ~LLSidepanelInventory(); private: - void updateInboxOutbox(); + void updateInbox(); public: - void observeInboxOutboxCreation(); + void observeInboxCreation(); void observeInboxModifications(const LLUUID& inboxID); /*virtual*/ BOOL postBuild(); @@ -63,7 +63,7 @@ public: BOOL isMainInventoryPanelActive() const; void clearSelections(bool clearMain, bool clearInbox); - std::set<LLUUID> getInboxOrOutboxSelectionList(); + std::set<LLUUID> getInboxSelectionList(); void showItemInfoPanel(); void showTaskInfoPanel(); @@ -94,8 +94,6 @@ protected: void onInboxChanged(const LLUUID& inbox_id); - bool manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel); - // // UI Elements // @@ -127,8 +125,8 @@ private: bool mInboxEnabled; - LLInventoryCategoriesObserver* mCategoriesObserver; - LLInboxOutboxAddedObserver* mInboxOutboxAddedObserver; + LLInventoryCategoriesObserver* mCategoriesObserver; + LLInboxAddedObserver* mInboxAddedObserver; }; #endif //LL_LLSIDEPANELINVENTORY_H diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index f0b29f2248..0368601bf4 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -6,7 +6,7 @@ height="440" help_topic="floater_merchant_outbox" min_width="300" - min_height="100" + min_height="200" name="floater_merchant_outbox" save_rect="true" save_visibility="true" @@ -31,8 +31,6 @@ width="313" top="0" bg_opaque_color="InventoryBackgroundColor" - background_visible="true" - background_opaque="true" > <panel name="outbox_inventory_placeholder_panel" @@ -43,8 +41,6 @@ width="308" height="400" bg_opaque_color="InventoryBackgroundColor" - background_visible="true" - background_opaque="true" > <text name="outbox_inventory_placeholder_title" @@ -80,8 +76,6 @@ width="313" top="405" bg_opaque_color="InventoryBackgroundColor" - background_visible="true" - background_opaque="true" > <text name="outbox_folder_count" @@ -110,18 +104,6 @@ width="200" enabled="false" /> </panel> - <panel - name="outbox_inventory_disable_panel" - follows="all" - left="0" - bottom="440" - width="333" - top="0" - bg_opaque_color="White_50" - background_visible="true" - background_opaque="true" - visible="false" - /> <layout_stack name="import_progress_indicator" orientation="vertical" left="0" height="440" top="0" width="333" follows="all" visible="false"> <layout_panel /> <layout_panel height="45" auto_resize="false"> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index e6c5110999..3007be7d5e 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - background_visible="true" default_tab_group="1" follows="all" height="423" @@ -51,10 +50,6 @@ top="18" width="303" /> <tab_container - bg_alpha_color="DkGray" - bg_opaque_color="DkGray" - background_visible="true" - background_opaque="true" follows="all" halign="center" height="339" @@ -71,7 +66,6 @@ bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" background_visible="true" - background_opaque="true" border="false" bevel_style="none" follows="all" @@ -90,7 +84,6 @@ bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" background_visible="true" - background_opaque="true" border="false" bevel_style="none" follows="all" diff --git a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml index 66117615e4..a3d39e55af 100644 --- a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml @@ -8,7 +8,6 @@ bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" background_visible="true" - background_opaque="true" border="false" bevel_style="none" show_item_link_overlays="true" diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 0b14fd0459..a26eb23a5d 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - background_visible="true" follows="all" height="570" label="Things" @@ -30,7 +29,7 @@ width="330"> <layout_panel name="main_inventory_layout_panel" - layout="topleft" + layout="topleft" min_dim="150" width="330" follows="bottom|left|right" @@ -48,41 +47,18 @@ height="300" width="330" /> </layout_panel> - <layout_panel + <layout_panel width="330" - layout="topleft" - auto_resize="true" - user_resize="false" - follows="bottom|left|right" - name="inbox_outbox_layout_panel" - visible="false" - min_dim="35" - max_dim="235" - expanded_min_dim="125" - height="235"> - <layout_stack - follows="left|right|top|bottom" - layout="topleft" - left="0" - top="0" - orientation="vertical" - name="inbox_outbox_layout_stack" - open_time_constant="0.02" - close_time_constant="0.02" - height="235" - width="330"> - <layout_panel - width="330" - layout="topleft" + layout="topleft" auto_resize="true" user_resize="false" follows="left|right|top" name="inbox_layout_panel" visible="false" min_dim="35" - max_dim="200" + max_dim="235" expanded_min_dim="90" - height="200"> + height="235"> <panel follows="all" layout="topleft" @@ -91,13 +67,13 @@ class="panel_marketplace_inbox" top="0" label="" - height="200" + height="235" width="330"> <string name="InboxLabelWithArg">Received items ([NUM])</string> <string name="InboxLabelNoArg">Received items</string> <button label="Received items" - font="SansSerifMedium" + font="SansSerifMedium" name="inbox_btn" height="35" width="308" @@ -129,7 +105,7 @@ <panel follows="all" left="10" - bottom="200" + bottom="235" width="308" top="35" bg_opaque_color="InventoryBackgroundColor" @@ -145,7 +121,7 @@ top="0" left="0" width="308" - height="165" + height="200" wrap="true" halign="center"> Purchases from the marketplace will be delivered here. @@ -153,8 +129,6 @@ </panel> </panel> </layout_panel> - </layout_stack> - </layout_panel> </layout_stack> <panel follows="bottom|left|right" @@ -275,8 +249,7 @@ </layout_stack> </panel> </panel> - -<panel + <panel follows="all" layout="topleft" left="0" @@ -289,8 +262,7 @@ visible="false" width="330"> </panel> - -<panel + <panel follows="all" layout="topleft" left="0" -- cgit v1.2.3 From cc92db1f353de96f6d27863b92671b2d847536f4 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 9 Dec 2011 16:19:03 -0800 Subject: Moved outbox import confirmations to window shades on the merchant outbox floater, rather than modal dialogs. --- indra/newview/llfloateroutbox.cpp | 61 +++++++++++++++++++++- indra/newview/llfloateroutbox.h | 8 +++ indra/newview/llnotificationhandler.h | 10 +++- indra/newview/llnotificationmanager.cpp | 2 + indra/newview/skins/default/textures/textures.xml | 19 ++----- .../newview/skins/default/xui/en/notifications.xml | 35 ++++++++----- 6 files changed, 105 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 619be87187..8d64214e8c 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -33,11 +33,32 @@ #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llmarketplacefunctions.h" +#include "llnotificationhandler.h" #include "llnotificationsutil.h" #include "lltextbox.h" #include "lltransientfloatermgr.h" #include "lltrans.h" #include "llviewernetwork.h" +#include "llwindowshade.h" + + +///---------------------------------------------------------------------------- +/// LLOutboxNotification class +///---------------------------------------------------------------------------- + +bool LLNotificationsUI::LLOutboxNotification::processNotification(const LLSD& notify) +{ + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); + + if (notification) + { + LLFloaterOutbox* outbox_floater = LLFloaterReg::getTypedInstance<LLFloaterOutbox>("outbox"); + + outbox_floater->showNotification(notification); + } + + return false; +} ///---------------------------------------------------------------------------- @@ -89,6 +110,7 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) , mInventoryText(NULL) , mInventoryTitle(NULL) , mImportButton(NULL) + , mWindowShade(NULL) { } @@ -121,6 +143,16 @@ BOOL LLFloaterOutbox::postBuild() return TRUE; } +void LLFloaterOutbox::onClose(bool app_quitting) +{ + if (mWindowShade) + { + delete mWindowShade; + + mWindowShade = NULL; + } +} + void LLFloaterOutbox::onOpen(const LLSD& key) { // @@ -275,7 +307,8 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { // Pass drag and drop to this floater to the outbox inventory control - if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress()) + if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress() || + (mWindowShade && mWindowShade->isShown())) { return FALSE; } @@ -369,3 +402,29 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) } } +void LLFloaterOutbox::showNotification(LLNotificationPtr notify) +{ + if (mWindowShade) + { + delete mWindowShade; + } + + LLRect floater_rect = getLocalRect(); + floater_rect.mTop -= getHeaderHeight(); + floater_rect.stretch(-5, 0); + + LLWindowShade::Params params; + params.name = "notification_shade"; + params.rect = floater_rect; + params.follows.flags = FOLLOWS_ALL; + params.notification = notify; + params.modal = true; + params.can_close = false; + params.text_color = LLColor4::white; + + mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params); + + addChild(mWindowShade); + mWindowShade->show(); +} + diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 3d2ce86144..8023434675 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -30,6 +30,7 @@ #include "llfloater.h" #include "llfoldertype.h" +#include "llnotificationptr.h" class LLButton; @@ -37,8 +38,10 @@ class LLInventoryCategoriesObserver; class LLInventoryCategoryAddedObserver; class LLInventoryPanel; class LLLoadingIndicator; +class LLNotification; class LLTextBox; class LLView; +class LLWindowShade; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -55,12 +58,15 @@ public: // virtuals BOOL postBuild(); + void onClose(bool app_quitting); void onOpen(const LLSD& key); BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); + + void showNotification(LLNotificationPtr notify); protected: void importReportResults(U32 status, const LLSD& content); @@ -86,6 +92,8 @@ private: LLTextBox * mInventoryTitle; LLButton * mImportButton; + + LLWindowShade * mWindowShade; }; #endif // LL_LLFLOATEROUTBOX_H diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 28a69f2373..23dbb6b047 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -283,9 +283,17 @@ class LLBrowserNotification : public LLSingleton<LLBrowserNotification> { public: virtual bool processNotification(const LLSD& notify); +}; +/** + * Handler for outbox notifications + */ +class LLOutboxNotification : public LLSingleton<LLOutboxNotification> +{ +public: + virtual bool processNotification(const LLSD& notify); }; - + class LLHandlerUtil { public: diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 6988227128..6105eff8ea 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -62,6 +62,7 @@ void LLNotificationManager::init() LLNotificationChannel::buildChannel("Offer", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "offer")); LLNotificationChannel::buildChannel("Hints", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "hint")); LLNotificationChannel::buildChannel("Browser", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "browser")); + LLNotificationChannel::buildChannel("Outbox", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "outbox")); LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); @@ -72,6 +73,7 @@ void LLNotificationManager::init() LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1)); LLNotifications::instance().getChannel("Browser")->connectChanged(boost::bind(&LLBrowserNotification::processNotification, LLBrowserNotification::getInstance(), _1)); + LLNotifications::instance().getChannel("Outbox")->connectChanged(boost::bind(&LLOutboxNotification::processNotification, LLOutboxNotification::getInstance(), _1)); mNotifyHandlers["notify"] = boost::shared_ptr<LLEventHandler>(new LLScriptHandler(NT_NOTIFY, LLSD())); mNotifyHandlers["notifytip"] = boost::shared_ptr<LLEventHandler>(new LLTipHandler(NT_NOTIFY, LLSD())); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 5da1276881..e4a8622a4b 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -387,22 +387,9 @@ with the same filename but different name <texture name="OptionsMenu_Off" file_name="icons/OptionsMenu_Off.png" preload="false" /> <texture name="OptionsMenu_Press" file_name="icons/OptionsMenu_Press.png" preload="false" /> - <texture name="OutboxPush_Disabled" file_name="icons/OutboxPush_Disabled.png" preload="true" /> - <texture name="OutboxPush_Off" file_name="icons/OutboxPush_Off.png" preload="true" /> - <texture name="OutboxPush_On" file_name="icons/OutboxPush_On.png" preload="true" /> - <texture name="OutboxPush_On_Over" file_name="icons/OutboxPush_On_Over.png" preload="true" /> - <texture name="OutboxPush_Over" file_name="icons/OutboxPush_Over.png" preload="true" /> - <texture name="OutboxPush_Press" file_name="icons/OutboxPush_Press.png" preload="true" /> - <texture name="OutboxPush_Progress_1" file_name="icons/OutboxPush_Progress_1.png" preload="true" /> - <texture name="OutboxPush_Progress_2" file_name="icons/OutboxPush_Progress_2.png" preload="true" /> - <texture name="OutboxPush_Progress_3" file_name="icons/OutboxPush_Progress_3.png" preload="true" /> - <texture name="OutboxPush_Progress_4" file_name="icons/OutboxPush_Progress_4.png" preload="true" /> - <texture name="OutboxPush_Progress_5" file_name="icons/OutboxPush_Progress_5.png" preload="true" /> - <texture name="OutboxPush_Progress_6" file_name="icons/OutboxPush_Progress_6.png" preload="true" /> - <texture name="OutboxPush_Selected" file_name="icons/OutboxPush_Selected.png" preload="true" /> - <texture name="OutboxPush_Selected_Disabled" file_name="icons/OutboxPush_Selected_Disabled.png" preload="true" /> - <texture name="OutboxPush_Selected_Over" file_name="icons/OutboxPush_Selected_Over.png" preload="true" /> - <texture name="OutboxPush_Selected_Press" file_name="icons/OutboxPush_Selected_Press.png" preload="true" /> + <texture name="OutboxStatus_Success" file_name="green_checkmark.png" preload="false" /> + <texture name="OutboxStatus_Warning" file_name="icons/pop_up_caution.png" preload="false" /> + <texture name="OutboxStatus_Error" file_name="red_x.png" preload="false" /> <texture name="PanOrbit_Off" file_name="bottomtray/PanOrbit_Off.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 8d0d76b58e..b174d51421 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -212,33 +212,44 @@ Save changes to current clothing/body part? </notification> <notification - icon="alertmodal.tga" + icon="OutboxStatus_Success" name="OutboxImportComplete" - type="alertmodal"> -Marketplace import complete. + type="outbox"> +Success + +All folders were successfully sent to the Marketplace. + <usetemplate name="okbutton" - yestext="Hooray!"/> + yestext="OK"/> </notification> <notification - icon="alertmodal.tga" + icon="OutboxStatus_Warning" name="OutboxImportHadErrors" - type="alertmodal"> -Marketplace import completed with errors! Please correct the problems in your outbox and retry. Thanks. + type="outbox"> +Some folders did not transfer + +Errors occurred when some folders were sent to the Marketplace. Those folders are still in your Merchant Outbox. See the error log for more information. + <usetemplate name="okbutton" - yestext="Boo!"/> + yestext="OK"/> </notification> <notification - icon="alertmodal.tga" + icon="OutboxStatus_Error" name="OutboxImportFailed" - type="alertmodal"> -Marketplace import failed with error [ERROR_CODE]! Please try again later. Thanks. + type="outbox"> +Transfer failed + +No folders were sent to the Marketplace because of a system or network error. Try again later. + +Error [ERROR_CODE] + <usetemplate name="okbutton" - yestext="Rats!"/> + yestext="OK"/> </notification> -- cgit v1.2.3 From e826cbd90750fd38565e4e44390948f36254cf1f Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 12 Dec 2011 15:02:52 -0800 Subject: EXP-1682 FIX EXP-1683 FIX EXP-1705 FIX EXP-1707 FIX * Outbox folder count now uses inventory API directly rather than inventory folder view for folder count and item status * Asynchronous fetches are triggered for the outbox content when the window is opened and when it receives focus * Marketplace URL's for empty and non-merchant outbox view have been updated * "Copy to Merchant Outbox" and "Delete" context menu items should be fully functional now with item counts, etc. --- indra/newview/llfloateroutbox.cpp | 135 +++++++++++++------------ indra/newview/llfloateroutbox.h | 10 +- indra/newview/llmarketplacefunctions.cpp | 101 +++++++++++------- indra/newview/llmarketplacefunctions.h | 4 + indra/newview/skins/default/xui/en/strings.xml | 24 +++-- 5 files changed, 162 insertions(+), 112 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 8d64214e8c..b10ef0ba64 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -30,6 +30,7 @@ #include "llfloaterreg.h" #include "llfolderview.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llmarketplacefunctions.h" @@ -139,6 +140,8 @@ BOOL LLFloaterOutbox::postBuild() mImportButton = getChild<LLButton>("outbox_import_btn"); mImportButton->setCommitCallback(boost::bind(&LLFloaterOutbox::onImportButtonClicked, this)); + + LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLFloaterOutbox::onFocusReceived, this)); return TRUE; } @@ -187,10 +190,30 @@ void LLFloaterOutbox::onOpen(const LLSD& key) } updateView(); + + // + // Trigger fetch of outbox contents + // + + fetchOutboxContents(); +} + +void LLFloaterOutbox::onFocusReceived() +{ + fetchOutboxContents(); +} + +void LLFloaterOutbox::fetchOutboxContents() +{ + if (mOutboxId.notNull()) + { + LLInventoryModelBackgroundFetch::instance().start(mOutboxId); + } } void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) -{ +{ + llassert(outboxId.notNull()); llassert(mOutboxId.isNull()); llassert(mCategoriesObserver == NULL); @@ -228,15 +251,47 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE); mOutboxInventoryPanel->getFilter()->markDefault(); - // Set selection callback for proper update of inventory status buttons - //mOutboxInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceOutbox::onSelectionChange, this)); + fetchOutboxContents(); +} + +void LLFloaterOutbox::updateItemCount() +{ + S32 item_count = 0; + + if (mOutboxId.notNull()) + { + LLInventoryModel::cat_array_t * cats; + LLInventoryModel::item_array_t * items; + gInventory.getDirectDescendentsOf(mOutboxId, cats, items); + + item_count = cats->count() + items->count(); + } + + mOutboxItemCount = item_count; + + switch (mOutboxItemCount) + { + case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; + case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; + default: + { + std::string item_count_str = llformat("%d", mOutboxItemCount); + + LLStringUtil::format_map_t args; + args["[NUM]"] = item_count_str; + + mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); + break; + } + } - // Set up the note to display when the outbox is empty - mOutboxInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryOutboxNoItems"); + mImportButton->setEnabled(mOutboxItemCount > 0); } void LLFloaterOutbox::updateView() { + updateItemCount(); + if (mOutboxItemCount > 0) { mOutboxInventoryPanel->setVisible(TRUE); @@ -251,44 +306,17 @@ void LLFloaterOutbox::updateView() std::string outbox_title; std::string outbox_tooltip; + LLStringUtil::format_map_t subs = getMarketplaceStringSubstitutions(); + if (mOutboxId.notNull()) { - outbox_text = LLTrans::getString("InventoryOutboxNoItems"); + outbox_text = LLTrans::getString("InventoryOutboxNoItems", subs); outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle"); outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip"); } else { - // - // The string to become a merchant contains 3 URL's which need the domain name patched in. - // - - std::string domain = "secondlife.com"; - - if (!LLGridManager::getInstance()->isInProductionGrid()) - { - std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); - domain = llformat("%s.lindenlab.com", utf8str_tolower(gridLabel).c_str()); - } - - LLStringUtil::format_map_t domain_arg; - domain_arg["[DOMAIN_NAME]"] = domain; - - std::string marketplace_url = LLTrans::getString("MarketplaceURL", domain_arg); - std::string marketplace_url_create = LLTrans::getString("MarketplaceURL_CreateStore", domain_arg); - std::string marketplace_url_info = LLTrans::getString("MarketplaceURL_LearnMore", domain_arg); - - LLStringUtil::format_map_t args1, args2, args3; - args1["[MARKETPLACE_URL]"] = marketplace_url; - args2["[LEARN_MORE_URL]"] = marketplace_url_info; - args3["[CREATE_STORE_URL]"] = marketplace_url_create; - - // NOTE: This is dumb, ridiculous and very finicky. The order of these is very important - // to have these three string substitutions work properly. - outbox_text = LLTrans::getString("InventoryOutboxNotMerchant", args1); - LLStringUtil::format(outbox_text, args2); - LLStringUtil::format(outbox_text, args3); - + outbox_text = LLTrans::getString("InventoryOutboxNotMerchant", subs); outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle"); outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip"); } @@ -306,7 +334,7 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, std::string& tooltip_msg) { // Pass drag and drop to this floater to the outbox inventory control - + if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress() || (mWindowShade && mWindowShade->isShown())) { @@ -329,37 +357,8 @@ void LLFloaterOutbox::onImportButtonClicked() void LLFloaterOutbox::onOutboxChanged() { llassert(!mOutboxId.isNull()); - - U32 item_count = 0; - - const LLFolderViewFolder * outbox_folder = mOutboxInventoryPanel->getRootFolder(); - - if (outbox_folder) - { - item_count += outbox_folder->getFoldersCount(); - item_count += outbox_folder->getItemsCount(); - } - - mOutboxItemCount = item_count; - - switch (mOutboxItemCount) - { - case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; - case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; - default: - { - std::string item_count_str = llformat("%d", mOutboxItemCount); - - LLStringUtil::format_map_t args; - args["[NUM]"] = item_count_str; - - mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); - break; - } - } - - mImportButton->setEnabled(mOutboxItemCount > 0); + fetchOutboxContents(); updateView(); } @@ -384,6 +383,8 @@ void LLFloaterOutbox::importReportResults(U32 status, const LLSD& content) //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); LLNotificationsUtil::add("OutboxImportFailed", subs); } + + updateView(); } void LLFloaterOutbox::importStatusChanged(bool inProgress) diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 8023434675..5222db1142 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -58,8 +58,6 @@ public: // virtuals BOOL postBuild(); - void onClose(bool app_quitting); - void onOpen(const LLSD& key); BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, @@ -69,12 +67,20 @@ public: void showNotification(LLNotificationPtr notify); protected: + void fetchOutboxContents(); + void importReportResults(U32 status, const LLSD& content); void importStatusChanged(bool inProgress); + void onClose(bool app_quitting); + void onOpen(const LLSD& key); + + void onFocusReceived(); + void onImportButtonClicked(); void onOutboxChanged(); + void updateItemCount(); void updateView(); private: diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 9c67c589b8..225bb059c9 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -30,6 +30,7 @@ #include "llagent.h" #include "llhttpclient.h" +#include "lltrans.h" #include "llviewermedia.h" #include "llviewernetwork.h" @@ -38,6 +39,59 @@ // Helpers // +static std::string getMarketplaceDomain() +{ + std::string domain = "secondlife.com"; + + if (!LLGridManager::getInstance()->isInProductionGrid()) + { + const std::string& grid_label = LLGridManager::getInstance()->getGridLabel(); + const std::string& grid_label_lower = utf8str_tolower(grid_label); + + if (grid_label_lower == "damballah") + { + domain = "secondlife-staging.com"; + } + else + { + domain = llformat("%s.lindenlab.com", grid_label_lower.c_str()); + } + } + + return domain; +} + +static std::string getMarketplaceURL(const std::string& urlStringName) +{ + LLStringUtil::format_map_t domain_arg; + domain_arg["[MARKETPLACE_DOMAIN_NAME]"] = getMarketplaceDomain(); + + std::string marketplace_url = LLTrans::getString(urlStringName, domain_arg); + + return marketplace_url; +} + +LLStringUtil::format_map_t getMarketplaceStringSubstitutions() +{ + std::string marketplace_url = getMarketplaceURL("MarketplaceURL"); + std::string marketplace_url_create = getMarketplaceURL("MarketplaceURL_CreateStore"); + std::string marketplace_url_dashboard = getMarketplaceURL("MarketplaceURL_Dashboard"); + std::string marketplace_url_info = getMarketplaceURL("MarketplaceURL_LearnMore"); + + LLStringUtil::format_map_t agent_map; + agent_map["[AGENT_ID]"] = gAgent.getID().getString(); + + LLStringUtil::format(marketplace_url_dashboard, agent_map); + + LLStringUtil::format_map_t marketplace_sub_map; + marketplace_sub_map["[MARKETPLACE_URL]"] = marketplace_url; + marketplace_sub_map["[MARKETPLACE_CREATE_STORE_URL]"] = marketplace_url_create; + marketplace_sub_map["[MARKETPLACE_LEARN_MORE_URL]"] = marketplace_url_info; + marketplace_sub_map["[MARKETPLACE_DASHBOARD_URL]"] = marketplace_url_dashboard; + + return marketplace_sub_map; +} + namespace LLMarketplaceImport { // Basic interface for this namespace @@ -61,42 +115,6 @@ namespace LLMarketplaceImport static LLSD sImportResults = LLSD::emptyMap(); - // Internal helper functions - - std::string getBaseURL() - { - std::string url = "https://marketplace.secondlife.com/"; - - if (!LLGridManager::getInstance()->isInProductionGrid()) - { - std::string gridLabel = utf8str_tolower(LLGridManager::getInstance()->getGridLabel()); - - if (gridLabel == "damballah") - { - url = "https://marketplace.secondlife-staging.com/"; - } - else - { - url = llformat("https://marketplace.%s.lindenlab.com/", gridLabel.c_str()); - } - } - - url += "api/1/"; - url += gAgent.getID().getString(); - url += "/inventory/"; - - return url; - } - - std::string getInventoryImportURL() - { - std::string url = getBaseURL(); - - url += "import/"; - - return url; - } - // Responders class LLImportPostResponder : public LLHTTPClient::Responder @@ -200,6 +218,17 @@ namespace LLMarketplaceImport return sImportResults; } + static std::string getInventoryImportURL() + { + std::string url = getMarketplaceURL("MarketplaceURL"); + + url += "api/1/"; + url += gAgent.getID().getString(); + url += "/inventory/import/"; + + return url; + } + void establishMarketplaceSessionCookie() { sImportInProgress = true; diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 5ca0bdfe77..f501f1ee8b 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -34,6 +34,10 @@ #include <boost/signals2.hpp> #include "llsingleton.h" +#include "llstring.h" + + +LLStringUtil::format_map_t getMarketplaceStringSubstitutions(); namespace MarketplaceErrorCodes diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b8d5f93320..7dd965de84 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2029,18 +2029,28 @@ Returns a string with the requested data about the region <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string> <string name="InventoryInboxNoItems">When you purchase or otherwise receive an item, it will appear here so you can drag it to a folder in your inventory, or delete it if you do not wish to keep it.</string> - <string name="MarketplaceURL">http://marketplace.[DOMAIN_NAME]</string> - <string name="MarketplaceURL_CreateStore">http://marketplace.[DOMAIN_NAME]/create_store</string> - <string name="MarketplaceURL_LearnMore">http://marketplace.[DOMAIN_NAME]/learn_more</string> + <string name="MarketplaceURL">https://marketplace.[MARKETPLACE_DOMAIN_NAME]</string> + <string name="MarketplaceURL_CreateStore">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/create_store</string> + <string name="MarketplaceURL_Dashboard">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/[AGENT_ID]/store/dashboard</string> + <string name="MarketplaceURL_LearnMore">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/learn_more</string> <string name="InventoryOutboxCreationErrorTitle">Your Merchant Outbox is not properly configured</string> <string name="InventoryOutboxCreationErrorTooltip">Merchant Outbox configuration error</string> <string name="InventoryOutboxCreationError">Please contact Customer Service to correct the problem.</string> - <string name="InventoryOutboxNotMerchantTitle">Anyone can sell items on the Marketplace</string> + <string name="InventoryOutboxNotMerchantTitle">Anyone can sell items on the Marketplace.</string> <string name="InventoryOutboxNotMerchantTooltip">Become a merchant!</string> - <string name="InventoryOutboxNotMerchant">[[MARKETPLACE_URL] The Second Life Marketplace] offers more than one million virtual products for sale, all of them created by Residents. You, too, can sell items you create, as well as some of the items you have purchased. It’s easy and setup is free. [[LEARN_MORE_URL] Learn more] or [[CREATE_STORE_URL] create a store] on the Marketplace to get started.</string> - <string name="InventoryOutboxNoItemsTitle">A new way to send items to the Marketplace</string> + <string name="InventoryOutboxNotMerchant"> + The Second Life Marketplace offers more than one million virtual products for sale, all of them created by Residents like you. You too can create items and sell them on the Marketplace. Creating a store is easy and free of charge. + + [[MARKETPLACE_URL] Visit the Marketplace] + [[MARKETPLACE_LEARN_MORE_URL] Learn more about creating a store] + </string> + <string name="InventoryOutboxNoItemsTitle">Your outbox is empty.</string> <string name="InventoryOutboxNoItemsTooltip">Drag and drop items here to prepare them for sale on the Marketplace</string> - <string name="InventoryOutboxNoItems">Drag items or folders that you wish to sell into this area. A copy of the item will appear, leaving your inventory unchanged, unless you have dragged a no-copy item. When you are ready to send the items to the Marketplace, click the Upload button. Once your items have been moved to your Marketplace Inventory, they will disappear from this folder.</string> + <string name="InventoryOutboxNoItems"> + Drag folders to this area. When you are ready to send them to the Marketplace for sale, click the "Send to Marketplace" button below. + + [[MARKETPLACE_DASHBOARD_URL] Go to your Merchant Dashboard] + </string> <string name="Marketplace Error None">No errors</string> <string name="Marketplace Error Not Merchant">Error: Before sending items to the Marketplace you will need to set yourself up as a merchant (free of charge).</string> -- cgit v1.2.3 From d3f06b296203c08c900c4e569ce5df0ac2f27715 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 12 Dec 2011 17:04:58 -0800 Subject: Fixed marketplace URL trailing '/' and updated to latest window shade code from viewer-experience --- indra/newview/llfloateroutbox.cpp | 4 ++-- indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index b10ef0ba64..972e1e8cdc 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -418,14 +418,14 @@ void LLFloaterOutbox::showNotification(LLNotificationPtr notify) params.name = "notification_shade"; params.rect = floater_rect; params.follows.flags = FOLLOWS_ALL; - params.notification = notify; params.modal = true; params.can_close = false; + params.shade_color = LLColor4::white % 0.25f; params.text_color = LLColor4::white; mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params); addChild(mWindowShade); - mWindowShade->show(); + mWindowShade->show(notify); } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 7dd965de84..3c7465cd7c 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2029,7 +2029,7 @@ Returns a string with the requested data about the region <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string> <string name="InventoryInboxNoItems">When you purchase or otherwise receive an item, it will appear here so you can drag it to a folder in your inventory, or delete it if you do not wish to keep it.</string> - <string name="MarketplaceURL">https://marketplace.[MARKETPLACE_DOMAIN_NAME]</string> + <string name="MarketplaceURL">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/</string> <string name="MarketplaceURL_CreateStore">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/create_store</string> <string name="MarketplaceURL_Dashboard">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/[AGENT_ID]/store/dashboard</string> <string name="MarketplaceURL_LearnMore">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/learn_more</string> -- cgit v1.2.3 From 181eaa8196d19d5d0c1db17fe27bd2bdee11525b Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 12 Dec 2011 17:22:47 -0800 Subject: EXP-1648 FIX * Merchant outbox no longer crashes for non-merchants. * Folder count is hidden for non-merchants. * Drag and drop to merchant outbox floater is disabled for non-merchants. --- indra/newview/llfloateroutbox.cpp | 38 ++++++++++++++++---------- indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 24 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 972e1e8cdc..b15380d427 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -269,22 +269,25 @@ void LLFloaterOutbox::updateItemCount() mOutboxItemCount = item_count; - switch (mOutboxItemCount) + if (mOutboxInventoryPanel) { - case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; - case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; - default: + switch (mOutboxItemCount) { - std::string item_count_str = llformat("%d", mOutboxItemCount); - - LLStringUtil::format_map_t args; - args["[NUM]"] = item_count_str; - - mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); - break; + case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; + case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; + default: + { + std::string item_count_str = llformat("%d", mOutboxItemCount); + + LLStringUtil::format_map_t args; + args["[NUM]"] = item_count_str; + + mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); + break; + } } } - + mImportButton->setEnabled(mOutboxItemCount > 0); } @@ -299,7 +302,11 @@ void LLFloaterOutbox::updateView() } else { - mOutboxInventoryPanel->setVisible(FALSE); + if (mOutboxInventoryPanel) + { + mOutboxInventoryPanel->setVisible(FALSE); + } + mInventoryPlaceholder->setVisible(TRUE); std::string outbox_text; @@ -335,8 +342,9 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { // Pass drag and drop to this floater to the outbox inventory control - if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress() || - (mWindowShade && mWindowShade->isShown())) + if ((mOutboxInventoryPanel == NULL) || + (mWindowShade && mWindowShade->isShown()) || + LLMarketplaceInventoryImporter::getInstance()->isImportInProgress()) { return FALSE; } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3c7465cd7c..d8da56d338 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2042,6 +2042,7 @@ Returns a string with the requested data about the region The Second Life Marketplace offers more than one million virtual products for sale, all of them created by Residents like you. You too can create items and sell them on the Marketplace. Creating a store is easy and free of charge. [[MARKETPLACE_URL] Visit the Marketplace] + [[MARKETPLACE_LEARN_MORE_URL] Learn more about creating a store] </string> <string name="InventoryOutboxNoItemsTitle">Your outbox is empty.</string> -- cgit v1.2.3 From 9fcdec3e34d689ccfb74fb4905fa975f5819270a Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 13 Dec 2011 11:15:01 -0800 Subject: EXP-1679 FIX -- Collapse links that are dragged to the outbox * Links are automatically tracked back to their source when dragged to the outbox * Worn items are now allowed into the outbox --- indra/newview/llinventorybridge.cpp | 25 +++++++++++--- indra/newview/llinventoryfunctions.cpp | 63 +++++++++++++++++++++------------- 2 files changed, 61 insertions(+), 27 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 33b9af7a78..3f12e8b1d3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -72,6 +72,7 @@ // Marketplace outbox current disabled #define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 +#define BLOCK_WORN_ITEMS_IN_OUTBOX 0 typedef std::pair<LLUUID, LLUUID> two_uuids_t; typedef std::list<two_uuids_t> two_uuids_list_t; @@ -1101,6 +1102,8 @@ BOOL LLInvFVBridge::canListOnMarketplace() const BOOL LLInvFVBridge::canListOnMarketplaceNow() const { #if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU + +#if BLOCK_WORN_ITEMS_IN_OUTBOX if (get_is_item_worn(mUUID)) { return FALSE; @@ -1112,6 +1115,7 @@ BOOL LLInvFVBridge::canListOnMarketplaceNow() const { return FALSE; } +#endif // BLOCK_WORN_ITEMS_IN_OUTBOX return TRUE; #else @@ -1787,19 +1791,32 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_msg) { - bool worn = get_is_item_worn(inv_item->getUUID()); + // Collapse links directly to items/folders + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; + LLViewerInventoryItem * linked_item = viewer_inv_item->getLinkedItem(); + if (linked_item != NULL) + { + inv_item = linked_item; + } + bool allow_transfer = inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); if (!allow_transfer) { tooltip_msg = LLTrans::getString("TooltipOutboxNoTransfer"); + return false; } - else if(worn) + +#if BLOCK_WORN_ITEMS_IN_OUTBOX + bool worn = get_is_item_worn(inv_item->getUUID()); + if (worn) { tooltip_msg = LLTrans::getString("TooltipOutboxWorn"); + return false; } - - return !worn && allow_transfer; +#endif + + return true; } diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 5fb3f15cd5..7040fef65e 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -595,32 +595,49 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response) void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder) { - if (inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + // Collapse links directly to items/folders + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; + LLViewerInventoryCategory * linked_category = viewer_inv_item->getLinkedCategory(); + if (linked_category != NULL) { - // when moving item directly into outbox create folder with that name - if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false)) - { - dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName()); - gInventory.notifyObservers(); - } - - copy_inventory_item( - gAgent.getID(), - inv_item->getPermissions().getOwner(), - inv_item->getUUID(), - dest_folder, - inv_item->getName(), - LLPointer<LLInventoryCallback>(NULL)); + copy_folder_to_outbox(linked_category, dest_folder, top_level_folder); } else - { - LLSD args; - args["ITEM_NAME"] = inv_item->getName(); - LLSD payload; - payload["item_id"] = inv_item->getUUID(); - payload["dest_folder_id"] = dest_folder; - payload["top_level_folder"] = top_level_folder; - LLNotificationsUtil::add("ConfirmNoCopyToOutbox", args, payload, boost::bind(&move_to_outbox_cb, _1, _2)); + { + LLViewerInventoryItem * linked_item = viewer_inv_item->getLinkedItem(); + if (linked_item != NULL) + { + inv_item = (LLInventoryItem *) linked_item; + } + + // Check for copy permissions + if (inv_item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID())) + { + // when moving item directly into outbox create folder with that name + if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false)) + { + dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName()); + gInventory.notifyObservers(); + } + + copy_inventory_item( + gAgent.getID(), + inv_item->getPermissions().getOwner(), + inv_item->getUUID(), + dest_folder, + inv_item->getName(), + LLPointer<LLInventoryCallback>(NULL)); + } + else + { + LLSD args; + args["ITEM_NAME"] = inv_item->getName(); + LLSD payload; + payload["item_id"] = inv_item->getUUID(); + payload["dest_folder_id"] = dest_folder; + payload["top_level_folder"] = top_level_folder; + LLNotificationsUtil::add("ConfirmNoCopyToOutbox", args, payload, boost::bind(&move_to_outbox_cb, _1, _2)); + } } } -- cgit v1.2.3 From 2f14bed8b2610f53c28881a9e2e19fd7a0be51fa Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 13 Dec 2011 11:40:36 -0800 Subject: EXP-1714 FIX -- Add rename option to context menu on outbox folders --- indra/newview/llinventorybridge.cpp | 95 ++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 48 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3f12e8b1d3..aabe851f79 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -617,7 +617,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - // Don't allow items to be pasted directly into the COF or the inbox + // Don't allow items to be pasted directly into the COF or the inbox/outbox if (!isCOFFolder() && !isInboxFolder() && !isOutboxFolder()) { items.push_back(std::string("Paste")); @@ -2892,6 +2892,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else if(isOutboxFolder()) { + mItems.push_back(std::string("Rename")); mItems.push_back(std::string("Delete")); } else if(isAgentInventory()) // do not allow creating in library @@ -3741,29 +3742,29 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t items; menuentry_vec_t disabled_items; - if(isItemInTrash()) - { - addTrashContextMenuOptions(items, disabled_items); - } - else if(isOutboxFolder()) + if (isOutboxFolder()) { items.push_back(std::string("Delete")); } else { - items.push_back(std::string("Share")); - if (!canShare()) + if (isItemInTrash()) { - disabled_items.push_back(std::string("Share")); - } - items.push_back(std::string("Sound Open")); - items.push_back(std::string("Properties")); + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } + items.push_back(std::string("Sound Open")); + items.push_back(std::string("Properties")); - getClipboardEntries(true, items, disabled_items, flags); - } + getClipboardEntries(true, items, disabled_items, flags); + } - if (!isOutboxFolder()) - { items.push_back(std::string("Sound Separator")); items.push_back(std::string("Sound Play")); } @@ -3799,29 +3800,29 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t disabled_items; lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl; - if(isItemInTrash()) - { - addTrashContextMenuOptions(items, disabled_items); - } - else if(isOutboxFolder()) + if(isOutboxFolder()) { items.push_back(std::string("Delete")); } else { - items.push_back(std::string("Share")); - if (!canShare()) + if(isItemInTrash()) { - disabled_items.push_back(std::string("Share")); - } - items.push_back(std::string("Landmark Open")); - items.push_back(std::string("Properties")); + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } + items.push_back(std::string("Landmark Open")); + items.push_back(std::string("Properties")); - getClipboardEntries(true, items, disabled_items, flags); - } + getClipboardEntries(true, items, disabled_items, flags); + } - if (!isOutboxFolder()) - { items.push_back(std::string("Landmark Separator")); items.push_back(std::string("About Landmark")); } @@ -4354,36 +4355,35 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t disabled_items; lldebugs << "LLAnimationBridge::buildContextMenu()" << llendl; - if(isItemInTrash()) - { - addTrashContextMenuOptions(items, disabled_items); - } - else if(isOutboxFolder()) + if(isOutboxFolder()) { items.push_back(std::string("Delete")); } else { - items.push_back(std::string("Share")); - if (!canShare()) + if(isItemInTrash()) { - disabled_items.push_back(std::string("Share")); - } - items.push_back(std::string("Animation Open")); - items.push_back(std::string("Properties")); + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } + items.push_back(std::string("Animation Open")); + items.push_back(std::string("Properties")); - getClipboardEntries(true, items, disabled_items, flags); - } + getClipboardEntries(true, items, disabled_items, flags); + } - if (!isOutboxFolder()) - { items.push_back(std::string("Animation Separator")); items.push_back(std::string("Animation Play")); items.push_back(std::string("Animation Audition")); } hide_context_entries(menu, items, disabled_items); - } // virtual @@ -5377,7 +5377,6 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); } - hide_context_entries(menu, items, disabled_items); } -- cgit v1.2.3 From a96271e3c2958a95040a1348934bd3f056f374ab Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 13 Dec 2011 13:09:53 -0800 Subject: EXP-1716 FIX -- Merchant outbox drag and drop always creates new folder * Items dragged to child folder now appear under that folder rather than in new separate top-level folder. --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index aabe851f79..3d20b99c9b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3461,7 +3461,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else if (move_is_into_outbox && !move_is_from_outbox) { - copy_item_to_outbox(inv_item, outbox_id, LLUUID::null); + copy_item_to_outbox(inv_item, mUUID, LLUUID::null); } // NORMAL or TRASH folder // (move the item, restamp if into trash) -- cgit v1.2.3 From d7fabfee19e536dd8df356fd4531437ccb3630d5 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 13 Dec 2011 13:56:41 -0800 Subject: EXP-1715 FIX -- Merchant outbox drag and drop has offset between mouse position and selected folder EXP-1717 FIX -- Drag and drop within the outbox can result in an item created at the top level of the outbox Folders are now created for items dragged around within the merchant outbox if their drop target is the top level outbox inventory panel itself. --- indra/newview/llfloateroutbox.cpp | 22 ++++++++++++++-------- indra/newview/llinventorybridge.cpp | 4 ++++ indra/newview/llinventoryfunctions.cpp | 21 ++++++++++++++++++--- indra/newview/llinventoryfunctions.h | 1 + 4 files changed, 37 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index b15380d427..eb11933368 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -248,7 +248,7 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) mOutboxInventoryPanel->setShape(inventory_placeholder_rect); // Set the sort order newest to oldest - mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE); + mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME); mOutboxInventoryPanel->getFilter()->markDefault(); fetchOutboxContents(); @@ -340,19 +340,25 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* accept, std::string& tooltip_msg) { - // Pass drag and drop to this floater to the outbox inventory control - if ((mOutboxInventoryPanel == NULL) || (mWindowShade && mWindowShade->isShown()) || LLMarketplaceInventoryImporter::getInstance()->isImportInProgress()) { return FALSE; } - - S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft; - S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom; - - return mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + + BOOL handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL); + + // Pass drag and drop to this floater to the outbox inventory control if no other children handle it + if (!handled) + { + S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft; + S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom; + + handled = mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } + + return handled; } void LLFloaterOutbox::onImportButtonClicked() diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3d20b99c9b..4bc846faeb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3463,6 +3463,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { copy_item_to_outbox(inv_item, mUUID, LLUUID::null); } + else if (move_is_into_outbox && move_is_from_outbox) + { + move_item_within_outbox(inv_item, mUUID); + } // NORMAL or TRASH folder // (move the item, restamp if into trash) else diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 7040fef65e..6c5325620e 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -588,7 +588,6 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response) parent = next_parent; } } - } } @@ -620,8 +619,7 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL gInventory.notifyObservers(); } - copy_inventory_item( - gAgent.getID(), + copy_inventory_item(gAgent.getID(), inv_item->getPermissions().getOwner(), inv_item->getUUID(), dest_folder, @@ -641,6 +639,23 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL } } +void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder) +{ + // when moving item directly into outbox create folder with that name + if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false)) + { + dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName()); + gInventory.notifyObservers(); + } + + LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; + + change_item_parent(&gInventory, + viewer_inv_item, + dest_folder, + false); +} + void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder) { LLUUID new_folder_id = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_cat->getName()); diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 7b452537f8..9f0ee0571a 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -75,6 +75,7 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s void append_path(const LLUUID& id, std::string& path); void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder); +void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder); void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder); -- cgit v1.2.3 From bb39e3fa3cc2cd9617d63b93bcf1d6da364cd917 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 13 Dec 2011 16:42:14 -0800 Subject: EXP-1718 FIX -- Drag and drop within the outbox can result in folders being out of order * Outbox updates now result in a resort to keep drag and drop items and folders properly sorted * New icon for merchant outbox * New behavior to accept drag and drop files over the entire merchant outbox floater --- indra/newview/llfloateroutbox.cpp | 38 ++++++++++++++------- indra/newview/llfolderview.cpp | 6 ++-- .../default/textures/toolbar_icons/outbox.png | Bin 2987 -> 1521 bytes 3 files changed, 29 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index eb11933368..984f47abb0 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -158,14 +158,6 @@ void LLFloaterOutbox::onClose(bool app_quitting) void LLFloaterOutbox::onOpen(const LLSD& key) { - // - // Initialize the marketplace import API - // - - LLMarketplaceInventoryImporter::getInstance()->initialize(); - LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); - LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); - // // Look for an outbox and set up the inventory API // @@ -224,6 +216,7 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) { gInventory.removeObserver(mCategoryAddedObserver); delete mCategoryAddedObserver; + mCategoryAddedObserver = NULL; } // Create observer for outbox modifications @@ -252,6 +245,14 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) mOutboxInventoryPanel->getFilter()->markDefault(); fetchOutboxContents(); + + // + // Initialize the marketplace import API + // + + LLMarketplaceInventoryImporter::getInstance()->initialize(); + LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); + LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); } void LLFloaterOutbox::updateItemCount() @@ -350,12 +351,20 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL); // Pass drag and drop to this floater to the outbox inventory control if no other children handle it - if (!handled) + if (!handled || (*accept == ACCEPT_NO)) { - S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft; - S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom; + S32 local_x; + S32 local_y; + + LLFolderView * outbox_root_folder = mOutboxInventoryPanel->getRootFolder(); + localPointToOtherView(x, y, &local_x, &local_y, outbox_root_folder); - handled = mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + const LLRect& outbox_rect = outbox_root_folder->getRect(); + + local_x = llclamp(local_x, outbox_rect.mLeft + 1, outbox_rect.mRight - 1); + local_y = llclamp(local_y, outbox_rect.mBottom + 1, outbox_rect.mTop - 1); + + handled = outbox_root_folder->LLFolderViewFolder::handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } return handled; @@ -371,6 +380,11 @@ void LLFloaterOutbox::onImportButtonClicked() void LLFloaterOutbox::onOutboxChanged() { llassert(!mOutboxId.isNull()); + + if (mOutboxInventoryPanel) + { + mOutboxInventoryPanel->requestSort(); + } fetchOutboxContents(); updateView(); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 6ec2598e44..b8515c2953 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1945,9 +1945,9 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { if (getListener()->getUUID().notNull()) - { - handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - } + { + handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } else { if (!mFolders.empty()) diff --git a/indra/newview/skins/default/textures/toolbar_icons/outbox.png b/indra/newview/skins/default/textures/toolbar_icons/outbox.png index 9fcf46794d..0f3db1c47c 100644 Binary files a/indra/newview/skins/default/textures/toolbar_icons/outbox.png and b/indra/newview/skins/default/textures/toolbar_icons/outbox.png differ -- cgit v1.2.3 From bff737ebefdfeeb17a81e1c3c4741d3e9aab2862 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 13 Dec 2011 17:03:25 -0800 Subject: EXP-1724 FIX -- Merchant outbox needs to be available from the Me menu --- indra/newview/skins/default/xui/en/menu_viewer.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1834be2d48..3c98f8e892 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -164,11 +164,18 @@ <menu_item_separator/> <menu_item_call - label="Buy L$" + label="Buy L$..." name="Buy and Sell L$"> <menu_item_call.on_click function="BuyCurrency" /> </menu_item_call> + <menu_item_call + label="Merchant Outbox..." + name="MerchantOutbox"> + <menu_item_call.on_click + function="Floater.ToggleOrBringToFront" + parameter="outbox" /> + </menu_item_call> <menu_item_call label="Account dashboard..." name="Manage My Account"> -- cgit v1.2.3 From 399f8dd1913530488744046794a74d6c7e61ffa3 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 14 Dec 2011 14:37:38 -0800 Subject: EXP-1723 -- Improved drag and drop behavior for outbox floater. --- indra/newview/llfloateroutbox.cpp | 36 ++++++++++++++++--------- indra/newview/llfolderviewitem.cpp | 52 ++++++++++++++++++++++--------------- indra/newview/llfolderviewitem.h | 5 ++++ indra/newview/llinventorybridge.cpp | 10 +------ indra/newview/llinventorybridge.h | 2 -- 5 files changed, 61 insertions(+), 44 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 984f47abb0..725e521e58 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -30,6 +30,7 @@ #include "llfloaterreg.h" #include "llfolderview.h" +#include "llinventorybridge.h" #include "llinventorymodelbackgroundfetch.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" @@ -348,23 +349,34 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, return FALSE; } - BOOL handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL); + LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + BOOL handled = (handled_view != NULL); - // Pass drag and drop to this floater to the outbox inventory control if no other children handle it + // Pass all drag and drop for this floater to the outbox inventory control if (!handled || (*accept == ACCEPT_NO)) { - S32 local_x; - S32 local_y; + // Always assume we are going to move the drag and drop operation to the outbox root folder + bool move_to_root = true; - LLFolderView * outbox_root_folder = mOutboxInventoryPanel->getRootFolder(); - localPointToOtherView(x, y, &local_x, &local_y, outbox_root_folder); - - const LLRect& outbox_rect = outbox_root_folder->getRect(); - - local_x = llclamp(local_x, outbox_rect.mLeft + 1, outbox_rect.mRight - 1); - local_y = llclamp(local_y, outbox_rect.mBottom + 1, outbox_rect.mTop - 1); + // If the inventory panel is visible, then only override it to the outbox root if we're outside the inventory panel + // (otherwise the inventory panel itself will handle the drag and drop operation, without any override) + if (mOutboxInventoryPanel->getVisible()) + { + S32 inv_x, inv_y; + localPointToOtherView(x, y, &inv_x, &inv_y, mOutboxInventoryPanel); + + const LLRect& inv_rect = mOutboxInventoryPanel->getRect(); - handled = outbox_root_folder->LLFolderViewFolder::handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + move_to_root = !inv_rect.pointInRect(inv_x, inv_y); + } + + // Handle the drag and drop directly to the root of the outbox + if (move_to_root) + { + LLFolderView * root_folder = mOutboxInventoryPanel->getRootFolder(); + + handled = root_folder->handleDragAndDropToRoot(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } } return handled; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index f27fd035db..526800d4be 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2276,33 +2276,16 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, EAcceptance* accept, std::string& tooltip_msg) { - LLFolderView* root_view = getRoot(); - BOOL handled = FALSE; - if(mIsOpen) + + if (mIsOpen) { - handled = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, - cargo_data, accept, tooltip_msg) != NULL; + handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL); } if (!handled) { - BOOL accepted = mListener && mListener->dragOrDrop(mask, drop,cargo_type,cargo_data, tooltip_msg); - - if (accepted) - { - mDragAndDropTarget = TRUE; - *accept = ACCEPT_YES_MULTI; - } - else - { - *accept = ACCEPT_NO; - } - - if (!drop && accepted) - { - root_view->autoOpenTest(this); - } + handleDragAndDropToRoot(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl; } @@ -2310,6 +2293,33 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, return TRUE; } +BOOL LLFolderViewFolder::handleDragAndDropToRoot(MASK mask, + BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + BOOL accepted = mListener && mListener->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + + if (accepted) + { + mDragAndDropTarget = TRUE; + *accept = ACCEPT_YES_MULTI; + } + else + { + *accept = ACCEPT_NO; + } + + if (!drop && accepted) + { + getRoot()->autoOpenTest(this); + } + + return TRUE; +} + BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask ) { diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 3433e3f7f3..02461fb144 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -547,6 +547,11 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); + BOOL handleDragAndDropToRoot(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); virtual void draw(); time_t getCreationDate() const; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4bc846faeb..d6b520d75e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1820,14 +1820,6 @@ static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_m } - -void LLFolderBridge::dropFolderToOutbox(LLInventoryCategory* inv_cat) -{ - copy_folder_to_outbox(inv_cat, getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false), inv_cat->getUUID()); -} - - - int get_folder_levels(LLInventoryCategory* inv_cat) { LLInventoryModel::cat_array_t* cats; @@ -2046,7 +2038,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else if (move_is_into_outbox && !move_is_from_outbox) { - dropFolderToOutbox(inv_cat); + copy_folder_to_outbox(inv_cat, mUUID, inv_cat->getUUID()); } else { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 2d625befb4..126a28f74c 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -306,8 +306,6 @@ protected: void dropToFavorites(LLInventoryItem* inv_item); void dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); - void dropToOutbox(LLInventoryItem* inv_item); - void dropFolderToOutbox(LLInventoryCategory* inv_cat); //-------------------------------------------------------------------- // Messy hacks for handling folder options -- cgit v1.2.3 From 90e6336b27ae962052a68ec17205e7b1f87bdb4e Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 15 Dec 2011 09:51:26 -0800 Subject: EXP-1725 FIX -- Carriage return or tab characters shown in Outbox text on Windows * Removed tabs from outbox strings. --- indra/newview/skins/default/xui/en/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index d8da56d338..b83571a106 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2039,18 +2039,18 @@ Returns a string with the requested data about the region <string name="InventoryOutboxNotMerchantTitle">Anyone can sell items on the Marketplace.</string> <string name="InventoryOutboxNotMerchantTooltip">Become a merchant!</string> <string name="InventoryOutboxNotMerchant"> - The Second Life Marketplace offers more than one million virtual products for sale, all of them created by Residents like you. You too can create items and sell them on the Marketplace. Creating a store is easy and free of charge. - - [[MARKETPLACE_URL] Visit the Marketplace] +The Second Life Marketplace offers more than one million virtual products for sale, all of them created by Residents like you. You too can create items and sell them on the Marketplace. Creating a store is easy and free of charge. + +[[MARKETPLACE_URL] Visit the Marketplace] - [[MARKETPLACE_LEARN_MORE_URL] Learn more about creating a store] +[[MARKETPLACE_LEARN_MORE_URL] Learn more about creating a store] </string> <string name="InventoryOutboxNoItemsTitle">Your outbox is empty.</string> <string name="InventoryOutboxNoItemsTooltip">Drag and drop items here to prepare them for sale on the Marketplace</string> <string name="InventoryOutboxNoItems"> - Drag folders to this area. When you are ready to send them to the Marketplace for sale, click the "Send to Marketplace" button below. - - [[MARKETPLACE_DASHBOARD_URL] Go to your Merchant Dashboard] +Drag folders to this area. When you are ready to send them to the Marketplace for sale, click the "Send to Marketplace" button below. + +[[MARKETPLACE_DASHBOARD_URL] Go to your Merchant Dashboard] </string> <string name="Marketplace Error None">No errors</string> -- cgit v1.2.3 From 2e564abcd682c348de3a2d3a50ef58df545c143b Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 15 Dec 2011 14:26:42 -0800 Subject: EXP-1730 FIX EXP-1731 FIX EXP-1735 FIX EXP-1736 FIX EXP-1737 FIX EXP-1738 FIX EXP-1739 FIX * Users can no longer drag and drop items to the outbox from in world, notecards or the library. * Drag and drop now blocks the creation of hierarchies that are too deep, too many folders or contain too many items. * Settings now exist to specify drag and drop limitations to the outbox, named: InventoryOutboxMaxFolderDepth (4) InventoryOutboxMaxFolderCount (20) InventoryOutboxMaxItemCount (200) --- indra/newview/app_settings/settings.xml | 32 +++- indra/newview/llinventorybridge.cpp | 208 ++++++++++++++++++------- indra/newview/llinventorymodel.cpp | 32 ++++ indra/newview/llinventorymodel.h | 3 + indra/newview/skins/default/xui/en/strings.xml | 2 + 5 files changed, 214 insertions(+), 63 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aa8ad53a3d..a6d859aab2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4260,16 +4260,38 @@ <key>Value</key> <integer>0</integer> </map> - <key>InventoryMarketplaceUserStatus</key> + <key>InventoryOutboxMaxFolderCount</key> <map> <key>Comment</key> - <string>Marketplace user status.</string> + <string>Maximum number of subfolders allowed in a listing in the merchant outbox.</string> <key>Persist</key> - <integer>1</integer> + <integer>0</integer> <key>Type</key> - <string>String</string> + <string>U32</string> <key>Value</key> - <string /> + <integer>20</integer> + </map> + <key>InventoryOutboxMaxFolderDepth</key> + <map> + <key>Comment</key> + <string>Maximum number of nested levels of subfolders allowed in a listing in the merchant outbox.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>4</integer> + </map> + <key>InventoryOutboxMaxItemCount</key> + <map> + <key>Comment</key> + <string>Maximum number of items allowed in a listing in the merchant outbox.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>200</integer> </map> <key>InventorySortOrder</key> <map> diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d6b520d75e..26e7dab270 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1815,7 +1815,7 @@ static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_m return false; } #endif - + return true; } @@ -1874,28 +1874,28 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (!isAgentAvatarValid()) return FALSE; if (!isAgentInventory()) return FALSE; // cannot drag categories into library + const LLUUID &cat_id = inv_cat->getUUID(); + const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); + const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + + const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); + const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); + const BOOL move_is_from_outbox = model->isObjectDescendentOf(cat_id, outbox_id); // check to make sure source is agent inventory, and is represented there. LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - const BOOL is_agent_inventory = (model->getCategory(inv_cat->getUUID()) != NULL) + const BOOL is_agent_inventory = (model->getCategory(cat_id) != NULL) && (LLToolDragAndDrop::SOURCE_AGENT == source); - const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - BOOL accept = FALSE; if (is_agent_inventory) { - const LLUUID &cat_id = inv_cat->getUUID(); const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH, false); const LLUUID &landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false); - const LLUUID &outbox_id = model->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); const BOOL move_is_into_outfit = getCategory() && (getCategory()->getPreferredType() == LLFolderType::FT_OUTFIT); const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); - const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); - const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_cat->getUUID(), outbox_id); //-------------------------------------------------------------------------------- // Determine if folder can be moved. @@ -1950,24 +1950,58 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } if (move_is_into_outbox) { - for (S32 i=0; i < descendent_items.count(); ++i) + int nested_folder_levels = (get_folder_path_length(outbox_id, mUUID) - 1) + get_folder_levels(inv_cat); + + if (nested_folder_levels >= gSavedSettings.getU32("InventoryOutboxMaxFolderDepth")) { - LLInventoryItem* item = descendent_items[i]; - if (!can_move_to_outbox(item, tooltip_msg)) - { - is_movable = FALSE; - break; - } + tooltip_msg = LLTrans::getString("TooltipOutboxFolderLevels"); + is_movable = FALSE; } + else + { + const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); + + int existing_item_count = 0; + int existing_folder_count = 0; + + if (master_folder != NULL) + { + LLInventoryModel::cat_array_t existing_categories; + LLInventoryModel::item_array_t existing_items; - int nested_folder_levels = get_folder_path_length(outbox_id, mUUID) + get_folder_levels(inv_cat); + gInventory.collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE); + + existing_item_count = existing_items.count(); + existing_folder_count = existing_categories.count(); + } - if (nested_folder_levels > 4) - { - tooltip_msg = LLTrans::getString("TooltipOutboxFolderLevels"); - is_movable = FALSE; + const int nested_folder_count = existing_folder_count + descendent_categories.count(); + const int nested_item_count = existing_item_count + descendent_items.count(); + + if (nested_folder_count >= gSavedSettings.getU32("InventoryOutboxMaxFolderCount")) + { + tooltip_msg = LLTrans::getString("TooltipOutboxTooManyFolders"); + is_movable = FALSE; + } + else if (nested_item_count >= gSavedSettings.getU32("InventoryOutboxMaxItemCount")) + { + tooltip_msg = LLTrans::getString("TooltipOutboxTooManyObjects"); + is_movable = FALSE; + } + + if (is_movable == TRUE); + { + for (S32 i=0; i < descendent_items.count(); ++i) + { + LLInventoryItem* item = descendent_items[i]; + if (!can_move_to_outbox(item, tooltip_msg)) + { + is_movable = FALSE; + break; + } + } + } } - } // @@ -2008,7 +2042,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // Recursively create links in target outfit. LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(inv_cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH); + gInventory.collectDescendents(cat_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); LLAppearanceMgr::instance().linkAll(mUUID,items,NULL); } } @@ -2026,7 +2060,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const std::string empty_description = ""; link_inventory_item( gAgent.getID(), - inv_cat->getUUID(), + cat_id, mUUID, inv_cat->getName(), empty_description, @@ -2038,13 +2072,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else if (move_is_into_outbox && !move_is_from_outbox) { - copy_folder_to_outbox(inv_cat, mUUID, inv_cat->getUUID()); + copy_folder_to_outbox(inv_cat, mUUID, cat_id); } else { - if (gInventory.isObjectDescendentOf(inv_cat->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false))) + if (gInventory.isObjectDescendentOf(cat_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false))) { - set_dad_inbox_object(inv_cat->getUUID()); + set_dad_inbox_object(cat_id); } // Reparent the folder and restamp children if it's moving @@ -2059,15 +2093,28 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else if (LLToolDragAndDrop::SOURCE_WORLD == source) { - // content category has same ID as object itself - LLUUID object_id = inv_cat->getUUID(); - LLUUID category_id = mUUID; - accept = move_inv_category_world_to_agent(object_id, category_id, drop); + if (move_is_into_outbox) + { + tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + accept = FALSE; + } + else + { + accept = move_inv_category_world_to_agent(cat_id, mUUID, drop); + } } else if (LLToolDragAndDrop::SOURCE_LIBRARY == source) { - // Accept folders that contain complete outfits. - accept = move_is_into_current_outfit && LLAppearanceMgr::instance().getCanMakeFolderIntoOutfit(inv_cat->getUUID()); + if (move_is_into_outbox) + { + tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNoTransferLibrary"); + accept = FALSE; + } + else + { + // Accept folders that contain complete outfits. + accept = move_is_into_current_outfit && LLAppearanceMgr::instance().getCanMakeFolderIntoOutfit(cat_id); + } if (accept && drop) { @@ -3317,8 +3364,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { LLInventoryModel* model = getInventoryModel(); - if(!model || !inv_item) return FALSE; - if(!isAgentInventory()) return FALSE; // cannot drag into library + if (!model || !inv_item) return FALSE; + if (!isAgentInventory()) return FALSE; // cannot drag into library if (!isAgentAvatarValid()) return FALSE; const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false); @@ -3386,10 +3433,14 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = TRUE; if (!is_movable) + { accept = FALSE; - if ((mUUID == inv_item->getParentUUID()) && !move_is_into_favorites) + } + else if ((mUUID == inv_item->getParentUUID()) && !move_is_into_favorites) + { accept = FALSE; - if (move_is_into_current_outfit || move_is_into_outfit) + } + else if (move_is_into_current_outfit || move_is_into_outfit) { accept = can_move_to_outfit(inv_item, move_is_into_current_outfit); } @@ -3400,9 +3451,32 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, else if (move_is_into_outbox) { accept = can_move_to_outbox(inv_item, tooltip_msg); + + if (accept) + { + const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); + + int existing_item_count = 0; + + if (master_folder != NULL) + { + LLInventoryModel::cat_array_t existing_categories; + LLInventoryModel::item_array_t existing_items; + + gInventory.collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE); + + existing_item_count = existing_items.count(); + } + + if (existing_item_count >= gSavedSettings.getU32("InventoryOutboxMaxItemCount")) + { + tooltip_msg = LLTrans::getString("TooltipOutboxTooManyObjects"); + accept = FALSE; + } + } } - if(accept && drop) + if (accept && drop) { if (inv_item->getType() == LLAssetType::AT_GESTURE && LLGestureMgr::instance().isGestureActive(inv_item->getUUID()) && move_is_into_trash) @@ -3451,13 +3525,16 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { dropToOutfit(inv_item, move_is_into_current_outfit); } - else if (move_is_into_outbox && !move_is_from_outbox) + else if (move_is_into_outbox) { - copy_item_to_outbox(inv_item, mUUID, LLUUID::null); - } - else if (move_is_into_outbox && move_is_from_outbox) - { - move_item_within_outbox(inv_item, mUUID); + if (move_is_from_outbox) + { + move_item_within_outbox(inv_item, mUUID); + } + else + { + copy_item_to_outbox(inv_item, mUUID, LLUUID::null); + } } // NORMAL or TRASH folder // (move the item, restamp if into trash) @@ -3478,7 +3555,6 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // //-------------------------------------------------------------------------------- - } } else if (LLToolDragAndDrop::SOURCE_WORLD == source) @@ -3487,7 +3563,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // anonymous objects, it would be possible to bypass // permissions. object = gObjectList.findObject(inv_item->getParentUUID()); - if(!object) + if (!object) { llinfos << "Object not found for drop." << llendl; return FALSE; @@ -3497,10 +3573,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // move/copy this item. LLPermissions perm(inv_item->getPermissions()); BOOL is_move = FALSE; - if((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) + if ((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) - { accept = TRUE; } @@ -3516,7 +3591,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Don't allow placing an original item into Current Outfit or an outfit folder // because they must contain only links to wearable items. // *TODO: Probably we should create a link to an item if it was dragged to outfit or COF. - if(move_is_into_current_outfit || move_is_into_outfit) + if (move_is_into_current_outfit || move_is_into_outfit) { accept = FALSE; } @@ -3527,8 +3602,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { accept = FALSE; } - - if(drop && accept) + else if (move_is_into_outbox) + { + tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + accept = FALSE; + } + + if (accept && drop) { LLMoveInv* move_inv = new LLMoveInv; move_inv->mObjectID = inv_item->getParentUUID(); @@ -3550,15 +3630,22 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLNotifications::instance().forceResponse(params, 0); } } - } else if(LLToolDragAndDrop::SOURCE_NOTECARD == source) { - // Don't allow placing an original item from a notecard to Current Outfit or an outfit folder - // because they must contain only links to wearable items. - accept = !(move_is_into_current_outfit || move_is_into_outfit); - - if(accept && drop) + if (move_is_into_outbox) + { + tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + accept = FALSE; + } + else + { + // Don't allow placing an original item from a notecard to Current Outfit or an outfit folder + // because they must contain only links to wearable items. + accept = !(move_is_into_current_outfit || move_is_into_outfit); + } + + if (accept && drop) { copy_inventory_from_notecard(mUUID, // Drop to the chosen destination folder LLToolDragAndDrop::getInstance()->getObjectID(), @@ -3573,7 +3660,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { accept = TRUE; - if (move_is_into_current_outfit || move_is_into_outfit) + if (move_is_into_outbox) + { + tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + accept = FALSE; + } + else if (move_is_into_current_outfit || move_is_into_outfit) { accept = can_move_to_outfit(inv_item, move_is_into_current_outfit); } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index dc25689fa3..2fb9c53857 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -217,6 +217,38 @@ const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(cons return NULL; } +// +// Search up the parent chain until we get to the specified parent, then return the first child category under it +// +const LLViewerInventoryCategory* LLInventoryModel::getFirstDescendantOf(const LLUUID& master_parent_id, const LLUUID& obj_id) const +{ + if (master_parent_id == obj_id) + { + return NULL; + } + + const LLViewerInventoryCategory* current_cat = getCategory(obj_id); + + if (current_cat == NULL) + { + current_cat = getCategory(getObject(obj_id)->getParentUUID()); + } + + while (current_cat != NULL) + { + const LLUUID& current_parent_id = current_cat->getParentUUID(); + + if (current_parent_id == master_parent_id) + { + return current_cat; + } + + current_cat = getCategory(current_parent_id); + } + + return NULL; +} + // Get the object by id. Returns NULL if not found. LLInventoryObject* LLInventoryModel::getObject(const LLUUID& id) const { diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 340c1b0c22..1740c4151d 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -238,6 +238,9 @@ public: // Get whatever special folder this object is a child of, if any. const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; + + // Get first descendant of the child object under the specified parent + const LLViewerInventoryCategory *getFirstDescendantOf(const LLUUID& master_parent_id, const LLUUID& obj_id) const; // Get the object by id. Returns NULL if not found. // NOTE: Use the pointer returned for read operations - do diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b83571a106..0d9a7e5c41 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -165,8 +165,10 @@ Please try logging in again in a minute.</string> <string name="TooltipMustSingleDrop">Only a single item can be dragged here</string> <string name="TooltipPrice" value="L$[AMOUNT]: "/> <string name="TooltipOutboxNoTransfer">One or more of these objects cannot be sold or transferred to another user.</string> + <string name="TooltipOutboxNotInInventory">You can only transfer objects in your inventory to your merchant outbox.</string> <string name="TooltipOutboxWorn">You are wearing one or more of these objects. Remove them from your avatar and try moving them again.</string> <string name="TooltipOutboxFolderLevels">This folder has too many levels of subfolders. Rearrange the interior folders to a maximum of 4 levels deep (Root Folder contains A contains B contains C).</string> + <string name="TooltipOutboxTooManyFolders">This folder has too many subfolders. Reorganize the interior to a maximum of 20 folders.</string> <string name="TooltipOutboxTooManyObjects">This folder contains more than 200 objects. Box some of the items to reduce the object count.</string> <!-- tooltips for Urls --> -- cgit v1.2.3 From b6af1b47f15992b60ddb4c718f03ae6d2040cc19 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 15 Dec 2011 15:09:02 -0800 Subject: Windows build fix and fixes for off-by-1 errors in limitations --- indra/newview/llinventorybridge.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 26e7dab270..64b5a9deba 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1950,9 +1950,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } if (move_is_into_outbox) { - int nested_folder_levels = (get_folder_path_length(outbox_id, mUUID) - 1) + get_folder_levels(inv_cat); + int nested_folder_levels = get_folder_path_length(outbox_id, mUUID) + get_folder_levels(inv_cat); - if (nested_folder_levels >= gSavedSettings.getU32("InventoryOutboxMaxFolderDepth")) + if (nested_folder_levels > gSavedSettings.getU32("InventoryOutboxMaxFolderDepth")) { tooltip_msg = LLTrans::getString("TooltipOutboxFolderLevels"); is_movable = FALSE; @@ -1962,7 +1962,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); int existing_item_count = 0; - int existing_folder_count = 0; + int existing_folder_count = 1; // +1 for this folder being dragged now if (master_folder != NULL) { @@ -1971,25 +1971,25 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, gInventory.collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE); - existing_item_count = existing_items.count(); - existing_folder_count = existing_categories.count(); + existing_item_count += existing_items.count(); + existing_folder_count += existing_categories.count(); } const int nested_folder_count = existing_folder_count + descendent_categories.count(); const int nested_item_count = existing_item_count + descendent_items.count(); - if (nested_folder_count >= gSavedSettings.getU32("InventoryOutboxMaxFolderCount")) + if (nested_folder_count > gSavedSettings.getU32("InventoryOutboxMaxFolderCount")) { tooltip_msg = LLTrans::getString("TooltipOutboxTooManyFolders"); is_movable = FALSE; } - else if (nested_item_count >= gSavedSettings.getU32("InventoryOutboxMaxItemCount")) + else if (nested_item_count > gSavedSettings.getU32("InventoryOutboxMaxItemCount")) { tooltip_msg = LLTrans::getString("TooltipOutboxTooManyObjects"); is_movable = FALSE; } - if (is_movable == TRUE); + if (is_movable == TRUE) { for (S32 i=0; i < descendent_items.count(); ++i) { @@ -3456,7 +3456,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); - int existing_item_count = 0; + int existing_item_count = 1; // +1 for this item being dragged now if (master_folder != NULL) { @@ -3465,10 +3465,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, gInventory.collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE); - existing_item_count = existing_items.count(); + existing_item_count += existing_items.count(); } - if (existing_item_count >= gSavedSettings.getU32("InventoryOutboxMaxItemCount")) + if (existing_item_count > gSavedSettings.getU32("InventoryOutboxMaxItemCount")) { tooltip_msg = LLTrans::getString("TooltipOutboxTooManyObjects"); accept = FALSE; -- cgit v1.2.3 From f1edfc73efa526735b2a80d47e2381a2b46295df Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 15 Dec 2011 16:21:35 -0800 Subject: EXP-1726 FIX -- Rename option present in context menu when selecting multiple folders in Outbox --- indra/newview/llinventorybridge.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 64b5a9deba..adf1d6254d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2933,10 +2933,15 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { mItems.push_back(std::string("Rename")); mItems.push_back(std::string("Delete")); + + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + mDisabledItems.push_back(std::string("Rename")); + } } else if(isAgentInventory()) // do not allow creating in library { - LLViewerInventoryCategory *cat = getCategory(); + LLViewerInventoryCategory *cat = getCategory(); // BAP removed protected check to re-enable standard ops in untyped folders. // Not sure what the right thing is to do here. if (!isCOFFolder() && cat && (cat->getPreferredType() != LLFolderType::FT_OUTFIT)) -- cgit v1.2.3 From 16778677868620874b8b042f6c62712c9d28f2fb Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 16 Dec 2011 10:43:57 -0800 Subject: EXP-1738 FIX EXP-1739 FIX * Initial pass to block drag and drop of multiple items when resultant outbox folder would contain too many items or folders. --- indra/newview/llinventorybridge.cpp | 5 +++-- indra/newview/lltooldraganddrop.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index adf1d6254d..ff980955e0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -60,6 +60,7 @@ #include "llpreviewtexture.h" #include "llselectmgr.h" #include "llsidepanelappearance.h" +#include "lltooldraganddrop.h" #include "lltrans.h" #include "llviewerassettype.h" #include "llviewerfoldertype.h" @@ -1962,7 +1963,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); int existing_item_count = 0; - int existing_folder_count = 1; // +1 for this folder being dragged now + int existing_folder_count = LLToolDragAndDrop::instance().getCargoIDsCount(); if (master_folder != NULL) { @@ -3461,7 +3462,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); - int existing_item_count = 1; // +1 for this item being dragged now + int existing_item_count = LLToolDragAndDrop::instance().getCargoIDsCount(); if (master_folder != NULL) { diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 92f007a251..273d23d1a0 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -86,6 +86,8 @@ public: EAcceptance getLastAccept() { return mLastAccept; } boost::signals2::connection setEndDragCallback( const enddrag_signal_t::slot_type& cb ) { return mEndDragSignal.connect(cb); } + + uuid_vec_t::size_type getCargoIDsCount() const { return mCargoIDs.size(); } protected: enum EDropTarget -- cgit v1.2.3 From 5b6fe3a8388ae8f3b0e49899a1ff4a0b5aca35fd Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 16 Dec 2011 16:35:21 -0800 Subject: EXP-1730 FIX -- Library items can be dragged and dropped to Outbox floater and folders are not created for items * Updated to proper tooltip string --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ff980955e0..3f12067048 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2108,7 +2108,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { if (move_is_into_outbox) { - tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNoTransferLibrary"); + tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; } else -- cgit v1.2.3 From 97a2663cf9fc28a9b651d423f4eb0e506b3c507d Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 19 Dec 2011 11:25:14 -0800 Subject: EXP-1745 FIX -- removed the merchant outbox from the toolbox --- indra/newview/app_settings/commands.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index c12d22adc3..1d1d39c786 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -136,7 +136,7 @@ is_running_parameters="moveview" /> <command name="outbox" - available_in_toybox="true" + available_in_toybox="false" icon="Command_Outbox_Icon" label_ref="Command_Outbox_Label" tooltip_ref="Command_Outbox_Tooltip" -- cgit v1.2.3 From ac01fb0e0378476fd572ba24151d73840f119519 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 19 Dec 2011 13:55:53 -0800 Subject: EXP-1683 FIX -- Add main inventory context menu option Copy To Outbox * The logic to determine whether or not the "Copy to Merchant Outbox" item is available is now tied to drag and drop functionality. --- indra/newview/llinventorybridge.cpp | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3f12067048..d8e0529501 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1102,26 +1102,33 @@ BOOL LLInvFVBridge::canListOnMarketplace() const BOOL LLInvFVBridge::canListOnMarketplaceNow() const { + BOOL can_list = FALSE; + #if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU -#if BLOCK_WORN_ITEMS_IN_OUTBOX - if (get_is_item_worn(mUUID)) - { - return FALSE; - } + const LLInventoryObject* obj = getInventoryObject(); - // Loop through all items worn by avatar and check to see if they are descendants - // of the item we are trying to list on the marketplace - if (get_is_parent_to_worn_item(mUUID)) + if (obj) { - return FALSE; + // Get outbox id + const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + LLFolderViewItem * outbox_itemp = mRoot->getItemByID(outbox_id); + + if (outbox_itemp) + { + MASK mask = 0x0; + BOOL drop = FALSE; + EDragAndDropType cargo_type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType()); + void * cargo_data = (void *) obj; + std::string tooltip_msg; + + can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + } } -#endif // BLOCK_WORN_ITEMS_IN_OUTBOX - return TRUE; -#else - return FALSE; #endif + + return can_list; } -- cgit v1.2.3 From a0929f39caba9c2b7be8184f217c8e2a811857eb Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 19 Dec 2011 13:58:36 -0800 Subject: EXP-1170 FIX -- Right click context menu to Copy to Outbox shown if user is not a merchant * The context menu option is no longer shown if the user does not have an outbox. --- indra/newview/llinventorybridge.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d8e0529501..7665ad6e88 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1087,6 +1087,12 @@ BOOL LLInvFVBridge::canListOnMarketplace() const { return FALSE; } + + const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + if (outbox_id.isNull()) + { + return FALSE; + } LLViewerInventoryItem * item = model->getItem(mUUID); if (item && !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) -- cgit v1.2.3 From 6c26fdea4d62f723c3bdbec9ded032e6d77301b8 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 19 Dec 2011 16:46:26 -0800 Subject: EXP-1741 FIX -- Learn more link goes to page not found from Outbox for user that is not a merchant an Agni EXP-1746 FIX -- Update Outbox messaging EXP-1748 FIX -- Close down on messaging with Spinner MKT-3403 support -- viewer tooltips updated to match errors in marketplace * Copy has been updated to match the design per Leo and Brooke * Marketplace URL's have also been updated * The outbox floater now reports a status string in the existing folder count control --- indra/newview/llfloateroutbox.cpp | 43 ++++++++++++++++------ indra/newview/llfloateroutbox.h | 23 +++++++----- indra/newview/llinventorybridge.cpp | 2 +- .../default/xui/en/floater_merchant_outbox.xml | 12 +++--- indra/newview/skins/default/xui/en/strings.xml | 37 ++++++++----------- 5 files changed, 68 insertions(+), 49 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 725e521e58..239ba7ad4d 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -103,15 +103,16 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) : LLFloater(key) , mCategoriesObserver(NULL) , mCategoryAddedObserver(NULL) - , mOutboxId(LLUUID::null) - , mOutboxInventoryPanel(NULL) - , mOutboxItemCount(0) + , mImportBusy(false) + , mImportButton(NULL) , mInventoryFolderCountText(NULL) , mInventoryImportInProgress(NULL) , mInventoryPlaceholder(NULL) , mInventoryText(NULL) , mInventoryTitle(NULL) - , mImportButton(NULL) + , mOutboxId(LLUUID::null) + , mOutboxInventoryPanel(NULL) + , mOutboxItemCount(0) , mWindowShade(NULL) { } @@ -251,12 +252,22 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) // Initialize the marketplace import API // + mImportBusy = true; + setStatusString(getString("OutboxInitializing")); + LLMarketplaceInventoryImporter::getInstance()->initialize(); LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); } -void LLFloaterOutbox::updateItemCount() +void LLFloaterOutbox::setStatusString(const std::string& statusString) +{ + llassert(mInventoryFolderCountText != NULL); + + mInventoryFolderCountText->setText(statusString); +} + +void LLFloaterOutbox::updateFolderCount() { S32 item_count = 0; @@ -275,8 +286,8 @@ void LLFloaterOutbox::updateItemCount() { switch (mOutboxItemCount) { - case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; - case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; + case 0: setStatusString(getString("OutboxFolderCount0")); break; + case 1: setStatusString(getString("OutboxFolderCount1")); break; default: { std::string item_count_str = llformat("%d", mOutboxItemCount); @@ -284,7 +295,7 @@ void LLFloaterOutbox::updateItemCount() LLStringUtil::format_map_t args; args["[NUM]"] = item_count_str; - mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); + setStatusString(getString("OutboxFolderCountN", args)); break; } } @@ -295,7 +306,10 @@ void LLFloaterOutbox::updateItemCount() void LLFloaterOutbox::updateView() { - updateItemCount(); + if (!mImportBusy) + { + updateFolderCount(); + } if (mOutboxItemCount > 0) { @@ -431,15 +445,22 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) { if (inProgress) { - mImportButton->setEnabled(false); + if (!mImportBusy) + { + setStatusString(getString("OutboxImporting")); + } + mImportBusy = true; + mImportButton->setEnabled(false); mInventoryImportInProgress->setVisible(true); } else { + mImportBusy = false; + mImportButton->setEnabled(mOutboxItemCount > 0); mInventoryImportInProgress->setVisible(false); - mImportButton->setEnabled(mOutboxItemCount > 0); + updateView(); } } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 5222db1142..5cb487be64 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -80,25 +80,28 @@ protected: void onImportButtonClicked(); void onOutboxChanged(); - void updateItemCount(); + void setStatusString(const std::string& statusString); + + void updateFolderCount(); void updateView(); private: LLInventoryCategoriesObserver * mCategoriesObserver; LLInventoryCategoryAddedObserver * mCategoryAddedObserver; - + + bool mImportBusy; + LLButton * mImportButton; + + LLTextBox * mInventoryFolderCountText; + LLView * mInventoryImportInProgress; + LLView * mInventoryPlaceholder; + LLTextBox * mInventoryText; + LLTextBox * mInventoryTitle; + LLUUID mOutboxId; LLInventoryPanel * mOutboxInventoryPanel; U32 mOutboxItemCount; - LLTextBox * mInventoryFolderCountText; - LLView * mInventoryImportInProgress; - LLView * mInventoryPlaceholder; - LLTextBox * mInventoryText; - LLTextBox * mInventoryTitle; - - LLButton * mImportButton; - LLWindowShade * mWindowShade; }; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7665ad6e88..4e26f09978 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -73,7 +73,7 @@ // Marketplace outbox current disabled #define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 -#define BLOCK_WORN_ITEMS_IN_OUTBOX 0 +#define BLOCK_WORN_ITEMS_IN_OUTBOX 1 typedef std::pair<LLUUID, LLUUID> two_uuids_t; typedef std::list<two_uuids_t> two_uuids_list_t; diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index 0368601bf4..eb68339022 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -16,6 +16,8 @@ <string name="OutboxFolderCount0">0 folders</string> <string name="OutboxFolderCount1">1 folder</string> <string name="OutboxFolderCountN">[NUM] folders</string> + <string name="OutboxImporting">Sending items...</string> + <string name="OutboxInitializing">Initializing...</string> <panel follows="all" layout="topleft" @@ -82,13 +84,13 @@ type="string" follows="all" layout="topleft" - top="7" + top="10" left="5" - width="100" + width="150" height="20" wrap="true" halign="left" - valign="baseline" + valign="bottom" font="SansSerif" /> <button label="Send to Marketplace" @@ -99,9 +101,9 @@ tab_stop="false" halign="center" top="3" - left="110" + left="160" height="25" - width="200" + width="150" enabled="false" /> </panel> <layout_stack name="import_progress_indicator" orientation="vertical" left="0" height="440" top="0" width="333" follows="all" visible="false"> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0d9a7e5c41..18ca3033e9 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -164,12 +164,13 @@ Please try logging in again in a minute.</string> <string name="TooltipLand">Land:</string> <string name="TooltipMustSingleDrop">Only a single item can be dragged here</string> <string name="TooltipPrice" value="L$[AMOUNT]: "/> - <string name="TooltipOutboxNoTransfer">One or more of these objects cannot be sold or transferred to another user.</string> - <string name="TooltipOutboxNotInInventory">You can only transfer objects in your inventory to your merchant outbox.</string> - <string name="TooltipOutboxWorn">You are wearing one or more of these objects. Remove them from your avatar and try moving them again.</string> - <string name="TooltipOutboxFolderLevels">This folder has too many levels of subfolders. Rearrange the interior folders to a maximum of 4 levels deep (Root Folder contains A contains B contains C).</string> - <string name="TooltipOutboxTooManyFolders">This folder has too many subfolders. Reorganize the interior to a maximum of 20 folders.</string> - <string name="TooltipOutboxTooManyObjects">This folder contains more than 200 objects. Box some of the items to reduce the object count.</string> + + <string name="TooltipOutboxNoTransfer">One or more of these objects cannot be sold or transferred.</string> + <string name="TooltipOutboxNotInInventory">Your merchant outbox can only accept items directly from your inventory</string> + <string name="TooltipOutboxWorn">You can not put items you are wearing into your merchant outbox</string> + <string name="TooltipOutboxFolderLevels">Depth of nested folders exceeds 3</string> + <string name="TooltipOutboxTooManyFolders">Subfolder count in top-level folder exceeds 20</string> + <string name="TooltipOutboxTooManyObjects">Item count in top-level folder exceeds 200</string> <!-- tooltips for Urls --> <string name="TooltipHttpUrl">Click to view this web page</string> @@ -2032,33 +2033,25 @@ Returns a string with the requested data about the region <string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string> <string name="InventoryInboxNoItems">When you purchase or otherwise receive an item, it will appear here so you can drag it to a folder in your inventory, or delete it if you do not wish to keep it.</string> <string name="MarketplaceURL">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/</string> - <string name="MarketplaceURL_CreateStore">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/create_store</string> - <string name="MarketplaceURL_Dashboard">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/[AGENT_ID]/store/dashboard</string> + <string name="MarketplaceURL_CreateStore">http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.4</string> + <string name="MarketplaceURL_Dashboard">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/dashboard</string> <string name="MarketplaceURL_LearnMore">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/learn_more</string> - <string name="InventoryOutboxCreationErrorTitle">Your Merchant Outbox is not properly configured</string> - <string name="InventoryOutboxCreationErrorTooltip">Merchant Outbox configuration error</string> - <string name="InventoryOutboxCreationError">Please contact Customer Service to correct the problem.</string> <string name="InventoryOutboxNotMerchantTitle">Anyone can sell items on the Marketplace.</string> - <string name="InventoryOutboxNotMerchantTooltip">Become a merchant!</string> + <string name="InventoryOutboxNotMerchantTooltip"></string> <string name="InventoryOutboxNotMerchant"> -The Second Life Marketplace offers more than one million virtual products for sale, all of them created by Residents like you. You too can create items and sell them on the Marketplace. Creating a store is easy and free of charge. - -[[MARKETPLACE_URL] Visit the Marketplace] - -[[MARKETPLACE_LEARN_MORE_URL] Learn more about creating a store] +If you'd like to become a merchant, you'll need to [[MARKETPLACE_CREATE_STORE_URL] create a Marketplace store]. </string> <string name="InventoryOutboxNoItemsTitle">Your outbox is empty.</string> - <string name="InventoryOutboxNoItemsTooltip">Drag and drop items here to prepare them for sale on the Marketplace</string> + <string name="InventoryOutboxNoItemsTooltip"></string> <string name="InventoryOutboxNoItems"> -Drag folders to this area. When you are ready to send them to the Marketplace for sale, click the "Send to Marketplace" button below. - -[[MARKETPLACE_DASHBOARD_URL] Go to your Merchant Dashboard] +Drag folders to this area and click "Send to Marketplace" to list them for sale on the [[MARKETPLACE_DASHBOARD_URL] Marketplace]. </string> <string name="Marketplace Error None">No errors</string> <string name="Marketplace Error Not Merchant">Error: Before sending items to the Marketplace you will need to set yourself up as a merchant (free of charge).</string> <string name="Marketplace Error Empty Folder">Error: This folder has no contents.</string> - <string name="Marketplace Error Unassociated Products">Error: This item failed to upload because your merchant account has too many items unassociated with products. To fix this error, login to the marketplace website and reduce your unassociated item count.</string> + <string name="Marketplace Error Unassociated Products">Error: This item failed to upload because your merchant account has too many items unassociated with products. To fix this error, log in to the marketplace website and reduce your unassociated item count.</string> + <string name="Marketplace Error Object Limit">Error: This item contains too many objects. Fix this error by placing objects together in boxes to reduce the total count to less than 200.</string> <string name="Marketplace Error Folder Depth">Error: This item contains too many levels of nested folders. Reorganize it to a maximum of 3 levels of nested folders.</string> <string name="Marketplace Error Unsellable Item">Error: This item can not be sold on the marketplace.</string> -- cgit v1.2.3 From 744484699cec728f60463755d409fbde681429ea Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 19 Dec 2011 17:29:17 -0800 Subject: EXP-1749 FIX -- Merchant outbox import completion messages are to be modal dialogs * Merchant outbox completion messages now shown as modal dialogs rather than window shades. --- indra/newview/llfloateroutbox.cpp | 42 ++++++++++++++++------ indra/newview/llfloateroutbox.h | 2 +- .../newview/skins/default/xui/en/notifications.xml | 4 +-- 3 files changed, 35 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 239ba7ad4d..b97cc54dd1 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -36,6 +36,7 @@ #include "llinventorypanel.h" #include "llmarketplacefunctions.h" #include "llnotificationhandler.h" +#include "llnotificationmanager.h" #include "llnotificationsutil.h" #include "lltextbox.h" #include "lltransientfloatermgr.h" @@ -43,6 +44,8 @@ #include "llviewernetwork.h" #include "llwindowshade.h" +#define USE_WINDOWSHADE_DIALOGS 0 + ///---------------------------------------------------------------------------- /// LLOutboxNotification class @@ -50,14 +53,9 @@ bool LLNotificationsUI::LLOutboxNotification::processNotification(const LLSD& notify) { - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if (notification) - { - LLFloaterOutbox* outbox_floater = LLFloaterReg::getTypedInstance<LLFloaterOutbox>("outbox"); - - outbox_floater->showNotification(notification); - } + LLFloaterOutbox* outbox_floater = LLFloaterReg::getTypedInstance<LLFloaterOutbox>("outbox"); + + outbox_floater->showNotification(notify); return false; } @@ -413,6 +411,7 @@ void LLFloaterOutbox::onOutboxChanged() } fetchOutboxContents(); + updateView(); } @@ -464,8 +463,19 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) } } -void LLFloaterOutbox::showNotification(LLNotificationPtr notify) +void LLFloaterOutbox::showNotification(const LLSD& notify) { + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); + + if (!notification) + { + llerrs << "Unable to find outbox notification!" << notify.asString() << llendl; + + return; + } + +#if USE_WINDOWSHADE_DIALOGS + if (mWindowShade) { delete mWindowShade; @@ -487,6 +497,18 @@ void LLFloaterOutbox::showNotification(LLNotificationPtr notify) mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params); addChild(mWindowShade); - mWindowShade->show(notify); + mWindowShade->show(notification); + +#else + + LLNotificationsUI::LLEventHandler * handler = + LLNotificationsUI::LLNotificationManager::instance().getHandlerForNotification("alertmodal"); + + LLNotificationsUI::LLSysHandler * sys_handler = dynamic_cast<LLNotificationsUI::LLSysHandler *>(handler); + llassert(sys_handler); + + sys_handler->processNotification(notify); + +#endif } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 5cb487be64..cc4a7207ca 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -64,7 +64,7 @@ public: EAcceptance* accept, std::string& tooltip_msg); - void showNotification(LLNotificationPtr notify); + void showNotification(const LLSD& notify); protected: void fetchOutboxContents(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 871a9d4a1d..858764006f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -203,8 +203,8 @@ Save changes to current clothing/body part? icon="alertmodal.tga" name="ConfirmNoCopyToOutbox" type="alertmodal"> - You don't have permission to copy this item to the Marketplace Outbox. Are you sure you want to move the following item? - [ITEM_NAME] +You don't have permission to copy this item to the Marketplace Outbox. Are you sure you want to move the following item? +[ITEM_NAME] <usetemplate name="okcancelbuttons" notext="No" -- cgit v1.2.3 From 11e192d9a72274d24e2a50799904c7a64ab33e27 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 20 Dec 2011 11:43:02 -0800 Subject: EXP-1738 FIX -- Disable drag and drop to folders in the outbox that would create a hierarchy that contains too many folders EXP-1743 FIX -- Tooltip errors given when dragging and dropping folders onto themselves in Merchant Outbox * Top level folder now reflected in folder count for total folders * Earlier rejections now honored in drag and drop code so outbox-specific tooltips only show up when appropriate --- indra/newview/llinventorybridge.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4e26f09978..2ff6563a09 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1918,9 +1918,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, BOOL is_movable = TRUE; if (LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) is_movable = FALSE; - if (move_is_into_outfit) + else if (move_is_into_outfit) is_movable = FALSE; - if (mUUID == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)) + else if (mUUID == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)) is_movable = FALSE; LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; @@ -1935,7 +1935,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, break; } } - if (move_is_into_trash) + if (is_movable && move_is_into_trash) { for (S32 i=0; i < descendent_items.count(); ++i) { @@ -1947,7 +1947,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } - if (move_is_into_landmarks) + if (is_movable && move_is_into_landmarks) { for (S32 i=0; i < descendent_items.count(); ++i) { @@ -1962,7 +1962,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } - if (move_is_into_outbox) + if (is_movable && move_is_into_outbox) { int nested_folder_levels = get_folder_path_length(outbox_id, mUUID) + get_folder_levels(inv_cat); @@ -1976,7 +1976,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); int existing_item_count = 0; - int existing_folder_count = LLToolDragAndDrop::instance().getCargoIDsCount(); + int existing_folder_count = 1 + LLToolDragAndDrop::instance().getCargoIDsCount(); // +1 for master folder if (master_folder != NULL) { -- cgit v1.2.3 From 2a3b7f295fa82d5d4826cfd912fd07ebbe5f9c21 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 20 Dec 2011 14:41:30 -0800 Subject: EXP-1755 FIX -- Can move items to Merchant Outbox during Outbox synch using Copy to Merchant Outbox context menu * "Copy to Merchant Outbox" context menu option no longer available when marketplace import is in progress. --- indra/newview/llinventorybridge.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2ff6563a09..96c527859c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -53,6 +53,7 @@ #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" +#include "llmarketplacefunctions.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llpreviewanim.h" @@ -1132,6 +1133,15 @@ BOOL LLInvFVBridge::canListOnMarketplaceNow() const } } + // Do not allow listing while import is in progress + if (LLMarketplaceInventoryImporter::instanceExists()) + { + if (LLMarketplaceInventoryImporter::instance().isImportInProgress()) + { + can_list = FALSE; + } + } + #endif return can_list; -- cgit v1.2.3 From 52fab641041ed1ba409a03fee77a0cdaec86dea2 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 20 Dec 2011 16:16:49 -0800 Subject: * Added "InventoryOutboxLogging" debug setting to log merchant outbox related web API calls. Each message begins with the tag "SLM". --- indra/newview/app_settings/settings.xml | 11 ++++++ indra/newview/llmarketplacefunctions.cpp | 39 ++++++++++++++++++++-- .../default/xui/en/floater_merchant_outbox.xml | 2 +- 3 files changed, 49 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c51197bbf1..e5bb686123 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4271,6 +4271,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>InventoryOutboxLogging</key> + <map> + <key>Comment</key> + <string>Enable debug output associated with the Merchant Outbox.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>InventoryOutboxMaxFolderCount</key> <map> <key>Comment</key> diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 225bb059c9..9a83c5fcb7 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -31,6 +31,7 @@ #include "llagent.h" #include "llhttpclient.h" #include "lltrans.h" +#include "llviewercontrol.h" #include "llviewermedia.h" #include "llviewernetwork.h" @@ -108,12 +109,13 @@ namespace LLMarketplaceImport // Internal state variables static std::string sMarketplaceCookie = ""; + static LLSD sImportId = LLSD::emptyMap(); static bool sImportInProgress = false; static bool sImportPostPending = false; static bool sImportGetPending = false; static U32 sImportResultStatus = 0; static LLSD sImportResults = LLSD::emptyMap(); - + // Responders @@ -124,9 +126,17 @@ namespace LLMarketplaceImport void completed(U32 status, const std::string& reason, const LLSD& content) { + if (gSavedSettings.getBOOL("InventoryOutboxLogging")) + { + llinfos << " SLM POST status: " << status << llendl; + llinfos << " SLM POST reason: " << reason << llendl; + llinfos << " SLM POST content: " << content.asString() << llendl; + } + sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE); sImportPostPending = false; sImportResultStatus = status; + sImportId = content; } }; @@ -142,6 +152,13 @@ namespace LLMarketplaceImport void completed(U32 status, const std::string& reason, const LLSD& content) { + if (gSavedSettings.getBOOL("InventoryOutboxLogging")) + { + llinfos << " SLM GET status: " << status << llendl; + llinfos << " SLM GET reason: " << reason << llendl; + llinfos << " SLM GET content: " << content.asString() << llendl; + } + sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING); sImportGetPending = false; sImportResultStatus = status; @@ -236,6 +253,11 @@ namespace LLMarketplaceImport std::string url = getInventoryImportURL(); + if (gSavedSettings.getBOOL("InventoryOutboxLogging")) + { + llinfos << " SLM GET: " << url << llendl; + } + LLHTTPClient::get(url, new LLImportGetResponder(), LLViewerMedia::getHeaders()); } @@ -245,18 +267,26 @@ namespace LLMarketplaceImport std::string url = getInventoryImportURL(); + url += sImportId.asString(); + // Make the headers for the post LLSD headers = LLSD::emptyMap(); headers["Accept"] = "*/*"; headers["Cookie"] = sMarketplaceCookie; - headers["Content-Type"] = "application/xml"; + headers["Content-Type"] = "application/llsd+xml"; headers["User-Agent"] = LLViewerMedia::getCurrentUserAgent(); + if (gSavedSettings.getBOOL("InventoryOutboxLogging")) + { + llinfos << " SLM GET: " << url << llendl; + } + LLHTTPClient::get(url, new LLImportGetResponder(), headers); } void triggerImport() { + sImportId = LLSD::emptyMap(); sImportInProgress = true; sImportPostPending = true; sImportResultStatus = MarketplaceErrorCodes::IMPORT_PROCESSING; @@ -272,6 +302,11 @@ namespace LLMarketplaceImport headers["Content-Type"] = "application/xml"; headers["User-Agent"] = LLViewerMedia::getCurrentUserAgent(); + if (gSavedSettings.getBOOL("InventoryOutboxLogging")) + { + llinfos << " SLM POST: " << url << llendl; + } + LLHTTPClient::post(url, LLSD(), new LLImportPostResponder(), headers); // Set a timer (for testing only) diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index eb68339022..02394e8ac3 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -16,7 +16,7 @@ <string name="OutboxFolderCount0">0 folders</string> <string name="OutboxFolderCount1">1 folder</string> <string name="OutboxFolderCountN">[NUM] folders</string> - <string name="OutboxImporting">Sending items...</string> + <string name="OutboxImporting">Sending folders...</string> <string name="OutboxInitializing">Initializing...</string> <panel follows="all" -- cgit v1.2.3 From 912833bafa9a59734432787158e36b66ee9586aa Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 4 Jan 2012 14:04:32 -0800 Subject: EXP-1738 FIX -- Disable drag and drop to folders in the outbox that would create a hierarchy that contains too many folders * Updated drag and drop to correctly handle moving to and from outbox as opposed to within the outbox when dealing with folder and item count limitations related to depth and total folder count. --- indra/newview/llfloateroutbox.cpp | 2 +- indra/newview/llfolderviewitem.cpp | 14 ++-- indra/newview/llfolderviewitem.h | 10 +-- indra/newview/llinventorybridge.cpp | 101 +++++++++++++++++++------ indra/newview/lltooldraganddrop.cpp | 2 + indra/newview/skins/default/xui/en/strings.xml | 3 + 6 files changed, 96 insertions(+), 36 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index b97cc54dd1..8ccebb36dc 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -387,7 +387,7 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { LLFolderView * root_folder = mOutboxInventoryPanel->getRootFolder(); - handled = root_folder->handleDragAndDropToRoot(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } } diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 526800d4be..dc42bb148d 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2285,7 +2285,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, if (!handled) { - handleDragAndDropToRoot(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl; } @@ -2293,12 +2293,12 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, return TRUE; } -BOOL LLFolderViewFolder::handleDragAndDropToRoot(MASK mask, - BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) +BOOL LLFolderViewFolder::handleDragAndDropToThisFolder(MASK mask, + BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) { BOOL accepted = mListener && mListener->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 02461fb144..0f8c3edef8 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -547,11 +547,11 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - BOOL handleDragAndDropToRoot(MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg); + BOOL handleDragAndDropToThisFolder(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); virtual void draw(); time_t getCreationDate() const; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 96c527859c..c94deed5e2 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1926,23 +1926,47 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // BOOL is_movable = TRUE; - if (LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) + + if (is_movable && (mUUID == cat_id)) + { + is_movable = FALSE; + tooltip_msg = LLTrans::getString("TooltipDragOntoSelf"); + } + if (is_movable && (model->isObjectDescendentOf(mUUID, cat_id))) + { + is_movable = FALSE; + tooltip_msg = LLTrans::getString("TooltipDragOntoOwnChild"); + } + if (is_movable && LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) + { is_movable = FALSE; - else if (move_is_into_outfit) + // tooltip? + } + if (is_movable && move_is_into_outfit) + { is_movable = FALSE; - else if (mUUID == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)) + // tooltip? + } + if (is_movable && (mUUID == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE))) + { is_movable = FALSE; + // tooltip? + } + LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; - gInventory.collectDescendents(cat_id, descendent_categories, descendent_items, FALSE); - for (S32 i=0; i < descendent_categories.count(); ++i) + if (is_movable) { - LLInventoryCategory* category = descendent_categories[i]; - if(LLFolderType::lookupIsProtectedType(category->getPreferredType())) + model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE); + for (S32 i=0; i < descendent_categories.count(); ++i) { - // Can't move "special folders" (e.g. Textures Folder). - is_movable = FALSE; - break; + LLInventoryCategory* category = descendent_categories[i]; + if(LLFolderType::lookupIsProtectedType(category->getPreferredType())) + { + // Can't move "special folders" (e.g. Textures Folder). + is_movable = FALSE; + break; + } } } if (is_movable && move_is_into_trash) @@ -1974,7 +1998,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } if (is_movable && move_is_into_outbox) { - int nested_folder_levels = get_folder_path_length(outbox_id, mUUID) + get_folder_levels(inv_cat); + const int nested_folder_levels = get_folder_path_length(outbox_id, mUUID) + get_folder_levels(inv_cat); if (nested_folder_levels > gSavedSettings.getU32("InventoryOutboxMaxFolderDepth")) { @@ -1983,23 +2007,56 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else { - const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); - + int dragged_folder_count = descendent_categories.count(); int existing_item_count = 0; - int existing_folder_count = 1 + LLToolDragAndDrop::instance().getCargoIDsCount(); // +1 for master folder + int existing_folder_count = 0; + + const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(outbox_id, mUUID); if (master_folder != NULL) { + if (model->isObjectDescendentOf(cat_id, master_folder->getUUID())) + { + // Don't use count because we're already inside the same category anyway + dragged_folder_count = 0; + } + else + { + existing_folder_count = 1; // Include the master folder in the count! + + // If we're in the drop operation as opposed to the drag without drop, we are doing a + // single category at a time so don't block based on the total amount of cargo data items + if (drop) + { + dragged_folder_count += 1; + } + else + { + // NOTE: The cargo id's count is a total of categories AND items but we err on the side of + // prevention rather than letting too many folders into the hierarchy of the outbox, + // when we're dragging the item to a new parent + dragged_folder_count += LLToolDragAndDrop::instance().getCargoIDsCount(); + } + } + + // Tally the total number of categories and items inside the master folder + LLInventoryModel::cat_array_t existing_categories; LLInventoryModel::item_array_t existing_items; - gInventory.collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE); + model->collectDescendents(master_folder->getUUID(), existing_categories, existing_items, FALSE); - existing_item_count += existing_items.count(); existing_folder_count += existing_categories.count(); + existing_item_count += existing_items.count(); + } + else + { + // Assume a single category is being dragged to the outbox since we evaluate one at a time + // when not putting them under a parent item. + dragged_folder_count += 1; } - const int nested_folder_count = existing_folder_count + descendent_categories.count(); + const int nested_folder_count = existing_folder_count + dragged_folder_count; const int nested_item_count = existing_item_count + descendent_items.count(); if (nested_folder_count > gSavedSettings.getU32("InventoryOutboxMaxFolderCount")) @@ -2031,10 +2088,8 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // //-------------------------------------------------------------------------------- - accept = is_movable - && (mUUID != cat_id) // Can't move a folder into itself - && (mUUID != inv_cat->getParentUUID()) // Avoid moves that would change nothing - && !(model->isObjectDescendentOf(mUUID, cat_id)); // Avoid circularity + accept = is_movable; + if (accept && drop) { // Look for any gestures and deactivate them @@ -2066,7 +2121,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // Recursively create links in target outfit. LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(cat_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); + model->collectDescendents(cat_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); LLAppearanceMgr::instance().linkAll(mUUID,items,NULL); } } @@ -2100,7 +2155,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else { - if (gInventory.isObjectDescendentOf(cat_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false))) + if (model->isObjectDescendentOf(cat_id, model->findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false))) { set_dad_inbox_object(cat_id); } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 6910b8eced..6338ea477c 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -626,6 +626,8 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask) void LLToolDragAndDrop::handleDeselect() { mToolTipMsg.clear(); + + LLToolTipMgr::instance().blockToolTips(); } // protected diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 18ca3033e9..6672d479a2 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -172,6 +172,9 @@ Please try logging in again in a minute.</string> <string name="TooltipOutboxTooManyFolders">Subfolder count in top-level folder exceeds 20</string> <string name="TooltipOutboxTooManyObjects">Item count in top-level folder exceeds 200</string> + <string name="TooltipDragOntoOwnChild">You can't move a folder into its child</string> + <string name="TooltipDragOntoSelf">You can't move a folder into itself</string> + <!-- tooltips for Urls --> <string name="TooltipHttpUrl">Click to view this web page</string> <string name="TooltipSLURL">Click to view this location's information</string> -- cgit v1.2.3 From 263fd1345875eb0389e2ed0a8cbeb4e458a2d007 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 5 Jan 2012 10:57:09 -0800 Subject: Removed unused code for old outbox error reporting --- .../newview/llpanelmarketplaceoutboxinventory.cpp | 99 ++-------------------- indra/newview/llpanelmarketplaceoutboxinventory.h | 26 +----- .../xui/en/widgets/outbox_folder_view_folder.xml | 10 --- 3 files changed, 8 insertions(+), 127 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.cpp b/indra/newview/llpanelmarketplaceoutboxinventory.cpp index ed1206aec8..1dd68b7758 100644 --- a/indra/newview/llpanelmarketplaceoutboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceoutboxinventory.cpp @@ -46,50 +46,6 @@ static LLDefaultChildRegistry::Register<LLOutboxInventoryPanel> r1("outbox_inven static LLDefaultChildRegistry::Register<LLOutboxFolderViewFolder> r2("outbox_folder_view_folder"); -// -// Marketplace errors -// - -enum -{ - MKTERR_NONE = 0, - - MKTERR_NOT_MERCHANT, - MKTERR_FOLDER_EMPTY, - MKTERR_UNASSOCIATED_PRODUCTS, - MKTERR_OBJECT_LIMIT, - MKTERR_FOLDER_DEPTH, - MKTERR_UNSELLABLE_ITEM, - MKTERR_INTERNAL_IMPORT, - - MKTERR_COUNT -}; - -static const std::string MARKETPLACE_ERROR_STRINGS[MKTERR_COUNT] = -{ - "NO_ERROR", - "NOT_MERCHANT_ERROR", - "FOLDER_EMPTY_ERROR", - "UNASSOCIATED_PRODUCTS_ERROR", - "OBJECT_LIMIT_ERROR", - "FOLDER_DEPTH_ERROR", - "UNSELLABLE_ITEM_FOUND", - "INTERNAL_IMPORT_ERROR", -}; - -static const std::string MARKETPLACE_ERROR_NAMES[MKTERR_COUNT] = -{ - "Marketplace Error None", - "Marketplace Error Not Merchant", - "Marketplace Error Empty Folder", - "Marketplace Error Unassociated Products", - "Marketplace Error Object Limit", - "Marketplace Error Folder Depth", - "Marketplace Error Unsellable Item", - "Marketplace Error Internal Import", -}; - - // // LLOutboxInventoryPanel Implementation // @@ -206,63 +162,18 @@ LLFolderViewItem * LLOutboxInventoryPanel::createFolderViewItem(LLInvFVBridge * LLOutboxFolderViewFolder::LLOutboxFolderViewFolder(const Params& p) : LLFolderViewFolder(p) - , LLBadgeOwner(getHandle()) - , mError(0) -{ - initBadgeParams(p.error_badge()); -} - -LLOutboxFolderViewFolder::~LLOutboxFolderViewFolder() { } -// virtual -void LLOutboxFolderViewFolder::draw() -{ - if (!badgeHasParent()) - { - addBadgeToParentPanel(); - } - - setBadgeVisibility(hasError()); - - LLFolderViewFolder::draw(); -} - -void LLOutboxFolderViewFolder::setErrorString(const std::string& errorString) -{ - S32 error_code = MKTERR_NONE; - - for (S32 i = 1; i < MKTERR_COUNT; ++i) - { - if (MARKETPLACE_ERROR_STRINGS[i] == errorString) - { - error_code = i; - break; - } - } - - setError(error_code); -} - -void LLOutboxFolderViewFolder::setError(S32 errorCode) -{ - mError = errorCode; - - if (hasError()) - { - setToolTip(LLTrans::getString(MARKETPLACE_ERROR_NAMES[mError])); - } - else - { - setToolTip(LLStringExplicit("")); - } -} - // // LLOutboxFolderViewItem Implementation // +LLOutboxFolderViewItem::LLOutboxFolderViewItem(const Params& p) + : LLFolderViewItem(p) +{ +} + BOOL LLOutboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) { return TRUE; diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.h b/indra/newview/llpanelmarketplaceoutboxinventory.h index 346680a79d..167f371f0e 100644 --- a/indra/newview/llpanelmarketplaceoutboxinventory.h +++ b/indra/newview/llpanelmarketplaceoutboxinventory.h @@ -28,7 +28,6 @@ #define LL_OUTBOXINVENTORYPANEL_H -#include "llbadgeowner.h" #include "llinventorypanel.h" #include "llfolderviewitem.h" @@ -53,41 +52,22 @@ public: }; -class LLOutboxFolderViewFolder : public LLFolderViewFolder, public LLBadgeOwner +class LLOutboxFolderViewFolder : public LLFolderViewFolder { public: struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params> { - Optional<LLBadge::Params> error_badge; - - Params() - : error_badge("error_badge") - { - } + Params() {} }; LLOutboxFolderViewFolder(const Params& p); - ~LLOutboxFolderViewFolder(); - - void draw(); - - void setErrorString(const std::string& errorString); - void setError(S32 errorCode); - - bool hasError() const { return (mError != 0); } - -protected: - S32 mError; }; class LLOutboxFolderViewItem : public LLFolderViewItem { public: - LLOutboxFolderViewItem(const Params& p) - : LLFolderViewItem(p) - { - } + LLOutboxFolderViewItem(const Params& p); // virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); diff --git a/indra/newview/skins/default/xui/en/widgets/outbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/outbox_folder_view_folder.xml index 0792996107..d19c47f54f 100644 --- a/indra/newview/skins/default/xui/en/widgets/outbox_folder_view_folder.xml +++ b/indra/newview/skins/default/xui/en/widgets/outbox_folder_view_folder.xml @@ -6,14 +6,4 @@ item_top_pad="4" selection_image="Rounded_Square" > - <error_badge - label=" " - label_offset_horiz="-1" - location="right" - padding_horiz="12.5" - padding_vert="2" - location_offset_hcenter="-23" - image="Error_Tag_Background" - image_color="Black" - /> </outbox_folder_view_folder> -- cgit v1.2.3 From 26998a5e387edca7d89159673c3dc8cd1a8d7539 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 5 Jan 2012 12:42:58 -0800 Subject: EXP-1753 FIX -- Open Merchant Outbox floater when user selects copy to Merchant Outbox context menu option in Inventory * Modified "copy to merchant outbox" and "move to merchant outbox" context menu actions to also open the merchant outbox floater * Changed context menu behavior to always preserve disabled menu items on multiselect rather than occasionally ignoring it --- indra/newview/llinventorybridge.cpp | 24 ++++++++++++------------ indra/newview/llinventorybridge.h | 3 +-- indra/newview/llinventoryfunctions.cpp | 15 ++++++++++----- 3 files changed, 23 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index c94deed5e2..3b6dad7f5c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -465,14 +465,13 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const void hide_context_entries(LLMenuGL& menu, const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries, - BOOL append) // If append is TRUE, then new enabled entries + const menuentry_vec_t &disabled_entries) // If append is TRUE, then new enabled entries { const LLView::child_list_t *list = menu.getChildList(); // For removing double separators or leading separator. Start at true so that // if the first element is a separator, it will not be shown. - BOOL is_previous_entry_separator = TRUE; + bool is_previous_entry_separator = true; for (LLView::child_list_t::const_iterator itor = list->begin(); itor != list->end(); @@ -496,6 +495,7 @@ void hide_context_entries(LLMenuGL& menu, if (*itor2 == name) { found = true; + break; } } @@ -503,9 +503,8 @@ void hide_context_entries(LLMenuGL& menu, // between two separators). if (found) { - const BOOL is_entry_separator = (dynamic_cast<LLMenuItemSeparatorGL *>(menu_item) != NULL); - if (is_entry_separator && is_previous_entry_separator) - found = false; + const bool is_entry_separator = (dynamic_cast<LLMenuItemSeparatorGL *>(menu_item) != NULL); + found = !(is_entry_separator && is_previous_entry_separator); is_previous_entry_separator = is_entry_separator; } @@ -523,15 +522,13 @@ void hide_context_entries(LLMenuGL& menu, // A bit of a hack so we can remember that some UI element explicitly set this to be visible // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); - if (append) - { - menu_item->setEnabled(TRUE); - } + for (itor2 = disabled_entries.begin(); itor2 != disabled_entries.end(); ++itor2) { if (*itor2 == name) { menu_item->setEnabled(FALSE); + break; } } } @@ -2946,7 +2943,7 @@ void LLFolderBridge::folderOptionsMenu() LLMenuGL* menup = dynamic_cast<LLMenuGL*>(mMenu.get()); if (menup) { - hide_context_entries(*menup, mItems, mDisabledItems, TRUE); + hide_context_entries(*menup, mItems, mDisabledItems); // Reposition the menu, in case we're adding items to an existing menu. menup->needsArrange(); @@ -3025,11 +3022,14 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // Not sure what the right thing is to do here. if (!isCOFFolder() && cat && (cat->getPreferredType() != LLFolderType::FT_OUTFIT)) { - if (!isInboxFolder() && !isOutboxFolder()) // don't allow creation in inbox + if (!isInboxFolder() && !isOutboxFolder()) // don't allow creation in inbox or outbox { // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694. if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat)) + { mItems.push_back(std::string("New Folder")); + } + mItems.push_back(std::string("New Script")); mItems.push_back(std::string("New Note")); mItems.push_back(std::string("New Gesture")); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 126a28f74c..447d781f48 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -648,7 +648,6 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, // are set as enabled. void hide_context_entries(LLMenuGL& menu, const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries, - BOOL append = FALSE); + const menuentry_vec_t &disabled_entries); #endif // LL_LLINVENTORYBRIDGE_H diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 6c5325620e..e8efac1ebf 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -530,6 +530,11 @@ void show_item_original(const LLUUID& item_uuid) } } +void open_outbox() +{ + LLFloaterReg::showInstance("outbox"); +} + void move_to_outbox_cb(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -588,6 +593,8 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response) parent = next_parent; } } + + open_outbox(); } } @@ -625,6 +632,8 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL dest_folder, inv_item->getName(), LLPointer<LLInventoryCallback>(NULL)); + + open_outbox(); } else { @@ -682,11 +691,7 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold copy_folder_to_outbox(category, new_folder_id, top_level_folder); } - // delete the folder if we have emptied it - //if (cat_array->empty() && item_array->empty()) - //{ - // remove_category(inventory_model, inv_cat->getUUID()); - //} + open_outbox(); } ///---------------------------------------------------------------------------- -- cgit v1.2.3 From b0db21a8ae93283acc99491b9b14c2e8f1a35395 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 5 Jan 2012 15:40:27 -0800 Subject: EXP-1754 FIX -- Search text shown in Outbox floater after marketplace synch if all items removed. * Added a setting to determine whether or not to display the standard empty inventory message. The message is on by default but turned off for the merchant outbox inventory panel. --- indra/newview/llfolderview.cpp | 5 ++-- indra/newview/llfolderview.h | 2 ++ indra/newview/llinventorypanel.cpp | 2 ++ indra/newview/llinventorypanel.h | 3 +++ .../newview/llpanelmarketplaceoutboxinventory.cpp | 31 ---------------------- .../xui/en/widgets/outbox_inventory_panel.xml | 2 +- 6 files changed, 11 insertions(+), 34 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 0af20f5de5..6cc136f58b 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -172,6 +172,7 @@ LLFolderView::Params::Params() title("title"), use_label_suffix("use_label_suffix"), allow_multiselect("allow_multiselect", true), + show_empty_message("show_empty_message", true), show_load_status("show_load_status", true), use_ellipses("use_ellipses", false) { @@ -185,6 +186,7 @@ LLFolderView::LLFolderView(const Params& p) mScrollContainer( NULL ), mPopupMenuHandle(), mAllowMultiSelect(p.allow_multiselect), + mShowEmptyMessage(p.show_empty_message), mShowFolderHierarchy(FALSE), mSourceID(p.task_id), mRenameItem( NULL ), @@ -932,7 +934,7 @@ void LLFolderView::draw() mStatusText.clear(); mStatusTextBox->setVisible( FALSE ); } - else + else if (mShowEmptyMessage) { if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) { @@ -966,7 +968,6 @@ void LLFolderView::draw() // See EXT-7564, EXT-7047. arrangeFromRoot(); } - } // skip over LLFolderViewFolder::draw since we don't want the folder icon, label, diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 8af01e9102..2da70f019c 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -75,6 +75,7 @@ public: Optional<std::string> title; Optional<bool> use_label_suffix, allow_multiselect, + show_empty_message, show_load_status, use_ellipses; @@ -282,6 +283,7 @@ protected: selected_items_t mSelectedItems; BOOL mKeyboardSelection; BOOL mAllowMultiSelect; + BOOL mShowEmptyMessage; BOOL mShowFolderHierarchy; LLUUID mSourceID; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index af1d2b8528..382569fa3a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -132,6 +132,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mAcceptsDragAndDrop(p.accepts_drag_and_drop), mAllowMultiSelect(p.allow_multi_select), mShowItemLinkOverlays(p.show_item_link_overlays), + mShowEmptyMessage(p.show_empty_message), mShowLoadStatus(p.show_load_status), mViewsInitialized(false), mInvFVBridgeBuilder(NULL) @@ -617,6 +618,7 @@ LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool u p.listener = bridge; p.use_label_suffix = useLabelSuffix; p.allow_multiselect = mAllowMultiSelect; + p.show_empty_message = mShowEmptyMessage; p.show_load_status = mShowLoadStatus; return LLUICtrlFactory::create<LLFolderView>(p); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 2a24327115..8279163762 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -84,6 +84,7 @@ public: Optional<Filter> filter; Optional<std::string> start_folder; Optional<bool> use_label_suffix; + Optional<bool> show_empty_message; Optional<bool> show_load_status; Optional<LLScrollContainer::Params> scroll; Optional<bool> accepts_drag_and_drop; @@ -96,6 +97,7 @@ public: filter("filter"), start_folder("start_folder"), use_label_suffix("use_label_suffix", true), + show_empty_message("show_empty_message", true), show_load_status("show_load_status"), scroll("scroll"), accepts_drag_and_drop("accepts_drag_and_drop") @@ -188,6 +190,7 @@ protected: BOOL mAcceptsDragAndDrop; BOOL mAllowMultiSelect; BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons + BOOL mShowEmptyMessage; BOOL mShowLoadStatus; LLFolderView* mFolderRoot; diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.cpp b/indra/newview/llpanelmarketplaceoutboxinventory.cpp index 1dd68b7758..c14a0c8379 100644 --- a/indra/newview/llpanelmarketplaceoutboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceoutboxinventory.cpp @@ -67,37 +67,6 @@ void LLOutboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& par LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); - // leslie -- temporary HACK to work around sim not creating outbox with proper system folder type - if (root_id.isNull()) - { - std::string start_folder_name(params.start_folder()); - - LLInventoryModel::cat_array_t* cats; - LLInventoryModel::item_array_t* items; - - gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items); - - if (cats) - { - for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it) - { - LLInventoryCategory* cat = *cat_it; - - if (cat->getName() == start_folder_name) - { - root_id = cat->getUUID(); - break; - } - } - } - - if (root_id == LLUUID::null) - { - llwarns << "No category found that matches outbox inventory panel start_folder: " << start_folder_name << llendl; - } - } - // leslie -- end temporary HACK - if (root_id == LLUUID::null) { llwarns << "Outbox inventory panel has no root folder!" << llendl; diff --git a/indra/newview/skins/default/xui/en/widgets/outbox_inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/outbox_inventory_panel.xml index e3f2072819..3964569da2 100644 --- a/indra/newview/skins/default/xui/en/widgets/outbox_inventory_panel.xml +++ b/indra/newview/skins/default/xui/en/widgets/outbox_inventory_panel.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<outbox_inventory_panel show_load_status="false" /> +<outbox_inventory_panel show_empty_message="false" show_load_status="false" /> -- cgit v1.2.3 From af32a74b77ffc2110de821e0159de8eb5aa0f454 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 5 Jan 2012 16:30:15 -0800 Subject: EXP-1757 FIX -- Merchant Outbox shows as empty when first opening/initializing even when populated * Updated merchant outbox floater to not wait for initialization to complete before displaying outbox inventory contents. --- indra/newview/CMakeLists.txt | 2 - indra/newview/llfloateroutbox.cpp | 13 +- indra/newview/llfloateroutbox.h | 1 + indra/newview/llpanelmarketplaceoutbox.cpp | 276 ----------------------------- indra/newview/llpanelmarketplaceoutbox.h | 91 ---------- 5 files changed, 10 insertions(+), 373 deletions(-) delete mode 100644 indra/newview/llpanelmarketplaceoutbox.cpp delete mode 100644 indra/newview/llpanelmarketplaceoutbox.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0a4874ae92..78cd33210f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -372,7 +372,6 @@ set(viewer_SOURCE_FILES llpanelmaininventory.cpp llpanelmarketplaceinbox.cpp llpanelmarketplaceinboxinventory.cpp - llpanelmarketplaceoutbox.cpp llpanelmarketplaceoutboxinventory.cpp llpanelmediasettingsgeneral.cpp llpanelmediasettingspermissions.cpp @@ -922,7 +921,6 @@ set(viewer_HEADER_FILES llpanelmaininventory.h llpanelmarketplaceinbox.h llpanelmarketplaceinboxinventory.h - llpanelmarketplaceoutbox.h llpanelmarketplaceoutboxinventory.h llpanelmediasettingsgeneral.h llpanelmediasettingspermissions.h diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 8ccebb36dc..6ecf715588 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -280,6 +280,14 @@ void LLFloaterOutbox::updateFolderCount() mOutboxItemCount = item_count; + if (!mImportBusy) + { + updateFolderCountStatus(); + } +} + +void LLFloaterOutbox::updateFolderCountStatus() +{ if (mOutboxInventoryPanel) { switch (mOutboxItemCount) @@ -304,10 +312,7 @@ void LLFloaterOutbox::updateFolderCount() void LLFloaterOutbox::updateView() { - if (!mImportBusy) - { - updateFolderCount(); - } + updateFolderCount(); if (mOutboxItemCount > 0) { diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index cc4a7207ca..6b4021807c 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -83,6 +83,7 @@ protected: void setStatusString(const std::string& statusString); void updateFolderCount(); + void updateFolderCountStatus(); void updateView(); private: diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp deleted file mode 100644 index 6c2363eb7f..0000000000 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ /dev/null @@ -1,276 +0,0 @@ -/** - * @file llpanelmarketplaceoutbox.cpp - * @brief Panel for marketplace outbox - * -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llpanelmarketplaceoutbox.h" -#include "llpanelmarketplaceoutboxinventory.h" - -#include "llappviewer.h" -#include "llbutton.h" -#include "llcoros.h" -#include "lleventcoro.h" -#include "llfloatersidepanelcontainer.h" -#include "llinventorypanel.h" -#include "llloadingindicator.h" -#include "llmarketplacefunctions.h" -#include "llnotificationsutil.h" -#include "llpanelmarketplaceinbox.h" -#include "llsdutil.h" -#include "llsidepanelinventory.h" -#include "lltimer.h" -#include "llviewernetwork.h" -#include "llagent.h" -#include "llviewermedia.h" -#include "llfolderview.h" -#include "llinventoryfunctions.h" - - -// Turn this on to get a bunch of console output for marketplace API calls, headers and status -#define DEBUG_MARKETPLACE_HTTP_API 0 - - -static LLRegisterPanelClassWrapper<LLPanelMarketplaceOutbox> t_panel_marketplace_outbox("panel_marketplace_outbox"); - -const LLPanelMarketplaceOutbox::Params& LLPanelMarketplaceOutbox::getDefaultParams() -{ - return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceOutbox>(); -} - -// protected -LLPanelMarketplaceOutbox::LLPanelMarketplaceOutbox(const Params& p) - : LLPanel(p) - , mInventoryPanel(NULL) - , mImportButton(NULL) - , mImportIndicator(NULL) - , mOutboxButton(NULL) -{ -} - -LLPanelMarketplaceOutbox::~LLPanelMarketplaceOutbox() -{ -} - -// virtual -BOOL LLPanelMarketplaceOutbox::postBuild() -{ - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceOutbox::handleLoginComplete, this)); - - LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceOutbox::onFocusReceived, this)); - - return TRUE; -} - -// DO WE NEED THIS FILE AT ALL? - -void LLPanelMarketplaceOutbox::handleLoginComplete() -{ - mImportButton = getChild<LLButton>("outbox_import_btn"); - mImportButton->setCommitCallback(boost::bind(&LLPanelMarketplaceOutbox::onImportButtonClicked, this)); - mImportButton->setEnabled(!isOutboxEmpty()); - - mImportIndicator = getChild<LLLoadingIndicator>("outbox_import_indicator"); - - mOutboxButton = getChild<LLButton>("outbox_btn"); -} - -void LLPanelMarketplaceOutbox::onFocusReceived() -{ - LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); - if (sidepanel_inventory) - { - sidepanel_inventory->clearSelections(true, true); - } -} - -void LLPanelMarketplaceOutbox::onSelectionChange() -{ - LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); - if (sidepanel_inventory) - { - sidepanel_inventory->updateVerbs(); - } -} - -LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel() -{ - LLView * outbox_inventory_placeholder = getChild<LLView>("outbox_inventory_placeholder_panel"); - LLView * outbox_inventory_parent = outbox_inventory_placeholder->getParent(); - - mInventoryPanel = - LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_outbox_inventory.xml", - outbox_inventory_parent, - LLInventoryPanel::child_registry_t::instance()); - - llassert(mInventoryPanel); - - // Reshape the inventory to the proper size - LLRect inventory_placeholder_rect = outbox_inventory_placeholder->getRect(); - mInventoryPanel->setShape(inventory_placeholder_rect); - - // Set the sort order newest to oldest - mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE); - mInventoryPanel->getFilter()->markDefault(); - - // Set selection callback for proper update of inventory status buttons - mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceOutbox::onSelectionChange, this)); - - // Set up the note to display when the outbox is empty - mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryOutboxNoItems"); - - // Hide the placeholder text - outbox_inventory_placeholder->setVisible(FALSE); - - // Set up marketplace importer - LLMarketplaceInventoryImporter::getInstance()->initialize(); - LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLPanelMarketplaceOutbox::importStatusChanged, this, _1)); - LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLPanelMarketplaceOutbox::importReportResults, this, _1, _2)); - - updateImportButtonStatus(); - - return mInventoryPanel; -} - -void LLPanelMarketplaceOutbox::importReportResults(U32 status, const LLSD& content) -{ - if (status == MarketplaceErrorCodes::IMPORT_DONE) - { - LLNotificationsUtil::add("OutboxImportComplete", LLSD::emptyMap(), LLSD::emptyMap()); - } - else if (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) - { - LLNotificationsUtil::add("OutboxImportHadErrors", LLSD::emptyMap(), LLSD::emptyMap()); - } - else - { - char status_string[16]; - sprintf(status_string, "%d", status); - - LLSD subs; - subs["ERROR_CODE"] = status_string; - - //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); - LLNotificationsUtil::add("OutboxImportFailed", LLSD::emptyMap(), LLSD::emptyMap()); - } -} - -void LLPanelMarketplaceOutbox::importStatusChanged(bool inProgress) -{ - updateImportButtonStatus(); -} - -BOOL LLPanelMarketplaceOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg) -{ - BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - - if (!handled && mInventoryPanel && mInventoryPanel->getRootFolder()) - { - handled = mInventoryPanel->getRootFolder()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); - - if (handled) - { - mInventoryPanel->getRootFolder()->setDragAndDropThisFrame(); - } - } - - return handled; -} - -bool LLPanelMarketplaceOutbox::isOutboxEmpty() const -{ - return (getTotalItemCount() == 0); -} - -void LLPanelMarketplaceOutbox::updateImportButtonStatus() -{ - if (LLMarketplaceInventoryImporter::instance().isImportInProgress()) - { - mImportButton->setVisible(false); - - mImportIndicator->setVisible(true); - mImportIndicator->reset(); - mImportIndicator->start(); - } - else - { - mImportIndicator->stop(); - mImportIndicator->setVisible(false); - - mImportButton->setVisible(true); - mImportButton->setEnabled(!isOutboxEmpty()); - } -} - -U32 LLPanelMarketplaceOutbox::getTotalItemCount() const -{ - U32 item_count = 0; - - if (mInventoryPanel) - { - const LLFolderViewFolder * outbox_folder = mInventoryPanel->getRootFolder(); - - if (outbox_folder) - { - item_count += outbox_folder->getFoldersCount(); - item_count += outbox_folder->getItemsCount(); - } - } - - return item_count; -} - -void LLPanelMarketplaceOutbox::onImportButtonClicked() -{ - LLMarketplaceInventoryImporter::instance().triggerImport(); - - // Get the import animation going - updateImportButtonStatus(); -} - -void LLPanelMarketplaceOutbox::draw() -{ - const U32 item_count = getTotalItemCount(); - const bool not_empty = (item_count > 0); - - if (not_empty) - { - std::string item_count_str = llformat("%d", item_count); - - LLStringUtil::format_map_t args; - args["[NUM]"] = item_count_str; - mOutboxButton->setLabel(getString("OutboxLabelWithArg", args)); - } - else - { - mOutboxButton->setLabel(getString("OutboxLabelNoArg")); - } - - LLPanel::draw(); -} diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h deleted file mode 100644 index 6f038118b3..0000000000 --- a/indra/newview/llpanelmarketplaceoutbox.h +++ /dev/null @@ -1,91 +0,0 @@ -/** - * @file llpanelmarketplaceoutbox.h - * @brief Panel for marketplace outbox - * -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLPANELMARKETPLACEOUTBOX_H -#define LL_LLPANELMARKETPLACEOUTBOX_H - -#include "llpanel.h" - - -class LLButton; -class LLInventoryPanel; -class LLLoadingIndicator; - - -class LLPanelMarketplaceOutbox : public LLPanel -{ -public: - - struct Params : public LLInitParam::Block<Params, LLPanel::Params> - {}; - - LOG_CLASS(LLPanelMarketplaceOutbox); - - // RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8 - static const LLPanelMarketplaceOutbox::Params& getDefaultParams(); - - LLPanelMarketplaceOutbox(const Params& p = getDefaultParams()); - ~LLPanelMarketplaceOutbox(); - - /*virtual*/ BOOL postBuild(); - - /*virtual*/ void draw(); - - LLInventoryPanel * setupInventoryPanel(); - - U32 getTotalItemCount() const; - - bool isOutboxEmpty() const; - - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg); - -protected: - void onImportButtonClicked(); - void updateImportButtonStatus(); - - void handleLoginComplete(); - void onFocusReceived(); - void onSelectionChange(); - - void importReportResults(U32 status, const LLSD& content); - void importStatusChanged(bool inProgress); - -private: - LLInventoryPanel * mInventoryPanel; - - LLButton * mImportButton; - LLLoadingIndicator * mImportIndicator; - - LLButton * mOutboxButton; -}; - - -#endif //LL_LLPANELMARKETPLACEOUTBOX_H - -- cgit v1.2.3 From 60df5e51dc977e28507b3446d649eac67556c050 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 6 Jan 2012 13:01:17 -0800 Subject: EXP-1220 GROUNDWORK -- Create context menu entry to allow import of selected item(s) * Added a context menu for "Send to Marketplace" but disabled the code to show it until we decide to move forward with this feature. * Made some progress unifying the context menu in the outbox for different types of items. (mesh, audio, etc.) --- indra/newview/llinventorybridge.cpp | 77 ++++++++++++++++++---- indra/newview/llinventorybridge.h | 4 ++ .../skins/default/xui/en/menu_inventory.xml | 8 +++ 3 files changed, 77 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3b6dad7f5c..70553ca676 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -74,6 +74,7 @@ // Marketplace outbox current disabled #define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 +#define ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU 0 #define BLOCK_WORN_ITEMS_IN_OUTBOX 1 typedef std::pair<LLUUID, LLUUID> two_uuids_t; @@ -130,6 +131,11 @@ bool isMarketplaceCopyAction(const std::string& action) return (("copy_to_outbox" == action) || ("move_to_outbox" == action)); } +bool isMarketplaceSendAction(const std::string& action) +{ + return ("send_to_marketplace" == action); +} + // +=================================================+ // | LLInvFVBridge | // +=================================================+ @@ -657,7 +663,7 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else if(isOutboxFolder()) { - items.push_back(std::string("Delete")); + addOutboxContextMenuOptions(flags, items, disabled_items); } else { @@ -734,6 +740,32 @@ void LLInvFVBridge::addOpenRightClickMenuOption(menuentry_vec_t &items) items.push_back(std::string("Open")); } +void LLInvFVBridge::addOutboxContextMenuOptions(U32 flags, + menuentry_vec_t &items, + menuentry_vec_t &disabled_items) +{ + items.push_back(std::string("Rename")); + items.push_back(std::string("Delete")); + + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Rename")); + } + +#if ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU + if (isOutboxFolderDirectParent()) + { + items.push_back(std::string("Marketplace Separator")); + items.push_back(std::string("Marketplace Send")); + + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Marketplace Send")); + } + } +#endif // ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU +} + // *TODO: remove this BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { @@ -854,6 +886,22 @@ BOOL LLInvFVBridge::isOutboxFolder() const return gInventory.isObjectDescendentOf(mUUID, outbox_id); } +BOOL LLInvFVBridge::isOutboxFolderDirectParent() const +{ + BOOL outbox_is_parent = FALSE; + + const LLInventoryCategory *cat = gInventory.getCategory(mUUID); + + if (cat) + { + const LLUUID outbox_id = getOutboxFolder(); + + outbox_is_parent = (outbox_id.notNull() && (outbox_id == cat->getParentUUID())); + } + + return outbox_is_parent; +} + const LLUUID LLInvFVBridge::getOutboxFolder() const { const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); @@ -2585,6 +2633,17 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); copy_folder_to_outbox(cat, outbox_id, cat->getUUID()); } +#if ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU + else if (isMarketplaceSendAction(action)) + { + llinfos << "Send to marketplace action!" << llendl; + + LLInventoryCategory * cat = gInventory.getCategory(mUUID); + if (!cat) return; + + send_to_marketplace(cat); + } +#endif // ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU } void LLFolderBridge::openItem() @@ -3007,13 +3066,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else if(isOutboxFolder()) { - mItems.push_back(std::string("Rename")); - mItems.push_back(std::string("Delete")); - - if ((flags & FIRST_SELECTED_ITEM) == 0) - { - mDisabledItems.push_back(std::string("Rename")); - } + addOutboxContextMenuOptions(flags, mItems, mDisabledItems); } else if(isAgentInventory()) // do not allow creating in library { @@ -3840,7 +3893,7 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else if(isOutboxFolder()) { - items.push_back(std::string("Delete")); + addOutboxContextMenuOptions(flags, items, disabled_items); } else { @@ -3916,7 +3969,7 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if (isOutboxFolder()) { - items.push_back(std::string("Delete")); + addOutboxContextMenuOptions(flags, items, disabled_items); } else { @@ -3974,7 +4027,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl; if(isOutboxFolder()) { - items.push_back(std::string("Delete")); + addOutboxContextMenuOptions(flags, items, disabled_items); } else { @@ -5540,7 +5593,7 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else if(isOutboxFolder()) { - items.push_back(std::string("Delete")); + addOutboxContextMenuOptions(flags, items, disabled_items); } else { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 447d781f48..2ab339b918 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -131,6 +131,9 @@ protected: virtual void addDeleteContextMenuOptions(menuentry_vec_t &items, menuentry_vec_t &disabled_items); virtual void addOpenRightClickMenuOption(menuentry_vec_t &items); + virtual void addOutboxContextMenuOptions(U32 flags, + menuentry_vec_t &items, + menuentry_vec_t &disabled_items); protected: LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid); @@ -144,6 +147,7 @@ protected: BOOL isCOFFolder() const; // true if COF or descendent of BOOL isInboxFolder() const; // true if COF or descendent of marketplace inbox BOOL isOutboxFolder() const; // true if COF or descendent of marketplace outbox + BOOL isOutboxFolderDirectParent() const; const LLUUID getOutboxFolder() const; virtual BOOL isItemPermissive() const; diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index fb85e5278a..31dcdfffbb 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -694,6 +694,14 @@ parameter="move_to_outbox" /> </menu_item_call> <menu_item_call + label="Send to Marketplace" + layout="topleft" + name="Marketplace Send"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="send_to_marketplace" /> + </menu_item_call> + <menu_item_call label="--no options--" layout="topleft" name="--no options--" /> -- cgit v1.2.3 From c98bf3cd509dd7bf10837713a911f9932c476e1f Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 6 Jan 2012 15:50:43 -0800 Subject: Updated InventoryOutboxMaxFolderCount to 21 to allow top level folder and 20 subfolders in outbox items --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e5bb686123..a4806e3b77 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4291,7 +4291,7 @@ <key>Type</key> <string>U32</string> <key>Value</key> - <integer>20</integer> + <integer>21</integer> </map> <key>InventoryOutboxMaxFolderDepth</key> <map> -- cgit v1.2.3 From 98a85b1bf2d7decf477d3d1076859fdeec6f1b46 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 9 Jan 2012 13:39:58 -0800 Subject: EXP-1159 FIX -- User can get No transfer items into Merchant Outbox by rezzing object from Outbox, including No Transfer item in contents, and then taking back into Inventory * Drag and drop to the 3D world is now disabled from the outbox --- indra/newview/lltooldraganddrop.cpp | 17 ++++++++++++++++- indra/newview/skins/default/xui/en/strings.xml | 21 +++++++++++---------- 2 files changed, 27 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 6338ea477c..5a4d177709 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -769,6 +769,21 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { + // Disallow drag and drop to 3D from the outbox + const LLUUID outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); + if (outbox_id.notNull()) + { + for (S32 item_index = 0; item_index < (S32)mCargoIDs.size(); item_index++) + { + if (gInventory.isObjectDescendentOf(mCargoIDs[item_index], outbox_id)) + { + *acceptance = ACCEPT_NO; + mToolTipMsg = LLTrans::getString("TooltipOutboxDragToWorld"); + return; + } + } + } + dragOrDrop3D( x, y, mask, drop, acceptance ); } } @@ -867,7 +882,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) (U32)mLastAccept, (U32)callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target)) - (hit_obj, hit_face, pick_info.mKeyMask, FALSE)); + (hit_obj, hit_face, pick_info.mKeyMask, FALSE)); } if (mDrop && ((U32)mLastAccept >= ACCEPT_YES_COPY_SINGLE)) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 20d9463186..a78f3df5b6 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -18,7 +18,7 @@ <string name="StartupClearingCache">Clearing cache...</string> <string name="StartupInitializingTextureCache">Initializing texture cache...</string> <string name="StartupInitializingVFS">Initializing VFS...</string> - <string name="StartupRequireDriverUpdate">Graphics initialization failed. Please update your graphics driver!</string> + <string name="StartupRequireDriverUpdate">Graphics initialization failed. Please update your graphics driver!</string> <!-- progress --> <string name="ProgressRestoring">Restoring...</string> @@ -35,9 +35,9 @@ <string name="LoginAttempt">Previous login attempt failed. Logging in, attempt [NUMBER]</string> <string name="LoginPrecaching">Loading world...</string> <string name="LoginInitializingBrowser">Initializing embedded web browser...</string> - <string name="LoginInitializingMultimedia">Initializing multimedia...</string> - <string name="LoginInitializingFonts">Loading fonts...</string> - <string name="LoginVerifyingCache">Verifying cache files (can take 60-90 seconds)...</string> + <string name="LoginInitializingMultimedia">Initializing multimedia...</string> + <string name="LoginInitializingFonts">Loading fonts...</string> + <string name="LoginVerifyingCache">Verifying cache files (can take 60-90 seconds)...</string> <string name="LoginProcessingResponse">Processing response...</string> <string name="LoginInitializingWorld">Initializing world...</string> <string name="LoginDecodingImages">Decoding images...</string> @@ -49,12 +49,12 @@ <string name="LoginWaitingForRegionHandshake">Waiting for region handshake...</string> <string name="LoginConnectingToRegion">Connecting to region...</string> <string name="LoginDownloadingClothing">Downloading clothing...</string> - <string name="InvalidCertificate">The server returned an invalid or corrupt certificate. Please contact the Grid administrator.</string> - <string name="CertInvalidHostname">An invalid hostname was used to access the server, please check your SLURL or Grid hostname.</string> - <string name="CertExpired">The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administrator.</string> - <string name="CertKeyUsage">The certificate returned by the server could not be used for SSL. Please contact your Grid administrator.</string> - <string name="CertBasicConstraints">Too many certificates were in the servers Certificate chain. Please contact your Grid administrator.</string> - <string name="CertInvalidSignature">The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrator.</string> + <string name="InvalidCertificate">The server returned an invalid or corrupt certificate. Please contact the Grid administrator.</string> + <string name="CertInvalidHostname">An invalid hostname was used to access the server, please check your SLURL or Grid hostname.</string> + <string name="CertExpired">The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administrator.</string> + <string name="CertKeyUsage">The certificate returned by the server could not be used for SSL. Please contact your Grid administrator.</string> + <string name="CertBasicConstraints">Too many certificates were in the servers Certificate chain. Please contact your Grid administrator.</string> + <string name="CertInvalidSignature">The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrator.</string> <string name="LoginFailedNoNetwork">Network error: Could not establish connection, please check your network connection.</string> <string name="LoginFailed">Login failed.</string> @@ -165,6 +165,7 @@ Please try logging in again in a minute.</string> <string name="TooltipMustSingleDrop">Only a single item can be dragged here</string> <string name="TooltipPrice" value="L$[AMOUNT]: "/> + <string name="TooltipOutboxDragToWorld">You can not rez items in your merchant outbox</string> <string name="TooltipOutboxNoTransfer">One or more of these objects cannot be sold or transferred.</string> <string name="TooltipOutboxNotInInventory">Your merchant outbox can only accept items directly from your inventory</string> <string name="TooltipOutboxWorn">You can not put items you are wearing into your merchant outbox</string> -- cgit v1.2.3 From 7bc4085eb2275c84eb482ba1f5b8426f1ac6ba5f Mon Sep 17 00:00:00 2001 From: Jonathan Yap <none@none> Date: Tue, 10 Jan 2012 12:03:20 -0500 Subject: STORM-1788 Clarify wording in About Land->Access and tooltips (and similar Estate panel) --- indra/newview/llfloaterland.cpp | 21 ------------ .../skins/default/xui/en/floater_about_land.xml | 38 ++++++---------------- .../skins/default/xui/en/panel_region_estate.xml | 10 +++--- 3 files changed, 15 insertions(+), 54 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index b13a9aab88..05c4903cba 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2475,27 +2475,6 @@ void LLPanelLandAccess::refresh() mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); } } - - LLCheckBoxWithTBAcess* maturity_checkbox = (LLCheckBoxWithTBAcess*) getChild<LLCheckBoxCtrl>( "public_access"); - LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); - if(region) - { - LLTextBox* maturity_textbox = maturity_checkbox->getTextBox(); - insert_maturity_into_textbox(maturity_textbox, gFloaterView->getParentFloater(this), getString("allow_public_access")); - maturity_checkbox->reshape(maturity_checkbox->getRect().getWidth(), maturity_checkbox->getRect().getHeight(), FALSE); - } - else - { - std::string maturity_string = getString("allow_public_access"); - size_t maturity_pos = maturity_string.find(MATURITY); - - if (maturity_pos != std::string::npos) - { - maturity_string.replace(maturity_pos, MATURITY.length(), std::string("")); - } - - maturity_checkbox->setLabel(maturity_string); - } if(parcel->getRegionDenyAnonymousOverride()) { diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 4772f744ea..0c741f3831 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1955,36 +1955,18 @@ Only large parcels can be listed in search. name="access_estate_defined"> (Defined by the Estate) </panel.string> - <panel.string - name="allow_public_access"> - Allow Public Access ([MATURITY]) (Note: Unchecking this will create ban lines) - </panel.string> <panel.string name="estate_override"> One or more of these options is set at the estate level </panel.string> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left="10" - name="Limit access to this parcel to:" - text_color="White" - top="10" - width="400"> - Access To This Parcel - </text> <check_box follows="top|left" height="16" layout="topleft" - left_delta="0" + left="8" name="public_access" - top_pad="5" - label_text.valign="center" - label_text.v_pad="-2" + label="Allow Public Access (Unchecking this will create ban lines)" + top_pad="10" width="278" /> <text type="string" @@ -1994,28 +1976,28 @@ Only large parcels can be listed in search. layout="topleft" left_delta="20" name="Only Allow" - top="49" + top="30" width="325"> - Restrict Access to Residents verified by: + Allow access only to Residents who: </text> <check_box follows="top|left" height="16" - label="Payment Information on File [ESTATE_PAYMENT_LIMIT]" + label="Have payment Information on File [ESTATE_PAYMENT_LIMIT]" layout="topleft" left_delta="0" name="limit_payment" - tool_tip="Ban unidentified Residents." + tool_tip="Residents must have payment information on file to access this parcel. See the [SUPPORT_SITE] for more information." top_pad="4" width="278" /> <check_box follows="top|left" height="16" - label="Age Verification [ESTATE_AGE_LIMIT]" + label="Have been age-verified [ESTATE_AGE_LIMIT]" layout="topleft" left_delta="0" name="limit_age_verified" - tool_tip="Ban Residents who have not verified their age. See the [SUPPORT_SITE] for more information." + tool_tip="Residents must be age verified to access this parcel. See the [SUPPORT_SITE] for more information." top_pad="4" width="278" /> <check_box @@ -2025,7 +2007,7 @@ Only large parcels can be listed in search. left="8" name="GroupCheck" tool_tip="Set group in the General tab." - top="109" + top="89" width="278" /> <check_box enabled="false" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index 6b28639a77..bfd796a62b 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -134,26 +134,26 @@ name="Only Allow" top_delta="-30" width="278"> - Restrict Access to accounts verified by: + Allow access only to Residents who: </text> <check_box follows="top|left" height="16" - label="Payment Information on File" + label="Have payment information on file" layout="topleft" left_delta="0" name="limit_payment" - tool_tip="Ban unidentified Residents" + tool_tip="Residents must have payment information on file to access this estate. See the [SUPPORT_SITE] for more information." top_pad="2" width="278" /> <check_box follows="top|left" height="16" - label="Age Verification" + label="Have been age-verified" layout="topleft" left_delta="0" name="limit_age_verified" - tool_tip="Ban Residents who have not verified their age. See the [SUPPORT_SITE] for more information." + tool_tip="Residents must be age verified to access this estate. See the [SUPPORT_SITE] for more information." top_pad="2" width="278" /> -- cgit v1.2.3 From 16112a32e83c6d67acfffdbe339fa7b7b9dd4be3 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine <vsavchuk@productengine.com> Date: Tue, 10 Jan 2012 20:56:52 +0200 Subject: EXP-1783 FIXED Duplicated/missing IDs in menu_viewer.xml --- indra/newview/skins/default/xui/da/menu_viewer.xml | 68 ++++------ indra/newview/skins/default/xui/de/menu_viewer.xml | 72 ++++------ indra/newview/skins/default/xui/en/menu_viewer.xml | 147 ++++----------------- indra/newview/skins/default/xui/es/menu_viewer.xml | 70 ++++------ indra/newview/skins/default/xui/fr/menu_viewer.xml | 72 ++++------ indra/newview/skins/default/xui/it/menu_viewer.xml | 70 ++++------ indra/newview/skins/default/xui/ja/menu_viewer.xml | 72 ++++------ indra/newview/skins/default/xui/pl/menu_viewer.xml | 68 ++++------ indra/newview/skins/default/xui/pt/menu_viewer.xml | 70 ++++------ indra/newview/skins/default/xui/ru/menu_viewer.xml | 72 ++++------ indra/newview/skins/default/xui/tr/menu_viewer.xml | 72 ++++------ indra/newview/skins/default/xui/zh/menu_viewer.xml | 70 ++++------ 12 files changed, 336 insertions(+), 587 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index ba18306686..d695cd1f89 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -20,8 +20,6 @@ <menu_item_call label="Væk" name="Set Away"/> <menu_item_call label="Optaget" name="Set Busy"/> </menu> - <menu_item_call label="Anmod om administrator status" name="Request Admin Options"/> - <menu_item_call label="Stop administrator status" name="Leave Admin Options"/> <menu_item_call label="Afslut [APP_NAME]" name="Quit"/> </menu> <menu label="Kommunikér" name="Communicate"> @@ -36,11 +34,10 @@ <menu_item_check label="Søg" name="Search"/> <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Opret landemærke for dette sted" name="Create Landmark Here"/> - <menu label="Profil for sted" name="Land"> - <menu_item_call label="Profil for sted" name="Place Profile"/> - <menu_item_call label="Om land" name="About Land"/> - <menu_item_call label="Region/Estate" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Profil for sted" name="Place Profile"/> + <menu_item_call label="Om land" name="About Land"/> + <menu_item_call label="Region/Estate" name="Region/Estate"/> <menu_item_call label="Køb dette land" name="Buy Land"/> <menu_item_call label="Mit land" name="My Land"/> <menu label="Vis" name="LandShow"> @@ -56,7 +53,7 @@ </menu> <menu_item_call label="Teleport hjem" name="Teleport Home"/> <menu_item_call label="Sæt dette sted som 'Hjem'" name="Set Home to Here"/> - <menu label="Sol" name="Environment Settings"> + <menu label="Sol" name="Sun"> <menu_item_call label="Solopgang" name="Sunrise"/> <menu_item_call label="Middag" name="Noon"/> <menu_item_call label="Solnedgang" name="Sunset"/> @@ -155,22 +152,22 @@ <menu_item_check label="Vis muse-sigte" name="ShowCrosshairs"/> </menu> <menu label="Gengivelsestyper" name="Rendering Types"> - <menu_item_check label="Simpel" name="Simple"/> - <menu_item_check label="Alpha" name="Alpha"/> - <menu_item_check label="Træer" name="Tree"/> - <menu_item_check label="Avatarer" name="Character"/> - <menu_item_check label="Surface Patch" name="Surface Patch"/> - <menu_item_check label="Himmel" name="Sky"/> - <menu_item_check label="Vand" name="Water"/> - <menu_item_check label="Jord" name="Ground"/> - <menu_item_check label="Volume" name="Volume"/> - <menu_item_check label="Græs" name="Grass"/> - <menu_item_check label="Skyer" name="Clouds"/> - <menu_item_check label="Partikler" name="Particles"/> - <menu_item_check label="Bump" name="Bump"/> + <menu_item_check label="Simpel" name="Rendering Type Simple"/> + <menu_item_check label="Alpha" name="Rendering Type Alpha"/> + <menu_item_check label="Træer" name="Rendering Type Tree"/> + <menu_item_check label="Avatarer" name="Rendering Type Character"/> + <menu_item_check label="Surface Patch" name="Rendering Type Surface Patch"/> + <menu_item_check label="Himmel" name="Rendering Type Sky"/> + <menu_item_check label="Vand" name="Rendering Type Water"/> + <menu_item_check label="Jord" name="Rendering Type Ground"/> + <menu_item_check label="Volume" name="Rendering Type Volume"/> + <menu_item_check label="Græs" name="Rendering Type Grass"/> + <menu_item_check label="Skyer" name="Rendering Type Clouds"/> + <menu_item_check label="Partikler" name="Rendering Type Particles"/> + <menu_item_check label="Bump" name="Rendering Type Bump"/> </menu> <menu label="Gengivelsesegenskaber" name="Rendering Features"> - <menu_item_check label="UI" name="UI"/> + <menu_item_check label="UI" name="ToggleUI"/> <menu_item_check label="Valgte" name="Selected"/> <menu_item_check label="Fremhævede" name="Highlighted"/> <menu_item_check label="Dynamiske teksturer" name="Dynamic Textures"/> @@ -182,10 +179,7 @@ <menu_item_call label="Tøm gruppe cache" name="ClearGroupCache"/> <menu_item_check label="Muse udjævning" name="Mouse Smoothing"/> <menu label="Shortcuts" name="Shortcuts"> - <menu_item_call label="Billede (L$[COST])..." name="Upload Image"/> - <menu_item_check label="Søg" name="Search"/> <menu_item_call label="Frigør taster" name="Release Keys"/> - <menu_item_call label="Sæt UI størrelse til standard" name="Set UI Size to Default"/> <menu_item_check label="Vis avanceret menu (gammel genvej)" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Luk vindue" name="Close Window"/> <menu_item_call label="Luk alle vinduer" name="Close All Windows"/> @@ -194,13 +188,6 @@ <menu_item_check label=""Joystick Flycam"" name="Joystick Flycam"/> <menu_item_call label="Nulstil udsyn" name="Reset View"/> <menu_item_call label="Se på den sidste der chattede" name="Look at Last Chatter"/> - <menu label="Vælg byggeværktøj" name="Select Tool"> - <menu_item_call label="Fokuseringsværktøj" name="Focus"/> - <menu_item_call label="Flyt værktøj" name="Move"/> - <menu_item_call label="Redigeringsværktøj" name="Edit"/> - <menu_item_call label="Opret værktøj" name="Create"/> - <menu_item_call label="Land værktøj" name="Land"/> - </menu> <menu_item_call label="Zoom ind" name="Zoom In"/> <menu_item_call label="Zoom standard" name="Zoom Default"/> <menu_item_call label="Zoom ud" name="Zoom Out"/> @@ -276,9 +263,8 @@ <menu_item_call label="Mist en netværkspakke" name="Drop a Packet"/> </menu> <menu_item_call label="Stød, skub & slag" name="Bumps, Pushes &amp; Hits"/> - <menu label="Verden" name="World"> + <menu label="Verden" name="DevelopWorld"> <menu_item_check label="Vælg anden sol end region" name="Sim Sun Override"/> - <menu_item_check label="Pejlelys blink effekt" name="Cheesy Beacon"/> <menu_item_check label="Fast vejr" name="Fixed Weather"/> <menu_item_call label="Dump Region Object Cache" name="Dump Region Object Cache"/> </menu> @@ -300,11 +286,11 @@ </menu> <menu label="Avatar" name="Character"> <menu label="Grab Baked Texture" name="Grab Baked Texture"> - <menu_item_call label="Iris" name="Iris"/> - <menu_item_call label="Hovede" name="Head"/> - <menu_item_call label="Overkrop" name="Upper Body"/> - <menu_item_call label="Underkrop" name="Lower Body"/> - <menu_item_call label="Nederdel" name="Skirt"/> + <menu_item_call label="Iris" name="Grab Iris"/> + <menu_item_call label="Hovede" name="Grab Head"/> + <menu_item_call label="Overkrop" name="Grab Upper Body"/> + <menu_item_call label="Underkrop" name="Grab Lower Body"/> + <menu_item_call label="Nederdel" name="Grab Skirt"/> </menu> <menu label="Avatar tests" name="Character Tests"> <menu_item_call label="Skift avatar geometri" name="Toggle Character Geometry"/> @@ -326,8 +312,8 @@ <menu_item_check label="Vis administrationsmenu" name="View Admin Options"/> </menu> <menu label="Administrér" name="Admin"> - <menu label="Object"> - <menu_item_call label="Tag kopi" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Tag kopi" name="Admin Take Copy"/> <menu_item_call label="Gennemtving ejer til mig" name="Force Owner To Me"/> <menu_item_call label="Gennemtving ejer tolerance" name="Force Owner Permissive"/> <menu_item_call label="Slet" name="Delete"/> diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 90b2cfbc41..2341293804 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -19,8 +19,6 @@ <menu_item_call label="Abwesend" name="Set Away"/> <menu_item_call label="Beschäftigt" name="Set Busy"/> </menu> - <menu_item_call label="Admin-Status anfordern" name="Request Admin Options"/> - <menu_item_call label="Admin-Status verlassen" name="Leave Admin Options"/> <menu_item_call label="L$ kaufen" name="Buy and Sell L$"/> <menu_item_call label="Einstellungen..." name="Preferences"/> <menu_item_call label="Symbolleisten..." name="Toolbars"/> @@ -40,11 +38,10 @@ <menu_item_check label="Suchen" name="Search"/> <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Landmarke für diesen Ort setzen" name="Create Landmark Here"/> - <menu label="Ortsprofil" name="Land"> - <menu_item_call label="Ortsprofil" name="Place Profile"/> - <menu_item_call label="Land-Info" name="About Land"/> - <menu_item_call label="Region/Grundbesitz" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Ortsprofil" name="Place Profile"/> + <menu_item_call label="Land-Info" name="About Land"/> + <menu_item_call label="Region/Grundbesitz" name="Region/Estate"/> <menu_item_call label="Dieses Land kaufen" name="Buy Land"/> <menu_item_call label="Mein Land" name="My Land"/> <menu label="Anzeigen" name="LandShow"> @@ -60,14 +57,14 @@ </menu> <menu_item_call label="Teleport nach Hause" name="Teleport Home"/> <menu_item_call label="Hier als Zuhause wählen" name="Set Home to Here"/> - <menu label="Sonne" name="Environment Settings"> + <menu label="Sonne" name="Sun"> <menu_item_call label="Sonnenaufgang" name="Sunrise"/> <menu_item_call label="Mittag" name="Noon"/> <menu_item_call label="Sonnenuntergang" name="Sunset"/> <menu_item_call label="Mitternacht" name="Midnight"/> </menu> <menu label="Umgebungs-Editor" name="Enviroment Editor"> - <menu_item_call label="Umgebungseinstellungen..." name="Enviroment Settings"/> + <menu_item_call label="Umgebungseinstellungen..." name="Environment Settings"/> <menu label="Wasser-Voreinstellungen" name="Water Presets"> <menu_item_call label="Neue Voreinstellung..." name="new_water_preset"/> <menu_item_call label="Voreinstellung bearbeiten..." name="edit_water_preset"/> @@ -173,22 +170,22 @@ <menu_item_check label="Fadenkreuz für Mouselook anzeigen" name="ShowCrosshairs"/> </menu> <menu label="Darstellungstypen" name="Rendering Types"> - <menu_item_check label="Einfach" name="Simple"/> - <menu_item_check label="Alpha" name="Alpha"/> - <menu_item_check label="Baum" name="Tree"/> - <menu_item_check label="Avatare" name="Character"/> - <menu_item_check label="Flächenpatch" name="Surface Patch"/> - <menu_item_check label="Himmel" name="Sky"/> - <menu_item_check label="Wasser" name="Water"/> - <menu_item_check label="Boden" name="Ground"/> - <menu_item_check label="Volumen" name="Volume"/> - <menu_item_check label="Gras" name="Grass"/> - <menu_item_check label="Wolken" name="Clouds"/> - <menu_item_check label="Partikel" name="Particles"/> - <menu_item_check label="Unebenheiten" name="Bump"/> + <menu_item_check label="Einfach" name="Rendering Type Simple"/> + <menu_item_check label="Alpha" name="Rendering Type Alpha"/> + <menu_item_check label="Baum" name="Rendering Type Tree"/> + <menu_item_check label="Avatare" name="Rendering Type Character"/> + <menu_item_check label="Flächenpatch" name="Rendering Type Surface Patch"/> + <menu_item_check label="Himmel" name="Rendering Type Sky"/> + <menu_item_check label="Wasser" name="Rendering Type Water"/> + <menu_item_check label="Boden" name="Rendering Type Ground"/> + <menu_item_check label="Volumen" name="Rendering Type Volume"/> + <menu_item_check label="Gras" name="Rendering Type Grass"/> + <menu_item_check label="Wolken" name="Rendering Type Clouds"/> + <menu_item_check label="Partikel" name="Rendering Type Particles"/> + <menu_item_check label="Unebenheiten" name="Rendering Type Bump"/> </menu> <menu label="Rendering-Eigenschaften" name="Rendering Features"> - <menu_item_check label="UI" name="UI"/> + <menu_item_check label="UI" name="ToggleUI"/> <menu_item_check label="Ausgewählt" name="Selected"/> <menu_item_check label="Farblich hervorgehoben" name="Highlighted"/> <menu_item_check label="Dynamische Texturen" name="Dynamic Textures"/> @@ -201,10 +198,7 @@ <menu_item_call label="Gruppen-Cache löschen" name="ClearGroupCache"/> <menu_item_check label="Weiche Mausbewegung" name="Mouse Smoothing"/> <menu label="Tastaturkürzel" name="Shortcuts"> - <menu_item_call label="Bild ([COST] L$)..." name="Upload Image"/> - <menu_item_check label="Suchen" name="Search"/> <menu_item_call label="Tasten freigeben" name="Release Keys"/> - <menu_item_call label="UI-Größe auf Standard setzen" name="Set UI Size to Default"/> <menu_item_check label="Erweitert-Menü anzeigen - veraltetet" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Fenster schließen" name="Close Window"/> <menu_item_call label="Alle Fenster schließen" name="Close All Windows"/> @@ -213,13 +207,6 @@ <menu_item_check label="Joystick-Flycam" name="Joystick Flycam"/> <menu_item_call label="Ansicht zurücksetzen" name="Reset View"/> <menu_item_call label="Letzten Chatter ansehen" name="Look at Last Chatter"/> - <menu label="Bauwerkzeug auswählen" name="Select Tool"> - <menu_item_call label="Fokus-Werkzeug" name="Focus"/> - <menu_item_call label="Werkzeug „Bewegen“" name="Move"/> - <menu_item_call label="Bearbeiten" name="Edit"/> - <menu_item_call label="Werkzeug „Erstellen"" name="Create"/> - <menu_item_call label="Land-Werkzeug" name="Land"/> - </menu> <menu_item_call label="Hineinzoomen" name="Zoom In"/> <menu_item_call label="Zoom-Standard" name="Zoom Default"/> <menu_item_call label="Wegzoomen" name="Zoom Out"/> @@ -333,9 +320,8 @@ <menu_item_call label="Aufnahme starten" name="Start Record"/> <menu_item_call label="Aufnahme stoppen" name="Stop Record"/> </menu> - <menu label="Welt" name="World"> + <menu label="Welt" name="DevelopWorld"> <menu_item_check label="Sonnen-Override für Sim" name="Sim Sun Override"/> - <menu_item_check label="Pulsierender Strahl" name="Cheesy Beacon"/> <menu_item_check label="Festgelegtes Wetter" name="Fixed Weather"/> <menu_item_call label="Regionsobjekt-Cache ausgeben" name="Dump Region Object Cache"/> </menu> @@ -367,11 +353,11 @@ </menu> <menu label="Avatar" name="Character"> <menu label="Geladene Textur nehmen" name="Grab Baked Texture"> - <menu_item_call label="Iris" name="Iris"/> - <menu_item_call label="Kopf" name="Head"/> - <menu_item_call label="Oberkörper" name="Upper Body"/> - <menu_item_call label="Unterkörper" name="Lower Body"/> - <menu_item_call label="Rock" name="Skirt"/> + <menu_item_call label="Iris" name="Grab Iris"/> + <menu_item_call label="Kopf" name="Grab Head"/> + <menu_item_call label="Oberkörper" name="Grab Upper Body"/> + <menu_item_call label="Unterkörper" name="Grab Lower Body"/> + <menu_item_call label="Rock" name="Grab Skirt"/> </menu> <menu label="Avatar-Tests" name="Character Tests"> <menu_item_call label="Aussehen als XML speichern" name="Appearance To XML"/> @@ -406,8 +392,8 @@ <menu_item_check label="Admin-Menü anzeigen" name="View Admin Options"/> </menu> <menu label="Admin" name="Admin"> - <menu label="Object"> - <menu_item_call label="Kopie nehmen" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Kopie nehmen" name="Admin Take Copy"/> <menu_item_call label="Besitzer zu mir zwingen" name="Force Owner To Me"/> <menu_item_call label="Erlaubnis des Besitzers erzwingen" name="Force Owner Permissive"/> <menu_item_call label="Löschen" name="Delete"/> @@ -443,7 +429,7 @@ <menu_item_call label="Physik" name="Physics"/> <menu_item_call label="Alle Kleider" name="All Clothes"/> </menu> - <menu label="Hilfe" name="Help"> + <menu label="Hilfe" name="DeprecatedHelp"> <menu_item_call label="Offizielles Linden-Blog" name="Official Linden Blog"/> <menu_item_call label="Scripting-Portal" name="Scripting Portal"/> <menu label="Fehlermeldungen" name="Bug Reporting"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 7d0ab33b66..3767560044 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -118,7 +118,7 @@ </menu_item_call> <menu_item_call label="Walk / run / fly..." - name="Stop Animating My Avatar"> + name="Walk / run / fly"> <menu_item_call.on_click function="Floater.ToggleOrBringToFront" parameter="moveview" /> @@ -144,23 +144,6 @@ </menu_item_call> </menu> - <menu_item_call - label="Request Admin Status" - name="Request Admin Options" - shortcut="control|alt|G" - visible="false"> - <menu_item_call.on_click - function="Advanced.RequestAdminStatus" /> - </menu_item_call> - <menu_item_call - label="Leave Admin Status" - name="Leave Admin Options" - shortcut="control|alt|shift|G" - visible="false"> - <menu_item_call.on_click - function="Advanced.LeaveAdminStatus" /> - </menu_item_call> - <menu_item_separator/> <menu_item_call @@ -525,7 +508,7 @@ <menu create_jump_keys="true" label="Sun" - name="Environment Settings" + name="Sun" tear_off="true"> <menu_item_call label="Sunrise" @@ -1452,7 +1435,7 @@ tear_off="true"> <menu_item_check label="Simple" - name="Simple" + name="Rendering Type Simple" shortcut="control|alt|shift|1"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1463,7 +1446,7 @@ </menu_item_check> <menu_item_check label="Alpha" - name="Alpha" + name="Rendering Type Alpha" shortcut="control|alt|shift|2"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1474,7 +1457,7 @@ </menu_item_check> <menu_item_check label="Tree" - name="Tree" + name="Rendering Type Tree" shortcut="control|alt|shift|3"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1485,7 +1468,7 @@ </menu_item_check> <menu_item_check label="Avatars" - name="Character" + name="Rendering Type Character" shortcut="control|alt|shift|4"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1496,7 +1479,7 @@ </menu_item_check> <menu_item_check label="Surface Patch" - name="Surface Patch" + name="Rendering Type Surface Patch" shortcut="control|alt|shift|5"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1507,7 +1490,7 @@ </menu_item_check> <menu_item_check label="Sky" - name="Sky" + name="Rendering Type Sky" shortcut="control|alt|shift|6"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1518,7 +1501,7 @@ </menu_item_check> <menu_item_check label="Water" - name="Water" + name="Rendering Type Water" shortcut="control|alt|shift|7"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1529,7 +1512,7 @@ </menu_item_check> <menu_item_check label="Ground" - name="Ground" + name="Rendering Type Ground" shortcut="control|alt|shift|8"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1540,7 +1523,7 @@ </menu_item_check> <menu_item_check label="Volume" - name="Volume" + name="Rendering Type Volume" shortcut="control|alt|shift|9"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1551,7 +1534,7 @@ </menu_item_check> <menu_item_check label="Grass" - name="Grass" + name="Rendering Type Grass" shortcut="control|alt|shift|0"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1562,7 +1545,7 @@ </menu_item_check> <menu_item_check label="Clouds" - name="Clouds" + name="Rendering Type Clouds" shortcut="control|alt|shift|-"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1573,7 +1556,7 @@ </menu_item_check> <menu_item_check label="Particles" - name="Particles" + name="Rendering Type Particles" shortcut="control|alt|shift|="> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1584,7 +1567,7 @@ </menu_item_check> <menu_item_check label="Bump" - name="Bump" + name="Rendering Type Bump" shortcut="control|alt|shift|\"> <menu_item_check.on_check function="Advanced.CheckRenderType" @@ -1601,7 +1584,7 @@ tear_off="true"> <menu_item_check label="UI" - name="UI" + name="ToggleUI" shortcut="control|alt|F1"> <menu_item_check.on_check function="Advanced.CheckFeature" @@ -1734,28 +1717,6 @@ name="Shortcuts" tear_off="true" visible="false"> - <menu_item_call - label="Image (L$[COST])..." - name="Upload Image" - shortcut="control|U"> - <menu_item_call.on_click - function="File.UploadImage" - parameter="" /> - <menu_item_call.on_enable - function="File.EnableUpload" /> - </menu_item_call> - <menu_item_check - label="Search" - name="Search" - shortcut="control|F"> - <menu_item_check.on_check - function="Floater.Visible" - parameter="search" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="search" /> - </menu_item_check> - <!-- This second, alternative shortcut for Show Advanced Menu is for backward compatibility. The main shortcut has been changed so it's Linux-friendly, where the old shortcut is typically eaten by the window manager. --> <menu_item_check label="Show Advanced Menu - legacy shortcut" @@ -1842,55 +1803,6 @@ <menu_item_separator/> - <menu - create_jump_keys="true" - label="Select Build Tool" - name="Select Tool" - tear_off="true"> - <menu_item_call - label="Focus Tool" - name="Focus" - shortcut="control|1"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="focus" /> - </menu_item_call> - <menu_item_call - label="Move Tool" - name="Move" - shortcut="control|2"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="move" /> - </menu_item_call> - <menu_item_call - label="Edit Tool" - name="Edit" - shortcut="control|3"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="edit" /> - </menu_item_call> - <menu_item_call - label="Create Tool" - name="Create" - shortcut="control|4"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="create" /> - </menu_item_call> - <menu_item_call - label="Land Tool" - name="Land" - shortcut="control|5"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="land" /> - </menu_item_call> - </menu> - - <menu_item_separator/> - <menu_item_call label="Zoom In" name="Zoom In" @@ -2853,7 +2765,7 @@ <menu create_jump_keys="true" label="World" - name="World" + name="DevelopWorld" tear_off="true"> <menu_item_check label="Sim Sun Override" @@ -2865,16 +2777,6 @@ function="ToggleControl" parameter="SkyOverrideSimSunPosition" /> </menu_item_check> - <menu_item_check - label="Cheesy Beacon" - name="Cheesy Beacon"> - <menu_item_check.on_check - function="CheckControl" - parameter="CheesyBeacon" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="CheesyBeacon" /> - </menu_item_check> <menu_item_check label="Fixed Weather" name="Fixed Weather"> @@ -3099,7 +3001,7 @@ tear_off="true"> <menu_item_call label="Iris" - name="Iris"> + name="Grab Iris"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" parameter="iris" /> @@ -3109,7 +3011,7 @@ </menu_item_call> <menu_item_call label="Head" - name="Head"> + name="Grab Head"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" parameter="head" /> @@ -3119,7 +3021,7 @@ </menu_item_call> <menu_item_call label="Upper Body" - name="Upper Body"> + name="Grab Upper Body"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" parameter="upper" /> @@ -3129,7 +3031,7 @@ </menu_item_call> <menu_item_call label="Lower Body" - name="Lower Body"> + name="Grab Lower Body"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" parameter="lower" /> @@ -3139,7 +3041,7 @@ </menu_item_call> <menu_item_call label="Skirt" - name="Skirt"> + name="Grab Skirt"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" parameter="skirt" /> @@ -3407,10 +3309,11 @@ <menu create_jump_keys="true" label="Object" + name="AdminObject" tear_off="true"> <menu_item_call label="Take Copy" - name="Take Copy" + name="Admin Take Copy" shortcut="control|alt|shift|O"> <menu_item_call.on_click function="Admin.ForceTakeCopy" /> @@ -3679,7 +3582,7 @@ <menu create_jump_keys="true" label="Help" - name="Help" + name="DeprecatedHelp" tear_off="true"> <menu_item_call label="Official Linden Blog" diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index f5cc2b9389..635ed58a6f 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -19,8 +19,6 @@ <menu_item_call label="Ausente" name="Set Away"/> <menu_item_call label="Ocupado" name="Set Busy"/> </menu> - <menu_item_call label="Solicitar estatus de Administrador" name="Request Admin Options"/> - <menu_item_call label="Dejar el estatus de Administrador" name="Leave Admin Options"/> <menu_item_call label="Comprar L$" name="Buy and Sell L$"/> <menu_item_call label="Preferencias..." name="Preferences"/> <menu_item_call label="Barras de herramientas..." name="Toolbars"/> @@ -40,11 +38,10 @@ <menu_item_check label="Buscar" name="Search"/> <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Crear un hito de este sitio" name="Create Landmark Here"/> - <menu label="Perfil del lugar" name="Land"> - <menu_item_call label="Perfil del lugar" name="Place Profile"/> - <menu_item_call label="Acerca del terreno" name="About Land"/> - <menu_item_call label="Región/Estado" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Perfil del lugar" name="Place Profile"/> + <menu_item_call label="Acerca del terreno" name="About Land"/> + <menu_item_call label="Región/Estado" name="Region/Estate"/> <menu_item_call label="Comprar este terreno" name="Buy Land"/> <menu_item_call label="Mi terreno" name="My Land"/> <menu label="Mostrar" name="LandShow"> @@ -60,14 +57,14 @@ </menu> <menu_item_call label="Teleportar a la Base" name="Teleport Home"/> <menu_item_call label="Fijar mi Base aquí" name="Set Home to Here"/> - <menu label="Sol" name="Environment Settings"> + <menu label="Sol" name="Sun"> <menu_item_call label="Amanecer" name="Sunrise"/> <menu_item_call label="Mediodía" name="Noon"/> <menu_item_call label="Atardecer" name="Sunset"/> <menu_item_call label="Medianoche" name="Midnight"/> </menu> <menu label="Editor de entorno" name="Enviroment Editor"> - <menu_item_call label="Configuración de entorno..." name="Enviroment Settings"/> + <menu_item_call label="Configuración de entorno..." name="Environment Settings"/> <menu label="Agua predefinida" name="Water Presets"> <menu_item_call label="Nuevo predefinido..." name="new_water_preset"/> <menu_item_call label="Editar predefinido..." name="edit_water_preset"/> @@ -173,22 +170,22 @@ <menu_item_check label="Mostrar el Punto de Mira en la vista subjetiva" name="ShowCrosshairs"/> </menu> <menu label="Objetos representados" name="Rendering Types"> - <menu_item_check label="Simple" name="Simple"/> - <menu_item_check label="Alfa" name="Alpha"/> - <menu_item_check label="Árbol" name="Tree"/> - <menu_item_check label="Avatares" name="Character"/> - <menu_item_check label="Parche de superficie" name="Surface Patch"/> - <menu_item_check label="Cielo" name="Sky"/> - <menu_item_check label="Agua" name="Water"/> - <menu_item_check label="Terreno" name="Ground"/> - <menu_item_check label="volumen" name="Volume"/> - <menu_item_check label="Hierba" name="Grass"/> - <menu_item_check label="Nubes" name="Clouds"/> - <menu_item_check label="Partículas" name="Particles"/> - <menu_item_check label="Efectos de relieve" name="Bump"/> + <menu_item_check label="Simple" name="Rendering Type Simple"/> + <menu_item_check label="Alfa" name="Rendering Type Alpha"/> + <menu_item_check label="Árbol" name="Rendering Type Tree"/> + <menu_item_check label="Avatares" name="Rendering Type Character"/> + <menu_item_check label="Parche de superficie" name="Rendering Type Surface Patch"/> + <menu_item_check label="Cielo" name="Rendering Type Sky"/> + <menu_item_check label="Agua" name="Rendering Type Water"/> + <menu_item_check label="Terreno" name="Rendering Type Ground"/> + <menu_item_check label="volumen" name="Rendering Type Volume"/> + <menu_item_check label="Hierba" name="Rendering Type Grass"/> + <menu_item_check label="Nubes" name="Rendering Type Clouds"/> + <menu_item_check label="Partículas" name="Rendering Type Particles"/> + <menu_item_check label="Efectos de relieve" name="Rendering Type Bump"/> </menu> <menu label="Rasgos renderizados" name="Rendering Features"> - <menu_item_check label="UI" name="UI"/> + <menu_item_check label="UI" name="ToggleUI"/> <menu_item_check label="Seleccionado" name="Selected"/> <menu_item_check label="Realzados" name="Highlighted"/> <menu_item_check label="Texturas dinámicas" name="Dynamic Textures"/> @@ -200,10 +197,7 @@ <menu_item_call label="Vaciar la caché de grupo" name="ClearGroupCache"/> <menu_item_check label="Vista subjetiva suavizada" name="Mouse Smoothing"/> <menu label="Atajos de teclado" name="Shortcuts"> - <menu_item_call label="Imagen ([COST] L$)..." name="Upload Image"/> - <menu_item_check label="Buscar" name="Search"/> <menu_item_call label="Recuperar las teclas" name="Release Keys"/> - <menu_item_call label="Interfaz en el tamaño predeterminado" name="Set UI Size to Default"/> <menu_item_check label="Mostrar el menú Avanzado - acceso directo antiguo" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Cerrar la ventana" name="Close Window"/> <menu_item_call label="Cerrar todas las ventanas" name="Close All Windows"/> @@ -212,13 +206,6 @@ <menu_item_check label="Flycam del joystick" name="Joystick Flycam"/> <menu_item_call label="Volver a la vista por defecto" name="Reset View"/> <menu_item_call label="Mirar al último que habló" name="Look at Last Chatter"/> - <menu label="Seleccionar la herramienta de construcción" name="Select Tool"> - <menu_item_call label="Herramienta Visión" name="Focus"/> - <menu_item_call label="Herramienta Mover" name="Move"/> - <menu_item_call label="Herramienta Editar" name="Edit"/> - <menu_item_call label="Herramienta Crear" name="Create"/> - <menu_item_call label="Herramienta Terreno" name="Land"/> - </menu> <menu_item_call label="Acercar el zoom" name="Zoom In"/> <menu_item_call label="Zoom por defecto" name="Zoom Default"/> <menu_item_call label="Alejar el zoom" name="Zoom Out"/> @@ -296,9 +283,8 @@ <menu_item_call label="Drop a Packet" name="Drop a Packet"/> </menu> <menu_item_call label="Bumps, Pushes & Hits" name="Bumps, Pushes &amp; Hits"/> - <menu label="World" name="World"> + <menu label="World" name="DevelopWorld"> <menu_item_check label="Region Sun Override" name="Sim Sun Override"/> - <menu_item_check label="Beacon flashing effect" name="Cheesy Beacon"/> <menu_item_check label="Fixed Weather" name="Fixed Weather"/> <menu_item_call label="Dump Region Object Cache" name="Dump Region Object Cache"/> </menu> @@ -320,11 +306,11 @@ </menu> <menu label="Avatar" name="Character"> <menu label="Grab Baked Texture" name="Grab Baked Texture"> - <menu_item_call label="Iris" name="Iris"/> - <menu_item_call label="Head" name="Head"/> - <menu_item_call label="Upper Body" name="Upper Body"/> - <menu_item_call label="Lower Body" name="Lower Body"/> - <menu_item_call label="Skirt" name="Skirt"/> + <menu_item_call label="Iris" name="Grab Iris"/> + <menu_item_call label="Head" name="Grab Head"/> + <menu_item_call label="Upper Body" name="Grab Upper Body"/> + <menu_item_call label="Lower Body" name="Grab Lower Body"/> + <menu_item_call label="GrabSkirt" name="Grab Skirt"/> </menu> <menu label="Character Tests" name="Character Tests"> <menu_item_call label="Toggle Character Geometry" name="Toggle Character Geometry"/> @@ -346,8 +332,8 @@ <menu_item_check label="Show Admin Menu" name="View Admin Options"/> </menu> <menu label="Admin" name="Admin"> - <menu label="Object"> - <menu_item_call label="Coger una copia" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Coger una copia" name="Admin Take Copy"/> <menu_item_call label="Force Owner To Me" name="Force Owner To Me"/> <menu_item_call label="Force Owner Permissive" name="Force Owner Permissive"/> <menu_item_call label="Eliminar" name="Delete"/> diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index d3b48639e0..1640026c9d 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -19,8 +19,6 @@ <menu_item_call label="Absent" name="Set Away"/> <menu_item_call label="Occupé" name="Set Busy"/> </menu> - <menu_item_call label="Demander le statut Admin" name="Request Admin Options"/> - <menu_item_call label="Quitter le statut Admin" name="Leave Admin Options"/> <menu_item_call label="Acheter des L$" name="Buy and Sell L$"/> <menu_item_call label="Préférences..." name="Preferences"/> <menu_item_call label="Barres d'outils..." name="Toolbars"/> @@ -40,11 +38,10 @@ <menu_item_check label="Rechercher" name="Search"/> <menu_item_call label="Photo" name="Take Snapshot"/> <menu_item_call label="Créer un repère pour ce lieu" name="Create Landmark Here"/> - <menu label="Profil du lieu" name="Land"> - <menu_item_call label="Profil du lieu" name="Place Profile"/> - <menu_item_call label="À propos du terrain" name="About Land"/> - <menu_item_call label="Région/Domaine" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Profil du lieu" name="Place Profile"/> + <menu_item_call label="À propos du terrain" name="About Land"/> + <menu_item_call label="Région/Domaine" name="Region/Estate"/> <menu_item_call label="Acheter ce terrain" name="Buy Land"/> <menu_item_call label="Mes terrains" name="My Land"/> <menu label="Afficher" name="LandShow"> @@ -60,14 +57,14 @@ </menu> <menu_item_call label="Me téléporter chez moi" name="Teleport Home"/> <menu_item_call label="Définir le domicile ici" name="Set Home to Here"/> - <menu label="Luminosité" name="Environment Settings"> + <menu label="Luminosité" name="Sun"> <menu_item_call label="Aube" name="Sunrise"/> <menu_item_call label="Milieu de journée" name="Noon"/> <menu_item_call label="Coucher de soleil" name="Sunset"/> <menu_item_call label="Minuit" name="Midnight"/> </menu> <menu label="Éditeur d'environnement" name="Enviroment Editor"> - <menu_item_call label="Paramètres d'environnement..." name="Enviroment Settings"/> + <menu_item_call label="Paramètres d'environnement..." name="Environment Settings"/> <menu label="Préréglages de l'eau" name="Water Presets"> <menu_item_call label="Nouveau préréglage..." name="new_water_preset"/> <menu_item_call label="Modifier un préréglage..." name="edit_water_preset"/> @@ -173,22 +170,22 @@ <menu_item_check label="Afficher le réticule de la vue subjective" name="ShowCrosshairs"/> </menu> <menu label="Types de rendu" name="Rendering Types"> - <menu_item_check label="Simple" name="Simple"/> - <menu_item_check label="Alpha" name="Alpha"/> - <menu_item_check label="Arbre" name="Tree"/> - <menu_item_check label="Avatars" name="Character"/> - <menu_item_check label="Patch de surface" name="Surface Patch"/> - <menu_item_check label="Ciel" name="Sky"/> - <menu_item_check label="Eau" name="Water"/> - <menu_item_check label="Sol" name="Ground"/> - <menu_item_check label="Volume" name="Volume"/> - <menu_item_check label="Herbe" name="Grass"/> - <menu_item_check label="Nuages" name="Clouds"/> - <menu_item_check label="Particules" name="Particles"/> - <menu_item_check label="Placage de relief" name="Bump"/> + <menu_item_check label="Simple" name="Rendering Type Simple"/> + <menu_item_check label="Alpha" name="Rendering Type Alpha"/> + <menu_item_check label="Arbre" name="Rendering Type Tree"/> + <menu_item_check label="Avatars" name="Rendering Type Character"/> + <menu_item_check label="Patch de surface" name="Rendering Type Surface Patch"/> + <menu_item_check label="Ciel" name="Rendering Type Sky"/> + <menu_item_check label="Eau" name="Rendering Type Water"/> + <menu_item_check label="Sol" name="Rendering Type Ground"/> + <menu_item_check label="Volume" name="Rendering Type Volume"/> + <menu_item_check label="Herbe" name="Rendering Type Grass"/> + <menu_item_check label="Nuages" name="Rendering Type Clouds"/> + <menu_item_check label="Particules" name="Rendering Type Particles"/> + <menu_item_check label="Placage de relief" name="Rendering Type Bump"/> </menu> <menu label="Fonctionnalités de rendu" name="Rendering Features"> - <menu_item_check label="Interface" name="UI"/> + <menu_item_check label="Interface" name="ToggleUI"/> <menu_item_check label="Sélection" name="Selected"/> <menu_item_check label="En surbrillance" name="Highlighted"/> <menu_item_check label="Textures dynamiques" name="Dynamic Textures"/> @@ -201,10 +198,7 @@ <menu_item_call label="Effacer le cache du groupe" name="ClearGroupCache"/> <menu_item_check label="Effet de lissage de la souris" name="Mouse Smoothing"/> <menu label="Raccourcis" name="Shortcuts"> - <menu_item_call label="Image ([COST] L$)..." name="Upload Image"/> - <menu_item_check label="Rechercher" name="Search"/> <menu_item_call label="Relâcher les touches" name="Release Keys"/> - <menu_item_call label="Taille de l'interface par défaut" name="Set UI Size to Default"/> <menu_item_check label="Afficher le menu Avancé - raccourci existant" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Fermer la fenêtre" name="Close Window"/> <menu_item_call label="Fermer toutes les fenêtres" name="Close All Windows"/> @@ -213,13 +207,6 @@ <menu_item_check label="Joystick Flycam" name="Joystick Flycam"/> <menu_item_call label="Réinitialiser la vue" name="Reset View"/> <menu_item_call label="Regarder la dernière conversation" name="Look at Last Chatter"/> - <menu label="Sélectionner un outil de construction" name="Select Tool"> - <menu_item_call label="Outil de mise au point" name="Focus"/> - <menu_item_call label="Outil de déplacement" name="Move"/> - <menu_item_call label="Outil de modification" name="Edit"/> - <menu_item_call label="Outil de création" name="Create"/> - <menu_item_call label="Outil Terrain" name="Land"/> - </menu> <menu_item_call label="Zoomer en avant" name="Zoom In"/> <menu_item_call label="Zoom par défaut" name="Zoom Default"/> <menu_item_call label="Zoomer en arrière" name="Zoom Out"/> @@ -333,9 +320,8 @@ <menu_item_call label="Commencer l'enregistrement" name="Start Record"/> <menu_item_call label="Arrêter l'enregistrement" name="Stop Record"/> </menu> - <menu label="Monde" name="World"> + <menu label="Monde" name="DevelopWorld"> <menu_item_check label="Ignorer les paramètres du soleil de la sim" name="Sim Sun Override"/> - <menu_item_check label="Balise animée" name="Cheesy Beacon"/> <menu_item_check label="Météo fixe" name="Fixed Weather"/> <menu_item_call label="Vidage de cache d'objet de la région" name="Dump Region Object Cache"/> </menu> @@ -367,11 +353,11 @@ </menu> <menu label="Avatar" name="Character"> <menu label="Récupérer la texture fixée" name="Grab Baked Texture"> - <menu_item_call label="Iris" name="Iris"/> - <menu_item_call label="Tête" name="Head"/> - <menu_item_call label="Haut du corps" name="Upper Body"/> - <menu_item_call label="Bas du corps" name="Lower Body"/> - <menu_item_call label="Jupe" name="Skirt"/> + <menu_item_call label="Iris" name="Grab Iris"/> + <menu_item_call label="Tête" name="Grab Head"/> + <menu_item_call label="Haut du corps" name="Grab Upper Body"/> + <menu_item_call label="Bas du corps" name="Grab Lower Body"/> + <menu_item_call label="Jupe" name="Grab Skirt"/> </menu> <menu label="Tests personnages" name="Character Tests"> <menu_item_call label="Apparence dans XML" name="Appearance To XML"/> @@ -406,8 +392,8 @@ <menu_item_check label="Afficher le menu Admin" name="View Admin Options"/> </menu> <menu label="Admin" name="Admin"> - <menu label="Object"> - <menu_item_call label="Prendre une copie" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Prendre une copie" name="Admin Take Copy"/> <menu_item_call label="Téléporter le propriétaire" name="Force Owner To Me"/> <menu_item_call label="Forcer la permission du propriétaire" name="Force Owner Permissive"/> <menu_item_call label="Supprimer" name="Delete"/> @@ -443,7 +429,7 @@ <menu_item_call label="Propriétés physiques" name="Physics"/> <menu_item_call label="Tous les habits" name="All Clothes"/> </menu> - <menu label="Aide" name="Help"> + <menu label="Aide" name="DeprecatedHelp"> <menu_item_call label="Blog officiel des Linden" name="Official Linden Blog"/> <menu_item_call label="Portail d'écriture de scripts" name="Scripting Portal"/> <menu label="Signaler des bugs" name="Bug Reporting"> diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index 8792a0fc19..2cccd4aa9f 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -19,8 +19,6 @@ <menu_item_call label="Assente" name="Set Away"/> <menu_item_call label="Non disponibile" name="Set Busy"/> </menu> - <menu_item_call label="Richiedi diritti Admin" name="Request Admin Options"/> - <menu_item_call label="Lascia stato Admin" name="Leave Admin Options"/> <menu_item_call label="Compra L$" name="Buy and Sell L$"/> <menu_item_call label="Preferenze..." name="Preferences"/> <menu_item_call label="Barre strumenti..." name="Toolbars"/> @@ -40,11 +38,10 @@ <menu_item_check label="Cerca" name="Search"/> <menu_item_call label="Istantanea" name="Take Snapshot"/> <menu_item_call label="Crea punto di riferimento per questo luogo" name="Create Landmark Here"/> - <menu label="Profilo del luogo" name="Land"> - <menu_item_call label="Profilo del luogo" name="Place Profile"/> - <menu_item_call label="Informazioni sui terreni" name="About Land"/> - <menu_item_call label="Regione/proprietà immobiliare" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Profilo del luogo" name="Place Profile"/> + <menu_item_call label="Informazioni sui terreni" name="About Land"/> + <menu_item_call label="Regione/proprietà immobiliare" name="Region/Estate"/> <menu_item_call label="Acquista questo terreno" name="Buy Land"/> <menu_item_call label="Il mio terreno" name="My Land"/> <menu label="Mostra" name="LandShow"> @@ -60,14 +57,14 @@ </menu> <menu_item_call label="Teleport a Casa" name="Teleport Home"/> <menu_item_call label="Imposta come Casa mia" name="Set Home to Here"/> - <menu label="Sole" name="Environment Settings"> + <menu label="Sole" name="Sun"> <menu_item_call label="Alba" name="Sunrise"/> <menu_item_call label="Mezzogiorno" name="Noon"/> <menu_item_call label="Tramonto" name="Sunset"/> <menu_item_call label="Mezzanotte" name="Midnight"/> </menu> <menu label="Editor ambiente" name="Enviroment Editor"> - <menu_item_call label="Impostazioni ambiente..." name="Enviroment Settings"/> + <menu_item_call label="Impostazioni ambiente..." name="Environment Settings"/> <menu label="Valori predefiniti acqua" name="Water Presets"> <menu_item_call label="Nuovo valore predefinito..." name="new_water_preset"/> <menu_item_call label="Modifica valori predefiniti..." name="edit_water_preset"/> @@ -173,22 +170,22 @@ <menu_item_check label="Mostra mirino visuale soggettiva" name="ShowCrosshairs"/> </menu> <menu label="Modalità di rendering" name="Rendering Types"> - <menu_item_check label="Semplice" name="Simple"/> - <menu_item_check label="Alpha (Trasparenza)" name="Alpha"/> - <menu_item_check label="Albero" name="Tree"/> - <menu_item_check label="Avatar" name="Character"/> - <menu_item_check label="Superficie chiusa" name="Surface Patch"/> - <menu_item_check label="Cielo" name="Sky"/> - <menu_item_check label="Acqua" name="Water"/> - <menu_item_check label="Suolo" name="Ground"/> - <menu_item_check label="Volume" name="Volume"/> - <menu_item_check label="Erba" name="Grass"/> - <menu_item_check label="Nuvole" name="Clouds"/> - <menu_item_check label="Particelle" name="Particles"/> - <menu_item_check label="Urti" name="Bump"/> + <menu_item_check label="Semplice" name="Rendering Type Simple"/> + <menu_item_check label="Alpha (Trasparenza)" name="Rendering Type Alpha"/> + <menu_item_check label="Albero" name="Rendering Type Tree"/> + <menu_item_check label="Avatar" name="Rendering Type Character"/> + <menu_item_check label="Superficie chiusa" name="Rendering Type Surface Patch"/> + <menu_item_check label="Cielo" name="Rendering Type Sky"/> + <menu_item_check label="Acqua" name="Rendering Type Water"/> + <menu_item_check label="Suolo" name="Rendering Type Ground"/> + <menu_item_check label="Volume" name="Rendering Type Volume"/> + <menu_item_check label="Erba" name="Rendering Type Grass"/> + <menu_item_check label="Nuvole" name="Rendering Type Clouds"/> + <menu_item_check label="Particelle" name="Rendering Type Particles"/> + <menu_item_check label="Urti" name="Rendering Type Bump"/> </menu> <menu label="Caratteristiche di rendering" name="Rendering Features"> - <menu_item_check label="Interfaccia utente" name="UI"/> + <menu_item_check label="Interfaccia utente" name="ToggleUI"/> <menu_item_check label="Selezionati" name="Selected"/> <menu_item_check label="Evidenziato" name="Highlighted"/> <menu_item_check label="Texture dinamiche" name="Dynamic Textures"/> @@ -200,10 +197,7 @@ <menu_item_call label="Pulisci cache di gruppo" name="ClearGroupCache"/> <menu_item_check label="Fluidità mouse" name="Mouse Smoothing"/> <menu label="Scorciatoie" name="Shortcuts"> - <menu_item_call label="Immagine ([COST]L$)..." name="Upload Image"/> - <menu_item_check label="Cerca" name="Search"/> <menu_item_call label="Rilascia tasti" name="Release Keys"/> - <menu_item_call label="Imposta dimensioni dell'interfaccia sui valori predefiniti" name="Set UI Size to Default"/> <menu_item_check label="Mostra menu Avanzato - tasti di scelta rapida esistenti" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Chiudi finestra" name="Close Window"/> <menu_item_call label="Chiudi tutte le finestre" name="Close All Windows"/> @@ -212,13 +206,6 @@ <menu_item_check label="Joystick Flycam" name="Joystick Flycam"/> <menu_item_call label="Reimposta vista" name="Reset View"/> <menu_item_call label="Guarda l'ultima conversazione" name="Look at Last Chatter"/> - <menu label="Seleziona strumento di costruzione" name="Select Tool"> - <menu_item_call label="Strumento Ingrandisci" name="Focus"/> - <menu_item_call label="Strumento Movimento" name="Move"/> - <menu_item_call label="Strumento Modifica" name="Edit"/> - <menu_item_call label="Strumento Crea" name="Create"/> - <menu_item_call label="Strumento Terreno" name="Land"/> - </menu> <menu_item_call label="Zoom avanti" name="Zoom In"/> <menu_item_call label="Zoom predefinito" name="Zoom Default"/> <menu_item_call label="Zoom indietro" name="Zoom Out"/> @@ -296,9 +283,8 @@ <menu_item_call label="Lascia un pacchetto" name="Drop a Packet"/> </menu> <menu_item_call label="Urti, spinte e contatti" name="Bumps, Pushes &amp; Hits"/> - <menu label="Mondo" name="World"> + <menu label="Mondo" name="DevelopWorld"> <menu_item_check label="Esclusione al sole della regione" name="Sim Sun Override"/> - <menu_item_check label="Effetto marcatore lampeggiante" name="Cheesy Beacon"/> <menu_item_check label="Clima fisso" name="Fixed Weather"/> <menu_item_call label="Dump della cache oggetti regione" name="Dump Region Object Cache"/> </menu> @@ -320,11 +306,11 @@ </menu> <menu label="Avatar" name="Character"> <menu label="Grab Baked Texture" name="Grab Baked Texture"> - <menu_item_call label="Iride" name="Iris"/> - <menu_item_call label="Testa" name="Head"/> - <menu_item_call label="Parte superiore del corpo" name="Upper Body"/> - <menu_item_call label="Parte inferiore del corpo" name="Lower Body"/> - <menu_item_call label="Gonna" name="Skirt"/> + <menu_item_call label="Iride" name="Grab Iris"/> + <menu_item_call label="Testa" name="Grab Head"/> + <menu_item_call label="Parte superiore del corpo" name="Grab Upper Body"/> + <menu_item_call label="Parte inferiore del corpo" name="Grab Lower Body"/> + <menu_item_call label="Gonna" name="Grab Skirt"/> </menu> <menu label="Test personaggio" name="Character Tests"> <menu_item_call label="Alterna la geometria dei personaggi" name="Toggle Character Geometry"/> @@ -346,8 +332,8 @@ <menu_item_check label="Mostra menu Admin" name="View Admin Options"/> </menu> <menu label="Admin" name="Admin"> - <menu label="Object"> - <menu_item_call label="Prendi copia" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Prendi copia" name="Admin Take Copy"/> <menu_item_call label="Rendimi proprietario" name="Force Owner To Me"/> <menu_item_call label="Forza permesso proprietario" name="Force Owner Permissive"/> <menu_item_call label="Elimina" name="Delete"/> diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 125e9bb226..1dc25791d3 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -19,8 +19,6 @@ <menu_item_call label="一時退席中" name="Set Away"/> <menu_item_call label="取り込み中" name="Set Busy"/> </menu> - <menu_item_call label="管理者権限のリクエスト" name="Request Admin Options"/> - <menu_item_call label="管理者ステータス解除" name="Leave Admin Options"/> <menu_item_call label="L$ の購入" name="Buy and Sell L$"/> <menu_item_call label="環境設定..." name="Preferences"/> <menu_item_call label="ツールバー..." name="Toolbars"/> @@ -40,11 +38,10 @@ <menu_item_check label="検索" name="Search"/> <menu_item_call label="スナップショット" name="Take Snapshot"/> <menu_item_call label="現在地をランドマーク" name="Create Landmark Here"/> - <menu label="場所のプロフィール" name="Land"> - <menu_item_call label="場所のプロフィール" name="Place Profile"/> - <menu_item_call label="土地情報" name="About Land"/> - <menu_item_call label="地域 / 不動産" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="場所のプロフィール" name="Place Profile"/> + <menu_item_call label="土地情報" name="About Land"/> + <menu_item_call label="地域 / 不動産" name="Region/Estate"/> <menu_item_call label="この土地を購入" name="Buy Land"/> <menu_item_call label="自分の土地" name="My Land"/> <menu label="表示" name="LandShow"> @@ -60,14 +57,14 @@ </menu> <menu_item_call label="ホームにテレポート" name="Teleport Home"/> <menu_item_call label="現在地をホームに設定" name="Set Home to Here"/> - <menu label="太陽" name="Environment Settings"> + <menu label="太陽" name="Sun"> <menu_item_call label="日の出" name="Sunrise"/> <menu_item_call label="正午" name="Noon"/> <menu_item_call label="日没" name="Sunset"/> <menu_item_call label="深夜" name="Midnight"/> </menu> <menu label="自然環境エディター" name="Enviroment Editor"> - <menu_item_call label="環境の設定..." name="Enviroment Settings"/> + <menu_item_call label="環境の設定..." name="Environment Settings"/> <menu label="水の事前設定" name="Water Presets"> <menu_item_call label="新しい事前設定..." name="new_water_preset"/> <menu_item_call label="事前設定を編集..." name="edit_water_preset"/> @@ -173,22 +170,22 @@ <menu_item_check label="一人称視点のときに十字線を表示する" name="ShowCrosshairs"/> </menu> <menu label="レンダリング(種類)" name="Rendering Types"> - <menu_item_check label="シンプル" name="Simple"/> - <menu_item_check label="アルファ" name="Alpha"/> - <menu_item_check label="木" name="Tree"/> - <menu_item_check label="アバター" name="Character"/> - <menu_item_check label="サーフェスパッチ" name="Surface Patch"/> - <menu_item_check label="空" name="Sky"/> - <menu_item_check label="水" name="Water"/> - <menu_item_check label="地面" name="Ground"/> - <menu_item_check label="ボリューム" name="Volume"/> - <menu_item_check label="草" name="Grass"/> - <menu_item_check label="雲" name="Clouds"/> - <menu_item_check label="パーティクル" name="Particles"/> - <menu_item_check label="衝突" name="Bump"/> + <menu_item_check label="シンプル" name="Rendering Type Simple"/> + <menu_item_check label="アルファ" name="Rendering Type Alpha"/> + <menu_item_check label="木" name="Rendering Type Tree"/> + <menu_item_check label="アバター" name="Rendering Type Character"/> + <menu_item_check label="サーフェスパッチ" name="Rendering Type Surface Patch"/> + <menu_item_check label="空" name="Rendering Type Sky"/> + <menu_item_check label="水" name="Rendering Type Water"/> + <menu_item_check label="地面" name="Rendering Type Ground"/> + <menu_item_check label="ボリューム" name="Rendering Type Volume"/> + <menu_item_check label="草" name="Rendering Type Grass"/> + <menu_item_check label="雲" name="Rendering Type Clouds"/> + <menu_item_check label="パーティクル" name="Rendering Type Particles"/> + <menu_item_check label="衝突" name="Rendering Type Bump"/> </menu> <menu label="レンダリング(機能)" name="Rendering Features"> - <menu_item_check label="UI" name="UI"/> + <menu_item_check label="UI" name="ToggleUI"/> <menu_item_check label="選択済" name="Selected"/> <menu_item_check label="ハイライト" name="Highlighted"/> <menu_item_check label="ダイナミックテクスチャ" name="Dynamic Textures"/> @@ -201,10 +198,7 @@ <menu_item_call label="グループキャッシュのクリア" name="ClearGroupCache"/> <menu_item_check label="マウスの平滑化" name="Mouse Smoothing"/> <menu label="ショートカット" name="Shortcuts"> - <menu_item_call label="画像 (L$ [COST] )..." name="Upload Image"/> - <menu_item_check label="検索" name="Search"/> <menu_item_call label="キーをリリース" name="Release Keys"/> - <menu_item_call label="UI のサイズをデフォルトに設定する" name="Set UI Size to Default"/> <menu_item_check label="アドバンスメニューを表示 - レガシーのショートカット" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="ウィンドウを閉じる" name="Close Window"/> <menu_item_call label="全てのウィンドウを閉じる" name="Close All Windows"/> @@ -213,13 +207,6 @@ <menu_item_check label="ジョイスティックフライカム" name="Joystick Flycam"/> <menu_item_call label="表示をリセットする" name="Reset View"/> <menu_item_call label="最後の発言者を見る" name="Look at Last Chatter"/> - <menu label="制作ツールを選択する" name="Select Tool"> - <menu_item_call label="焦点ツール" name="Focus"/> - <menu_item_call label="移動ツール" name="Move"/> - <menu_item_call label="編集ツール" name="Edit"/> - <menu_item_call label="作成ツール" name="Create"/> - <menu_item_call label="土地ツール" name="Land"/> - </menu> <menu_item_call label="ズームイン" name="Zoom In"/> <menu_item_call label="ズーム(デフォルト)" name="Zoom Default"/> <menu_item_call label="ズームアウト" name="Zoom Out"/> @@ -333,9 +320,8 @@ <menu_item_call label="記録開始" name="Start Record"/> <menu_item_call label="記録停止" name="Stop Record"/> </menu> - <menu label="世界" name="World"> + <menu label="世界" name="DevelopWorld"> <menu_item_check label="シムの太陽の設定を無視する" name="Sim Sun Override"/> - <menu_item_check label="ビーコンを強調表示する" name="Cheesy Beacon"/> <menu_item_check label="固定された天気" name="Fixed Weather"/> <menu_item_call label="リージョンオブジェクトのキャッシュをダンプする" name="Dump Region Object Cache"/> </menu> @@ -367,11 +353,11 @@ </menu> <menu label="アバター" name="Character"> <menu label="ベークドテクスチャを取得する" name="Grab Baked Texture"> - <menu_item_call label="瞳" name="Iris"/> - <menu_item_call label="頭" name="Head"/> - <menu_item_call label="上半身" name="Upper Body"/> - <menu_item_call label="下半身" name="Lower Body"/> - <menu_item_call label="スカート" name="Skirt"/> + <menu_item_call label="瞳" name="Grab Iris"/> + <menu_item_call label="頭" name="Grab Head"/> + <menu_item_call label="上半身" name="Grab Upper Body"/> + <menu_item_call label="下半身" name="Grab Lower Body"/> + <menu_item_call label="スカート" name="Grab Skirt"/> </menu> <menu label="キャラクターテスト" name="Character Tests"> <menu_item_call label="容姿を XML に保存する" name="Appearance To XML"/> @@ -406,8 +392,8 @@ <menu_item_check label="管理者メニューを表示する" name="View Admin Options"/> </menu> <menu label="管理者" name="Admin"> - <menu label="Object"> - <menu_item_call label="コピーを取る" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="コピーを取る" name="Admin Take Copy"/> <menu_item_call label="私を所有者にする" name="Force Owner To Me"/> <menu_item_call label="所有者権限を実行する" name="Force Owner Permissive"/> <menu_item_call label="削除" name="Delete"/> @@ -443,7 +429,7 @@ <menu_item_call label="物理作用" name="Physics"/> <menu_item_call label="すべての衣類" name="All Clothes"/> </menu> - <menu label="ヘルプ" name="Help"> + <menu label="ヘルプ" name="DeprecatedHelp"> <menu_item_call label="リンデン公式ブログ" name="Official Linden Blog"/> <menu_item_call label="スクリプトポータル" name="Scripting Portal"/> <menu label="バグの報告" name="Bug Reporting"> diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index c072ea9b5a..24c961fa26 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -20,8 +20,6 @@ <menu_item_call label="Tryb oddalenia" name="Set Away"/> <menu_item_call label="Tryb pracy" name="Set Busy"/> </menu> - <menu_item_call label="Zażądaj statusu administratora" name="Request Admin Options"/> - <menu_item_call label="Wyłącz atatus administratora" name="Leave Admin Options"/> <menu_item_call label="Wyłącz [APP_NAME]" name="Quit"/> </menu> <menu label="Komunikacja" name="Communicate"> @@ -36,11 +34,10 @@ <menu_item_check label="Szukaj" name="Search"/> <menu_item_call label="Zrób zdjęcie" name="Take Snapshot"/> <menu_item_call label="Zapamiętaj to miejsce (LM)" name="Create Landmark Here"/> - <menu label="Miejsce" name="Land"> - <menu_item_call label="Profil miejsca" name="Place Profile"/> - <menu_item_call label="O posiadłości" name="About Land"/> - <menu_item_call label="Region/Majątek" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Profil miejsca" name="Place Profile"/> + <menu_item_call label="O posiadłości" name="About Land"/> + <menu_item_call label="Region/Majątek" name="Region/Estate"/> <menu_item_call label="Kup posiadłość" name="Buy Land"/> <menu_item_call label="Moje posiadłości" name="My Land"/> <menu label="Pokaż" name="LandShow"> @@ -56,7 +53,7 @@ </menu> <menu_item_call label="Teleportuj do Miejsca Startu" name="Teleport Home"/> <menu_item_call label="Ustaw Miejsce Startu" name="Set Home to Here"/> - <menu label="Słońce" name="Environment Settings"> + <menu label="Słońce" name="Sun"> <menu_item_call label="Wschód Słońca" name="Sunrise"/> <menu_item_call label="Południe" name="Noon"/> <menu_item_call label="Zachód Słońca" name="Sunset"/> @@ -153,22 +150,22 @@ <menu_item_check label="Pokaż celownik myszki" name="ShowCrosshairs"/> </menu> <menu label="Rodzaje renderowania" name="Rendering Types"> - <menu_item_check label="Podstawowe" name="Simple"/> - <menu_item_check label="Maska alpha" name="Alpha"/> - <menu_item_check label="Drzewo" name="Tree"/> - <menu_item_check label="Awatary" name="Character"/> - <menu_item_check label="Płaszczyzna powierzchni" name="SurfacePath"/> - <menu_item_check label="Niebo" name="Sky"/> - <menu_item_check label="Woda" name="Water"/> - <menu_item_check label="Ziemia" name="Ground"/> - <menu_item_check label="Głośność" name="Volume"/> - <menu_item_check label="Trawa" name="Grass"/> - <menu_item_check label="Chmury" name="Clouds"/> - <menu_item_check label="Cząsteczki" name="Particles"/> - <menu_item_check label="Zderzenie" name="Bump"/> + <menu_item_check label="Podstawowe" name="Rendering Type Simple"/> + <menu_item_check label="Maska alpha" name="Rendering Type Alpha"/> + <menu_item_check label="Drzewo" name="Rendering Type Tree"/> + <menu_item_check label="Awatary" name="Rendering Type Character"/> + <menu_item_check label="Płaszczyzna powierzchni" name="Rendering Type Surface Patch"/> + <menu_item_check label="Niebo" name="Rendering Type Sky"/> + <menu_item_check label="Woda" name="Rendering Type Water"/> + <menu_item_check label="Ziemia" name="Rendering Type Ground"/> + <menu_item_check label="Głośność" name="Rendering Type Volume"/> + <menu_item_check label="Trawa" name="Rendering Type Grass"/> + <menu_item_check label="Chmury" name="Rendering Type Clouds"/> + <menu_item_check label="Cząsteczki" name="Rendering Type Particles"/> + <menu_item_check label="Zderzenie" name="Rendering Type Bump"/> </menu> <menu label="Opcje renderowania" name="Rendering Features"> - <menu_item_check label="UI" name="UI"/> + <menu_item_check label="UI" name="ToggleUI"/> <menu_item_check label="Zaznaczone" name="Selected"/> <menu_item_check label="Podświetlenie" name="Highlighted"/> <menu_item_check label="Tekstury dynamiczne" name="Dynamic Textures"/> @@ -180,10 +177,7 @@ <menu_item_call label="Wyczyść bufor danych grupy" name="ClearGroupCache"/> <menu_item_check label="Wygładzanie ruchu myszki" name="Mouse Smoothing"/> <menu label="Skróty" name="Shortcuts"> - <menu_item_call label="Obraz (L$[COST])..." name="Upload Image"/> - <menu_item_check label="Szukaj" name="Search"/> <menu_item_call label="Zwolnij klawisze" name="Release Keys"/> - <menu_item_call label="Domyślne ustawienia rozmiaru interfejsu" name="Set UI Size to Default"/> <menu_item_check label="Pokaż menu Zaawansowane - skrót" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Zamknij okno" name="Close Window"/> <menu_item_call label="Zamknij wszystkie okna" name="Close All Windows"/> @@ -192,13 +186,6 @@ <menu_item_check label="Wolna kamera" name="Joystick Flycam"/> <menu_item_call label="Reset widoku" name="Reset View"/> <menu_item_call label="Zobacz ostatniego rozmówcę" name="Look at Last Chatter"/> - <menu label="Wybierz narzędzie budowania" name="Select Tool"> - <menu_item_call label="Narzędzie ogniskowej" name="Focus"/> - <menu_item_call label="Narzędzie ruchu" name="Move"/> - <menu_item_call label="Narzędzie edycji" name="Edit"/> - <menu_item_call label="Stwórz narzędzie" name="Create"/> - <menu_item_call label="Narzędzia posiadłości" name="Land"/> - </menu> <menu_item_call label="Przybliż" name="Zoom In"/> <menu_item_call label="Domyślne przybliżenie" name="Zoom Default"/> <menu_item_call label="Oddal" name="Zoom Out"/> @@ -267,9 +254,8 @@ <menu_item_call label="Upuść pakiet pamięci" name="Drop a Packet"/> </menu> <menu_item_call label="Zderzenia, popchnięcia & uderzenia" name="Bumps, Pushes &amp; Hits"/> - <menu label="Świat" name="World"> + <menu label="Świat" name="DevelopWorld"> <menu_item_check label="Domyślne ustawienia środowiska Regionu" name="Sim Sun Override"/> - <menu_item_check label="Efekty emiterów" name="Cheesy Beacon"/> <menu_item_check label="Ustalona pogoda" name="Fixed Weather"/> <menu_item_call label="Zachowaj bufor pamięci obiektów regionu" name="Dump Region Object Cache"/> </menu> @@ -291,11 +277,11 @@ </menu> <menu label="Awatar" name="Character"> <menu label="Przesuń bakowaną teksturę" name="Grab Baked Texture"> - <menu_item_call label="Tęczówka oka" name="Iris"/> - <menu_item_call label="Głowa" name="Head"/> - <menu_item_call label="Górna część ciała" name="Upper Body"/> - <menu_item_call label="Dolna część ciała" name="Lower Body"/> - <menu_item_call label="Spódnica" name="Skirt"/> + <menu_item_call label="Tęczówka oka" name="Grab Iris"/> + <menu_item_call label="Głowa" name="Grab Head"/> + <menu_item_call label="Górna część ciała" name="Grab Upper Body"/> + <menu_item_call label="Dolna część ciała" name="Grab Lower Body"/> + <menu_item_call label="Spódnica" name="Grab Skirt"/> </menu> <menu label="Testy postaci" name="Character Tests"> <menu_item_call label="Przesuń geometrię postaci" name="Toggle Character Geometry"/> @@ -316,8 +302,8 @@ <menu_item_check label="Pokaż menu administratora" name="View Admin Options"/> </menu> <menu label="Administrator" name="Admin"> - <menu label="Object"> - <menu_item_call label="Weź kopię" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Weź kopię" name="Admin Take Copy"/> <menu_item_call label="Reset właściciela" name="Force Owner To Me"/> <menu_item_call label="Reset przyzwolenia właściciela" name="Force Owner Permissive"/> <menu_item_call label="Usuń" name="Delete"/> diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index 5ff2d49ac1..9ce55c6415 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -19,8 +19,6 @@ <menu_item_call label="Ausente" name="Set Away"/> <menu_item_call label="Ocupado" name="Set Busy"/> </menu> - <menu_item_call label="Request Admin Status" name="Request Admin Options"/> - <menu_item_call label="Sair do modo admin" name="Leave Admin Options"/> <menu_item_call label="Comprar L$" name="Buy and Sell L$"/> <menu_item_call label="Preferências..." name="Preferences"/> <menu_item_call label="Barras de ferramentas..." name="Toolbars"/> @@ -40,11 +38,10 @@ <menu_item_check label="Busca" name="Search"/> <menu_item_call label="Foto" name="Take Snapshot"/> <menu_item_call label="Criar marco deste lugar" name="Create Landmark Here"/> - <menu label="Perfil da região" name="Land"> - <menu_item_call label="Perfil da região" name="Place Profile"/> - <menu_item_call label="Sobre terrenos" name="About Land"/> - <menu_item_call label="Região/Propriedade" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Perfil da região" name="Place Profile"/> + <menu_item_call label="Sobre terrenos" name="About Land"/> + <menu_item_call label="Região/Propriedade" name="Region/Estate"/> <menu_item_call label="Comprar este terreno" name="Buy Land"/> <menu_item_call label="Meus terrenos" name="My Land"/> <menu label="Mostrar" name="LandShow"> @@ -60,14 +57,14 @@ </menu> <menu_item_call label="Teletransportar para meu início" name="Teleport Home"/> <menu_item_call label="Definir como Início" name="Set Home to Here"/> - <menu label="Sol" name="Environment Settings"> + <menu label="Sol" name="Sun"> <menu_item_call label="Amanhecer" name="Sunrise"/> <menu_item_call label="Meio-dia" name="Noon"/> <menu_item_call label="Pôr-do-Sol" name="Sunset"/> <menu_item_call label="Meia-noite" name="Midnight"/> </menu> <menu label="Editor de ambientes" name="Enviroment Editor"> - <menu_item_call label="Configurações de ambiente..." name="Enviroment Settings"/> + <menu_item_call label="Configurações de ambiente..." name="Environment Settings"/> <menu label="Pré-configurações de água" name="Water Presets"> <menu_item_call label="Nova pré-configuração..." name="new_water_preset"/> <menu_item_call label="Editar pré-configuração..." name="edit_water_preset"/> @@ -173,22 +170,22 @@ <menu_item_check label="Mostrar retículo na vista subjetiva" name="ShowCrosshairs"/> </menu> <menu label="Tipos de renderização" name="Rendering Types"> - <menu_item_check label="Simples" name="Simple"/> - <menu_item_check label="Alpha" name="Alpha"/> - <menu_item_check label="Árvore" name="Tree"/> - <menu_item_check label="Avatares" name="Character"/> - <menu_item_check label="Patch de superfície" name="Surface Patch"/> - <menu_item_check label="Céu" name="Sky"/> - <menu_item_check label="Água" name="Water"/> - <menu_item_check label="Chão" name="Ground"/> - <menu_item_check label="Volume" name="Volume"/> - <menu_item_check label="Grama" name="Grass"/> - <menu_item_check label="Nuvens" name="Clouds"/> - <menu_item_check label="Partículas" name="Particles"/> - <menu_item_check label="Elevação" name="Bump"/> + <menu_item_check label="Simples" name="Rendering Type Simple"/> + <menu_item_check label="Alpha" name="Rendering Type Alpha"/> + <menu_item_check label="Árvore" name="Rendering Type Tree"/> + <menu_item_check label="Avatares" name="Rendering Type Character"/> + <menu_item_check label="Patch de superfície" name="Rendering Type Surface Patch"/> + <menu_item_check label="Céu" name="Rendering Type Sky"/> + <menu_item_check label="Água" name="Rendering Type Water"/> + <menu_item_check label="Chão" name="Rendering Type Ground"/> + <menu_item_check label="Volume" name="Rendering Type Volume"/> + <menu_item_check label="Grama" name="Rendering Type Grass"/> + <menu_item_check label="Nuvens" name="Rendering Type Clouds"/> + <menu_item_check label="Partículas" name="Rendering Type Particles"/> + <menu_item_check label="Elevação" name="Rendering Type Bump"/> </menu> <menu label="Recursos de renderização" name="Rendering Features"> - <menu_item_check label="Interface" name="UI"/> + <menu_item_check label="Interface" name="ToggleUI"/> <menu_item_check label="Selecionado" name="Selected"/> <menu_item_check label="Realçado" name="Highlighted"/> <menu_item_check label="Texturas dinâmicas" name="Dynamic Textures"/> @@ -200,10 +197,7 @@ <menu_item_call label="Limpar cache de grupo" name="ClearGroupCache"/> <menu_item_check label="Smoothing de mouse" name="Mouse Smoothing"/> <menu label="Atalhos" name="Shortcuts"> - <menu_item_call label="Imagem (L$[COST])..." name="Upload Image"/> - <menu_item_check label="Busca" name="Search"/> <menu_item_call label="Soltar objeto" name="Release Keys"/> - <menu_item_call label="Interface tamanho padrão" name="Set UI Size to Default"/> <menu_item_check label="Mostrar menu avançado - atalho antigo" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Fechar janela" name="Close Window"/> <menu_item_call label="Fechar todas as janelas" name="Close All Windows"/> @@ -212,13 +206,6 @@ <menu_item_check label="Flycam Joystick" name="Joystick Flycam"/> <menu_item_call label="Visão padrão" name="Reset View"/> <menu_item_call label="Olhar para quem fala por último" name="Look at Last Chatter"/> - <menu label="Selecionar ferramenta de construção" name="Select Tool"> - <menu_item_call label="Ferramenta enfoque" name="Focus"/> - <menu_item_call label="Ferramenta de movimentação" name="Move"/> - <menu_item_call label="Ferramenta de edição" name="Edit"/> - <menu_item_call label="Ferramenta criar" name="Create"/> - <menu_item_call label="Ferramenta de terrenos" name="Land"/> - </menu> <menu_item_call label="Mais zoom" name="Zoom In"/> <menu_item_call label="Zoom padrão" name="Zoom Default"/> <menu_item_call label="Menos zoom" name="Zoom Out"/> @@ -296,9 +283,8 @@ <menu_item_call label="Drop a Packet" name="Drop a Packet"/> </menu> <menu_item_call label="Empurrões, trombadas e tapas" name="Bumps, Pushes &amp; Hits"/> - <menu label="Mundo" name="World"> + <menu label="Mundo" name="DevelopWorld"> <menu_item_check label="Impor sobre sol regional" name="Sim Sun Override"/> - <menu_item_check label="Efeito baliza piscando" name="Cheesy Beacon"/> <menu_item_check label="Fixed Weather" name="Fixed Weather"/> <menu_item_call label="Dump Region Object Cache" name="Dump Region Object Cache"/> </menu> @@ -320,11 +306,11 @@ </menu> <menu label="Avatar" name="Character"> <menu label="Grab Baked Texture" name="Grab Baked Texture"> - <menu_item_call label="Íris" name="Iris"/> - <menu_item_call label="Cabeça" name="Head"/> - <menu_item_call label="Cintura acima" name="Upper Body"/> - <menu_item_call label="Cintura para baixo" name="Lower Body"/> - <menu_item_call label="Saia" name="Skirt"/> + <menu_item_call label="Íris" name="Grab Iris"/> + <menu_item_call label="Cabeça" name="Grab Head"/> + <menu_item_call label="Cintura acima" name="Grab Upper Body"/> + <menu_item_call label="Cintura para baixo" name="Grab Lower Body"/> + <menu_item_call label="Saia" name="Grab Skirt"/> </menu> <menu label="Testes de personagem" name="Character Tests"> <menu_item_call label="Toggle Character Geometry" name="Toggle Character Geometry"/> @@ -346,8 +332,8 @@ <menu_item_check label="Mostrar menu admin" name="View Admin Options"/> </menu> <menu label="Admin" name="Admin"> - <menu label="Object"> - <menu_item_call label="Pegar uma cópia" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Pegar uma cópia" name="Admin Take Copy"/> <menu_item_call label="Force Owner To Me" name="Force Owner To Me"/> <menu_item_call label="Force Owner Permissive" name="Force Owner Permissive"/> <menu_item_call label="Excluir" name="Delete"/> diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index b9f403c04b..6e4d64eca7 100644 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -17,8 +17,6 @@ <menu_item_call label="Нет на месте" name="Set Away"/> <menu_item_call label="Не беспокоить" name="Set Busy"/> </menu> - <menu_item_call label="Запрос статуса администратора" name="Request Admin Options"/> - <menu_item_call label="Выход из статуса администратора" name="Leave Admin Options"/> <menu_item_call label="Купить L$" name="Buy and Sell L$"/> <menu_item_call label="Настройки..." name="Preferences"/> <menu_item_call label="Панели инструментов..." name="Toolbars"/> @@ -38,11 +36,10 @@ <menu_item_check label="Поиск" name="Search"/> <menu_item_call label="Снимок" name="Take Snapshot"/> <menu_item_call label="Добавить закладку на это место" name="Create Landmark Here"/> - <menu label="Профиль места" name="Land"> - <menu_item_call label="Профиль места" name="Place Profile"/> - <menu_item_call label="О земле" name="About Land"/> - <menu_item_call label="Регион/землевладение" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Профиль места" name="Place Profile"/> + <menu_item_call label="О земле" name="About Land"/> + <menu_item_call label="Регион/землевладение" name="Region/Estate"/> <menu_item_call label="Купить эту землю" name="Buy Land"/> <menu_item_call label="Моя земля" name="My Land"/> <menu label="Показать" name="LandShow"> @@ -58,14 +55,14 @@ </menu> <menu_item_call label="Телепортироваться домой" name="Teleport Home"/> <menu_item_call label="Установить дом здесь" name="Set Home to Here"/> - <menu label="Солнце" name="Environment Settings"> + <menu label="Солнце" name="Sun"> <menu_item_call label="Восход" name="Sunrise"/> <menu_item_call label="Полдень" name="Noon"/> <menu_item_call label="Закат" name="Sunset"/> <menu_item_call label="Полночь" name="Midnight"/> </menu> <menu label="Редактор среды" name="Enviroment Editor"> - <menu_item_call label="Настройки среды..." name="Enviroment Settings"/> + <menu_item_call label="Настройки среды..." name="Environment Settings"/> <menu label="Настройки воды" name="Water Presets"> <menu_item_call label="Создать настройку..." name="new_water_preset"/> <menu_item_call label="Изменить настройку..." name="edit_water_preset"/> @@ -171,22 +168,22 @@ <menu_item_check label="Показывать прицел при обзоре мышью" name="ShowCrosshairs"/> </menu> <menu label="Типы визуализации" name="Rendering Types"> - <menu_item_check label="Обычная" name="Simple"/> - <menu_item_check label="Альфа" name="Alpha"/> - <menu_item_check label="Дерево" name="Tree"/> - <menu_item_check label="Аватары" name="Character"/> - <menu_item_check label="Исправление поверхности" name="Surface Patch"/> - <menu_item_check label="Небо" name="Sky"/> - <menu_item_check label="Вода" name="Water"/> - <menu_item_check label="Земля" name="Ground"/> - <menu_item_check label="Объем" name="Volume"/> - <menu_item_check label="Трава" name="Grass"/> - <menu_item_check label="Облака" name="Clouds"/> - <menu_item_check label="Частицы" name="Particles"/> - <menu_item_check label="Рельефное" name="Bump"/> + <menu_item_check label="Обычная" name="Rendering Type Simple"/> + <menu_item_check label="Альфа" name="Rendering Type Alpha"/> + <menu_item_check label="Дерево" name="Rendering Type Tree"/> + <menu_item_check label="Аватары" name="Rendering Type Character"/> + <menu_item_check label="Исправление поверхности" name="Rendering Type Surface Patch"/> + <menu_item_check label="Небо" name="Rendering Type Sky"/> + <menu_item_check label="Вода" name="Rendering Type Water"/> + <menu_item_check label="Земля" name="Rendering Type Ground"/> + <menu_item_check label="Объем" name="Rendering Type Volume"/> + <menu_item_check label="Трава" name="Rendering Type Grass"/> + <menu_item_check label="Облака" name="Rendering Type Clouds"/> + <menu_item_check label="Частицы" name="Rendering Type Particles"/> + <menu_item_check label="Рельефное" name="Rendering Type Bump"/> </menu> <menu label="Функции визуализации" name="Rendering Features"> - <menu_item_check label="Интерфейс пользователя" name="UI"/> + <menu_item_check label="Интерфейс пользователя" name="ToggleUI"/> <menu_item_check label="Выбрано" name="Selected"/> <menu_item_check label="Выделено" name="Highlighted"/> <menu_item_check label="Динамические текстуры" name="Dynamic Textures"/> @@ -199,10 +196,7 @@ <menu_item_call label="Очистить кэш группы" name="ClearGroupCache"/> <menu_item_check label="Сглаживание мышью" name="Mouse Smoothing"/> <menu label="Горячие клавиши" name="Shortcuts"> - <menu_item_call label="Изображение (L$[COST])..." name="Upload Image"/> - <menu_item_check label="Поиск" name="Search"/> <menu_item_call label="Освободить клавиши" name="Release Keys"/> - <menu_item_call label="Сбросить размер интерфейса" name="Set UI Size to Default"/> <menu_item_check label="Показать меню «Дополнительно» - старое сочетание клавиш" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Закрыть окно" name="Close Window"/> <menu_item_call label="Закрыть все окна" name="Close All Windows"/> @@ -211,13 +205,6 @@ <menu_item_check label="Обзор джойстиком" name="Joystick Flycam"/> <menu_item_call label="Сброс обзора" name="Reset View"/> <menu_item_call label="Смотреть на последнего говорившего" name="Look at Last Chatter"/> - <menu label="Выбрать инструменты" name="Select Tool"> - <menu_item_call label="Фокус" name="Focus"/> - <menu_item_call label="Перемещение" name="Move"/> - <menu_item_call label="Редактирование" name="Edit"/> - <menu_item_call label="Создание" name="Create"/> - <menu_item_call label="Земля" name="Land"/> - </menu> <menu_item_call label="Приблизить" name="Zoom In"/> <menu_item_call label="Стандартный масштаб" name="Zoom Default"/> <menu_item_call label="Отодвинуть" name="Zoom Out"/> @@ -331,9 +318,8 @@ <menu_item_call label="Начать запись" name="Start Record"/> <menu_item_call label="Остановить запись" name="Stop Record"/> </menu> - <menu label="Мир" name="World"> + <menu label="Мир" name="DevelopWorld"> <menu_item_check label="Перекрытие солнца в симуляторе" name="Sim Sun Override"/> - <menu_item_check label="Мигающий маяк" name="Cheesy Beacon"/> <menu_item_check label="Неизменная погода" name="Fixed Weather"/> <menu_item_call label="Вывод кэша региональных объектов" name="Dump Region Object Cache"/> </menu> @@ -365,11 +351,11 @@ </menu> <menu label="Аватар" name="Character"> <menu label="Захват запеченных текстур" name="Grab Baked Texture"> - <menu_item_call label="Радужка" name="Iris"/> - <menu_item_call label="Голова" name="Head"/> - <menu_item_call label="Верхняя часть тела" name="Upper Body"/> - <menu_item_call label="Нижняя часть тела" name="Lower Body"/> - <menu_item_call label="Юбка" name="Skirt"/> + <menu_item_call label="Радужка" name="Grab Iris"/> + <menu_item_call label="Голова" name="Grab Head"/> + <menu_item_call label="Верхняя часть тела" name="Grab Upper Body"/> + <menu_item_call label="Нижняя часть тела" name="Grab Lower Body"/> + <menu_item_call label="Юбка" name="Grab Skirt"/> </menu> <menu label="Проверка персонажа" name="Character Tests"> <menu_item_call label="Внешний вид в XML" name="Appearance To XML"/> @@ -404,8 +390,8 @@ <menu_item_check label="Показать меню администратора" name="View Admin Options"/> </menu> <menu label="Администратор" name="Admin"> - <menu label="Object"> - <menu_item_call label="Взять копию" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Взять копию" name="Admin Take Copy"/> <menu_item_call label="Назначить себя владельцем" name="Force Owner To Me"/> <menu_item_call label="Назначить полноправным владельцем" name="Force Owner Permissive"/> <menu_item_call label="Удалить" name="Delete"/> @@ -441,7 +427,7 @@ <menu_item_call label="Физика" name="Physics"/> <menu_item_call label="Вся одежда" name="All Clothes"/> </menu> - <menu label="Справка" name="Help"> + <menu label="Справка" name="DeprecatedHelp"> <menu_item_call label="Официальный блог Linden" name="Official Linden Blog"/> <menu_item_call label="Портал скриптов" name="Scripting Portal"/> <menu label="Сообщение об ошибке" name="Bug Reporting"> diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index 75294e38d5..7ad5221bb0 100644 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -17,8 +17,6 @@ <menu_item_call label="Uzakta" name="Set Away"/> <menu_item_call label="Meşgul" name="Set Busy"/> </menu> - <menu_item_call label="Yönetici Durumu Talep Et" name="Request Admin Options"/> - <menu_item_call label="Yönetici Durumundan Ayrıl" name="Leave Admin Options"/> <menu_item_call label="L$ Satın Al" name="Buy and Sell L$"/> <menu_item_call label="Tercihler..." name="Preferences"/> <menu_item_call label="Araç çubukları..." name="Toolbars"/> @@ -38,11 +36,10 @@ <menu_item_check label="Ara" name="Search"/> <menu_item_call label="Anlık Görüntü" name="Take Snapshot"/> <menu_item_call label="Bu Yeri Yer İmlerine Ekle" name="Create Landmark Here"/> - <menu label="Profili Yerleştir" name="Land"> - <menu_item_call label="Profili Yerleştir" name="Place Profile"/> - <menu_item_call label="Arazi Hakkında" name="About Land"/> - <menu_item_call label="Bölge/Gayrimenkul" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="Profili Yerleştir" name="Place Profile"/> + <menu_item_call label="Arazi Hakkında" name="About Land"/> + <menu_item_call label="Bölge/Gayrimenkul" name="Region/Estate"/> <menu_item_call label="Bu Araziyi Satın Al" name="Buy Land"/> <menu_item_call label="Arazim" name="My Land"/> <menu label="Göster" name="LandShow"> @@ -58,14 +55,14 @@ </menu> <menu_item_call label="Ana Konuma Işınla" name="Teleport Home"/> <menu_item_call label="Ana Konumu Burası Olarak Seç" name="Set Home to Here"/> - <menu label="Güneş" name="Environment Settings"> + <menu label="Güneş" name="Sun"> <menu_item_call label="Gün Doğumu" name="Sunrise"/> <menu_item_call label="Gün Ortası" name="Noon"/> <menu_item_call label="Gün Batımı" name="Sunset"/> <menu_item_call label="Gece Yarısı" name="Midnight"/> </menu> <menu label="Ortam Düzenleyici" name="Enviroment Editor"> - <menu_item_call label="Ortam Ayarları..." name="Enviroment Settings"/> + <menu_item_call label="Ortam Ayarları..." name="Environment Settings"/> <menu label="Su Ön Ayarları" name="Water Presets"> <menu_item_call label="Yeni ön ayar..." name="new_water_preset"/> <menu_item_call label="Ön ayarı düzenle..." name="edit_water_preset"/> @@ -171,22 +168,22 @@ <menu_item_check label="Fare Üzerinden Görünüm Artı İşaretini Göster" name="ShowCrosshairs"/> </menu> <menu label="İşleme Türleri" name="Rendering Types"> - <menu_item_check label="Basit" name="Simple"/> - <menu_item_check label="Alfa" name="Alpha"/> - <menu_item_check label="Ağaç" name="Tree"/> - <menu_item_check label="Avatarlar" name="Character"/> - <menu_item_check label="Yüzey Yaması" name="Surface Patch"/> - <menu_item_check label="Gökyüzü" name="Sky"/> - <menu_item_check label="Su" name="Water"/> - <menu_item_check label="Toprak" name="Ground"/> - <menu_item_check label="Hacim" name="Volume"/> - <menu_item_check label="Çimen" name="Grass"/> - <menu_item_check label="Bulutlar" name="Clouds"/> - <menu_item_check label="Parçacıklar" name="Particles"/> - <menu_item_check label="Tümsek" name="Bump"/> + <menu_item_check label="Basit" name="Rendering Type Simple"/> + <menu_item_check label="Alfa" name="Rendering Type Alpha"/> + <menu_item_check label="Ağaç" name="Rendering Type Tree"/> + <menu_item_check label="Avatarlar" name="Rendering Type Character"/> + <menu_item_check label="Yüzey Yaması" name="Rendering Type Surface Patch"/> + <menu_item_check label="Gökyüzü" name="Rendering Type Sky"/> + <menu_item_check label="Su" name="Rendering Type Water"/> + <menu_item_check label="Toprak" name="Rendering Type Ground"/> + <menu_item_check label="Hacim" name="Rendering Type Volume"/> + <menu_item_check label="Çimen" name="Rendering Type Grass"/> + <menu_item_check label="Bulutlar" name="Rendering Type Clouds"/> + <menu_item_check label="Parçacıklar" name="Rendering Type Particles"/> + <menu_item_check label="Tümsek" name="Rendering Type Bump"/> </menu> <menu label="İşleme Özellikleri" name="Rendering Features"> - <menu_item_check label="KA" name="UI"/> + <menu_item_check label="KA" name="ToggleUI"/> <menu_item_check label="Seçili" name="Selected"/> <menu_item_check label="Vurgulanmış" name="Highlighted"/> <menu_item_check label="Dinamik Dokular" name="Dynamic Textures"/> @@ -199,10 +196,7 @@ <menu_item_call label="Grup Ön Belleğini Temizle" name="ClearGroupCache"/> <menu_item_check label="Fare Düzleştirme" name="Mouse Smoothing"/> <menu label="Kısa Yollar" name="Shortcuts"> - <menu_item_call label="Görüntü (L$[COST])..." name="Upload Image"/> - <menu_item_check label="Ara" name="Search"/> <menu_item_call label="Bırakma Anahtarları" name="Release Keys"/> - <menu_item_call label="KA Büyüklüğünü Varsayılana Ayarla" name="Set UI Size to Default"/> <menu_item_check label="Gelişmiş Menüyü Göster - eski kısayol" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="Pencereyi Kapat" name="Close Window"/> <menu_item_call label="Tüm Pencereleri Kapat" name="Close All Windows"/> @@ -211,13 +205,6 @@ <menu_item_check label="Oyun Çubuğu Flycam" name="Joystick Flycam"/> <menu_item_call label="Görünümü Sıfırla" name="Reset View"/> <menu_item_call label="Son Sohbet Edene Bak" name="Look at Last Chatter"/> - <menu label="İnşa Et Aracını Seç" name="Select Tool"> - <menu_item_call label="Odaklanma Aracı" name="Focus"/> - <menu_item_call label="Hareket Ettirme Aracı" name="Move"/> - <menu_item_call label="Düzenleme Aracı" name="Edit"/> - <menu_item_call label="Oluşturma Aracı" name="Create"/> - <menu_item_call label="Arazi Aracı" name="Land"/> - </menu> <menu_item_call label="Yakınlaştır" name="Zoom In"/> <menu_item_call label="Varsayılan Yakınlaştırma" name="Zoom Default"/> <menu_item_call label="Uzaklaştırma" name="Zoom Out"/> @@ -331,9 +318,8 @@ <menu_item_call label="Kaydı Başlat" name="Start Record"/> <menu_item_call label="Kaydı Durdur" name="Stop Record"/> </menu> - <menu label="Dünya" name="World"> + <menu label="Dünya" name="DevelopWorld"> <menu_item_check label="Sim Güneşi Geçersiz Kıl" name="Sim Sun Override"/> - <menu_item_check label="Yanıp Sönen İşaret" name="Cheesy Beacon"/> <menu_item_check label="Sabit Hava Durumu" name="Fixed Weather"/> <menu_item_call label="Bölge Nesne Önbelleğinin Dökümünü Al" name="Dump Region Object Cache"/> </menu> @@ -365,11 +351,11 @@ </menu> <menu label="Avatar" name="Character"> <menu label="Kaydedilmiş Dokuyu Al" name="Grab Baked Texture"> - <menu_item_call label="İris" name="Iris"/> - <menu_item_call label="Baş" name="Head"/> - <menu_item_call label="Üst Gövde" name="Upper Body"/> - <menu_item_call label="Alt Gövde" name="Lower Body"/> - <menu_item_call label="Etek" name="Skirt"/> + <menu_item_call label="İris" name="Grab Iris"/> + <menu_item_call label="Baş" name="Grab Head"/> + <menu_item_call label="Üst Gövde" name="Grab Upper Body"/> + <menu_item_call label="Alt Gövde" name="Grab Lower Body"/> + <menu_item_call label="Etek" name="Grab Skirt"/> </menu> <menu label="Karakter Testleri" name="Character Tests"> <menu_item_call label="XML'de Görünüm" name="Appearance To XML"/> @@ -404,8 +390,8 @@ <menu_item_check label="Yönetici Menüsünü Göster" name="View Admin Options"/> </menu> <menu label="Yönetici" name="Admin"> - <menu label="Object"> - <menu_item_call label="Kopya Al" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="Kopya Al" name="Admin Take Copy"/> <menu_item_call label="Mülkiyetime Geçir" name="Force Owner To Me"/> <menu_item_call label="İzinlerle Birlikte Mülkiyetime Geçir" name="Force Owner Permissive"/> <menu_item_call label="Sil" name="Delete"/> @@ -441,7 +427,7 @@ <menu_item_call label="Fizik" name="Physics"/> <menu_item_call label="Tüm Giysiler" name="All Clothes"/> </menu> - <menu label="Yardım" name="Help"> + <menu label="Yardım" name="DeprecatedHelp"> <menu_item_call label="Resmi Linden Blog'u" name="Official Linden Blog"/> <menu_item_call label="Komut Dosyası Portalı" name="Scripting Portal"/> <menu label="Hata Raporlama" name="Bug Reporting"> diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index f7be781cac..b6bb79bcbc 100644 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -20,8 +20,6 @@ <menu_item_call label="離開" name="Set Away"/> <menu_item_call label="忙碌" name="Set Busy"/> </menu> - <menu_item_call label="要求 Admin 狀態" name="Request Admin Options"/> - <menu_item_call label="離開 Admin 狀態" name="Leave Admin Options"/> <menu_item_call label="結束退出 [APP_NAME]" name="Quit"/> </menu> <menu label="溝通" name="Communicate"> @@ -36,11 +34,10 @@ <menu_item_check label="搜尋" name="Search"/> <menu_item_call label="拍攝快照" name="Take Snapshot"/> <menu_item_call label="將此處記下地標" name="Create Landmark Here"/> - <menu label="地點檔案" name="Land"> - <menu_item_call label="地點檔案" name="Place Profile"/> - <menu_item_call label="關於土地" name="About Land"/> - <menu_item_call label="地區 / 領地" name="Region/Estate"/> - </menu> + <menu_item_separator/> + <menu_item_call label="地點檔案" name="Place Profile"/> + <menu_item_call label="關於土地" name="About Land"/> + <menu_item_call label="地區 / 領地" name="Region/Estate"/> <menu_item_call label="購買這塊土地" name="Buy Land"/> <menu_item_call label="我的土地" name="My Land"/> <menu label="顯示" name="LandShow"> @@ -56,7 +53,7 @@ </menu> <menu_item_call label="瞬間瞬間傳送回家" name="Teleport Home"/> <menu_item_call label="設定家在此處" name="Set Home to Here"/> - <menu label="太陽" name="Environment Settings"> + <menu label="太陽" name="Sun"> <menu_item_call label="日出" name="Sunrise"/> <menu_item_call label="中午" name="Noon"/> <menu_item_call label="日落" name="Sunset"/> @@ -154,22 +151,22 @@ <menu_item_check label="顯示第一人稱視角準星" name="ShowCrosshairs"/> </menu> <menu label="Rendering Types" name="Rendering Types"> - <menu_item_check label="簡單" name="Simple"/> - <menu_item_check label="半透明" name="Alpha"/> - <menu_item_check label="樹木" name="Tree"/> - <menu_item_check label="化身" name="Character"/> - <menu_item_check label="地表" name="SurfacePath"/> - <menu_item_check label="天空" name="Sky"/> - <menu_item_check label="水文" name="Water"/> - <menu_item_check label="地面" name="Ground"/> - <menu_item_check label="體積" name="Volume"/> - <menu_item_check label="草地" name="Grass"/> - <menu_item_check label="雲彩" name="Clouds"/> - <menu_item_check label="粒子效果" name="Particles"/> - <menu_item_check label="碰撞" name="Bump"/> + <menu_item_check label="簡單" name="Rendering Type Simple"/> + <menu_item_check label="半透明" name="Rendering Type Alpha"/> + <menu_item_check label="樹木" name="Rendering Type Tree"/> + <menu_item_check label="化身" name="Rendering Type Character"/> + <menu_item_check label="地表" name="Rendering Type Surface Patch"/> + <menu_item_check label="天空" name="Rendering Type Sky"/> + <menu_item_check label="水文" name="Rendering Type Water"/> + <menu_item_check label="地面" name="Rendering Type Ground"/> + <menu_item_check label="體積" name="Rendering Type Volume"/> + <menu_item_check label="草地" name="Rendering Type Grass"/> + <menu_item_check label="雲彩" name="Rendering Type Clouds"/> + <menu_item_check label="粒子效果" name="Rendering Type Particles"/> + <menu_item_check label="碰撞" name="Rendering Type Bump"/> </menu> <menu label="Rendering Features" name="Rendering Features"> - <menu_item_check label="UI" name="UI"/> + <menu_item_check label="UI" name="ToggleUI"/> <menu_item_check label="Selected" name="Selected"/> <menu_item_check label="Highlighted" name="Highlighted"/> <menu_item_check label="Dynamic Textures" name="Dynamic Textures"/> @@ -182,10 +179,7 @@ <menu_item_call label="清除群組快取資料" name="ClearGroupCache"/> <menu_item_check label="滑鼠平滑移動" name="Mouse Smoothing"/> <menu label="快速鍵" name="Shortcuts"> - <menu_item_call label="圖像(L$[COST])..." name="Upload Image"/> - <menu_item_check label="搜尋" name="Search"/> <menu_item_call label="釋出按鍵" name="Release Keys"/> - <menu_item_call label="設定使用者界面大小至預設值" name="Set UI Size to Default"/> <menu_item_check label="顯示進階選單 - 舊版捷徑" name="Show Advanced Menu - legacy shortcut"/> <menu_item_call label="關閉視窗" name="Close Window"/> <menu_item_call label="關閉全部視窗" name="Close All Windows"/> @@ -194,13 +188,6 @@ <menu_item_check label="Joystick Flycam" name="Joystick Flycam"/> <menu_item_call label="重設視角" name="Reset View"/> <menu_item_call label="注視上一位聊天者" name="Look at Last Chatter"/> - <menu label="選擇建造工具" name="Select Tool"> - <menu_item_call label="聚焦工具" name="Focus"/> - <menu_item_call label="移動工具" name="Move"/> - <menu_item_call label="編輯工具" name="Edit"/> - <menu_item_call label="創造工具" name="Create"/> - <menu_item_call label="土地工具" name="Land"/> - </menu> <menu_item_call label="Zoom In" name="Zoom In"/> <menu_item_call label="Zoom Default" name="Zoom Default"/> <menu_item_call label="Zoom Out" name="Zoom Out"/> @@ -306,9 +293,8 @@ <menu_item_call label="開始錄製" name="Start Record"/> <menu_item_call label="停止錄製" name="Stop Record"/> </menu> - <menu label="世界" name="World"> + <menu label="世界" name="DevelopWorld"> <menu_item_check label="模擬器太陽設定覆蓋" name="Sim Sun Override"/> - <menu_item_check label="Cheesy Beacon" name="Cheesy Beacon"/> <menu_item_check label="固定天氣" name="Fixed Weather"/> <menu_item_call label="傾印地區物件快取" name="Dump Region Object Cache"/> </menu> @@ -340,11 +326,11 @@ </menu> <menu label="化身" name="Character"> <menu label="Grab Baked Texture" name="Grab Baked Texture"> - <menu_item_call label="Iris" name="Iris"/> - <menu_item_call label="頭部" name="Head"/> - <menu_item_call label="Upper Body" name="Upper Body"/> - <menu_item_call label="Lower Body" name="Lower Body"/> - <menu_item_call label="裙子" name="Skirt"/> + <menu_item_call label="Iris" name="Grab Iris"/> + <menu_item_call label="頭部" name="Grab Head"/> + <menu_item_call label="Upper Body" name="Grab Upper Body"/> + <menu_item_call label="Lower Body" name="Grab Lower Body"/> + <menu_item_call label="裙子" name="Grab Skirt"/> </menu> <menu label="Character Tests" name="Character Tests"> <menu_item_call label="Appearance To XML" name="Appearance To XML"/> @@ -378,8 +364,8 @@ <menu_item_check label="Show Admin Menu" name="View Admin Options"/> </menu> <menu label="Admin" name="Admin"> - <menu label="Object"> - <menu_item_call label="取得副本" name="Take Copy"/> + <menu label="Object" name="AdminObject"> + <menu_item_call label="取得副本" name="Admin Take Copy"/> <menu_item_call label="強制擁有者為我" name="Force Owner To Me"/> <menu_item_call label="Force Owner Permissive" name="Force Owner Permissive"/> <menu_item_call label="刪除" name="Delete"/> @@ -415,7 +401,7 @@ <menu_item_call label="身體物理" name="Physics"/> <menu_item_call label="全部衣服" name="All Clothes"/> </menu> - <menu label="幫助" name="Help"> + <menu label="幫助" name="DeprecatedHelp"> <menu_item_call label="林登官方部落格" name="Official Linden Blog"/> <menu_item_call label="Scripting Portal" name="Scripting Portal"/> <menu label="臭蟲回報" name="Bug Reporting"> -- cgit v1.2.3 From b2b421acb6ddea83c9cc25c3593c534f7ff22e57 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 10 Jan 2012 16:15:57 -0800 Subject: Changed merchant outbox visibility to not persist between sessions. --- indra/newview/skins/default/xui/en/floater_merchant_outbox.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index 02394e8ac3..741515d56c 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -9,7 +9,7 @@ min_height="200" name="floater_merchant_outbox" save_rect="true" - save_visibility="true" + save_visibility="false" reuse_instance="true" title="MERCHANT OUTBOX" width="333" > -- cgit v1.2.3 From 00b767e5a91d9e3379119c867164f9be40f888cc Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 11 Jan 2012 10:05:15 -0800 Subject: EXP-1791 - Handle case where initialization with SLM fails in the Merchant Outbox floater in the viewer * Added code to clear and re-initialize the SLM cookie when authentication errors are encountered. * Re-organized logic for outbox import a bit to hopefully be more robust when errors are encountered. --- indra/newview/llfloateroutbox.cpp | 38 +++-- indra/newview/llfloateroutbox.h | 1 + indra/newview/llmarketplacefunctions.cpp | 175 +++++++++++++-------- indra/newview/llmarketplacefunctions.h | 4 + .../newview/skins/default/xui/en/notifications.xml | 14 ++ 5 files changed, 157 insertions(+), 75 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 6ecf715588..28589f5e9a 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -250,12 +250,12 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) // Initialize the marketplace import API // - mImportBusy = true; - setStatusString(getString("OutboxInitializing")); - - LLMarketplaceInventoryImporter::getInstance()->initialize(); - LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); - LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); + LLMarketplaceInventoryImporter& importer = LLMarketplaceInventoryImporter::instance(); + + importer.setInitializationErrorCallback(boost::bind(&LLFloaterOutbox::initializationReportError, this, _1, _2)); + importer.setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); + importer.setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); + importer.initialize(); } void LLFloaterOutbox::setStatusString(const std::string& statusString) @@ -403,7 +403,7 @@ void LLFloaterOutbox::onImportButtonClicked() { mOutboxInventoryPanel->clearSelection(); - LLMarketplaceInventoryImporter::instance().triggerImport(); + mImportBusy = LLMarketplaceInventoryImporter::instance().triggerImport(); } void LLFloaterOutbox::onOutboxChanged() @@ -449,10 +449,14 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) { if (inProgress) { - if (!mImportBusy) + if (mImportBusy) { setStatusString(getString("OutboxImporting")); } + else + { + setStatusString(getString("OutboxInitializing")); + } mImportBusy = true; mImportButton->setEnabled(false); @@ -463,9 +467,25 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) mImportBusy = false; mImportButton->setEnabled(mOutboxItemCount > 0); mInventoryImportInProgress->setVisible(false); + } + + updateView(); +} - updateView(); +void LLFloaterOutbox::initializationReportError(U32 status, const LLSD& content) +{ + if (status != MarketplaceErrorCodes::IMPORT_DONE) + { + char status_string[16]; + sprintf(status_string, "%d", status); + + LLSD subs; + subs["[ERROR_CODE]"] = status_string; + + LLNotificationsUtil::add("OutboxInitFailed", subs); } + + updateView(); } void LLFloaterOutbox::showNotification(const LLSD& notify) diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 6b4021807c..58b7d6ec98 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -71,6 +71,7 @@ protected: void importReportResults(U32 status, const LLSD& content); void importStatusChanged(bool inProgress); + void initializationReportError(U32 status, const LLSD& content); void onClose(bool app_quitting); void onOpen(const LLSD& key); diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 9a83c5fcb7..ea6634a39e 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -97,14 +97,15 @@ namespace LLMarketplaceImport { // Basic interface for this namespace + bool hasSessionCookie(); bool inProgress(); bool resultPending(); U32 getResultStatus(); const LLSD& getResults(); - void establishMarketplaceSessionCookie(); - void pollStatus(); - void triggerImport(); + bool establishMarketplaceSessionCookie(); + bool pollStatus(); + bool triggerImport(); // Internal state variables @@ -116,7 +117,6 @@ namespace LLMarketplaceImport static U32 sImportResultStatus = 0; static LLSD sImportResults = LLSD::emptyMap(); - // Responders class LLImportPostResponder : public LLHTTPClient::Responder @@ -147,7 +147,12 @@ namespace LLMarketplaceImport void completedHeader(U32 status, const std::string& reason, const LLSD& content) { - sMarketplaceCookie = content["set-cookie"].asString(); + const std::string& set_cookie_string = content["set-cookie"].asString(); + + if (!set_cookie_string.empty()) + { + sMarketplaceCookie = set_cookie_string; + } } void completed(U32 status, const std::string& reason, const LLSD& content) @@ -158,6 +163,16 @@ namespace LLMarketplaceImport llinfos << " SLM GET reason: " << reason << llendl; llinfos << " SLM GET content: " << content.asString() << llendl; } + + if (status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) + { + if (gSavedSettings.getBOOL("InventoryOutboxLogging")) + { + llinfos << " SLM GET clearing marketplace cookie due to authentication failure" << llendl; + } + + sMarketplaceCookie.clear(); + } sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING); sImportGetPending = false; @@ -165,56 +180,14 @@ namespace LLMarketplaceImport sImportResults = content; } }; - - // Coroutine testing -/* - std::string gTimeDelayDebugFunc = ""; - - void timeDelay(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) - { - waitForEventOn(self, "mainloop"); - - LLTimer delayTimer; - delayTimer.reset(); - delayTimer.setTimerExpirySec(5.0f); - - while (!delayTimer.hasExpired()) - { - waitForEventOn(self, "mainloop"); - } - - outboxPanel->onImportPostComplete(MarketplaceErrorCodes::IMPORT_DONE, LLSD::emptyMap()); - - gTimeDelayDebugFunc = ""; - } - - std::string gImportPollingFunc = ""; - - void importPoll(LLCoros::self& self, LLPanelMarketplaceOutbox* outboxPanel) + + // Basic API + + bool hasSessionCookie() { - waitForEventOn(self, "mainloop"); - - while (outboxPanel->isImportInProgress()) - { - LLTimer delayTimer; - delayTimer.reset(); - delayTimer.setTimerExpirySec(5.0f); - - while (!delayTimer.hasExpired()) - { - waitForEventOn(self, "mainloop"); - } - - //outboxPanel-> - } - - gImportPollingFunc = ""; + return !sMarketplaceCookie.empty(); } -*/ - - // Basic API - bool inProgress() { return sImportInProgress; @@ -246,8 +219,13 @@ namespace LLMarketplaceImport return url; } - void establishMarketplaceSessionCookie() + bool establishMarketplaceSessionCookie() { + if (hasSessionCookie()) + { + return false; + } + sImportInProgress = true; sImportGetPending = true; @@ -259,10 +237,17 @@ namespace LLMarketplaceImport } LLHTTPClient::get(url, new LLImportGetResponder(), LLViewerMedia::getHeaders()); + + return true; } - void pollStatus() + bool pollStatus() { + if (!hasSessionCookie()) + { + return false; + } + sImportGetPending = true; std::string url = getInventoryImportURL(); @@ -282,10 +267,17 @@ namespace LLMarketplaceImport } LLHTTPClient::get(url, new LLImportGetResponder(), headers); + + return true; } - void triggerImport() + bool triggerImport() { + if (!hasSessionCookie()) + { + return false; + } + sImportId = LLSD::emptyMap(); sImportInProgress = true; sImportPostPending = true; @@ -309,8 +301,7 @@ namespace LLMarketplaceImport LLHTTPClient::post(url, LLSD(), new LLImportPostResponder(), headers); - // Set a timer (for testing only) - //gTimeDelayDebugFunc = LLCoros::instance().launch("LLPanelMarketplaceOutbox timeDelay", boost::bind(&timeDelay, _1, this)); + return true; } } @@ -330,8 +321,10 @@ void LLMarketplaceInventoryImporter::update() } LLMarketplaceInventoryImporter::LLMarketplaceInventoryImporter() - : mImportInProgress(false) + : mAutoTriggerImport(false) + , mImportInProgress(false) , mInitialized(false) + , mErrorInitSignal(NULL) , mStatusChangedSignal(NULL) , mStatusReportSignal(NULL) { @@ -339,12 +332,24 @@ LLMarketplaceInventoryImporter::LLMarketplaceInventoryImporter() void LLMarketplaceInventoryImporter::initialize() { - if (!mInitialized) + llassert(!mInitialized); + + if (!LLMarketplaceImport::hasSessionCookie()) { LLMarketplaceImport::establishMarketplaceSessionCookie(); } } +boost::signals2::connection LLMarketplaceInventoryImporter::setInitializationErrorCallback(const status_report_signal_t::slot_type& cb) +{ + if (mErrorInitSignal == NULL) + { + mErrorInitSignal = new status_report_signal_t(); + } + + return mErrorInitSignal->connect(cb); +} + boost::signals2::connection LLMarketplaceInventoryImporter::setStatusChangedCallback(const status_changed_signal_t::slot_type& cb) { if (mStatusChangedSignal == NULL) @@ -367,9 +372,18 @@ boost::signals2::connection LLMarketplaceInventoryImporter::setStatusReportCallb bool LLMarketplaceInventoryImporter::triggerImport() { - LLMarketplaceImport::triggerImport(); + const bool import_triggered = LLMarketplaceImport::triggerImport(); - return LLMarketplaceImport::inProgress(); + if (!import_triggered) + { + mInitialized = false; + + initialize(); + + mAutoTriggerImport = true; + } + + return import_triggered; } void LLMarketplaceInventoryImporter::updateImport() @@ -378,7 +392,16 @@ void LLMarketplaceInventoryImporter::updateImport() if (in_progress && !LLMarketplaceImport::resultPending()) { - LLMarketplaceImport::pollStatus(); + const bool polling_status = LLMarketplaceImport::pollStatus(); + + if (!polling_status) + { + mInitialized = false; + + initialize(); + + mAutoTriggerImport = true; + } } if (mImportInProgress != in_progress) @@ -390,16 +413,36 @@ void LLMarketplaceInventoryImporter::updateImport() (*mStatusChangedSignal)(mImportInProgress); } - // If we are no longer in progress, report results - if (!mImportInProgress && mStatusReportSignal) + // If we are no longer in progress + if (!mImportInProgress) { if (mInitialized) { - (*mStatusReportSignal)(LLMarketplaceImport::getResultStatus(), LLMarketplaceImport::getResults()); + // Report results + if (mStatusReportSignal) + { + (*mStatusReportSignal)(LLMarketplaceImport::getResultStatus(), LLMarketplaceImport::getResults()); + } } else { - mInitialized = true; + // Look for results success + mInitialized = LLMarketplaceImport::hasSessionCookie(); + + if (mInitialized) + { + // Follow up with auto trigger of import + if (mAutoTriggerImport) + { + mAutoTriggerImport = false; + + triggerImport(); + } + } + else if (mErrorInitSignal) + { + (*mErrorInitSignal)(LLMarketplaceImport::getResultStatus(), LLMarketplaceImport::getResults()); + } } } } diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index f501f1ee8b..b2f6cb7521 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -46,6 +46,7 @@ namespace MarketplaceErrorCodes { IMPORT_DONE = 200, IMPORT_PROCESSING = 202, + IMPORT_AUTHENTICATION_ERROR = 401, IMPORT_DONE_WITH_ERRORS = 409, IMPORT_JOB_FAILED = 410, }; @@ -65,6 +66,7 @@ public: typedef boost::signals2::signal<void (bool)> status_changed_signal_t; typedef boost::signals2::signal<void (U32, const LLSD&)> status_report_signal_t; + boost::signals2::connection setInitializationErrorCallback(const status_report_signal_t::slot_type& cb); boost::signals2::connection setStatusChangedCallback(const status_changed_signal_t::slot_type& cb); boost::signals2::connection setStatusReportCallback(const status_report_signal_t::slot_type& cb); @@ -75,9 +77,11 @@ protected: void updateImport(); private: + bool mAutoTriggerImport; bool mImportInProgress; bool mInitialized; + status_report_signal_t * mErrorInitSignal; status_changed_signal_t * mStatusChangedSignal; status_report_signal_t * mStatusReportSignal; }; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index bcb3a105ea..2269703cb6 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -252,6 +252,20 @@ Error [ERROR_CODE] yestext="OK"/> </notification> + <notification + icon="OutboxStatus_Error" + name="OutboxInitFailed" + type="outbox"> +Marketplace initialization failed + +Initialization with the Marketplace failed because of a system or network error. Try again later. + +Error [ERROR_CODE] + + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> <notification -- cgit v1.2.3 From 0a1cb4f03ee1aeb0cfc9d9bdb837043d0f46f292 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 11 Jan 2012 11:26:56 -0800 Subject: EXP-1791 FIX -- Handle case where initialization with SLM fails in the Merchant Outbox floater in the viewer * Updated marketplace import to properly handle failed cases of authentications and invalid cookies. The import will reset to an uninitialized state and then trigger and initialization followed immediately by an import when appropriate. --- indra/newview/llfloateroutbox.cpp | 1 - indra/newview/llmarketplacefunctions.cpp | 67 +++++++++++++--------- indra/newview/llmarketplacefunctions.h | 5 +- .../newview/skins/default/xui/en/notifications.xml | 7 +-- 4 files changed, 45 insertions(+), 35 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 28589f5e9a..130c26acdc 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -438,7 +438,6 @@ void LLFloaterOutbox::importReportResults(U32 status, const LLSD& content) LLSD subs; subs["[ERROR_CODE]"] = status_string; - //llassert(status == MarketplaceErrorCodes::IMPORT_JOB_FAILED); LLNotificationsUtil::add("OutboxImportFailed", subs); } diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index ea6634a39e..84cbe3cac2 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -133,6 +133,17 @@ namespace LLMarketplaceImport llinfos << " SLM POST content: " << content.asString() << llendl; } + if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) || + (status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR)) + { + if (gSavedSettings.getBOOL("InventoryOutboxLogging")) + { + llinfos << " SLM POST clearing marketplace cookie due to authentication failure" << llendl; + } + + sMarketplaceCookie.clear(); + } + sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE); sImportPostPending = false; sImportResultStatus = status; @@ -330,16 +341,6 @@ LLMarketplaceInventoryImporter::LLMarketplaceInventoryImporter() { } -void LLMarketplaceInventoryImporter::initialize() -{ - llassert(!mInitialized); - - if (!LLMarketplaceImport::hasSessionCookie()) - { - LLMarketplaceImport::establishMarketplaceSessionCookie(); - } -} - boost::signals2::connection LLMarketplaceInventoryImporter::setInitializationErrorCallback(const status_report_signal_t::slot_type& cb) { if (mErrorInitSignal == NULL) @@ -370,17 +371,32 @@ boost::signals2::connection LLMarketplaceInventoryImporter::setStatusReportCallb return mStatusReportSignal->connect(cb); } +void LLMarketplaceInventoryImporter::initialize() +{ + llassert(!mInitialized); + + if (!LLMarketplaceImport::hasSessionCookie()) + { + LLMarketplaceImport::establishMarketplaceSessionCookie(); + } +} + +void LLMarketplaceInventoryImporter::reinitializeAndTriggerImport() +{ + mInitialized = false; + + initialize(); + + mAutoTriggerImport = true; +} + bool LLMarketplaceInventoryImporter::triggerImport() { const bool import_triggered = LLMarketplaceImport::triggerImport(); if (!import_triggered) { - mInitialized = false; - - initialize(); - - mAutoTriggerImport = true; + reinitializeAndTriggerImport(); } return import_triggered; @@ -396,23 +412,14 @@ void LLMarketplaceInventoryImporter::updateImport() if (!polling_status) { - mInitialized = false; - - initialize(); - - mAutoTriggerImport = true; + reinitializeAndTriggerImport(); } } if (mImportInProgress != in_progress) { mImportInProgress = in_progress; - - if (mStatusChangedSignal) - { - (*mStatusChangedSignal)(mImportInProgress); - } - + // If we are no longer in progress if (!mImportInProgress) { @@ -436,7 +443,7 @@ void LLMarketplaceInventoryImporter::updateImport() { mAutoTriggerImport = false; - triggerImport(); + mImportInProgress = triggerImport(); } } else if (mErrorInitSignal) @@ -445,6 +452,12 @@ void LLMarketplaceInventoryImporter::updateImport() } } } + + // Make sure we trigger the status change with the final state (in case of auto trigger after initialize) + if (mStatusChangedSignal) + { + (*mStatusChangedSignal)(mImportInProgress); + } } } diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index b2f6cb7521..78df86ef3e 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -46,6 +46,7 @@ namespace MarketplaceErrorCodes { IMPORT_DONE = 200, IMPORT_PROCESSING = 202, + IMPORT_REDIRECT = 302, IMPORT_AUTHENTICATION_ERROR = 401, IMPORT_DONE_WITH_ERRORS = 409, IMPORT_JOB_FAILED = 410, @@ -61,8 +62,6 @@ public: LLMarketplaceInventoryImporter(); - void initialize(); - typedef boost::signals2::signal<void (bool)> status_changed_signal_t; typedef boost::signals2::signal<void (U32, const LLSD&)> status_report_signal_t; @@ -70,10 +69,12 @@ public: boost::signals2::connection setStatusChangedCallback(const status_changed_signal_t::slot_type& cb); boost::signals2::connection setStatusReportCallback(const status_report_signal_t::slot_type& cb); + void initialize(); bool triggerImport(); bool isImportInProgress() const { return mImportInProgress; } protected: + void reinitializeAndTriggerImport(); void updateImport(); private: diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 2269703cb6..61346bf3d6 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -230,8 +230,9 @@ All folders were successfully sent to the Marketplace. type="outbox"> Some folders did not transfer -Errors occurred when some folders were sent to the Marketplace. Those folders are still in your Merchant Outbox. See the error log for more information. +Errors occurred when some folders were sent to the Marketplace. Those folders are still in your Merchant Outbox. +See the error log for more information. <usetemplate name="okbutton" yestext="OK"/> @@ -245,8 +246,6 @@ Transfer failed No folders were sent to the Marketplace because of a system or network error. Try again later. -Error [ERROR_CODE] - <usetemplate name="okbutton" yestext="OK"/> @@ -260,8 +259,6 @@ Marketplace initialization failed Initialization with the Marketplace failed because of a system or network error. Try again later. -Error [ERROR_CODE] - <usetemplate name="okbutton" yestext="OK"/> -- cgit v1.2.3 From 98f071aa6fc2961d9a86fa1d174c1f988a6ef8dc Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 11 Jan 2012 11:59:34 -0800 Subject: EXP-1790 FIX -- Hitting return on item in Merchant Outbox wears the object * Disabled the "openItem" function on outbox items to prevent default behavior when the return button is pressed. --- indra/newview/llpanelmarketplaceoutboxinventory.cpp | 5 +++++ indra/newview/llpanelmarketplaceoutboxinventory.h | 1 + 2 files changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.cpp b/indra/newview/llpanelmarketplaceoutboxinventory.cpp index c14a0c8379..ff62cb23db 100644 --- a/indra/newview/llpanelmarketplaceoutboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceoutboxinventory.cpp @@ -148,4 +148,9 @@ BOOL LLOutboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) return TRUE; } +void LLOutboxFolderViewItem::openItem() +{ + // Intentionally do nothing to block attaching items from the outbox +} + // eof diff --git a/indra/newview/llpanelmarketplaceoutboxinventory.h b/indra/newview/llpanelmarketplaceoutboxinventory.h index 167f371f0e..a6c522b7c2 100644 --- a/indra/newview/llpanelmarketplaceoutboxinventory.h +++ b/indra/newview/llpanelmarketplaceoutboxinventory.h @@ -71,6 +71,7 @@ public: // virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + void openItem(); }; -- cgit v1.2.3 From 542c31d547a7a42cd81c2a535805d30b164e31e4 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 11 Jan 2012 13:37:43 -0800 Subject: EXP-1788 FIX -- Outbox drag and drop restrictions can be bypassed if inventory not fully loaded * The "Copy to Outbox" option is now disabled when the item is in the loading state. --- indra/newview/llfolderviewitem.h | 2 + indra/newview/llinventorybridge.cpp | 118 ++++++++++++++++++++++-------------- indra/newview/llinventorybridge.h | 6 +- 3 files changed, 76 insertions(+), 50 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 0f8c3edef8..5a0e58ea0e 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -122,6 +122,8 @@ public: // Mostly for debugging printout purposes. const std::string& getSearchableLabel() { return mSearchableLabel; } + + BOOL isLoading() const { return mIsLoading; } private: BOOL mIsSelected; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8abb6d66ad..e75ef20c6a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1088,108 +1088,132 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid) } } -BOOL LLInvFVBridge::canShare() const +bool LLInvFVBridge::canShare() const { - if (!isAgentInventory()) return FALSE; + bool can_share = false; - const LLInventoryModel* model = getInventoryModel(); - if (!model) return FALSE; - - const LLViewerInventoryItem *item = model->getItem(mUUID); - if (item) + if (isAgentInventory()) { - if (!LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item)) - return FALSE; - return (BOOL)LLGiveInventory::isInventoryGiveAcceptable(item); + const LLInventoryModel* model = getInventoryModel(); + if (model) + { + const LLViewerInventoryItem *item = model->getItem(mUUID); + if (item) + { + if (LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item)) + { + can_share = LLGiveInventory::isInventoryGiveAcceptable(item); + } + } + else + { + // Categories can be given. + can_share = (model->getCategory(mUUID) != NULL); + } + } } - // Categories can be given. - if (model->getCategory(mUUID)) return TRUE; - - return FALSE; + return can_share; } -BOOL LLInvFVBridge::canListOnMarketplace() const +bool LLInvFVBridge::canListOnMarketplace() const { #if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU + LLInventoryModel * model = getInventoryModel(); + const LLViewerInventoryCategory * cat = model->getCategory(mUUID); if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - return FALSE; + return false; } if (!isAgentInventory()) { - return FALSE; + return false; } if (getOutboxFolder().isNull()) { - return FALSE; + return false; } if (isInboxFolder() || isOutboxFolder()) { - return FALSE; + return false; } const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); if (outbox_id.isNull()) { - return FALSE; + return false; } LLViewerInventoryItem * item = model->getItem(mUUID); if (item && !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - return FALSE; + return false; } - return TRUE; + return true; + #else - return FALSE; + return false; #endif } -BOOL LLInvFVBridge::canListOnMarketplaceNow() const +bool LLInvFVBridge::canListOnMarketplaceNow() const { - BOOL can_list = FALSE; - #if ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU + + bool can_list = true; + // Do not allow listing while import is in progress + if (LLMarketplaceInventoryImporter::instanceExists()) + { + can_list = !LLMarketplaceInventoryImporter::instance().isImportInProgress(); + } + const LLInventoryObject* obj = getInventoryObject(); - if (obj) + if (obj && can_list) { - // Get outbox id - const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); - LLFolderViewItem * outbox_itemp = mRoot->getItemByID(outbox_id); + const LLUUID& object_id = obj->getLinkedUUID(); + can_list = object_id.notNull(); - if (outbox_itemp) + if (can_list) { - MASK mask = 0x0; - BOOL drop = FALSE; - EDragAndDropType cargo_type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType()); - void * cargo_data = (void *) obj; - std::string tooltip_msg; - - can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + LLFolderViewFolder * object_folderp = mRoot->getFolderByID(object_id); + if (object_folderp) + { + can_list = !object_folderp->isLoading(); + } } - } - - // Do not allow listing while import is in progress - if (LLMarketplaceInventoryImporter::instanceExists()) - { - if (LLMarketplaceInventoryImporter::instance().isImportInProgress()) + + if (can_list) { - can_list = FALSE; + // Get outbox id + const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); + LLFolderViewItem * outbox_itemp = mRoot->getItemByID(outbox_id); + + if (outbox_itemp) + { + MASK mask = 0x0; + BOOL drop = FALSE; + EDragAndDropType cargo_type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType()); + void * cargo_data = (void *) obj; + std::string tooltip_msg; + + can_list = outbox_itemp->getListener()->dragOrDrop(mask, drop, cargo_type, cargo_data, tooltip_msg); + } } } + + return can_list; +#else + return false; #endif - - return can_list; } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 2ab339b918..cb378b7d7a 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -69,9 +69,9 @@ public: U32 flags = 0x00); virtual ~LLInvFVBridge() {} - BOOL canShare() const; - BOOL canListOnMarketplace() const; - BOOL canListOnMarketplaceNow() const; + bool canShare() const; + bool canListOnMarketplace() const; + bool canListOnMarketplaceNow() const; //-------------------------------------------------------------------- // LLInvFVBridge functionality -- cgit v1.2.3 From 59950f6178699b96e86bfd2c0bc701271b3f1a6b Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 11 Jan 2012 16:49:32 -0800 Subject: EXP-1778 FIX -- Link to Marketplace Error log in transfer failed viewer notification * Added a link to the "imports" log from the "done with errors" notification when sending folders to the marketplace. --- indra/newview/llfloateroutbox.cpp | 6 ++++-- indra/newview/llmarketplacefunctions.cpp | 12 +++++------- indra/newview/llmarketplacefunctions.h | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 3 ++- indra/newview/skins/default/xui/en/strings.xml | 1 + 5 files changed, 13 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 130c26acdc..597602d5ab 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -332,7 +332,7 @@ void LLFloaterOutbox::updateView() std::string outbox_title; std::string outbox_tooltip; - LLStringUtil::format_map_t subs = getMarketplaceStringSubstitutions(); + const LLSD& subs = getMarketplaceStringSubstitutions(); if (mOutboxId.notNull()) { @@ -428,7 +428,9 @@ void LLFloaterOutbox::importReportResults(U32 status, const LLSD& content) } else if (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) { - LLNotificationsUtil::add("OutboxImportHadErrors"); + const LLSD& subs = getMarketplaceStringSubstitutions(); + + LLNotificationsUtil::add("OutboxImportHadErrors", subs); } else { diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 84cbe3cac2..ee7505c4f4 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -72,23 +72,21 @@ static std::string getMarketplaceURL(const std::string& urlStringName) return marketplace_url; } -LLStringUtil::format_map_t getMarketplaceStringSubstitutions() +LLSD getMarketplaceStringSubstitutions() { std::string marketplace_url = getMarketplaceURL("MarketplaceURL"); std::string marketplace_url_create = getMarketplaceURL("MarketplaceURL_CreateStore"); std::string marketplace_url_dashboard = getMarketplaceURL("MarketplaceURL_Dashboard"); + std::string marketplace_url_imports = getMarketplaceURL("MarketplaceURL_Imports"); std::string marketplace_url_info = getMarketplaceURL("MarketplaceURL_LearnMore"); - LLStringUtil::format_map_t agent_map; - agent_map["[AGENT_ID]"] = gAgent.getID().getString(); - - LLStringUtil::format(marketplace_url_dashboard, agent_map); - - LLStringUtil::format_map_t marketplace_sub_map; + LLSD marketplace_sub_map; + marketplace_sub_map["[MARKETPLACE_URL]"] = marketplace_url; marketplace_sub_map["[MARKETPLACE_CREATE_STORE_URL]"] = marketplace_url_create; marketplace_sub_map["[MARKETPLACE_LEARN_MORE_URL]"] = marketplace_url_info; marketplace_sub_map["[MARKETPLACE_DASHBOARD_URL]"] = marketplace_url_dashboard; + marketplace_sub_map["[MARKETPLACE_IMPORTS_URL]"] = marketplace_url_imports; return marketplace_sub_map; } diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 78df86ef3e..4731566366 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -37,7 +37,7 @@ #include "llstring.h" -LLStringUtil::format_map_t getMarketplaceStringSubstitutions(); +LLSD getMarketplaceStringSubstitutions(); namespace MarketplaceErrorCodes diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 61346bf3d6..657d9fe91a 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -232,7 +232,8 @@ Some folders did not transfer Errors occurred when some folders were sent to the Marketplace. Those folders are still in your Merchant Outbox. -See the error log for more information. +See the [[MARKETPLACE_IMPORTS_URL] error log] for more information. + <usetemplate name="okbutton" yestext="OK"/> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index a78f3df5b6..84fce6630b 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2040,6 +2040,7 @@ Returns a string with the requested data about the region <string name="MarketplaceURL">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/</string> <string name="MarketplaceURL_CreateStore">http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.4</string> <string name="MarketplaceURL_Dashboard">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/dashboard</string> + <string name="MarketplaceURL_Imports">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/imports</string> <string name="MarketplaceURL_LearnMore">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/learn_more</string> <string name="InventoryOutboxNotMerchantTitle">Anyone can sell items on the Marketplace.</string> <string name="InventoryOutboxNotMerchantTooltip"></string> -- cgit v1.2.3 From 6452154b19c6592efaf27e07bbee3bc6bcd3a415 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 11 Jan 2012 16:53:08 -0800 Subject: Correcting logic back to way it was, to make sure invalid objects can not be copied to the outbox --- indra/newview/llinventorybridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e75ef20c6a..1d7406883c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1175,8 +1175,9 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const } const LLInventoryObject* obj = getInventoryObject(); + can_list &= (obj != NULL); - if (obj && can_list) + if (can_list) { const LLUUID& object_id = obj->getLinkedUUID(); can_list = object_id.notNull(); -- cgit v1.2.3 From 1307fad7c9f7a1130242a4de7e0144ba4dea6297 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 11 Jan 2012 17:32:22 -0800 Subject: EXP-1752 FIX -- Merchant outbox import completion success modal dialog needs checkbox to disable EXP-1795 PROGRESS -- Update warning dialog for dragging and dropping no-copy items to Merchant Outbox * The text associated with EXP-1795 has been updated but the "apply to all" checkbox has not been implemented yet. * Updated the "0 folders" text to be an empty string instead. --- .../newview/skins/default/xui/en/floater_merchant_outbox.xml | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index 741515d56c..c0f26413cb 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -13,7 +13,7 @@ reuse_instance="true" title="MERCHANT OUTBOX" width="333" > - <string name="OutboxFolderCount0">0 folders</string> + <string name="OutboxFolderCount0"></string> <string name="OutboxFolderCount1">1 folder</string> <string name="OutboxFolderCountN">[NUM] folders</string> <string name="OutboxImporting">Sending folders...</string> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 657d9fe91a..387cee3cee 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -203,12 +203,13 @@ Save changes to current clothing/body part? icon="alertmodal.tga" name="ConfirmNoCopyToOutbox" type="alertmodal"> -You don't have permission to copy this item to the Marketplace Outbox. Are you sure you want to move the following item? +You don't have permission to copy this item to the Merchant Outbox. You can move it or leave it behind. + [ITEM_NAME] <usetemplate - name="okcancelbuttons" - notext="No" - yestext="Yes"/> + name="yesnocancelbuttons" + notext="Don't move item" + yestext="Move item"/> </notification> <notification @@ -220,7 +221,8 @@ Success All folders were successfully sent to the Marketplace. <usetemplate - name="okbutton" + ignoretext="All folders sent to the Marketplace" + name="okignore" yestext="OK"/> </notification> -- cgit v1.2.3 From 2ae55b2be6bea2b95a3fa4cc1ca2c4fe14609a4e Mon Sep 17 00:00:00 2001 From: Jonathan Yap <none@none> Date: Thu, 12 Jan 2012 15:42:31 -0500 Subject: STORM-1798 'Block' menuitem title isn't changed after blocking item in object inspector --- indra/newview/llviewermenu.cpp | 28 ++++++++++++++++++++-- .../default/xui/en/menu_inspect_object_gear.xml | 9 +++++++ 2 files changed, 35 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3a1b8d7623..4d6f6a444e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2762,8 +2762,31 @@ bool enable_object_mute() else { // Just a regular object - return LLSelectMgr::getInstance()->getSelection()-> - contains( object, SELECT_ALL_TES ); + return LLSelectMgr::getInstance()->getSelection()->contains( object, SELECT_ALL_TES ) && + !LLMuteList::getInstance()->isMuted(object->getID()); + } +} + +bool enable_object_unmute() +{ + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + if (!object) return false; + + LLVOAvatar* avatar = find_avatar_from_object(object); + if (avatar) + { + // It's an avatar + LLNameValue *lastname = avatar->getNVPair("LastName"); + bool is_linden = + lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); + bool is_self = avatar->isSelf(); + return !is_linden && !is_self; + } + else + { + // Just a regular object + return LLSelectMgr::getInstance()->getSelection()->contains( object, SELECT_ALL_TES ) && + LLMuteList::getInstance()->isMuted(object->getID());; } } @@ -8281,6 +8304,7 @@ void initialize_menus() enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute)); enable.add("Object.EnableMute", boost::bind(&enable_object_mute)); + enable.add("Object.EnableUnmute", boost::bind(&enable_object_unmute)); enable.add("Object.EnableBuy", boost::bind(&enable_buy_object)); commit.add("Object.ZoomIn", boost::bind(&handle_look_at_selection, "zoom")); diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml index f818ebe2d7..63e154697b 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml @@ -113,6 +113,15 @@ <menu_item_call.on_visible function="Object.EnableMute" /> </menu_item_call> + <menu_item_call + label="Unblock" + layout="topleft" + name="unblock"> + <menu_item_call.on_click + function="Object.Mute" /> + <menu_item_call.on_visible + function="Object.EnableUnmute" /> + </menu_item_call> <menu_item_call label="Zoom In" layout="topleft" -- cgit v1.2.3 From ec2b0e3af34bee7870283e5af2d16f879ad68f1b Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 12 Jan 2012 14:17:47 -0800 Subject: Fixing up 'cancel' button text on no-copy item transfer to outbox message --- indra/newview/skins/default/xui/en/notifications.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 387cee3cee..a7e7436256 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -207,6 +207,7 @@ You don't have permission to copy this item to the Merchant Outbox. You can move [ITEM_NAME] <usetemplate + canceltext="Cancel" name="yesnocancelbuttons" notext="Don't move item" yestext="Move item"/> -- cgit v1.2.3 From ba41aea4b2813ac96cad2bae7c82da6e5eefd63a Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 12 Jan 2012 17:01:23 -0800 Subject: EXP-1795 FIX -- Update warning dialog for dragging and dropping no-copy items to Merchant Outbox * Any drag and drop or copy operation to the merchant outbox that contains one or more no-copy items now brings up a single modal dialog prompting the user to move the no-copy items to the outbox or to leave them all behind. --- indra/newview/llinventorybridge.cpp | 8 +-- indra/newview/llinventoryfunctions.cpp | 60 ++++++++++++++++------ indra/newview/llinventoryfunctions.h | 4 +- indra/newview/lltooldraganddrop.cpp | 8 +++ indra/newview/lltooldraganddrop.h | 3 ++ .../newview/skins/default/xui/en/notifications.xml | 11 ++-- 6 files changed, 66 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1d7406883c..11e22d5226 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1323,7 +1323,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) if (!itemp) return; const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); - copy_item_to_outbox(itemp, outbox_id, LLUUID::null); + copy_item_to_outbox(itemp, outbox_id, LLUUID::null, LLToolDragAndDrop::getOperationId()); } } @@ -2221,7 +2221,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } else if (move_is_into_outbox && !move_is_from_outbox) { - copy_folder_to_outbox(inv_cat, mUUID, cat_id); + copy_folder_to_outbox(inv_cat, mUUID, cat_id, LLToolDragAndDrop::getOperationId()); } else { @@ -2655,7 +2655,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) if (!cat) return; const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false); - copy_folder_to_outbox(cat, outbox_id, cat->getUUID()); + copy_folder_to_outbox(cat, outbox_id, cat->getUUID(), LLToolDragAndDrop::getOperationId()); } #if ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU else if (isMarketplaceSendAction(action)) @@ -3694,7 +3694,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else { - copy_item_to_outbox(inv_item, mUUID, LLUUID::null); + copy_item_to_outbox(inv_item, mUUID, LLUUID::null, LLToolDragAndDrop::getOperationId()); } } // NORMAL or TRASH folder diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index e8efac1ebf..7672f7e674 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -82,6 +82,8 @@ #include "llvoavatarself.h" #include "llwearablelist.h" +#include <boost/foreach.hpp> + BOOL LLInventoryState::sWearNewClothing = FALSE; LLUUID LLInventoryState::sWearNewClothingTransactionID; @@ -535,13 +537,10 @@ void open_outbox() LLFloaterReg::showInstance("outbox"); } -void move_to_outbox_cb(const LLSD& notification, const LLSD& response) +void move_to_outbox_cb_action(const LLSD& payload) { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option != 0) return; // canceled - - LLViewerInventoryItem * viitem = gInventory.getItem(notification["payload"]["item_id"].asUUID()); - LLUUID dest_folder_id = notification["payload"]["dest_folder_id"].asUUID(); + LLViewerInventoryItem * viitem = gInventory.getItem(payload["item_id"].asUUID()); + LLUUID dest_folder_id = payload["dest_folder_id"].asUUID(); if (viitem) { @@ -560,12 +559,12 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response) dest_folder_id, false); - LLUUID top_level_folder = notification["payload"]["top_level_folder"].asUUID(); + LLUUID top_level_folder = payload["top_level_folder"].asUUID(); if (top_level_folder != LLUUID::null) { LLViewerInventoryCategory* category; - + while (parent.notNull()) { LLInventoryModel::cat_array_t* cat_array; @@ -593,20 +592,41 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response) parent = next_parent; } } - + open_outbox(); } } +static S32 move_to_outbox_operation_id = -1; +static std::list<LLSD> move_to_outbox_payloads; + +void move_to_outbox_cb(const LLSD& notification, const LLSD& response) +{ + const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + llassert(move_to_outbox_payloads.size() > 0); + + BOOST_FOREACH(const LLSD& payload, move_to_outbox_payloads) + { + move_to_outbox_cb_action(payload); + } + } + + move_to_outbox_operation_id = -1; + move_to_outbox_payloads.clear(); +} + -void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder) +void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id) { // Collapse links directly to items/folders LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; LLViewerInventoryCategory * linked_category = viewer_inv_item->getLinkedCategory(); if (linked_category != NULL) { - copy_folder_to_outbox(linked_category, dest_folder, top_level_folder); + copy_folder_to_outbox(linked_category, dest_folder, top_level_folder, operation_id); } else { @@ -639,11 +659,21 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL { LLSD args; args["ITEM_NAME"] = inv_item->getName(); + LLSD payload; payload["item_id"] = inv_item->getUUID(); payload["dest_folder_id"] = dest_folder; payload["top_level_folder"] = top_level_folder; - LLNotificationsUtil::add("ConfirmNoCopyToOutbox", args, payload, boost::bind(&move_to_outbox_cb, _1, _2)); + + if (move_to_outbox_operation_id != operation_id) + { + LLNotificationsUtil::add("ConfirmNoCopyToOutbox", args, payload, boost::bind(&move_to_outbox_cb, _1, _2)); + + move_to_outbox_operation_id = operation_id; + move_to_outbox_payloads.clear(); + } + + move_to_outbox_payloads.push_back(payload); } } } @@ -665,7 +695,7 @@ void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder) false); } -void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder) +void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder, S32 operation_id) { LLUUID new_folder_id = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_cat->getName()); gInventory.notifyObservers(); @@ -680,7 +710,7 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++) { LLInventoryItem* item = *iter; - copy_item_to_outbox(item, new_folder_id, top_level_folder); + copy_item_to_outbox(item, new_folder_id, top_level_folder, operation_id); } LLInventoryModel::cat_array_t cat_array_copy = *cat_array; @@ -688,7 +718,7 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++) { LLViewerInventoryCategory* category = *iter; - copy_folder_to_outbox(category, new_folder_id, top_level_folder); + copy_folder_to_outbox(category, new_folder_id, top_level_folder, operation_id); } open_outbox(); diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 9f0ee0571a..a93446000d 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -74,10 +74,10 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s // Generates a string containing the path to the item specified by item_id. void append_path(const LLUUID& id, std::string& path); -void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder); +void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id); void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder); -void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder); +void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder, S32 operation_id); /** Miscellaneous global functions ** ** diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 5a4d177709..8c32dfcb4d 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -282,6 +282,8 @@ void LLCategoryDropDescendentsObserver::done() } */ +S32 LLToolDragAndDrop::sOperationId = 0; + LLToolDragAndDrop::DragAndDropEntry::DragAndDropEntry(dragOrDrop3dImpl f_none, dragOrDrop3dImpl f_self, dragOrDrop3dImpl f_avatar, @@ -644,6 +646,12 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, mToolTipMsg.clear(); + // Increment the operation id for every drop + if (drop) + { + sOperationId++; + } + if (top_view) { handled = TRUE; diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 273d23d1a0..188d36cd1b 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -88,6 +88,7 @@ public: boost::signals2::connection setEndDragCallback( const enddrag_signal_t::slot_type& cb ) { return mEndDragSignal.connect(cb); } uuid_vec_t::size_type getCargoIDsCount() const { return mCargoIDs.size(); } + static S32 getOperationId() { return sOperationId; } protected: enum EDropTarget @@ -127,6 +128,8 @@ protected: LLUUID mSourceID; LLUUID mObjectID; + static S32 sOperationId; + LLVector3d mLastCameraPos; LLVector3d mLastHitPos; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a7e7436256..1a4dab2ac5 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -203,14 +203,11 @@ Save changes to current clothing/body part? icon="alertmodal.tga" name="ConfirmNoCopyToOutbox" type="alertmodal"> -You don't have permission to copy this item to the Merchant Outbox. You can move it or leave it behind. - -[ITEM_NAME] +You don't have permission to copy one or more of these items to the Merchant Outbox. You can move them or leave them behind. <usetemplate - canceltext="Cancel" - name="yesnocancelbuttons" - notext="Don't move item" - yestext="Move item"/> + name="okcancelbuttons" + notext="Don't move item(s)" + yestext="Move item(s)"/> </notification> <notification -- cgit v1.2.3 From 86ef722e7cb2e4c791e8223f5c09a0552b52b574 Mon Sep 17 00:00:00 2001 From: merov <none@none> Date: Fri, 13 Jan 2012 15:11:37 -0800 Subject: EXP-1775 : cleanup a bit PeekMessage() usage, avoid eating one event when reaching MAX_MESSAGE_PER_UPDATE. --- indra/newview/llstartup.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7e02a41e7e..3923b4510a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -804,9 +804,8 @@ bool idle_startup() #ifdef _WIN32 MSG msg; while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) ) - { - display_startup(); - } + { } + display_startup(); #endif timeout.reset(); return FALSE; -- cgit v1.2.3 From d6add298d7c793eda1fee2c03b2ccf91df7f6102 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 13 Jan 2012 16:06:58 -0800 Subject: EXP-1802 FIX -- Create labeled drop target region at bottom of merchant outbox floater for easy top level drop access * Added generic drop zone that highlights green when its functionality will be used. --- indra/newview/llfloateroutbox.cpp | 34 ++- indra/newview/llfloateroutbox.h | 3 + .../default/xui/en/floater_merchant_outbox.xml | 241 +++++++++++---------- 3 files changed, 167 insertions(+), 111 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 597602d5ab..297736f3bd 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -111,6 +111,7 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) , mOutboxId(LLUUID::null) , mOutboxInventoryPanel(NULL) , mOutboxItemCount(0) + , mOutboxTopLevelDropZone(NULL) , mWindowShade(NULL) { } @@ -140,7 +141,9 @@ BOOL LLFloaterOutbox::postBuild() mImportButton = getChild<LLButton>("outbox_import_btn"); mImportButton->setCommitCallback(boost::bind(&LLFloaterOutbox::onImportButtonClicked, this)); - + + mOutboxTopLevelDropZone = getChild<LLPanel>("outbox_generic_drag_target"); + LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLFloaterOutbox::onFocusReceived, this)); return TRUE; @@ -353,6 +356,11 @@ void LLFloaterOutbox::updateView() } } +bool isAccepted(EAcceptance accept) +{ + return (accept >= ACCEPT_YES_COPY_SINGLE); +} + BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, @@ -370,7 +378,7 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL handled = (handled_view != NULL); // Pass all drag and drop for this floater to the outbox inventory control - if (!handled || (*accept == ACCEPT_NO)) + if (!handled || !isAccepted(*accept)) { // Always assume we are going to move the drag and drop operation to the outbox root folder bool move_to_root = true; @@ -394,11 +402,33 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } + + if (mOutboxTopLevelDropZone) + { + mOutboxTopLevelDropZone->setBackgroundVisible(handled && !drop && isAccepted(*accept)); + } + } + else + { + if (mOutboxTopLevelDropZone) + { + mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); + } } return handled; } +void LLFloaterOutbox::onMouseLeave(S32 x, S32 y, MASK mask) +{ + if (mOutboxTopLevelDropZone) + { + mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); + } + + LLFloater::onMouseLeave(x, y, mask); +} + void LLFloaterOutbox::onImportButtonClicked() { mOutboxInventoryPanel->clearSelection(); diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 58b7d6ec98..796c533059 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -66,6 +66,8 @@ public: void showNotification(const LLSD& notify); + void onMouseLeave(S32 x, S32 y, MASK mask); + protected: void fetchOutboxContents(); @@ -103,6 +105,7 @@ private: LLUUID mOutboxId; LLInventoryPanel * mOutboxInventoryPanel; U32 mOutboxItemCount; + LLPanel * mOutboxTopLevelDropZone; LLWindowShade * mWindowShade; }; diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index c0f26413cb..498a9b6ce0 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <floater - open_positioning="cascading" - can_close="true" - can_resize="true" - height="440" - help_topic="floater_merchant_outbox" - min_width="300" - min_height="200" - name="floater_merchant_outbox" - save_rect="true" - save_visibility="false" - reuse_instance="true" - title="MERCHANT OUTBOX" - width="333" > - <string name="OutboxFolderCount0"></string> - <string name="OutboxFolderCount1">1 folder</string> - <string name="OutboxFolderCountN">[NUM] folders</string> - <string name="OutboxImporting">Sending folders...</string> - <string name="OutboxInitializing">Initializing...</string> - <panel + open_positioning="cascading" + can_close="true" + can_resize="true" + height="440" + help_topic="floater_merchant_outbox" + min_width="300" + min_height="200" + name="floater_merchant_outbox" + save_rect="true" + save_visibility="false" + reuse_instance="true" + title="MERCHANT OUTBOX" + width="333"> + <string name="OutboxFolderCount0"></string> + <string name="OutboxFolderCount1">1 folder</string> + <string name="OutboxFolderCountN">[NUM] folders</string> + <string name="OutboxImporting">Sending folders...</string> + <string name="OutboxInitializing">Initializing...</string> + <panel follows="all" layout="topleft" left="0" @@ -26,104 +26,127 @@ label="" height="440" width="333"> - <panel + <panel follows="all" left="10" - bottom="400" + bottom="370" width="313" top="0" - bg_opaque_color="InventoryBackgroundColor" - > - <panel - name="outbox_inventory_placeholder_panel" - follows="all" - layout="topleft" - top="0" - left="0" - width="308" - height="400" - bg_opaque_color="InventoryBackgroundColor" - > - <text - name="outbox_inventory_placeholder_title" - type="string" - follows="top|left|right" - layout="topleft" - top="10" - left="0" - width="308" - height="25" - wrap="true" - halign="center" - font="SansSerifBold"> - Loading... - </text> - <text - name="outbox_inventory_placeholder_text" - type="string" - follows="top|left|right" - layout="topleft" - top="35" - left="0" - width="308" - height="130" - wrap="true" - halign="left" /> - </panel> + bg_opaque_color="InventoryBackgroundColor"> + <panel + name="outbox_inventory_placeholder_panel" + follows="all" + layout="topleft" + top="0" + left="0" + width="308" + height="370" + bg_opaque_color="InventoryBackgroundColor"> + <text + name="outbox_inventory_placeholder_title" + type="string" + follows="top|left|right" + layout="topleft" + top="10" + left="0" + width="308" + height="25" + wrap="true" + halign="center" + font="SansSerifBold"> + Loading... + </text> + <text + name="outbox_inventory_placeholder_text" + type="string" + follows="top|left|right" + layout="topleft" + top="35" + left="0" + width="308" + height="130" + wrap="true" + halign="left" /> + </panel> </panel> - <panel + <panel follows="bottom|left|right" left="10" bottom="435" width="313" - top="405" - bg_opaque_color="InventoryBackgroundColor" - > - <text - name="outbox_folder_count" - type="string" - follows="all" - layout="topleft" - top="10" - left="5" - width="150" - height="20" - wrap="true" - halign="left" - valign="bottom" - font="SansSerif" /> - <button - label="Send to Marketplace" - tool_tip="Push to my Marketplace Storefront" - is_toggle="false" - name="outbox_import_btn" - follows="bottom|right" - tab_stop="false" - halign="center" - top="3" - left="160" - height="25" - width="150" - enabled="false" /> + top="370"> + <panel + name="outbox_generic_drag_target" + mouse_opaque="false" + follows="all" + top="5" + left="5" + width="303" + height="25" + background_visible="false" + bg_alpha_color="EmphasisColor_35" + border="true" + bevel_style="in" + visible="true"> + <text + type="string" + follows="all" + layout="topleft" + top="6" + height="20" + left="5" + width="293" + halign="center" + font="SansSerifMedium" + font_shadow="hard" + valign="bottom"> + Drag items here to create folders + </text> + </panel> + <text + name="outbox_folder_count" + type="string" + follows="all" + layout="topleft" + top="40" + left="5" + width="150" + height="20" + wrap="true" + halign="left" + valign="bottom" + font="SansSerif" /> + <button + label="Send to Marketplace" + tool_tip="Push to my Marketplace Storefront" + is_toggle="false" + name="outbox_import_btn" + follows="bottom|right" + tab_stop="false" + halign="center" + top="37" + left="160" + height="25" + width="150" + enabled="false" /> </panel> - <layout_stack name="import_progress_indicator" orientation="vertical" left="0" height="440" top="0" width="333" follows="all" visible="false"> - <layout_panel /> - <layout_panel height="45" auto_resize="false"> - <layout_stack orientation="horizontal" left="0" height="45" top="0" width="333" follows="all"> - <layout_panel width="0" /> - <layout_panel width="45" auto_resize="false"> - <loading_indicator - height="45" - layout="topleft" - left="0" - top="0" - width="45" - /> - </layout_panel> - <layout_panel width="0" /> - </layout_stack> - </layout_panel> - <layout_panel /> - </layout_stack> - </panel> + <layout_stack name="import_progress_indicator" orientation="vertical" left="0" height="440" top="0" width="333" follows="all" visible="false"> + <layout_panel /> + <layout_panel height="45" auto_resize="false"> + <layout_stack orientation="horizontal" left="0" height="45" top="0" width="333" follows="all"> + <layout_panel width="0" /> + <layout_panel width="45" auto_resize="false"> + <loading_indicator + height="45" + layout="topleft" + left="0" + top="0" + width="45" /> + </layout_panel> + <layout_panel width="0" /> + </layout_stack> + </layout_panel> + <layout_panel /> + </layout_stack> + </panel> </floater> -- cgit v1.2.3 From 6b919e324e55ebcac0e2d33ca44a05fae9ac1d42 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 13 Jan 2012 16:36:57 -0800 Subject: EXP-1803 FIX -- Notify the user when a folder is automatically created for them in the outbox * New confirmation dialog lets them know when a folder was automatically created to contain an item dragged/copied to the outbox. --- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llinventoryfunctions.cpp | 45 ++++++++++++++++------ indra/newview/llinventoryfunctions.h | 2 +- .../newview/skins/default/xui/en/notifications.xml | 22 ++++++++--- 4 files changed, 53 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 11e22d5226..270ef4fddc 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3690,7 +3690,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { if (move_is_from_outbox) { - move_item_within_outbox(inv_item, mUUID); + move_item_within_outbox(inv_item, mUUID, LLToolDragAndDrop::getOperationId()); } else { diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 7672f7e674..f5be271a68 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -532,11 +532,39 @@ void show_item_original(const LLUUID& item_uuid) } } + +static S32 create_folder_in_outbox_operation_id = -1; +static S32 move_to_outbox_operation_id = -1; +static std::list<LLSD> move_to_outbox_payloads; + void open_outbox() { LLFloaterReg::showInstance("outbox"); } +void folder_created_in_outbox_cb(const LLSD& notification, const LLSD& response) +{ + create_folder_in_outbox_operation_id = -1; +} + +LLUUID create_folder_in_outbox_for_item(LLInventoryItem* item, const LLUUID& destFolderId, S32 operation_id) +{ + llassert(item); + llassert(destFolderId.notNull()); + + LLUUID created_folder_id = gInventory.createNewCategory(destFolderId, LLFolderType::FT_NONE, item->getName()); + gInventory.notifyObservers(); + + if (create_folder_in_outbox_operation_id != operation_id) + { + LLNotificationsUtil::add("OutboxFolderCreated", LLSD(), LLSD(), boost::bind(&folder_created_in_outbox_cb, _1, _2)); + + create_folder_in_outbox_operation_id = operation_id; + } + + return created_folder_id; +} + void move_to_outbox_cb_action(const LLSD& payload) { LLViewerInventoryItem * viitem = gInventory.getItem(payload["item_id"].asUUID()); @@ -547,8 +575,8 @@ void move_to_outbox_cb_action(const LLSD& payload) // when moving item directly into outbox create folder with that name if (dest_folder_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false)) { - dest_folder_id = gInventory.createNewCategory(dest_folder_id, LLFolderType::FT_NONE, viitem->getName()); - gInventory.notifyObservers(); + S32 operation_id = payload["operation_id"].asInteger(); + dest_folder_id = create_folder_in_outbox_for_item(viitem, dest_folder_id, operation_id); } LLUUID parent = viitem->getParentUUID(); @@ -597,9 +625,6 @@ void move_to_outbox_cb_action(const LLSD& payload) } } -static S32 move_to_outbox_operation_id = -1; -static std::list<LLSD> move_to_outbox_payloads; - void move_to_outbox_cb(const LLSD& notification, const LLSD& response) { const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -618,7 +643,6 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response) move_to_outbox_payloads.clear(); } - void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id) { // Collapse links directly to items/folders @@ -642,8 +666,7 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL // when moving item directly into outbox create folder with that name if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false)) { - dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName()); - gInventory.notifyObservers(); + dest_folder = create_folder_in_outbox_for_item(inv_item, dest_folder, operation_id); } copy_inventory_item(gAgent.getID(), @@ -664,6 +687,7 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL payload["item_id"] = inv_item->getUUID(); payload["dest_folder_id"] = dest_folder; payload["top_level_folder"] = top_level_folder; + payload["operation_id"] = operation_id; if (move_to_outbox_operation_id != operation_id) { @@ -678,13 +702,12 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL } } -void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder) +void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, S32 operation_id) { // when moving item directly into outbox create folder with that name if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false)) { - dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName()); - gInventory.notifyObservers(); + dest_folder = create_folder_in_outbox_for_item(inv_item, dest_folder, operation_id); } LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item; diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index a93446000d..ce2b89b22e 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -75,7 +75,7 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s void append_path(const LLUUID& id, std::string& path); void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id); -void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder); +void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, S32 operation_id); void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder, S32 operation_id); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 1a4dab2ac5..e44fb3bf28 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -204,11 +204,23 @@ Save changes to current clothing/body part? name="ConfirmNoCopyToOutbox" type="alertmodal"> You don't have permission to copy one or more of these items to the Merchant Outbox. You can move them or leave them behind. - <usetemplate - name="okcancelbuttons" - notext="Don't move item(s)" - yestext="Move item(s)"/> - </notification> + <usetemplate + name="okcancelbuttons" + notext="Don't move item(s)" + yestext="Move item(s)"/> + </notification> + + <notification + icon="OutboxStatus_Success" + name="OutboxFolderCreated" + type="outbox"> +A new folder has been created for each item you have transferred into the top level of your Merchant Outbox. + + <usetemplate + ignoretext="A new folder was created in the Merchant Outbox" + name="okignore" + yestext="OK"/> + </notification> <notification icon="OutboxStatus_Success" -- cgit v1.2.3 From 637409950512ac84a7c94c446ac60875757a92ef Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Fri, 13 Jan 2012 16:41:54 -0800 Subject: EXP-1770 WIP Drag and drop visual selection can be off across hierarchies made shift-selection work consistently across folder boundaries --- indra/newview/llfolderview.cpp | 24 --- indra/newview/llfolderview.h | 5 +- indra/newview/llfolderviewitem.cpp | 364 ++++++++++++++++++++++--------------- indra/newview/llfolderviewitem.h | 18 +- 4 files changed, 223 insertions(+), 188 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index ecd4c2c3de..3167c51970 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -349,10 +349,6 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) { mFolders.insert(mFolders.begin(), folder); } - if (folder->numSelected()) - { - recursiveIncrementNumDescendantsSelected(folder->numSelected()); - } folder->setShowLoadStatus(mShowLoadStatus); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); @@ -694,26 +690,6 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected) return rv; } -void LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items) -{ - // now store resulting selection - if (mAllowMultiSelect) - { - LLFolderViewItem *cur_selection = getCurSelectedItem(); - LLFolderViewFolder::extendSelection(selection, cur_selection, items); - for (S32 i = 0; i < items.count(); i++) - { - addToSelectionList(items[i]); - } - } - else - { - setSelection(selection, FALSE, FALSE); - } - - mSignalSelectCallback = SIGNAL_KEYBOARD_FOCUS; -} - static LLFastTimer::DeclareTimer FTM_SANITIZE_SELECTION("Sanitize Selection"); void LLFolderView::sanitizeSelection() { diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 8af01e9102..d4305a2fe2 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -106,6 +106,8 @@ public: U32 getSortOrder() const; BOOL isFilterModified(); + bool getAllowMultiSelect() { return mAllowMultiSelect; } + // Close all folders in the view void closeAllFolders(); void openTopLevelFolders(); @@ -141,8 +143,6 @@ public: // children, and keeps track of selected objects. virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); - virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items); - virtual std::set<LLUUID> getSelectionList() const; // make sure if ancestor is selected, descendents are not @@ -156,7 +156,6 @@ public: void setDraggingOverItem(LLFolderViewItem* item) { mDraggingOverItem = item; } LLFolderViewItem* getDraggingOverItem() { return mDraggingOverItem; } - // deletion functionality void removeSelectedItems(); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index f27fd035db..ca7e4bc1d0 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -386,13 +386,6 @@ void LLFolderViewItem::changeSelectionFromRoot(LLFolderViewItem* selection, BOOL getRoot()->changeSelection(selection, selected); } -void LLFolderViewItem::extendSelectionFromRoot(LLFolderViewItem* selection) -{ - LLDynamicArray<LLFolderViewItem*> selected_items; - - getRoot()->extendSelection(selection, NULL, selected_items); -} - std::set<LLUUID> LLFolderViewItem::getSelectionList() const { std::set<LLUUID> selection; @@ -496,10 +489,6 @@ BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, if (selection == this && !mIsSelected) { selectItem(); - if (mListener) - { - mListener->selectItem(); - } } else if (mIsSelected) // Deselect everything else. { @@ -520,10 +509,6 @@ BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selecte { selectItem(); } - if (mListener) - { - mListener->selectItem(); - } return TRUE; } return FALSE; @@ -531,30 +516,16 @@ BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selecte void LLFolderViewItem::deselectItem(void) { - llassert(mIsSelected); - mIsSelected = FALSE; - - // Update ancestors' count of selected descendents. - LLFolderViewFolder* parent_folder = getParentFolder(); - if (parent_folder) - { - parent_folder->recursiveIncrementNumDescendantsSelected(-1); - } } void LLFolderViewItem::selectItem(void) { - llassert(!mIsSelected); - - mIsSelected = TRUE; - - // Update ancestors' count of selected descendents. - LLFolderViewFolder* parent_folder = getParentFolder(); - if (parent_folder) + if (mListener) { - parent_folder->recursiveIncrementNumDescendantsSelected(1); + mListener->selectItem(); } + mIsSelected = TRUE; } BOOL LLFolderViewItem::isMovable() @@ -697,7 +668,7 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) } else if (mask & MASK_SHIFT) { - extendSelectionFromRoot(this); + getParentFolder()->extendSelectionTo(this); } else { @@ -812,7 +783,7 @@ BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask ) } else if (mask & MASK_SHIFT) { - extendSelectionFromRoot(this); + getParentFolder()->extendSelectionTo(this); } else { @@ -1125,7 +1096,6 @@ void LLFolderViewItem::draw() LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ): LLFolderViewItem( p ), // 0 = no create time - mNumDescendantsSelected(0), mIsOpen(FALSE), mExpanderHighlighted(FALSE), mCurHeight(0.f), @@ -1572,21 +1542,6 @@ BOOL LLFolderViewFolder::hasFilteredDescendants() return mMostFilteredDescendantGeneration >= getRoot()->getFilter()->getCurrentGeneration(); } -void LLFolderViewFolder::recursiveIncrementNumDescendantsSelected(S32 increment) -{ - LLFolderViewFolder* parent_folder = this; - do - { - parent_folder->mNumDescendantsSelected += increment; - - // Make sure we don't have negative values. - llassert(parent_folder->mNumDescendantsSelected >= 0); - - parent_folder = parent_folder->getParentFolder(); - } - while(parent_folder); -} - // Passes selection information on to children and record selection // information if necessary. BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, @@ -1599,10 +1554,6 @@ BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem { selectItem(); } - if (mListener) - { - mListener->selectItem(); - } rv = TRUE; } else @@ -1663,10 +1614,6 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec deselectItem(); } } - if (mListener && selected) - { - mListener->selectItem(); - } } for (folders_t::iterator iter = mFolders.begin(); @@ -1690,119 +1637,261 @@ BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection, BOOL selec return rv; } -void LLFolderViewFolder::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& selected_items) +LLFolderViewFolder* LLFolderViewFolder::getCommonAncestor(LLFolderViewItem* item_a, LLFolderViewItem* item_b, bool& reverse) { - // pass on to child folders first - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) + if (!item_a->getParentFolder() || !item_b->getParentFolder()) return NULL; + + std::deque<LLFolderViewFolder*> item_a_ancestors; + + LLFolderViewFolder* parent = item_a->getParentFolder(); + while(parent) { - folders_t::iterator fit = iter++; - (*fit)->extendSelection(selection, last_selected, selected_items); + item_a_ancestors.push_back(parent); + parent = parent->getParentFolder(); } - // handle selection of our immediate children... - BOOL reverse_select = FALSE; - BOOL found_last_selected = FALSE; - BOOL found_selection = FALSE; - LLDynamicArray<LLFolderViewItem*> items_to_select; - LLFolderViewItem* item; + std::deque<LLFolderViewFolder*> item_b_ancestors; + + parent = item_b->getParentFolder(); + while(parent) + { + item_b_ancestors.push_back(parent); + parent = parent->getParentFolder(); + } - //...folders first... - for (folders_t::iterator iter = mFolders.begin(); - iter != mFolders.end();) + LLFolderViewFolder* common_ancestor = item_a->getRoot(); + + while(item_a_ancestors.size() > item_b_ancestors.size()) { - folders_t::iterator fit = iter++; - item = (*fit); - if(item == selection) - { - found_selection = TRUE; - } - else if (item == last_selected) + item_a = item_a_ancestors.front(); + item_a_ancestors.pop_front(); + } + + while(item_b_ancestors.size() > item_a_ancestors.size()) + { + item_b = item_b_ancestors.front(); + item_b_ancestors.pop_front(); + } + + while(item_a_ancestors.size()) + { + common_ancestor = item_a_ancestors.front(); + + if (item_a_ancestors.front() == item_b_ancestors.front()) { - found_last_selected = TRUE; - if (found_selection) + // which came first, sibling a or sibling b? + for (folders_t::iterator it = common_ancestor->mFolders.begin(), end_it = common_ancestor->mFolders.end(); + it != end_it; + ++it) { - reverse_select = TRUE; + LLFolderViewItem* item = *it; + + if (item == item_a) + { + reverse = false; + return common_ancestor; + } + if (item == item_b) + { + reverse = true; + return common_ancestor; + } } - } - if (found_selection || found_last_selected) - { - // deselect currently selected items so they can be pushed back on queue - if (item->isSelected()) + for (items_t::iterator it = common_ancestor->mItems.begin(), end_it = common_ancestor->mItems.end(); + it != end_it; + ++it) { - item->changeSelection(item, FALSE); + LLFolderViewItem* item = *it; + + if (item == item_a) + { + reverse = false; + return common_ancestor; + } + if (item == item_b) + { + reverse = true; + return common_ancestor; + } } - items_to_select.put(item); + break; } - if (found_selection && found_last_selected) - { - break; - } + item_a = item_a_ancestors.front(); + item_a_ancestors.pop_front(); + item_b = item_b_ancestors.front(); + item_b_ancestors.pop_front(); } - if (!(found_selection && found_last_selected)) + return NULL; +} + +void LLFolderViewFolder::gatherChildRangeExclusive(LLFolderViewItem* start, LLFolderViewItem* end, bool reverse, std::vector<LLFolderViewItem*>& items) +{ + bool selecting = start == NULL; + if (reverse) { - //,,,then items - for (items_t::iterator iter = mItems.begin(); - iter != mItems.end();) + for (items_t::reverse_iterator it = mItems.rbegin(), end_it = mItems.rend(); + it != end_it; + ++it) { - items_t::iterator iit = iter++; - item = (*iit); - if(item == selection) + if (*it == end) { - found_selection = TRUE; + return; } - else if (item == last_selected) + if (selecting) { - found_last_selected = TRUE; - if (found_selection) - { - reverse_select = TRUE; - } + items.push_back(*it); } - if (found_selection || found_last_selected) + if (*it == start) { - // deselect currently selected items so they can be pushed back on queue - if (item->isSelected()) - { - item->changeSelection(item, FALSE); - } - items_to_select.put(item); + selecting = true; + } + } + for (folders_t::reverse_iterator it = mFolders.rbegin(), end_it = mFolders.rend(); + it != end_it; + ++it) + { + if (*it == end) + { + return; } - if (found_selection && found_last_selected) + if (selecting) { - break; + items.push_back(*it); + } + + if (*it == start) + { + selecting = true; } } } - - if (found_last_selected && found_selection) + else { - // we have a complete selection inside this folder - for (S32 index = reverse_select ? items_to_select.getLength() - 1 : 0; - reverse_select ? index >= 0 : index < items_to_select.getLength(); reverse_select ? index-- : index++) + for (folders_t::iterator it = mFolders.begin(), end_it = mFolders.end(); + it != end_it; + ++it) + { + if (*it == end) + { + return; + } + + if (selecting) + { + items.push_back(*it); + } + + if (*it == start) + { + selecting = true; + } + } + for (items_t::iterator it = mItems.begin(), end_it = mItems.end(); + it != end_it; + ++it) { - LLFolderViewItem* item = items_to_select[index]; - if (item->changeSelection(item, TRUE)) + if (*it == end) + { + return; + } + + if (selecting) + { + items.push_back(*it); + } + + if (*it == start) { - selected_items.put(item); + selecting = true; } } } - else if (found_selection) +} + +void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) +{ + if (getRoot()->getAllowMultiSelect() == FALSE) return; + + LLFolderViewItem* cur_selected_item = getRoot()->getCurSelectedItem(); + if (cur_selected_item == NULL) + { + cur_selected_item = new_selection; + } + + + bool reverse = false; + LLFolderViewFolder* common_ancestor = getCommonAncestor(cur_selected_item, new_selection, reverse); + if (!common_ancestor) return; + + LLFolderViewItem* last_selected_item_from_cur = cur_selected_item; + LLFolderViewFolder* cur_folder = cur_selected_item->getParentFolder(); + + std::vector<LLFolderViewItem*> items_to_select_forward; + + while(cur_folder != common_ancestor) + { + cur_folder->gatherChildRangeExclusive(last_selected_item_from_cur, NULL, reverse, items_to_select_forward); + + last_selected_item_from_cur = cur_folder; + cur_folder = cur_folder->getParentFolder(); + } + + std::vector<LLFolderViewItem*> items_to_select_reverse; + + LLFolderViewItem* last_selected_item_from_new = new_selection; + cur_folder = new_selection->getParentFolder(); + while(cur_folder != common_ancestor) + { + cur_folder->gatherChildRangeExclusive(last_selected_item_from_new, NULL, !reverse, items_to_select_reverse); + + last_selected_item_from_new = cur_folder; + cur_folder = cur_folder->getParentFolder(); + } + + common_ancestor->gatherChildRangeExclusive(last_selected_item_from_cur, last_selected_item_from_new, reverse, items_to_select_forward); + + for (std::vector<LLFolderViewItem*>::reverse_iterator it = items_to_select_reverse.rbegin(), end_it = items_to_select_reverse.rend(); + it != end_it; + ++it) { - // last selection was not in this folder....go ahead and select just the new item - if (selection->changeSelection(selection, TRUE)) + items_to_select_forward.push_back(*it); + } + + LLFolderView* root = getRoot(); + + for (std::vector<LLFolderViewItem*>::iterator it = items_to_select_forward.begin(), end_it = items_to_select_forward.end(); + it != end_it; + ++it) + { + LLFolderViewItem* item = *it; + if (item->isSelected()) + { + root->removeFromSelectionList(item); + } + else { - selected_items.put(selection); + item->selectItem(); } + root->addToSelectionList(item); } + + if (new_selection->isSelected()) + { + root->removeFromSelectionList(new_selection); + } + else + { + new_selection->selectItem(); + } + root->addToSelectionList(new_selection); } + void LLFolderViewFolder::destroyView() { for (items_t::iterator iter = mItems.begin(); @@ -1874,19 +1963,11 @@ void LLFolderViewFolder::extractItem( LLFolderViewItem* item ) ft = std::find(mFolders.begin(), mFolders.end(), f); if (ft != mFolders.end()) { - if ((*ft)->numSelected()) - { - recursiveIncrementNumDescendantsSelected(-(*ft)->numSelected()); - } mFolders.erase(ft); } } else { - if ((*it)->isSelected()) - { - recursiveIncrementNumDescendantsSelected(-1); - } mItems.erase(it); } //item has been removed, need to update filter @@ -2055,11 +2136,6 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) { mItems.push_back(item); - if (item->isSelected()) - { - recursiveIncrementNumDescendantsSelected(1); - } - item->setRect(LLRect(0, 0, getRect().getWidth(), 0)); item->setVisible(FALSE); @@ -2097,10 +2173,6 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder) { mFolders.push_back(folder); - if (folder->numSelected()) - { - recursiveIncrementNumDescendantsSelected(folder->numSelected()); - } folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 3433e3f7f3..29c5b2246d 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -164,9 +164,6 @@ protected: // helper function to change the selection from the root. void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected); - // helper function to change the selection from the root. - void extendSelectionFromRoot(LLFolderViewItem* selection); - // this is an internal method used for adding items to folders. A // no-op at this level, but reimplemented in derived classes. virtual BOOL addItem(LLFolderViewItem*) { return FALSE; } @@ -224,9 +221,6 @@ public: // Returns TRUE if the selection state of this item was changed. virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); - // this method is used to group select items - virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items) { } - // this method is used to deselect this element void deselectItem(); @@ -373,13 +367,6 @@ public: typedef std::list<LLFolderViewItem*> items_t; typedef std::list<LLFolderViewFolder*> folders_t; -private: - S32 mNumDescendantsSelected; - -public: // Accessed needed by LLFolderViewItem - void recursiveIncrementNumDescendantsSelected(S32 increment); - S32 numSelected(void) const { return mNumDescendantsSelected + (isSelected() ? 1 : 0); } - protected: items_t mItems; folders_t mFolders; @@ -461,7 +448,7 @@ public: virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected); // this method is used to group select items - virtual void extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items); + void extendSelectionTo(LLFolderViewItem* selection); // Returns true is this object and all of its children can be removed. virtual BOOL isRemovable(); @@ -551,7 +538,6 @@ public: time_t getCreationDate() const; bool isTrash() const; - S32 getNumSelectedDescendants(void) const { return mNumDescendantsSelected; } folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); } folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); } @@ -560,6 +546,8 @@ public: items_t::const_iterator getItemsBegin() const { return mItems.begin(); } items_t::const_iterator getItemsEnd() const { return mItems.end(); } items_t::size_type getItemsCount() const { return mItems.size(); } + LLFolderViewFolder* getCommonAncestor(LLFolderViewItem* item_a, LLFolderViewItem* item_b, bool& reverse); + void gatherChildRangeExclusive(LLFolderViewItem* start, LLFolderViewItem* end, bool reverse, std::vector<LLFolderViewItem*>& items); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 5e5105bd223f5180bbca634ba2c393be2ef3d13d Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Fri, 13 Jan 2012 18:37:50 -0800 Subject: EXP-1770 WIP Drag and drop visual selection can be off across hierarchies added throttling to fetchInventoryItem queries --- indra/newview/llfolderviewitem.cpp | 11 +- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llinventorymodelbackgroundfetch.cpp | 328 +++++++++++++++------- indra/newview/llinventorymodelbackgroundfetch.h | 16 +- 4 files changed, 237 insertions(+), 120 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index ca7e4bc1d0..50d62b29d3 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -499,7 +499,7 @@ BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected) { - if (selection == this && mIsSelected != selected) + if (selection == this) { if (mIsSelected) { @@ -521,11 +521,14 @@ void LLFolderViewItem::deselectItem(void) void LLFolderViewItem::selectItem(void) { - if (mListener) + if (mIsSelected == FALSE) { - mListener->selectItem(); + if (mListener) + { + mListener->selectItem(); + } + mIsSelected = TRUE; } - mIsSelected = TRUE; } BOOL LLFolderViewItem::isMovable() diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index eaf9b53eb9..5916ed60a4 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1234,7 +1234,7 @@ void LLItemBridge::selectItem() LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem()); if(item && !item->isFinished()) { - item->fetchFromServer(); + LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); } } diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 91fdd67806..5f0c744192 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -50,7 +50,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : mMinTimeBetweenFetches(0.3f), mMaxTimeBetweenFetches(10.f), mTimelyFetchPending(FALSE), - mBulkFetchCount(0) + mFetchCount(0) { } @@ -60,7 +60,7 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const { - return mFetchQueue.empty() && mBulkFetchCount<=0; + return mFetchQueue.empty() && mFetchCount<=0; } bool LLInventoryModelBackgroundFetch::libraryFetchStarted() const @@ -103,44 +103,60 @@ BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const return mBackgroundFetchActive; } -void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive) +void LLInventoryModelBackgroundFetch::start(const LLUUID& id, BOOL recursive) { - if (!mAllFoldersFetched || cat_id.notNull()) - { - LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL; + if (id.isNull()) return; - mBackgroundFetchActive = TRUE; - if (cat_id.isNull()) + LLViewerInventoryCategory* cat = gInventory.getCategory(id); + if (cat) + { // it's a folder, do a bulk fetch + if (!mAllFoldersFetched) { - if (!mRecursiveInventoryFetchStarted) + LL_DEBUGS("InventoryFetch") << "Start fetching category: " << id << ", recursive: " << recursive << LL_ENDL; + + mBackgroundFetchActive = TRUE; + if (id.isNull()) { - mRecursiveInventoryFetchStarted |= recursive; - mFetchQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursive)); - gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + if (!mRecursiveInventoryFetchStarted) + { + mRecursiveInventoryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursive)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } + if (!mRecursiveLibraryFetchStarted) + { + mRecursiveLibraryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursive)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } } - if (!mRecursiveLibraryFetchStarted) + else { - mRecursiveLibraryFetchStarted |= recursive; - mFetchQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursive)); - gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + // Specific folder requests go to front of queue. + if (mFetchQueue.empty() || mFetchQueue.front().mUUID != id) + { + mFetchQueue.push_front(FetchQueueInfo(id, recursive)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } + if (id == gInventory.getLibraryRootFolderID()) + { + mRecursiveLibraryFetchStarted |= recursive; + } + if (id == gInventory.getRootFolderID()) + { + mRecursiveInventoryFetchStarted |= recursive; + } } } - else + } + else if (LLViewerInventoryItem* itemp = gInventory.getItem(id)) + { + if (!itemp->mIsComplete && (mFetchQueue.empty() || mFetchQueue.front().mUUID != id)) { - // Specific folder requests go to front of queue. - if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id) - { - mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive)); - gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - } - if (cat_id == gInventory.getLibraryRootFolderID()) - { - mRecursiveLibraryFetchStarted |= recursive; - } - if (cat_id == gInventory.getRootFolderID()) - { - mRecursiveInventoryFetchStarted |= recursive; - } + mBackgroundFetchActive = TRUE; + + mFetchQueue.push_front(FetchQueueInfo(id, false, false)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } } } @@ -158,7 +174,7 @@ void LLInventoryModelBackgroundFetch::stopBackgroundFetch() { mBackgroundFetchActive = FALSE; gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - mBulkFetchCount=0; + mFetchCount=0; mMinTimeBetweenFetches=0.0f; } } @@ -183,10 +199,9 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (mBackgroundFetchActive && gAgent.getRegion()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents2"); - if (gSavedSettings.getBOOL("UseHTTPInventory") && !url.empty()) + if (gSavedSettings.getBOOL("UseHTTPInventory")) { - bulkFetch(url); + bulkFetch(); return; } @@ -230,7 +245,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } const FetchQueueInfo info = mFetchQueue.front(); - LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID); + LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); // Category has been deleted, remove from queue. if (!cat) @@ -258,7 +273,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } } // Do I have all my children? - else if (gInventory.isCategoryComplete(info.mCatUUID)) + else if (gInventory.isCategoryComplete(info.mUUID)) { // Finished with this category, remove from queue. mFetchQueue.pop_front(); @@ -313,15 +328,35 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } } -void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching) +void LLInventoryModelBackgroundFetch::incrFetchCount(S16 fetching) { - mBulkFetchCount += fetching; - if (mBulkFetchCount < 0) + mFetchCount += fetching; + if (mFetchCount < 0) { - mBulkFetchCount = 0; + mFetchCount = 0; } } +class LLInventoryModelFetchItemResponder : public LLInventoryModel::fetchInventoryResponder +{ +public: + LLInventoryModelFetchItemResponder(const LLSD& request_sd) : LLInventoryModel::fetchInventoryResponder(request_sd) {}; + void result(const LLSD& content); + void error(U32 status, const std::string& reason); +}; + +void LLInventoryModelFetchItemResponder::result( const LLSD& content ) +{ + LLInventoryModel::fetchInventoryResponder::result(content); + LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1); +} + +void LLInventoryModelFetchItemResponder::error( U32 status, const std::string& reason ) +{ + LLInventoryModel::fetchInventoryResponder::error(status, reason); + LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1); +} + class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder { @@ -458,7 +493,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) } } - fetcher->incrBulkFetch(-1); + fetcher->incrFetchCount(-1); if (fetcher->isBulkFetchProcessingComplete()) { @@ -477,7 +512,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str llinfos << "LLInventoryModelFetchDescendentsResponder::error " << status << ": " << reason << llendl; - fetcher->incrBulkFetch(-1); + fetcher->incrFetchCount(-1); if (status==499) // timed out { @@ -508,12 +543,14 @@ BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat // Bundle up a bunch of requests to send all at once. // static -void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) +void LLInventoryModelBackgroundFetch::bulkFetch() { //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. //Stopbackgroundfetch will be run from the Responder instead of here. + LLViewerRegion* region = gAgent.getRegion(); + if (!region) return; S16 max_concurrent_fetches=8; F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely. @@ -523,12 +560,13 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) } if (gDisconnected || - (mBulkFetchCount > max_concurrent_fetches) || + (mFetchCount > max_concurrent_fetches) || (mFetchTimer.getElapsedTimeF32() < mMinTimeBetweenFetches)) { return; // just bail if we are disconnected } + U32 item_count=0; U32 folder_count=0; U32 max_batch_size=5; @@ -536,83 +574,159 @@ void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) uuid_vec_t recursive_cats; - LLSD body; - LLSD body_lib; + LLSD folder_request_body; + LLSD folder_request_body_lib; + LLSD item_request_body; + LLSD item_request_body_lib; - while (!(mFetchQueue.empty()) && (folder_count < max_batch_size)) + while (!(mFetchQueue.empty()) && ((item_count + folder_count) < max_batch_size)) { const FetchQueueInfo& fetch_info = mFetchQueue.front(); - const LLUUID &cat_id = fetch_info.mCatUUID; - if (cat_id.isNull()) //DEV-17797 - { - LLSD folder_sd; - folder_sd["folder_id"] = LLUUID::null.asString(); - folder_sd["owner_id"] = gAgent.getID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - body["folders"].append(folder_sd); - folder_count++; - } - else - { - const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (fetch_info.mIsCategory) + { + + const LLUUID &cat_id = fetch_info.mUUID; + if (cat_id.isNull()) //DEV-17797 + { + LLSD folder_sd; + folder_sd["folder_id"] = LLUUID::null.asString(); + folder_sd["owner_id"] = gAgent.getID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + folder_request_body["folders"].append(folder_sd); + folder_count++; + } + else + { + const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - if (cat) - { - if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - LLSD folder_sd; - folder_sd["folder_id"] = cat->getUUID(); - folder_sd["owner_id"] = cat->getOwnerID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - - if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) - body_lib["folders"].append(folder_sd); - else - body["folders"].append(folder_sd); - folder_count++; - } - // May already have this folder, but append child folders to list. - if (fetch_info.mRecursive) - { - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) + if (cat) + { + if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); - } - } - } - } - if (fetch_info.mRecursive) - recursive_cats.push_back(cat_id); + LLSD folder_sd; + folder_sd["folder_id"] = cat->getUUID(); + folder_sd["owner_id"] = cat->getOwnerID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + + if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) + folder_request_body_lib["folders"].append(folder_sd); + else + folder_request_body["folders"].append(folder_sd); + folder_count++; + } + // May already have this folder, but append child folders to list. + if (fetch_info.mRecursive) + { + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); + } + } + } + } + if (fetch_info.mRecursive) + recursive_cats.push_back(cat_id); + } + else + { + LLViewerInventoryItem* itemp = gInventory.getItem(fetch_info.mUUID); + if (itemp) + { + LLSD item_sd; + item_sd["owner_id"] = itemp->getPermissions().getOwner(); + item_sd["item_id"] = itemp->getUUID(); + if (itemp->getPermissions().getOwner() == gAgent.getID()) + { + item_request_body.append(item_sd); + } + else + { + item_request_body_lib.append(item_sd); + } + //itemp->fetchFromServer(); + item_count++; + } + } mFetchQueue.pop_front(); } - if (folder_count > 0) + if (item_count + folder_count > 0) { - mBulkFetchCount++; - if (body["folders"].size()) + if (folder_count) { - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body, recursive_cats); - LLHTTPClient::post(url, body, fetcher, 300.0); + std::string url = region->getCapability("FetchInventoryDescendents2"); + mFetchCount++; + if (folder_request_body["folders"].size()) + { + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats); + LLHTTPClient::post(url, folder_request_body, fetcher, 300.0); + } + if (folder_request_body_lib["folders"].size()) + { + std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); + + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body_lib, recursive_cats); + LLHTTPClient::post(url_lib, folder_request_body_lib, fetcher, 300.0); + } } - if (body_lib["folders"].size()) + if (item_count) { - std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); - - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats); - LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0); + std::string url; + + if (item_request_body.size()) + { + mFetchCount++; + url = region->getCapability("FetchInventory2"); + if (!url.empty()) + { + LLSD body; + body["agent_id"] = gAgent.getID(); + body["items"] = item_request_body; + + LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body)); + } + //else + //{ + // LLMessageSystem* msg = gMessageSystem; + // msg->newMessage("FetchInventory"); + // msg->nextBlock("AgentData"); + // msg->addUUID("AgentID", gAgent.getID()); + // msg->addUUID("SessionID", gAgent.getSessionID()); + // msg->nextBlock("InventoryData"); + // msg->addUUID("OwnerID", mPermissions.getOwner()); + // msg->addUUID("ItemID", mUUID); + // gAgent.sendReliableMessage(); + //} + } + + if (item_request_body_lib.size()) + { + mFetchCount++; + + url = region->getCapability("FetchLib2"); + if (!url.empty()) + { + LLSD body; + body["agent_id"] = gAgent.getID(); + body["items"] = item_request_body_lib; + + LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body)); + } + } } mFetchTimer.reset(); } + else if (isBulkFetchProcessingComplete()) { setAllFoldersFetched(); @@ -624,7 +738,7 @@ bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LL for (fetch_queue_t::const_iterator it = mFetchQueue.begin(); it != mFetchQueue.end(); ++it) { - const LLUUID& fetch_id = (*it).mCatUUID; + const LLUUID& fetch_id = (*it).mUUID; if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) return false; } diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index c35c785ceb..0745407a8c 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -60,10 +60,10 @@ public: bool inventoryFetchInProgress() const; void findLostItems(); + void incrFetchCount(S16 fetching); protected: - void incrBulkFetch(S16 fetching); bool isBulkFetchProcessingComplete() const; - void bulkFetch(std::string url); + void bulkFetch(); void backgroundFetch(); static void backgroundFetchCB(void*); // background fetch idle function @@ -77,7 +77,7 @@ private: BOOL mAllFoldersFetched; BOOL mBackgroundFetchActive; - S16 mBulkFetchCount; + S16 mFetchCount; BOOL mTimelyFetchPending; S32 mNumFetchRetries; @@ -87,11 +87,11 @@ private: struct FetchQueueInfo { - FetchQueueInfo(const LLUUID& id, BOOL recursive) : - mCatUUID(id), mRecursive(recursive) - { - } - LLUUID mCatUUID; + FetchQueueInfo(const LLUUID& id, BOOL recursive, bool is_category = true) : + mUUID(id), mRecursive(recursive), mIsCategory(is_category) + {} + LLUUID mUUID; + bool mIsCategory; BOOL mRecursive; }; typedef std::deque<FetchQueueInfo> fetch_queue_t; -- cgit v1.2.3 From c0d2d316bef9157fcf80e7ee33aff38b55410f16 Mon Sep 17 00:00:00 2001 From: Jonathan Yap <none@none> Date: Sun, 15 Jan 2012 10:04:41 -0500 Subject: STORM-1796 Preferences->Privacy->Only friends and groups can call or IM me cannot be changed unless Voice Chat is enabled --- indra/newview/skins/default/xui/en/panel_preferences_privacy.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 47236c1a48..587c461bee 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -59,7 +59,6 @@ top_pad="30" width="350" /> <check_box - enabled_control="EnableVoiceChat" control_name="VoiceCallsFriendsOnly" height="16" label="Only friends and groups can call or IM me" -- cgit v1.2.3 From 1fc53d33bd6ca6e6cb2f32281e54bd5c78b15610 Mon Sep 17 00:00:00 2001 From: Jonathan Yap <none@none> Date: Mon, 16 Jan 2012 12:16:17 -0500 Subject: STORM-1799 Object doesn't appear in Block list if trying to block from Remote object inspector --- indra/newview/llinspectremoteobject.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index bf6cf52298..a12ec390af 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -60,12 +60,10 @@ public: private: void update(); - void onNameCache(const LLUUID& id, const std::string& name, bool is_group); private: LLUUID mObjectID; LLUUID mOwnerID; - std::string mOwnerLegacyName; std::string mSLurl; std::string mName; bool mGroupOwned; @@ -75,7 +73,6 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) : LLInspect(LLSD()), mObjectID(NULL), mOwnerID(NULL), - mOwnerLegacyName(), mSLurl(""), mName(""), mGroupOwned(false) @@ -111,14 +108,6 @@ void LLInspectRemoteObject::onOpen(const LLSD& data) mGroupOwned = data["group_owned"].asBoolean(); mSLurl = data["slurl"].asString(); - // work out the owner's name - mOwnerLegacyName = ""; - if (gCacheName) - { - gCacheName->get(mOwnerID, mGroupOwned, // muting - boost::bind(&LLInspectRemoteObject::onNameCache, this, _1, _2, _3)); - } - // update the inspector with the current object state update(); @@ -144,8 +133,7 @@ void LLInspectRemoteObject::onClickMap() void LLInspectRemoteObject::onClickBlock() { - LLMute::EType mute_type = mGroupOwned ? LLMute::GROUP : LLMute::AGENT; - LLMute mute(mOwnerID, mOwnerLegacyName, mute_type); + LLMute mute(mObjectID, mName, LLMute::OBJECT); LLMuteList::getInstance()->add(mute); LLPanelBlockedList::showPanelAndSelect(mute.mID); closeFloater(); @@ -156,12 +144,6 @@ void LLInspectRemoteObject::onClickClose() closeFloater(); } -void LLInspectRemoteObject::onNameCache(const LLUUID& id, const std::string& name, bool is_group) -{ - mOwnerLegacyName = name; - update(); -} - void LLInspectRemoteObject::update() { // show the object name as the inspector's title @@ -198,8 +180,8 @@ void LLInspectRemoteObject::update() // disable the Map button if we don't have a SLurl getChild<LLUICtrl>("map_btn")->setEnabled(! mSLurl.empty()); - // disable the Block button if we don't have the owner ID - getChild<LLUICtrl>("block_btn")->setEnabled(! mOwnerID.isNull()); + // disable the Block button if we don't have the object ID (will this ever happen?) + getChild<LLUICtrl>("block_btn")->setEnabled(! mObjectID.isNull()); } ////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From cd4204b2730350eede126190814621b65308c422 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Mon, 16 Jan 2012 11:03:33 -0800 Subject: EXP-1758 WIP Progress spinner not shown during merketplace synch if Merchant Outbox floater was previously minimized rewrote layout_stack resizing logic to be symmetrical --- indra/newview/llchathistory.cpp | 1 - indra/newview/llchicletbar.cpp | 27 --- indra/newview/llfloaternotificationsconsole.cpp | 2 +- indra/newview/llimfloater.cpp | 3 - indra/newview/llsidepanelinventory.cpp | 1 - .../skins/default/xui/en/floater_help_browser.xml | 1 - .../skins/default/xui/en/floater_im_session.xml | 5 +- .../skins/default/xui/en/floater_media_browser.xml | 4 - .../default/xui/en/floater_test_layout_stacks.xml | 223 +++++++++++++++++++++ .../skins/default/xui/en/floater_ui_preview.xml | 2 + .../default/xui/en/floater_voice_controls.xml | 5 +- .../skins/default/xui/en/floater_web_content.xml | 5 +- indra/newview/skins/default/xui/en/main_view.xml | 2 - .../skins/default/xui/en/menu_inventory_add.xml | 1 + .../default/xui/en/panel_adhoc_control_panel.xml | 6 +- .../skins/default/xui/en/panel_bottomtray_lite.xml | 8 +- .../skins/default/xui/en/panel_chiclet_bar.xml | 4 - .../skins/default/xui/en/panel_classified_info.xml | 12 +- .../skins/default/xui/en/panel_edit_classified.xml | 2 - .../skins/default/xui/en/panel_edit_pick.xml | 2 - .../skins/default/xui/en/panel_edit_profile.xml | 2 - .../skins/default/xui/en/panel_edit_wearable.xml | 2 - .../default/xui/en/panel_group_control_panel.xml | 11 +- .../default/xui/en/panel_group_info_sidetray.xml | 5 +- .../default/xui/en/panel_im_control_panel.xml | 23 +-- .../skins/default/xui/en/panel_landmarks.xml | 4 - indra/newview/skins/default/xui/en/panel_login.xml | 2 - .../skins/default/xui/en/panel_main_inventory.xml | 4 - .../skins/default/xui/en/panel_navigation_bar.xml | 1 - .../skins/default/xui/en/panel_nearby_media.xml | 10 +- .../skins/default/xui/en/panel_outfit_edit.xml | 6 +- .../default/xui/en/panel_outfits_inventory.xml | 2 - .../newview/skins/default/xui/en/panel_people.xml | 12 -- .../skins/default/xui/en/panel_pick_info.xml | 3 - indra/newview/skins/default/xui/en/panel_picks.xml | 5 - .../skins/default/xui/en/panel_place_profile.xml | 2 - .../newview/skins/default/xui/en/panel_places.xml | 10 - .../default/xui/en/panel_postcard_settings.xml | 2 - .../default/xui/en/panel_prim_media_controls.xml | 35 +--- .../skins/default/xui/en/panel_progress.xml | 3 - .../skins/default/xui/en/panel_snapshot_local.xml | 2 - .../default/xui/en/panel_snapshot_profile.xml | 2 - .../skins/default/xui/en/panel_toolbar_view.xml | 5 - .../skins/default/xui/en/sidepanel_inventory.xml | 12 +- 44 files changed, 257 insertions(+), 224 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 42de47e777..f530d10ddc 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -621,7 +621,6 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p) panel_p.has_border = false; panel_p.mouse_opaque = false; panel_p.min_dim = 30; - panel_p.max_dim = S32_MAX; panel_p.auto_resize = true; panel_p.user_resize = false; diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index a879651060..a32fd307f1 100644 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -42,28 +42,6 @@ namespace { const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel"; - S32 get_panel_min_width(LLLayoutStack* stack, LLView* panel) - { - S32 minimal_width = 0; - llassert(stack); - if ( stack && panel && panel->getVisible() ) - { - stack->getPanelMinSize(panel->getName(), &minimal_width); - } - return minimal_width; - } - - S32 get_panel_max_width(LLLayoutStack* stack, LLPanel* panel) - { - S32 max_width = 0; - llassert(stack); - if ( stack && panel && panel->getVisible() ) - { - stack->getPanelMaxSize(panel->getName(), &max_width); - } - return max_width; - } - S32 get_curr_width(LLUICtrl* ctrl) { S32 cur_width = 0; @@ -234,15 +212,10 @@ void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent) { // Firstly, update layout stack to ensure we deal with correct panel sizes. { - BOOL saved_anim = mToolbarStack->getAnimate(); // Set chiclet panel to be autoresized by default. mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE); - // Disable animation to prevent layout updating in several frames. - mToolbarStack->setAnimate(FALSE); // Force the updating of layout to reset panels collapse factor. mToolbarStack->updateLayout(); - // Restore animate state. - mToolbarStack->setAnimate(saved_anim); } // chiclet bar is narrowed diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 29af81d64c..2681d4b34d 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -220,7 +220,7 @@ void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open void LLFloaterNotificationConsole::removeChannel(const std::string& name) { LLPanel* panelp = getChild<LLPanel>(name); - getChildRef<LLLayoutStack>("notification_channels").removePanel(panelp); + getChildRef<LLView>("notification_channels").removeChild(panelp); delete panelp; updateResizeLimits(); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index f5cda52d44..228260c41a 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -385,9 +385,6 @@ void LLIMFloater::onSlide() getChild<LLButton>("slide_left_btn")->setVisible(mControlPanel->getParent()->getVisible()); getChild<LLButton>("slide_right_btn")->setVisible(!mControlPanel->getParent()->getVisible()); - - LLLayoutStack* stack = getChild<LLLayoutStack>("im_panels"); - if (stack) stack->setAnimate(true); } //static diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 9d069c3996..e40cc4662b 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -248,7 +248,6 @@ BOOL LLSidepanelInventory::postBuild() // Disable user_resize on main inventory panel by default inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false); - inv_stack->setPanelUserResize(INBOX_OUTBOX_LAYOUT_PANEL_NAME, false); // Collapse marketplace panel by default inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_OUTBOX_LAYOUT_PANEL_NAME), true); diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml index d101bca694..cd075abc41 100644 --- a/indra/newview/skins/default/xui/en/floater_help_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml @@ -34,7 +34,6 @@ left_delta="0" top_delta="0" name="external_controls" - user_resize="false" width="620"> <web_browser trusted_content="true" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index a2739a8339..ca73883e53 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -16,7 +16,7 @@ min_width="250" min_height="190"> <layout_stack - animate="false" + animate="true" default_tab_group="2" follows="all" height="320" @@ -32,8 +32,7 @@ min_width="115" width="150" height="320" - auto_resize="false" - user_resize="false"> + auto_resize="false"> <panel name="panel_im_control_panel" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml index c3324a6aa4..ce788654aa 100644 --- a/indra/newview/skins/default/xui/en/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml @@ -37,7 +37,6 @@ min_height="20" name="nav_controls" top="400" - user_resize="false" width="800"> <button follows="left|top" @@ -113,7 +112,6 @@ min_height="20" name="time_controls" top_delta="0" - user_resize="false" width="800"> <button follows="left|top" @@ -171,7 +169,6 @@ min_height="20" name="parcel_owner_controls" top_delta="0" - user_resize="false" width="540"> <button enabled="false" @@ -193,7 +190,6 @@ left_delta="0" name="external_controls" top_delta="0" - user_resize="false" width="540"> <web_browser bottom="-30" diff --git a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml new file mode 100644 index 0000000000..dbe75f8b53 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml @@ -0,0 +1,223 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + can_resize="true" + can_close="true" + bevel_style="in" + height="300" + layout="topleft" + min_height="40" + min_width="420" + name="Test Floater" + title="LAYOUTSTACK TESTS" + width="420"> + <layout_stack name="test_stack" + left="0" + top="0" + width="100" + height="250" + follows="left|top|bottom" + orientation="vertical"> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="11" + min_height="0" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + min_height="0" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + min_height="0" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + </layout_stack> + <layout_stack name="test_stack" + left_pad="5" + top="0" + width="100" + height="250" + follows="left|top|bottom" + orientation="vertical"> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="100" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + visible="false" + bg_alpha_color="blue" + height="100" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + min_height="10" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + min_height="10" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="100" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="100" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="100" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="100" + visible="true" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + </layout_stack> + <layout_stack name="test_stack" + left_pad="5" + top="0" + width="100" + height="250" + follows="left|top|bottom" + orientation="vertical"> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + height="11" + bg_alpha_color="blue" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="11" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + </layout_stack> + <layout_stack name="test_stack" + left_pad="5" + top="0" + width="100" + height="250" + follows="left|top|bottom" + orientation="vertical"> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="fixed" + auto_resize="false" + user_resize="true" + height="50" + bg_alpha_color="green" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="black">fixed</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="11" + min_height="0" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="11" + min_height="0" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + <layout_panel name="flex" + auto_resize="true" + user_resize="true" + bg_alpha_color="blue" + height="11" + min_height="0" + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> + </layout_panel> + </layout_stack> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml index 3921cfcd2c..06d4327293 100644 --- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml @@ -22,6 +22,7 @@ or specifying its path in the "Editor Path" field.</string> layout="topleft" left="0" mouse_opaque="false" + default_tab_group="1" name="main_panel" right="750" top="0"> @@ -196,6 +197,7 @@ or specifying its path in the "Editor Path" field.</string> left="10" name="name_list" right="-10" + tab_group="1" search_column="1" top="80"> <scroll_list.columns diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 6807b01fa3..cea19ec75c 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -49,7 +49,6 @@ width="263"> <layout_panel follows="top|left|right" - user_resize="false" auto_resize="false" layout="topleft" min_height="20" @@ -89,7 +88,7 @@ visible="true" width="20" /> </layout_panel> - <layout_panel name="leave_call_panel" height="26" min_height="26" user_resize="false" auto_resize="false"> + <layout_panel name="leave_call_panel" height="26" min_height="26" auto_resize="false"> <layout_stack clip="true" follows="left|top|right" @@ -110,7 +109,6 @@ </layout_panel> <layout_panel auto_resize="false" - user_resize="false" follows="top|right" height="23" visible="true" @@ -133,7 +131,6 @@ top_pad="0" height="132" name="callers_panel" - user_resize="false" auto_resize="true" width="280"> <avatar_list 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 57d1c92acb..cea10adca8 100644 --- a/indra/newview/skins/default/xui/en/floater_web_content.xml +++ b/indra/newview/skins/default/xui/en/floater_web_content.xml @@ -31,7 +31,6 @@ min_height="20" name="nav_controls" top="400" - user_resize="false" width="770"> <button image_overlay="Arrow_Left_Off" @@ -160,7 +159,6 @@ left_delta="0" name="external_controls" top_delta="0" - user_resize="false" auto_resize="true" width="585"> <web_browser @@ -173,8 +171,7 @@ </layout_panel> <layout_panel name="status_bar" height="23" - auto_resize="false" - user_resize="false"> + auto_resize="false"> <text type="string" length="200" diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index b4be17e677..a87027a113 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -23,7 +23,6 @@ left="0" top="0" width="1024" - user_resize="false" auto_resize="false" visible="true"> <view mouse_opaque="false" @@ -40,7 +39,6 @@ name="nav_bar_container" tab_stop="false" width="1024" - user_resize="false" visible="false"/> <layout_panel auto_resize="true" follows="all" diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index 0f42000ae7..e91f5af3d5 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -3,6 +3,7 @@ layout="topleft" left="0" mouse_opaque="false" + can_tear_off="true" name="menu_inventory_add" visible="false"> <menu diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index 93cafd4a53..d68fa6ca6c 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -27,8 +27,7 @@ mouse_opaque="false" width="147" top="0" - name="speakers_list_panel" - user_resize="false"> + name="speakers_list_panel"> <avatar_list color="DkGray2" follows="all" @@ -50,7 +49,6 @@ min_height="25" width="130" name="call_btn_panel" - user_resize="false" visible="false"> <button follows="all" @@ -68,7 +66,6 @@ min_height="25" width="130" name="end_call_btn_panel" - user_resize="false" visible="false"> <button follows="all" @@ -85,7 +82,6 @@ min_height="25" width="130" name="voice_ctrls_btn_panel" - user_resize="false" visible="false"> <button follows="all" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml index b5e1a5f16d..f4722b05d6 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml @@ -31,7 +31,6 @@ width="1000"> <layout_panel auto_resize="false" - user_resize="false" min_width="2" width="2" /> <layout_panel @@ -40,8 +39,7 @@ height="28" layout="topleft" width="310" - min_width="188" - user_resize="false"> + min_width="188"> <panel left="0" filename="panel_nearby_chat_bar.xml" @@ -61,8 +59,7 @@ width="82" top_delta="0" min_width="52" - name="gesture_panel" - user_resize="false"> + name="gesture_panel"> <gesture_combo_list follows="left|right" height="23" @@ -80,7 +77,6 @@ </layout_panel> <layout_panel auto_resize="false" - user_resize="false" min_width="3" name="after_gesture_panel" width="3"/> diff --git a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml index 41d1036a4d..6d4008a4ed 100644 --- a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml @@ -28,7 +28,6 @@ mouse_opaque="false" name="chiclet_list_panel" top="0" - user_resize="false" width="189"> <chiclet_panel chiclet_padding="4" @@ -78,7 +77,6 @@ </chiclet_panel> </layout_panel> <layout_panel auto_resize="false" - user_resize="false" width="4" min_width="4"/> <layout_panel @@ -90,7 +88,6 @@ min_width="37" name="im_well_panel" top="0" - user_resize="false" width="37"> <chiclet_im_well follows="right" @@ -139,7 +136,6 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well min_width="37" name="notification_well_panel" top="0" - user_resize="false" width="37"> <chiclet_notification follows="right" diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index 6c8d994bc6..d4a2745d1d 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -289,8 +289,7 @@ left="0" top="0" width="290" - height="16" - user_resize="false"> + height="16"> <text follows="left|top" font.style="BOLD" @@ -327,8 +326,7 @@ left="0" top="0" width="290" - height="16" - user_resize="false"> + height="16"> <text follows="left|top" font.style="BOLD" @@ -357,8 +355,7 @@ left="0" top="0" width="290" - height="215" - user_resize="false"> + height="215"> <text auto_resize="false" follows="left|top" @@ -416,7 +413,6 @@ layout="bottomleft" left="0" name="layout_panel1" - user_resize="false" auto_resize="true" width="101"> <button @@ -436,7 +432,6 @@ layout="bottomleft" left_pad="3" name="show_on_map_btn_lp" - user_resize="false" auto_resize="true" width="100"> <button @@ -455,7 +450,6 @@ layout="bottomleft" left_pad="3" name="edit_btn_lp" - user_resize="false" auto_resize="true" width="101"> <button diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml index e512d63f9e..3509eaa285 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml @@ -319,7 +319,6 @@ layout="bottomleft" left="0" name="save_changes_btn_lp" - user_resize="false" auto_resize="true" width="156"> <button @@ -339,7 +338,6 @@ layout="bottomleft" left_pad="3" name="show_on_map_btn_lp" - user_resize="false" auto_resize="true" width="157"> <button diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index 2ec2e03e8c..0faa1598b1 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -201,7 +201,6 @@ layout="topleft" left="0" name="layout_panel1" - user_resize="false" auto_resize="true" width="150"> <button @@ -221,7 +220,6 @@ layout="topleft" left_pad="4" name="layout_panel2" - user_resize="false" auto_resize="true" width="146"> <button diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index 442eb8c28d..2c7c8133d1 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -435,7 +435,6 @@ layout="bottomleft" name="save_changes_btn_lp" top="0" - user_resize="false" auto_resize="true" width="153"> <button @@ -456,7 +455,6 @@ left_pad="3" name="show_on_map_btn_lp" top="0" - user_resize="false" auto_resize="true" width="154"> <button diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index c8764a6a84..69a692e2c4 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -454,7 +454,6 @@ left="0" mouse_opaque="false" name="save_as_btn_lp" - user_resize="false" auto_resize="true" width="154"> <button @@ -474,7 +473,6 @@ left_pad="3" mouse_opaque="false" name="revert_btn_lp" - user_resize="false" auto_resize="true" width="152"> <button diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index c1dc2aaaf7..ad10e53a4e 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -26,8 +26,7 @@ mouse_opaque="false" width="145" top="0" - name="speakers_list_panel" - user_resize="false"> + name="speakers_list_panel"> <avatar_list color="DkGray2" follows="all" @@ -48,8 +47,7 @@ layout="topleft" min_height="28" width="130" - name="group_info_btn_panel" - user_resize="false"> + name="group_info_btn_panel"> <button follows="left|right|bottom" height="23" @@ -66,8 +64,7 @@ layout="topleft" min_height="28" width="130" - name="call_btn_panel" - user_resize="false"> + name="call_btn_panel"> <button follows="all" height="23" @@ -84,7 +81,6 @@ min_height="28" width="130" name="end_call_btn_panel" - user_resize="false" visible="false"> <button follows="all" @@ -101,7 +97,6 @@ min_height="28" width="130" name="voice_ctrls_btn_panel" - user_resize="false" visible="false"> <button follows="all" diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index ec3f3b48bc..206496cc0e 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -97,6 +97,7 @@ background_visible="true" follows="all" layout="topleft" auto_resize="true" + user_resize="true" height="513" width="313"> <accordion @@ -195,7 +196,6 @@ background_visible="true" layout="bottomleft" left="0" name="btn_refresh_lp" - user_resize="false" auto_resize="false" width="24"> <button @@ -215,7 +215,6 @@ background_visible="true" layout="bottomleft" left_pad="3" name="btn_chat_lp" - user_resize="false" auto_resize="true" width="91"> <button @@ -234,7 +233,6 @@ background_visible="true" layout="bottomleft" left_pad="3" name="call_btn_lp" - user_resize="false" auto_resize="true" width="91"> <button @@ -255,7 +253,6 @@ background_visible="true" layout="bottomleft" left_pad="3" name="btn_apply_lp" - user_resize="false" auto_resize="true" width="91"> <button diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 9f73b7c540..8fcd6ccbaf 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -32,8 +32,7 @@ min_height="20" width="140" name="view_profile_btn_panel" - top="0" - user_resize="false"> + top="0" > <button follows="left|top|right" height="23" @@ -49,8 +48,7 @@ layout="topleft" min_height="25" width="140" - name="add_friend_btn_panel" - user_resize="false"> + name="add_friend_btn_panel"> <button follows="left|top|right" height="23" @@ -66,8 +64,7 @@ layout="topleft" min_height="25" width="140" - name="teleport_btn_panel" - user_resize="false"> + name="teleport_btn_panel"> <button auto_resize="false" follows="left|top|right" @@ -84,8 +81,7 @@ layout="topleft" min_height="25" width="140" - name="share_btn_panel" - user_resize="false"> + name="share_btn_panel"> <button auto_resize="true" follows="left|top|right" @@ -101,8 +97,7 @@ layout="topleft" min_height="25" width="140" - name="pay_btn_panel" - user_resize="false"> + name="pay_btn_panel"> <button auto_resize="true" follows="left|top|right" @@ -118,8 +113,7 @@ layout="topleft" min_height="25" width="140" - name="call_btn_panel" - user_resize="false"> + name="call_btn_panel"> <button follows="left|top|right" height="23" @@ -135,7 +129,6 @@ min_height="25" width="140" name="end_call_btn_panel" - user_resize="false" visible="false"> <button follows="left|top|right" @@ -152,7 +145,6 @@ min_height="25" width="140" name="voice_ctrls_btn_panel" - user_resize="false" visible="false"> <button follows="left|top|right" @@ -169,7 +161,6 @@ layout="topleft" min_height="0" width="140" - name="spacer" - user_resize="false" /> + name="spacer"/> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index 23d8cb11ca..2a5933e3e9 100644 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -114,7 +114,6 @@ height="25" layout="topleft" name="options_gear_btn_panel" - user_resize="false" width="32"> <menu_button follows="bottom|left" @@ -135,7 +134,6 @@ height="25" layout="topleft" name="add_btn_panel" - user_resize="false" width="32"> <button follows="bottom|left" @@ -156,7 +154,6 @@ height="25" layout="topleft" name="dummy_panel" - user_resize="false" width="212"> <icon follows="bottom|left|right" @@ -173,7 +170,6 @@ height="25" layout="topleft" name="trash_btn_panel" - user_resize="false" width="31"> <dnd_button follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 6521bf2a4e..223326dd06 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -48,7 +48,6 @@ name="login" layout="topleft" width="705" min_width="705" -user_resize="false" height="80"> <text follows="left|bottom" @@ -165,7 +164,6 @@ follows="right|bottom" name="links" width="205" min_width="205" -user_resize="false" height="80"> <text follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index e6c5110999..9f84cdc43e 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -119,7 +119,6 @@ height="25" layout="topleft" name="options_gear_btn_panel" - user_resize="false" width="32"> <menu_button follows="bottom|left" @@ -140,7 +139,6 @@ height="25" layout="topleft" name="add_btn_panel" - user_resize="false" width="32"> <button follows="bottom|left" @@ -161,7 +159,6 @@ height="25" layout="topleft" name="dummy_panel" - user_resize="false" width="212"> <icon follows="bottom|left|right" @@ -178,7 +175,6 @@ height="25" layout="topleft" name="trash_btn_panel" - user_resize="false" width="31"> <dnd_button follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 7a8e872dc9..9dee68efa7 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -141,7 +141,6 @@ max_width="5" min_width="5" name="nav_bar_resize_handle_panel" - user_resize="false" width="5"> <icon follows="top|right" diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index bfc503f05b..d1cb64f7ad 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -196,7 +196,6 @@ name="stop" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="22" @@ -224,7 +223,6 @@ name="play" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="22" @@ -252,7 +250,6 @@ name="pause" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" min_width="22" @@ -279,7 +276,6 @@ name="volume_slider_ctrl" mouse_opaque="false" auto_resize="true" - user_resize="false" follows="left|right" layout="topleft" top="0" @@ -304,7 +300,6 @@ name="mute" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="72" @@ -333,7 +328,6 @@ name="zoom" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="28" @@ -361,7 +355,6 @@ name="unzoom" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" min_width="21" @@ -388,8 +381,7 @@ <layout_panel name="right_bookend" width="0" - mouse_opaque="false" - user_resize="false" /> + mouse_opaque="false"/> </layout_stack> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index e1cd78bad8..b61f110e32 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -198,7 +198,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap height="154" name="add_button_and_combobox" width="311" - user_resize="false" visible="true"> <!-- List containing items from the COF and Base outfit --> @@ -271,8 +270,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap height="30" name="filter_panel" width="311" - visible="false" - user_resize="false"> + visible="false"> <filter_editor background_image="TextField_Search_Off" @@ -515,7 +513,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap left="0" mouse_opaque="false" name="save_btn_lp" - user_resize="false" auto_resize="true" width="156"> <button @@ -550,7 +547,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap left_pad="3" mouse_opaque="false" name="revert_btn_lp" - user_resize="false" auto_resize="true" width="147"> <button diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 2ad2416179..405d9513db 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -84,7 +84,6 @@ left="0" mouse_opaque="false" name="save_btn_lp" - user_resize="false" auto_resize="true" width="156"> <button @@ -118,7 +117,6 @@ left_pad="3" mouse_opaque="false" name="wear_btn_lp" - user_resize="false" auto_resize="true" width="147"> <button diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 0ebfd9c037..98c7c49ff4 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -284,7 +284,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M height="25" layout="topleft" name="options_gear_btn_panel" - user_resize="false" width="32"> <menu_button follows="bottom|left" @@ -305,7 +304,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M height="25" layout="topleft" name="add_btn_panel" - user_resize="false" width="32"> <button follows="bottom|left" @@ -326,7 +324,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M height="25" layout="topleft" name="dummy_panel" - user_resize="false" width="210"> <icon follows="bottom|left|right" @@ -343,7 +340,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M height="25" layout="topleft" name="trash_btn_panel" - user_resize="false" width="31"> <dnd_button follows="bottom|left" @@ -602,7 +598,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="bottomleft" left="0" name="view_profile_btn_lp" - user_resize="false" auto_resize="true" width="68"> <button @@ -623,7 +618,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="bottomleft" left_pad="3" name="im_btn_lp" - user_resize="false" auto_resize="true" width="41"> <button @@ -644,7 +638,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="bottomleft" left_pad="3" name="call_btn_lp" - user_resize="false" auto_resize="true" width="52"> <button @@ -665,7 +658,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="bottomleft" left_pad="3" name="share_btn_lp" - user_resize="false" auto_resize="true" width="66"> <button @@ -686,7 +678,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="bottomleft" left_pad="3" name="teleport_btn_lp" - user_resize="false" auto_resize="true" width="77"> <button @@ -720,7 +711,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left="0" mouse_opaque="false" name="group_info_btn_lp" - user_resize="false" auto_resize="true" width="108"> <button @@ -743,7 +733,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left_pad="3" mouse_opaque="false" name="chat_btn_lp" - user_resize="false" auto_resize="true" width="101"> <button @@ -766,7 +755,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M left_pad="3" mouse_opaque="false" name="group_call_btn_lp" - user_resize="false" auto_resize="true" width="96"> <button diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml index 24046d5cca..79d190e1e0 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml @@ -139,7 +139,6 @@ layout="bottomleft" left="0" name="layout_panel1" - user_resize="false" auto_resize="true" width="101"> <button @@ -158,7 +157,6 @@ layout="bottomleft" left_pad="3" name="show_on_map_btn_lp" - user_resize="false" auto_resize="true" width="100"> <button @@ -177,7 +175,6 @@ layout="bottomleft" left_pad="3" name="edit_btn_lp" - user_resize="false" auto_resize="true" width="101"> <button diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 85f402dfa2..8def96cada 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -102,7 +102,6 @@ bg_opaque_color="DkGray2" layout="bottomleft" left="0" name="gear_menu_btn" - user_resize="false" auto_resize="true" width="51"> <button @@ -124,7 +123,6 @@ bg_opaque_color="DkGray2" height="18" layout="bottomleft" name="trash_btn_lp" - user_resize="false" auto_resize="true" width="18"> <button @@ -170,7 +168,6 @@ bg_opaque_color="DkGray2" layout="topleft" left="0" name="info_btn_lp" - user_resize="false" auto_resize="true" top="0" width="95"> @@ -192,7 +189,6 @@ bg_opaque_color="DkGray2" layout="bottomleft" left_pad="2" name="teleport_btn_lp" - user_resize="false" auto_resize="true" width="117"> <button @@ -212,7 +208,6 @@ bg_opaque_color="DkGray2" height="28" layout="bottomleft" name="show_on_map_btn_lp" - user_resize="false" auto_resize="true" left_pad="2" width="90"> diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index e280115bda..308acf0c0c 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -238,7 +238,6 @@ mouse_opaque="false" name="here_panel" top="0" - user_resize="false" width="60"> <icon follows="top|left" @@ -259,7 +258,6 @@ mouse_opaque="false" name="for_sale_panel" top="0" - user_resize="false" width="60"> <icon follows="top|left" diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index 670aa47313..f169dbb702 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -92,7 +92,6 @@ background_visible="true" left="0" mouse_opaque="false" name="lp1" - user_resize="false" auto_resize="true" width="193"> @@ -115,7 +114,6 @@ background_visible="true" left="0" mouse_opaque="false" name="teleport_btn_lp" - user_resize="false" auto_resize="true" width="109"> <button @@ -137,7 +135,6 @@ background_visible="true" left_pad="3" mouse_opaque="false" name="chat_btn_lp" - user_resize="false" auto_resize="true" width="86"> <button @@ -161,7 +158,6 @@ background_visible="true" left_pad="0" mouse_opaque="false" name="lp2" - user_resize="false" auto_resize="true" width="116"> @@ -185,7 +181,6 @@ background_visible="true" left_pad="0" mouse_opaque="false" name="edit_btn_lp" - user_resize="false" auto_resize="true" width="84"> <button @@ -208,7 +203,6 @@ background_visible="true" left_pad="0" mouse_opaque="false" name="overflow_btn_lp" - user_resize="false" auto_resize="true" width="24"> <menu_button @@ -246,7 +240,6 @@ background_visible="true" left_pad="3" mouse_opaque="false" name="profile_btn_lp" - user_resize="false" auto_resize="true" width="102"> <button @@ -283,7 +276,6 @@ background_visible="true" mouse_opaque="false" name="close_btn_lp" top="0" - user_resize="false" auto_resize="true" width="51"> <button @@ -324,7 +316,6 @@ background_visible="true" mouse_opaque="false" name="save_btn_lp" top="0" - user_resize="false" auto_resize="true" width="153"> <button @@ -347,7 +338,6 @@ background_visible="true" mouse_opaque="false" name="cancel_btn_lp" top="0" - user_resize="false" auto_resize="true" width="154"> <button diff --git a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml index 2e0bb88f53..e9427a2388 100644 --- a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml +++ b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml @@ -50,7 +50,6 @@ layout="topleft" left="0" name="postcard_image_size_lp" - user_resize="false" auto_resize="false" top="0" right="-1" @@ -99,7 +98,6 @@ layout="topleft" left="0" name="postcard_image_format_quality_lp" - user_resize="false" auto_resize="true" top="0" right="-1" diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 273c252474..198ccd6e2f 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -31,8 +31,7 @@ width="0" name="left_bookend_bottom" mouse_opaque="false" - layout="topleft" - user_resize="false" /> + layout="topleft"/> <layout_panel name="media_progress_indicator" mouse_opaque="false" @@ -41,7 +40,6 @@ left="0" top="0" auto_resize="false" - user_resize="false" min_width="100" width="200"> <progress_bar @@ -59,8 +57,7 @@ name="right_bookend_bottom" width="0" mouse_opaque="false" - layout="topleft" - user_resize="false" /> + layout="topleft"/> </layout_stack> <layout_stack name="media_controls" @@ -79,13 +76,11 @@ top="0" width="0" mouse_opaque="false" - layout="topleft" - user_resize="false" /> + layout="topleft"/> <layout_panel name="back" top="0" auto_resize="false" - user_resize="false" layout="topleft" mouse_opaque="false" min_width="22" @@ -114,7 +109,6 @@ name="fwd" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" min_width="22" top="0" @@ -142,7 +136,6 @@ name="home" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="22" @@ -170,7 +163,6 @@ name="media_stop" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="22" @@ -198,7 +190,6 @@ name="reload" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="22" @@ -226,7 +217,6 @@ name="stop" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="22" @@ -254,7 +244,6 @@ name="play" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="22" @@ -282,7 +271,6 @@ name="pause" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" min_width="22" @@ -310,7 +298,6 @@ name="media_address" mouse_opaque="false" auto_resize="true" - user_resize="false" height="24" follows="left|right|bottom" layout="topleft" @@ -343,8 +330,7 @@ layout="topleft" width="16" mouse_opaque="false" - auto_resize="false" - user_resize="false"> + auto_resize="false"> <icon name="media_whitelist_flag" follows="top|right" @@ -358,8 +344,7 @@ layout="topleft" width="16" mouse_opaque="false" - auto_resize="false" - user_resize="false"> + auto_resize="false"> <icon name="media_secure_lock_flag" height="16" @@ -374,7 +359,6 @@ name="media_play_position" mouse_opaque="false" auto_resize="true" - user_resize="false" follows="left|right" layout="topleft" top="0" @@ -399,7 +383,6 @@ name="skip_back" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" min_width="22" @@ -428,7 +411,6 @@ name="skip_forward" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" min_width="22" @@ -455,7 +437,6 @@ name="media_volume" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="72" @@ -511,7 +492,6 @@ name="zoom_frame" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" height="28" @@ -539,7 +519,6 @@ name="close" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" min_width="21" @@ -567,7 +546,6 @@ name="new_window" mouse_opaque="false" auto_resize="false" - user_resize="false" layout="topleft" top="0" min_width="22" @@ -596,8 +574,7 @@ mouse_opaque="false" top="0" width="0" - layout="topleft" - user_resize="false" /> + layout="topleft"/> </layout_stack> <panel name="media_region" diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 4535c56339..7275e8d89b 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -20,14 +20,12 @@ layout="topleft" min_width="10" name="panel1" - user_resize="false" width="150" /> <layout_panel height="768" layout="topleft" min_width="640" name="panel2" - user_resize="false" width="640"> <layout_stack follows="left|right|top|bottom" @@ -121,7 +119,6 @@ layout="topleft" min_width="10" name="panel6" - user_resize="false" width="150" /> </layout_stack> <button diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml index ae0215a578..b966358f18 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml @@ -96,7 +96,6 @@ layout="topleft" left="0" name="local_image_size_lp" - user_resize="false" auto_resize="false" top="0" right="-1" @@ -145,7 +144,6 @@ layout="topleft" left="0" name="local_image_format_quality_lp" - user_resize="false" auto_resize="true" top="0" right="-1" diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml index 91ac9ad658..5bd383b81e 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml @@ -84,7 +84,6 @@ layout="topleft" left="0" name="profile_image_size_lp" - user_resize="false" auto_resize="false" top="0" right="-1" @@ -132,7 +131,6 @@ layout="topleft" left="0" name="profile_image_metadata_lp" - user_resize="false" auto_resize="true" top="0" right="-1" diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index 3c69a0cb6c..58911bed56 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -20,7 +20,6 @@ mouse_opaque="false"> <layout_panel name="vertical_toolbar_panel" auto_resize="true" - user_resize="false" width="1024" height="500" mouse_opaque="false"> @@ -34,7 +33,6 @@ mouse_opaque="false"> <layout_panel name="left_toolbar_panel" auto_resize="false" - user_resize="false" height="500" width="30" mouse_opaque="false"> @@ -61,7 +59,6 @@ </layout_panel> <layout_panel name="non_toolbar_panel" auto_resize="true" - user_resize="false" mouse_opaque="false" height="100" width="200"> @@ -102,7 +99,6 @@ </layout_panel> <layout_panel name="right_toolbar_panel" auto_resize="false" - user_resize="false" height="500" width="30" mouse_opaque="false"> @@ -132,7 +128,6 @@ </layout_panel> <layout_panel name="bottom_toolbar_panel" auto_resize="false" - user_resize="false" height="30" width="1024" mouse_opaque="false"> diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index b52784d6bc..d4162f6d9a 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -34,7 +34,6 @@ min_dim="150" width="330" follows="bottom|left|right" - user_resize="false" height="300"> <panel class="panel_main_inventory" @@ -52,12 +51,10 @@ width="330" layout="topleft" auto_resize="true" - user_resize="false" follows="bottom|left|right" name="inbox_outbox_layout_panel" visible="false" min_dim="35" - max_dim="235" expanded_min_dim="125" height="235"> <layout_stack @@ -75,13 +72,11 @@ width="330" layout="topleft" auto_resize="true" - user_resize="false" follows="left|right|top" name="inbox_layout_panel" visible="false" min_dim="35" - max_dim="200" - expanded_min_dim="90" + height="200"> <panel follows="all" @@ -157,12 +152,10 @@ width="330" layout="topleft" auto_resize="true" - user_resize="false" follows="all" name="outbox_layout_panel" visible="false" min_dim="35" - max_dim="200" expanded_min_dim="90" height="200"> <panel @@ -312,7 +305,6 @@ left="0" mouse_opaque="false" name="info_btn_lp" - user_resize="false" auto_resize="true" width="101"> <button @@ -334,7 +326,6 @@ left_pad="1" mouse_opaque="false" name="share_btn_lp" - user_resize="false" auto_resize="true" width="100"> <button @@ -356,7 +347,6 @@ left_pad="1" mouse_opaque="false" name="shop_btn_lp" - user_resize="false" auto_resize="true" width="100"> <button -- cgit v1.2.3 From 83138403ec6bb839d38b1d72c286df1121d08be9 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine <pguslisty@productengine.com> Date: Tue, 17 Jan 2012 13:40:35 +0200 Subject: EXP-1768 FIXED (incomplete sentence for translation) The whole sentence was split to two parts: First pars was in panel.string and the second one in the text box. I combined them both in "allow_label5" text box and also I deleted unnecessary panel.string with the first part of the sentence. --- indra/newview/llfloaterland.cpp | 1 - .../newview/skins/default/xui/de/floater_about_land.xml | 5 +---- .../newview/skins/default/xui/en/floater_about_land.xml | 16 ++++++---------- .../newview/skins/default/xui/es/floater_about_land.xml | 5 +---- .../newview/skins/default/xui/fr/floater_about_land.xml | 5 +---- .../newview/skins/default/xui/it/floater_about_land.xml | 5 +---- .../newview/skins/default/xui/ja/floater_about_land.xml | 5 +---- .../newview/skins/default/xui/pt/floater_about_land.xml | 5 +---- .../newview/skins/default/xui/ru/floater_about_land.xml | 5 +---- .../newview/skins/default/xui/tr/floater_about_land.xml | 5 +---- 10 files changed, 14 insertions(+), 43 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index b13a9aab88..d8e4aa03f7 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2025,7 +2025,6 @@ void LLPanelLandOptions::refresh() } mSeeAvatarsCtrl->set(parcel->getSeeAVs()); - mSeeAvatarsCtrl->setLabel(getString("see_avs_text")); mSeeAvatarsCtrl->setEnabled(can_change_options && parcel->getHaveNewParcelLimitData()); BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml index 3cf3a16247..f377c74a3f 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -309,9 +309,6 @@ Nur große Parzellen können in der Suche aufgeführt werden. <panel.string name="push_restrict_region_text"> Kein Stoßen (regional) </panel.string> - <panel.string name="see_avs_text"> - Auf dieser Parzelle Einwohner sehen und mit ihnen chatten - </panel.string> <text name="allow_label"> Anderen Einwohnern gestatten: </text> @@ -375,7 +372,7 @@ Nur große Parzellen können in der Suche aufgeführt werden. </text> <texture_picker label="" name="snapshot_ctrl" tool_tip="Klicken Sie hier, um ein Bild auszuwählen"/> <text name="allow_label5"> - Einwohnern auf anderen Parzellen Folgendes gestatten: + Einwohnern auf anderen Parzellen Folgendes gestatten: Auf dieser Parzelle Einwohner sehen und mit ihnen chatten </text> <check_box label="Avatare sehen" name="SeeAvatarsCheck" tool_tip="Gestattet sowohl Einwohnern auf anderen Parzellen, Einwohner auf dieser Parzelle zu sehen und mit ihnen zu chatten, als auch Ihnen, diese Einwohner auf anderen Parzellen zu sehen und mit ihnen zu chatten."/> <text name="landing_point"> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 4772f744ea..d198cd65a8 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1206,10 +1206,6 @@ Only large parcels can be listed in search. name="push_restrict_region_text"> No Pushing (Region Override) </panel.string> - <panel.string - name="see_avs_text"> - Avatars on other parcels can see - </panel.string> <text type="string" length="1" @@ -1524,24 +1520,24 @@ Only large parcels can be listed in search. length="1" follows="left|top" text_color="LtGray" - height="16" + height="32" layout="topleft" left="274" - top="166" + top="150" name="allow_label5" - width="278"> - and chat with avatars on this parcel + width="205" + wrap="true"> + Avatars on other parcels can see and chat with avatars on this parcel </text> <check_box height="16" - label="See Avatars" follows="top" layout="topleft" left="253" top="150" name="SeeAvatarsCheck" tool_tip="Allows avatars on other parcels to see and chat with avatars on this parcel, and you to see and chat with them." - width="120" /> + width="10" /> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml index b6391e28a0..e34b57fca3 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -308,9 +308,6 @@ Sólo las parcelas más grandes pueden listarse en la búsqueda. <panel.string name="push_restrict_region_text"> Sin 'empujones' (prevalece lo marcado en la región) </panel.string> - <panel.string name="see_avs_text"> - Ver a los residentes de esta parcela y chatear con ellos - </panel.string> <text name="allow_label"> Permitir a otros Residentes: </text> @@ -374,7 +371,7 @@ Sólo las parcelas más grandes pueden listarse en la búsqueda. </text> <texture_picker label="" name="snapshot_ctrl" tool_tip="Pulse para elegir una imagen"/> <text name="allow_label5"> - Permitir a los residentes de otras parcelas: + Permitir a los residentes de otras parcelas: Ver a los residentes de esta parcela y chatear con ellos </text> <check_box label="Ver los avatares" name="SeeAvatarsCheck" tool_tip="Permite que los residentes de otras parcelas vean a los residentes de ésta y chateen con ellos, y también que tú puedas verles y chatear con ellos."/> <text name="landing_point"> diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml index 9771c3f7fd..900a856e7b 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -312,9 +312,6 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche. <panel.string name="push_restrict_region_text"> Pas de bousculades (les règles de la région priment) </panel.string> - <panel.string name="see_avs_text"> - Voir et chatter avec les résidents sur cette parcelle - </panel.string> <text name="allow_label"> Autoriser les autres résidents à : </text> @@ -378,7 +375,7 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche. </text> <texture_picker label="" name="snapshot_ctrl" tool_tip="Cliquez pour sélectionner une image"/> <text name="allow_label5"> - Autoriser les résidents sur les autres parcelles à : + Autoriser les résidents sur les autres parcelles à : Voir et chatter avec les résidents sur cette parcelle </text> <check_box label="Voir les avatars" name="SeeAvatarsCheck" tool_tip="Permettre aux résidents présents sur d'autres parcelles de voir et chatter avec les résidents présents sur cette parcelle et vous permettre de les voir et de chatter avec eux."/> <text name="landing_point"> diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml index b6bfb4aadf..2e30de4214 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -313,9 +313,6 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. <panel.string name="push_restrict_region_text"> Nessuna spinta (Impostazione regionale) </panel.string> - <panel.string name="see_avs_text"> - Vedi i residenti in questo lotto e chatta con loro - </panel.string> <text name="allow_label"> Permetti ad altri residenti di: </text> @@ -379,7 +376,7 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. </text> <texture_picker label="" name="snapshot_ctrl" tool_tip="Clicca per scegliere una immagine"/> <text name="allow_label5"> - Permetti ai residenti in altri lotti di: + Permetti ai residenti in altri lotti di: Vedi i residenti in questo lotto e chatta con loro </text> <check_box label="Vedi avatar" name="SeeAvatarsCheck" tool_tip="Consente ai residenti in altri lotti di vedere i residenti in questo lotto e chattare con loro, e ti consente di vederli e chattare con loro."/> <text name="landing_point"> diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml index 3c88c902f8..61d418b2d8 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -310,9 +310,6 @@ <panel.string name="push_restrict_region_text"> プッシュ禁止 (地域設定優先) </panel.string> - <panel.string name="see_avs_text"> - この区画にいる住人と会ってチャットする - </panel.string> <text name="allow_label"> 他の住人への許可: </text> @@ -376,7 +373,7 @@ </text> <texture_picker label="" name="snapshot_ctrl" tool_tip="写真をクリックして選択"/> <text name="allow_label5"> - 他の区画にいる住人への許可: + 他の区画にいる住人への許可: この区画にいる住人と会ってチャットする </text> <check_box label="アバターを表示" name="SeeAvatarsCheck" tool_tip="他の区画の住人が、この区画にいる住人に会ってチャットすることを許可し、あなたもそれら住人に会ってチャットできるようにします。"/> <text name="landing_point"> diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml index cc09888994..39d44a9949 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -308,9 +308,6 @@ Apenas lotes maiores podem ser listados na busca. <panel.string name="push_restrict_region_text"> Proibido empurrar (regulamento da região) </panel.string> - <panel.string name="see_avs_text"> - Veja e bata papo com os residentes deste terreno - </panel.string> <text name="allow_label"> Autorizar outros residentes a: </text> @@ -374,7 +371,7 @@ Apenas lotes maiores podem ser listados na busca. </text> <texture_picker label="" name="snapshot_ctrl" tool_tip="Clique para escolher uma imagem"/> <text name="allow_label5"> - Permitir que residentes de outros terrenos: + Permitir que residentes de outros terrenos: Veja e bata papo com os residentes deste terreno </text> <check_box label="Ver avatares" name="SeeAvatarsCheck" tool_tip="Permite que residentes de outros terrenos vejam e conversem com os residentes deste terreno e vice-versa."/> <text name="landing_point"> diff --git a/indra/newview/skins/default/xui/ru/floater_about_land.xml b/indra/newview/skins/default/xui/ru/floater_about_land.xml index 3c278fce52..2f5c64984d 100644 --- a/indra/newview/skins/default/xui/ru/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ru/floater_about_land.xml @@ -306,9 +306,6 @@ <panel.string name="push_restrict_region_text"> Не толкать (настройки региона) </panel.string> - <panel.string name="see_avs_text"> - Видеть жителей этого участка и общаться с ними в чате - </panel.string> <text name="allow_label"> Позволить другим жителям: </text> @@ -372,7 +369,7 @@ </text> <texture_picker name="snapshot_ctrl" tool_tip="Щелкните для выбора изображения"/> <text name="allow_label5"> - Позволить жителям с других участков: + Позволить жителям с других участков: Видеть жителей этого участка и общаться с ними в чате </text> <check_box label="Видны аватары" name="SeeAvatarsCheck" tool_tip="Жители с других участков могут видеть жителей этого участка и общаться с ними в чате (вы также сможете видеть жителей с других участков и общаться с ними)."/> <text name="landing_point"> diff --git a/indra/newview/skins/default/xui/tr/floater_about_land.xml b/indra/newview/skins/default/xui/tr/floater_about_land.xml index e0350964b5..69abe582e6 100644 --- a/indra/newview/skins/default/xui/tr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/tr/floater_about_land.xml @@ -306,9 +306,6 @@ Sadece büyük parseller aramada görünür. <panel.string name="push_restrict_region_text"> İtme Yok (Bölge Geçersiz Kılma) </panel.string> - <panel.string name="see_avs_text"> - Parseldeki sakinleri gör ve onlarla sohbet et - </panel.string> <text name="allow_label"> Sakinlere şunun için izin ver: </text> @@ -372,7 +369,7 @@ Sadece büyük parseller aramada görünür. </text> <texture_picker name="snapshot_ctrl" tool_tip="Bir resim seçmek için tıklayın"/> <text name="allow_label5"> - Diğer parsel Sakinlerine şunun için izin verin: + Diğer parsel Sakinlerine şunun için izin verin: Parseldeki sakinleri gör ve onlarla sohbet et </text> <check_box label="Avatarları Gör" name="SeeAvatarsCheck" tool_tip="Diğer parsellerdeki sakinlerin bu parseldeki sakinleri görmesine ve onlarla sohbet etmesine, sizin de onları görüp, onlarla sohbet etmenize imkan tanır."/> <text name="landing_point"> -- cgit v1.2.3 From 1f9529c0c2b02c4ceee912f8ecb35181174cc7cc Mon Sep 17 00:00:00 2001 From: Merov Linden <merov@lindenlab.com> Date: Tue, 17 Jan 2012 08:55:19 -0800 Subject: EXP-1772 : Suppress a useless and confusing assert in destructor, called cleanup in there instead. --- indra/newview/llwearablelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index ddbcdfc3f7..6f6411ce3c 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -63,7 +63,7 @@ struct LLWearableArrivedData LLWearableList::~LLWearableList() { - llassert_always(mList.empty()) ; + cleanup(); } void LLWearableList::cleanup() -- cgit v1.2.3 From 577479a3e53ef152da191e3a004aeb34f0815658 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 17 Jan 2012 09:36:14 -0800 Subject: EXP-1803 CLEAN-UP -- Modified code to use the "unique" tag on the notification. --- indra/newview/llinventorybridge.cpp | 10 +++++----- indra/newview/llinventoryfunctions.cpp | 13 +------------ indra/newview/skins/default/xui/en/notifications.xml | 1 + 3 files changed, 7 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 270ef4fddc..1a4fd17d61 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2244,7 +2244,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { if (move_is_into_outbox) { - tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; } else @@ -2256,7 +2256,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { if (move_is_into_outbox) { - tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; } else @@ -3765,7 +3765,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else if (move_is_into_outbox) { - tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; } @@ -3796,7 +3796,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, { if (move_is_into_outbox) { - tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; } else @@ -3823,7 +3823,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (move_is_into_outbox) { - tooltip_msg = tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); + tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; } else if (move_is_into_current_outfit || move_is_into_outfit) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f5be271a68..40bc3b76c9 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -533,7 +533,6 @@ void show_item_original(const LLUUID& item_uuid) } -static S32 create_folder_in_outbox_operation_id = -1; static S32 move_to_outbox_operation_id = -1; static std::list<LLSD> move_to_outbox_payloads; @@ -542,11 +541,6 @@ void open_outbox() LLFloaterReg::showInstance("outbox"); } -void folder_created_in_outbox_cb(const LLSD& notification, const LLSD& response) -{ - create_folder_in_outbox_operation_id = -1; -} - LLUUID create_folder_in_outbox_for_item(LLInventoryItem* item, const LLUUID& destFolderId, S32 operation_id) { llassert(item); @@ -555,12 +549,7 @@ LLUUID create_folder_in_outbox_for_item(LLInventoryItem* item, const LLUUID& des LLUUID created_folder_id = gInventory.createNewCategory(destFolderId, LLFolderType::FT_NONE, item->getName()); gInventory.notifyObservers(); - if (create_folder_in_outbox_operation_id != operation_id) - { - LLNotificationsUtil::add("OutboxFolderCreated", LLSD(), LLSD(), boost::bind(&folder_created_in_outbox_cb, _1, _2)); - - create_folder_in_outbox_operation_id = operation_id; - } + LLNotificationsUtil::add("OutboxFolderCreated"); return created_folder_id; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index e44fb3bf28..af75d49353 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -214,6 +214,7 @@ You don't have permission to copy one or more of these items to the Merchant Out icon="OutboxStatus_Success" name="OutboxFolderCreated" type="outbox"> + <unique/> A new folder has been created for each item you have transferred into the top level of your Merchant Outbox. <usetemplate -- cgit v1.2.3 From 3a313469c9be4e71384314ebecb2de7434752c02 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 17 Jan 2012 11:44:40 -0800 Subject: EXP-1799 FIX -- Replace and Add to Outfit options appear as grayed out in Inventory * Updated context menu code to enable visible items that aren't explicitly disabled. --- indra/newview/llinventorybridge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1a4fd17d61..c97d756a31 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -529,14 +529,17 @@ void hide_context_entries(LLMenuGL& menu, // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); + BOOL enabled = TRUE; for (itor2 = disabled_entries.begin(); itor2 != disabled_entries.end(); ++itor2) { if (*itor2 == name) { - menu_item->setEnabled(FALSE); + enabled = FALSE; break; } } + + menu_item->setEnabled(enabled); } } } -- cgit v1.2.3 From accf83394513c82e98fffa15bc0131ee25f63f00 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 17 Jan 2012 13:07:57 -0800 Subject: EXP-1805 FIX -- Block calling cards from being added to Merchant Outbox EXP-1810 PROGRESS -- Cannot resize Received items panel in Inventory window * Updated "copy to merchant outbox" context menu and drag and drop code to block calling cards. * Changed user_resize to true on the "Received Items" panel and the main inventory panel --- indra/newview/llinventorybridge.cpp | 20 +++++++++++++++++--- .../skins/default/xui/en/sidepanel_inventory.xml | 5 ++++- indra/newview/skins/default/xui/en/strings.xml | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2d5e4938c6..3929183be2 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1153,9 +1153,17 @@ bool LLInvFVBridge::canListOnMarketplace() const } LLViewerInventoryItem * item = model->getItem(mUUID); - if (item && !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + if (item) { - return false; + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + { + return false; + } + + if (LLAssetType::AT_CALLINGCARD == item->getType()) + { + return false; + } } return true; @@ -1897,7 +1905,6 @@ static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_m } bool allow_transfer = inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); - if (!allow_transfer) { tooltip_msg = LLTrans::getString("TooltipOutboxNoTransfer"); @@ -1913,6 +1920,13 @@ static BOOL can_move_to_outbox(LLInventoryItem* inv_item, std::string& tooltip_m } #endif + bool calling_card = (LLAssetType::AT_CALLINGCARD == inv_item->getType()); + if (calling_card) + { + tooltip_msg = LLTrans::getString("TooltipOutboxCallingCard"); + return false; + } + return true; } diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 5d398a29af..fcba937bdb 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -30,6 +30,8 @@ <layout_panel name="main_inventory_layout_panel" layout="topleft" + auto_resize="true" + user_resize="true" min_dim="150" width="330" follows="bottom|left|right" @@ -48,8 +50,9 @@ </layout_panel> <layout_panel width="330" - layout="topleft" + layout="topleft" auto_resize="true" + user_resize="true" follows="left|right|top" name="inbox_layout_panel" visible="false" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 84fce6630b..3b00969fd4 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -169,6 +169,7 @@ Please try logging in again in a minute.</string> <string name="TooltipOutboxNoTransfer">One or more of these objects cannot be sold or transferred.</string> <string name="TooltipOutboxNotInInventory">Your merchant outbox can only accept items directly from your inventory</string> <string name="TooltipOutboxWorn">You can not put items you are wearing into your merchant outbox</string> + <string name="TooltipOutboxCallingCard">You can not put calling cards into your merchant outbox</string> <string name="TooltipOutboxFolderLevels">Depth of nested folders exceeds 3</string> <string name="TooltipOutboxTooManyFolders">Subfolder count in top-level folder exceeds 20</string> <string name="TooltipOutboxTooManyObjects">Item count in top-level folder exceeds 200</string> -- cgit v1.2.3 From e4b63c96b83a1ed8c18946ecd64c21d6bd7c26fe Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 17 Jan 2012 14:59:18 -0800 Subject: EXP-1804 FIX -- Drag and drop operations can be blocked by modal dialogs * Added support for marketplace notifications that don't display the dialog until the next frame, leaving room for the drag and drop operation to properly complete before the notification shows up and interferes. --- indra/newview/CMakeLists.txt | 2 + indra/newview/llappviewer.cpp | 4 +- indra/newview/llinventoryfunctions.cpp | 39 ++---------- indra/newview/llmarketplacenotifications.cpp | 89 ++++++++++++++++++++++++++++ indra/newview/llmarketplacenotifications.h | 57 ++++++++++++++++++ 5 files changed, 155 insertions(+), 36 deletions(-) create mode 100644 indra/newview/llmarketplacenotifications.cpp create mode 100644 indra/newview/llmarketplacenotifications.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 78cd33210f..f85b943c70 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -316,6 +316,7 @@ set(viewer_SOURCE_FILES llmanipscale.cpp llmaniptranslate.cpp llmarketplacefunctions.cpp + llmarketplacenotifications.cpp llmediactrl.cpp llmediadataclient.cpp llmemoryview.cpp @@ -871,6 +872,7 @@ set(viewer_HEADER_FILES llmanipscale.h llmaniptranslate.h llmarketplacefunctions.h + llmarketplacenotifications.h llmediactrl.h llmediadataclient.h llmemoryview.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5c51f1b11a..a455d359bf 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -46,6 +46,7 @@ #include "llviewerstats.h" #include "llviewerstatsrecorder.h" #include "llmarketplacefunctions.h" +#include "llmarketplacenotifications.h" #include "llmd5.h" #include "llmeshrepository.h" #include "llpumpio.h" @@ -4406,8 +4407,9 @@ void LLAppViewer::idle() // update media focus LLViewerMediaFocus::getInstance()->update(); - // Update marketplace importer + // Update marketplace LLMarketplaceInventoryImporter::update(); + LLMarketplaceInventoryNotifications::update(); // objects and camera should be in sync, do LOD calculations now { diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 40bc3b76c9..dd92188e9d 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -58,6 +58,7 @@ #include "llinventorymodel.h" #include "llinventorypanel.h" #include "lllineeditor.h" +#include "llmarketplacenotifications.h" #include "llmenugl.h" #include "llnotificationsutil.h" #include "llpanelmaininventory.h" @@ -533,9 +534,6 @@ void show_item_original(const LLUUID& item_uuid) } -static S32 move_to_outbox_operation_id = -1; -static std::list<LLSD> move_to_outbox_payloads; - void open_outbox() { LLFloaterReg::showInstance("outbox"); @@ -614,24 +612,6 @@ void move_to_outbox_cb_action(const LLSD& payload) } } -void move_to_outbox_cb(const LLSD& notification, const LLSD& response) -{ - const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - if (option == 0) - { - llassert(move_to_outbox_payloads.size() > 0); - - BOOST_FOREACH(const LLSD& payload, move_to_outbox_payloads) - { - move_to_outbox_cb_action(payload); - } - } - - move_to_outbox_operation_id = -1; - move_to_outbox_payloads.clear(); -} - void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id) { // Collapse links directly to items/folders @@ -668,25 +648,14 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL open_outbox(); } else - { - LLSD args; - args["ITEM_NAME"] = inv_item->getName(); - + { LLSD payload; payload["item_id"] = inv_item->getUUID(); payload["dest_folder_id"] = dest_folder; payload["top_level_folder"] = top_level_folder; payload["operation_id"] = operation_id; - - if (move_to_outbox_operation_id != operation_id) - { - LLNotificationsUtil::add("ConfirmNoCopyToOutbox", args, payload, boost::bind(&move_to_outbox_cb, _1, _2)); - - move_to_outbox_operation_id = operation_id; - move_to_outbox_payloads.clear(); - } - - move_to_outbox_payloads.push_back(payload); + + LLMarketplaceInventoryNotifications::addNoCopyNotification(payload, move_to_outbox_cb_action); } } } diff --git a/indra/newview/llmarketplacenotifications.cpp b/indra/newview/llmarketplacenotifications.cpp new file mode 100644 index 0000000000..25faafb8ea --- /dev/null +++ b/indra/newview/llmarketplacenotifications.cpp @@ -0,0 +1,89 @@ +/** + * @file llmarketplacenotifications.cpp + * @brief Handler for notifications related to marketplace file I/O + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +#include "llmarketplacenotifications.h" +#include "llnotificationsutil.h" + +#include "llerror.h" + +#include <boost/foreach.hpp> +#include <boost/signals2.hpp> + + +namespace LLMarketplaceInventoryNotifications +{ + typedef boost::signals2::signal<void (const LLSD& param)> no_copy_payload_cb_signal_t; + + static no_copy_payload_cb_signal_t* no_copy_cb_action = NULL; + static bool no_copy_notify_active = false; + static std::list<LLSD> no_copy_payloads; + + void notifyNoCopyCallback(const LLSD& notification, const LLSD& response) + { + const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + llassert(!no_copy_payloads.empty()); + llassert(no_copy_cb_action != NULL); + + BOOST_FOREACH(const LLSD& payload, no_copy_payloads) + { + (*no_copy_cb_action)(payload); + } + } + + delete no_copy_cb_action; + no_copy_cb_action = NULL; + + no_copy_notify_active = false; + no_copy_payloads.clear(); + } + + void update() + { + if (!no_copy_notify_active && !no_copy_payloads.empty()) + { + no_copy_notify_active = true; + + LLNotificationsUtil::add("ConfirmNoCopyToOutbox", LLSD(), LLSD(), boost::bind(¬ifyNoCopyCallback, _1, _2)); + } + } + + void addNoCopyNotification(const LLSD& payload, const NoCopyCallbackFunction& cb) + { + if (no_copy_cb_action == NULL) + { + no_copy_cb_action = new no_copy_payload_cb_signal_t; + no_copy_cb_action->connect(boost::bind(cb, _1)); + } + + no_copy_payloads.push_back(payload); + } +} diff --git a/indra/newview/llmarketplacenotifications.h b/indra/newview/llmarketplacenotifications.h new file mode 100644 index 0000000000..83a4e163c7 --- /dev/null +++ b/indra/newview/llmarketplacenotifications.h @@ -0,0 +1,57 @@ +/** + * @file llmarketplacenotifications.h + * @brief Handler for notifications related to marketplace file I/O + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLMARKETPLACENOTIFICATIONS_H +#define LL_LLMARKETPLACENOTIFICATIONS_H + + +#include <llsd.h> +#include <boost/function.hpp> + + +// +// This is a set of helper functions to handle a unique notification with multiple +// payloads, helpful when dragging and dropping items to the merchant outbox that +// trigger notifications that can potentially interfere with the current drag and +// drop operation. +// +// Notification payloads are cached locally when initiated, the notification itself +// is triggered on the following frame during the call to "update" and then the +// response is triggered once per payload. +// + +namespace LLMarketplaceInventoryNotifications +{ + void update(); + + typedef boost::function<void (const LLSD&)> NoCopyCallbackFunction; + + void addNoCopyNotification(const LLSD& payload, const NoCopyCallbackFunction& cb); +}; + + +#endif // LL_LLMARKETPLACENOTIFICATIONS_H -- cgit v1.2.3 From 4b9cca70d7a3db719a9dfcfbf4937cfcb06b3516 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 17 Jan 2012 15:04:47 -0800 Subject: Fix for precompiled header issue on windows --- indra/newview/llmarketplacenotifications.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llmarketplacenotifications.cpp b/indra/newview/llmarketplacenotifications.cpp index 25faafb8ea..0886f9a990 100644 --- a/indra/newview/llmarketplacenotifications.cpp +++ b/indra/newview/llmarketplacenotifications.cpp @@ -25,7 +25,8 @@ * $/LicenseInfo$ */ -#include "linden_common.h" +// Precompiled header +#include "llviewerprecompiledheaders.h" #include "llmarketplacenotifications.h" #include "llnotificationsutil.h" -- cgit v1.2.3 From 652ef621543497aa947970d374285d8f851ed682 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Tue, 17 Jan 2012 15:51:30 -0800 Subject: EXP-1791 FIX -- Handle case where initialization with SLM fails in the Merchant Outbox floater in the viewer * Timeout now triggers the re-initialization logic in the merchant outbox. --- indra/newview/llmarketplacefunctions.cpp | 10 ++++++---- indra/newview/llmarketplacefunctions.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index ee7505c4f4..a3f0a6062c 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -132,11 +132,12 @@ namespace LLMarketplaceImport } if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) || - (status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR)) + (status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) || + (status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)) { if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM POST clearing marketplace cookie due to authentication failure" << llendl; + llinfos << " SLM POST clearing marketplace cookie due to authentication failure or timeout" << llendl; } sMarketplaceCookie.clear(); @@ -173,11 +174,12 @@ namespace LLMarketplaceImport llinfos << " SLM GET content: " << content.asString() << llendl; } - if (status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) + if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) || + (status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)) { if (gSavedSettings.getBOOL("InventoryOutboxLogging")) { - llinfos << " SLM GET clearing marketplace cookie due to authentication failure" << llendl; + llinfos << " SLM GET clearing marketplace cookie due to authentication failure or timeout" << llendl; } sMarketplaceCookie.clear(); diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 4731566366..4b8f7a1ac7 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -50,6 +50,7 @@ namespace MarketplaceErrorCodes IMPORT_AUTHENTICATION_ERROR = 401, IMPORT_DONE_WITH_ERRORS = 409, IMPORT_JOB_FAILED = 410, + IMPORT_JOB_TIMEOUT = 499, }; } -- cgit v1.2.3 From 1fede65af23248293d4033b8f7557875b499e191 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Tue, 17 Jan 2012 16:05:10 -0800 Subject: EXP-1810 FIX Cannot resize Received items panel in Inventory window --- .../default/xui/en/floater_test_layout_stacks.xml | 29 +++++----------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml index dbe75f8b53..f95f21e63a 100644 --- a/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml +++ b/indra/newview/skins/default/xui/en/floater_test_layout_stacks.xml @@ -26,31 +26,14 @@ background_visible="true"> <text follows="top|left|right" halign="center" text_color="white">flex</text> </layout_panel> - <layout_panel name="fixed" - auto_resize="false" - user_resize="true" - height="50" - min_height="0" - bg_alpha_color="green" - background_visible="true"> - <text follows="top|left|right" halign="center" text_color="black">fixed</text> - </layout_panel> - <layout_panel name="fixed" - auto_resize="false" + <layout_panel name="flex" + auto_resize="true" user_resize="true" - height="50" + bg_alpha_color="blue" + height="11" min_height="0" - bg_alpha_color="green" - background_visible="true"> - <text follows="top|left|right" halign="center" text_color="black">fixed</text> - </layout_panel> - <layout_panel name="fixed" - auto_resize="false" - user_resize="true" - height="50" - bg_alpha_color="green" - background_visible="true"> - <text follows="top|left|right" halign="center" text_color="black">fixed</text> + background_visible="true"> + <text follows="top|left|right" halign="center" text_color="white">flex</text> </layout_panel> </layout_stack> <layout_stack name="test_stack" -- cgit v1.2.3 From 23773d792d4387a93db6e66bddcfe2035164d7be Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Tue, 17 Jan 2012 17:36:59 -0800 Subject: EXP-1811 FIX Login progress floater has smaller than expected size made minimum size reflect default size for 1024 width window of old layout stack no way to match behavior --- indra/newview/llfloateruipreview.cpp | 6 +++-- .../skins/default/xui/en/panel_progress.xml | 30 +++++++++++----------- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 4c9c4cb154..d741b5b133 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -915,14 +915,16 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) { panel->buildFromFile(path); // build it LLRect new_size = panel->getRect(); // get its rectangle - panel->setOrigin(0,0); // reset its origin point so it's not offset by -left or other XUI attributes + panel->setOrigin(2,2); // reset its origin point so it's not offset by -left or other XUI attributes (*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute panel->setUseBoundingRect(TRUE); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements) panel->updateBoundingRect(); // update bounding rect LLRect bounding_rect = panel->getBoundingRect(); // get the bounding rect LLRect new_rect = panel->getRect(); // get the panel's rect new_rect.unionWith(bounding_rect); // union them to make sure we get the biggest one possible - (*floaterp)->reshape(new_rect.getWidth(), new_rect.getHeight() + floater_header_size); // reshape floater to match the union rect's dimensions + LLRect floater_rect = new_rect; + floater_rect.stretch(4, 4); + (*floaterp)->reshape(floater_rect.getWidth(), floater_rect.getHeight() + floater_header_size); // reshape floater to match the union rect's dimensions panel->reshape(new_rect.getWidth(), new_rect.getHeight()); // reshape panel to match the union rect's dimensions as well (both are needed) (*floaterp)->addChild(panel); // add panel as child (*floaterp)->openFloater(); // open floater (needed?) diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 7275e8d89b..860caf2d21 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -12,43 +12,43 @@ height="768" layout="topleft" left="0" - name="stack1" + name="horizontal_centering" orientation="horizontal" top="0" width="1024"> <layout_panel layout="topleft" min_width="10" - name="panel1" + name="left" width="150" /> <layout_panel height="768" layout="topleft" - min_width="640" - name="panel2" - width="640"> + min_width="670" + name="center" + width="670"> <layout_stack follows="left|right|top|bottom" height="768" layout="topleft" left="0" orientation="vertical" - name="stack2" + name="vertical_centering" top="0" - width="640"> + width="670"> <layout_panel height="200" layout="topleft" min_height="10" name="panel3" - width="640" /> + width="670" /> <layout_panel auto_resize="false" height="250" layout="topleft" min_height="250" name="panel4" - width="640"> + width="670"> <icon color="LoginProgressBoxCenterColor" follows="left|right|bottom|top" @@ -57,7 +57,7 @@ layout="topleft" left="0" top="0" - width="640" /> + width="670" /> <text follows="left|right|top" font="SansSerifHuge" @@ -69,7 +69,7 @@ name="title_text" text_color="LoginProgressBoxTextColor" top_delta="50" - width="593" /> + right="-47"/> <text follows="left|right|top" font="SansSerif" @@ -81,7 +81,7 @@ name="progress_text" text_color="LoginProgressBoxTextColor" top_pad="5" - width="593" + right="-47" word_wrap="true"/> <progress_bar bottom="115" @@ -104,7 +104,7 @@ name="message_text" text_color="LoginProgressBoxTextColor" top="145" - width="550" + right="-90" word_wrap="true"/> </layout_panel> <layout_panel @@ -112,13 +112,13 @@ layout="topleft" min_width="10" name="panel5" - width="640" /> + width="670" /> </layout_stack> </layout_panel> <layout_panel layout="topleft" min_width="10" - name="panel6" + name="right" width="150" /> </layout_stack> <button -- cgit v1.2.3 From 40687a930c2e37a4da15ff15f004611a734583d7 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Wed, 18 Jan 2012 12:59:44 -0800 Subject: EXP-1812 FIX Cannot resize location bar / favorites in top navigation bar in viewer --- indra/newview/app_settings/settings.xml | 11 - .../skins/default/xui/en/panel_navigation_bar.xml | 235 +++++++++++---------- 2 files changed, 119 insertions(+), 127 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a4806e3b77..28ba9fd704 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11378,17 +11378,6 @@ <key>Value</key> <real>3</real> </map> - <key>UIResizeBarOverlap</key> - <map> - <key>Comment</key> - <string>Size of UI resize bar overlap</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <real>1</real> - </map> <key>UIScaleFactor</key> <map> <key>Comment</key> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 9dee68efa7..305ce70fcb 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -59,6 +59,8 @@ follows="all" height="34" layout="topleft" + border_size="0" + resize_bar_overlap="3" left="0" mouse_opaque="false" name="nvp_stack" @@ -73,129 +75,130 @@ min_width="480" name="navigation_layout_panel" width="480"> - <panel - background_visible="false" - follows="left|top|right" - top="3" - height="23" - layout="topleft" - left="0" - name="navigation_panel" - width="480"> - <pull_button - follows="left|top" - direction="down" - height="23" - image_overlay="Arrow_Left_Off" - image_bottom_pad="1" - layout="topleft" - left="10" - name="back_btn" - tool_tip="Go back to previous location" - top="2" - width="31" /> - <pull_button - follows="left|top" - direction="down" - height="23" - image_overlay="Arrow_Right_Off" - image_bottom_pad="1" - layout="topleft" - left_pad="0" - name="forward_btn" - tool_tip="Go forward one location" - top_delta="0" - width="31" /> - <button - follows="left|top" - height="23" - image_bottom_pad="1" - image_overlay="Home_Off" - layout="topleft" - left_pad="7" - name="home_btn" - tool_tip="Teleport to my home location" - top_delta="0" - width="32" /> - <location_input - follows="all" - halign="right" - height="23" - label="Location" - layout="topleft" - left_pad="7" - max_chars="254" - mouse_opaque="false" - name="location_combo" - top_delta="0" - width="355"> - <combo_list - mouse_wheel_opaque="true"/> - </location_input> - </panel> - </layout_panel> - - <layout_panel - auto_resize="false" - layout="topleft" - max_width="5" - min_width="5" - name="nav_bar_resize_handle_panel" - width="5"> - <icon - follows="top|right" - height="25" - image_name="ChatBarHandle" - layout="topleft" - left="-6" - name="resize_handle" - top="4" - width="5" /> - </layout_panel> - + <panel + background_visible="false" + follows="left|top|right" + top="3" + height="23" + layout="topleft" + left="0" + name="navigation_panel" + width="480"> + <pull_button + follows="left|top" + direction="down" + height="23" + image_overlay="Arrow_Left_Off" + image_bottom_pad="1" + layout="topleft" + left="10" + name="back_btn" + tool_tip="Go back to previous location" + top="2" + width="31" /> + <pull_button + follows="left|top" + direction="down" + height="23" + image_overlay="Arrow_Right_Off" + image_bottom_pad="1" + layout="topleft" + left_pad="0" + name="forward_btn" + tool_tip="Go forward one location" + top_delta="0" + width="31" /> + <button + follows="left|top" + height="23" + image_bottom_pad="1" + image_overlay="Home_Off" + layout="topleft" + left_pad="7" + name="home_btn" + tool_tip="Teleport to my home location" + top_delta="0" + width="32" /> + <location_input + follows="all" + halign="right" + height="23" + label="Location" + layout="topleft" + left_pad="7" + max_chars="254" + mouse_opaque="false" + name="location_combo" + top_delta="0" + width="355"> + <combo_list + mouse_wheel_opaque="true"/> + </location_input> + </panel> + <icon + follows="top|right" + height="25" + image_name="ChatBarHandle" + layout="topleft" + left="-3" + name="resize_handle" + top="4" + width="5" /> + </layout_panel> <layout_panel follows="top|left" - layout="topleft" + layout="topleft" auto_resize="true" user_resize="true" min_width="315" name="favorites_layout_panel" width="315"> - <favorites_bar - follows="left|right|top" - font="SansSerifSmall" - height="20" - layout="topleft" - left="0" - name="favorite" - image_drag_indication="Accordion_ArrowOpened_Off" - tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" - width="311"> - <label - follows="left|top" - height="15" - layout="topleft" - left="10" - name="favorites_bar_label" - text_color="LtGray" - tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" - top="12" - width="102"> - Favorites Bar - </label> - <!-- More button actually is a text box. --> - <more_button - follows="left|bottom" - name=">>" - tab_stop="false" - tool_tip="Show more of My Favorites" - top="13" - width="50" - bottom="0" - valign="bottom"> - More ▼ - </more_button> - </favorites_bar> + <icon + follows="top|left" + height="25" + image_name="ChatBarHandle" + layout="topleft" + left="-318" + name="resize_handle" + top="4" + width="5" /> + + <favorites_bar + follows="left|right|top" + font="SansSerifSmall" + height="20" + layout="topleft" + left="0" + top="4" + name="favorite" + image_drag_indication="Accordion_ArrowOpened_Off" + tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" + width="311"> + <label + follows="left|top" + height="15" + layout="topleft" + left="10" + name="favorites_bar_label" + text_color="LtGray" + tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" + top="12" + width="102"> + Favorites Bar + </label> + <!-- More button actually is a text box. --> + <more_button + follows="left|bottom" + name=">>" + tab_stop="false" + tool_tip="Show more of My Favorites" + top="13" + width="50" + bottom="0" + valign="bottom"> + More ▼ + </more_button> + </favorites_bar> </layout_panel> </layout_stack> -- cgit v1.2.3 From eee28bd007178ac83053dfb891a7951d368bcc6e Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 18 Jan 2012 13:03:19 -0800 Subject: EXP-1125 FIX -- New tags always shown in Received Items inbox when Inventory window is detached from side panel EXP-1578 FIX -- received items folder shows shadows of content when scrolling through lots of folders in same window * Put in guard to prevent the inventory panel from being created multiple times --- indra/newview/llsidepanelinventory.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index e7d486e058..3761eb5777 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -71,8 +71,6 @@ static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel"; static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel"; -static const char * const INBOX_INVENTORY_PANEL = "inventory_inbox"; - static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; @@ -288,34 +286,44 @@ void LLSidepanelInventory::observeInboxCreation() void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID) { + // + // Silently do nothing if we already have an inbox inventory panel set up + // (this can happen multiple times on the initial session that creates the inbox) + // + + if (mInventoryPanelInbox != NULL) + { + return; + } + // // Track inbox folder changes // - + if (inboxID.isNull()) { - llwarns << "Attempting to track modifications to non-existant inbox" << llendl; + llwarns << "Attempting to track modifications to non-existent inbox" << llendl; return; } - + if (mCategoriesObserver == NULL) { mCategoriesObserver = new LLInventoryCategoriesObserver(); gInventory.addObserver(mCategoriesObserver); } - + mCategoriesObserver->addCategory(inboxID, boost::bind(&LLSidepanelInventory::onInboxChanged, this, inboxID)); - + // // Trigger a load for the entire contents of the Inbox // - + LLInventoryModelBackgroundFetch::instance().start(inboxID); - + // // Set up the inbox inventory view // - + LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL); mInventoryPanelInbox = inbox->setupInventoryPanel(); } -- cgit v1.2.3 From b18d54be9fb4998854e39df8fbaa271ceb2b8f89 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 18 Jan 2012 13:11:57 -0800 Subject: EXP-1816 FIX -- Drag area in outbox can remain highlighted after drag and drop ends * Added handleHover function to clear highlight --- indra/newview/llfloateroutbox.cpp | 10 ++++++++++ indra/newview/llfloateroutbox.h | 1 + 2 files changed, 11 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 297736f3bd..08cd8082aa 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -419,6 +419,16 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, return handled; } +BOOL LLFloaterOutbox::handleHover(S32 x, S32 y, MASK mask) +{ + if (mOutboxTopLevelDropZone) + { + mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); + } + + return LLFloater::handleHover(x, y, mask); +} + void LLFloaterOutbox::onMouseLeave(S32 x, S32 y, MASK mask) { if (mOutboxTopLevelDropZone) diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 796c533059..18baccf1c9 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -66,6 +66,7 @@ public: void showNotification(const LLSD& notify); + BOOL handleHover(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); protected: -- cgit v1.2.3 From 28fc3cbadb2b4d46b87938b74d61d5537f6c9701 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Wed, 18 Jan 2012 13:35:00 -0800 Subject: removed some invalid attributes --- indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 305ce70fcb..4bf420b79f 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -54,8 +54,6 @@ width="800" height="2"/> <layout_stack - use_border="true" - bevel_style="none" follows="all" height="34" layout="topleft" -- cgit v1.2.3 From 245f29ca2646157958f1a86bd2bae6cb54275223 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 18 Jan 2012 13:39:04 -0800 Subject: EXP-1550 FIX -- New tag shown and not removed on click when rezzing an item from Received Items panel and taking back into inventory. * Inventory folder creation dates are now only set once, rather than being updated every time a new item is added. --- indra/newview/llfolderviewitem.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index aee5a47011..8d6114c887 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2146,8 +2146,14 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) item->dirtyFilter(); - // Update the folder creation date if the child is newer than our current date - setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate())); + // Update the folder creation date if the folder has no creation date + bool setting_date = false; + const time_t item_creation_date = item->getCreationDate(); + if ((item_creation_date > 0) && (mCreationDate == 0)) + { + setCreationDate(item_creation_date); + setting_date = true; + } // Handle sorting requestArrange(); @@ -2157,8 +2163,11 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) LLFolderViewFolder* parentp = getParentFolder(); while (parentp) { - // Update the folder creation date if the child is newer than our current date - parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate())); + // Update the parent folder creation date + if (setting_date && (parentp->mCreationDate == 0)) + { + parentp->setCreationDate(item_creation_date); + } if (parentp->mSortFunction.isByDate()) { -- cgit v1.2.3 From 098bbfef99b6a52855af9076837ca521d2cdd525 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Wed, 18 Jan 2012 13:53:05 -0800 Subject: EXP-1704 FIX -- Updated text for Empty Received Items panel in Viewer * Updated to latest text per Leo's comment in the JIRA. --- indra/newview/skins/default/xui/en/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3b00969fd4..3351ffe00f 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2037,7 +2037,7 @@ Returns a string with the requested data about the region <string name="PlacesNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/places/[SEARCH_TERM] Search].</string> <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string> - <string name="InventoryInboxNoItems">When you purchase or otherwise receive an item, it will appear here so you can drag it to a folder in your inventory, or delete it if you do not wish to keep it.</string> + <string name="InventoryInboxNoItems">Certain items you receive, such as premium gifts, will appear here. You may then drag them into your inventory.</string> <string name="MarketplaceURL">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/</string> <string name="MarketplaceURL_CreateStore">http://community.secondlife.com/t5/English-Knowledge-Base/Selling-in-the-Marketplace/ta-p/700193#Section_.4</string> <string name="MarketplaceURL_Dashboard">https://marketplace.[MARKETPLACE_DOMAIN_NAME]/merchants/store/dashboard</string> -- cgit v1.2.3 From bb79bbf3209fbb962ca1b284076738eb5ba6019c Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 19 Jan 2012 13:53:48 -0800 Subject: EXP-1827 FIX -- Drag area in outbox does not always highlight green when indicating a top level drop * Updated the outbox drop area highlight to include top level drops within the outbox inventory panel itself. --- indra/newview/llfloateroutbox.cpp | 55 +++++++++++++++------------------------ 1 file changed, 21 insertions(+), 34 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 08cd8082aa..540f977305 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -376,44 +376,37 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); BOOL handled = (handled_view != NULL); + + // Determine if the mouse is inside the inventory panel itself or just within the floater + bool pointInInventoryPanel = false; + bool pointInInventoryPanelChild = false; + LLFolderView * root_folder = mOutboxInventoryPanel->getRootFolder(); + if (mOutboxInventoryPanel->getVisible()) + { + S32 inv_x, inv_y; + localPointToOtherView(x, y, &inv_x, &inv_y, mOutboxInventoryPanel); + + pointInInventoryPanel = mOutboxInventoryPanel->getRect().pointInRect(inv_x, inv_y); + + LLView * inventory_panel_child_at_point = mOutboxInventoryPanel->childFromPoint(inv_x, inv_y, true); + pointInInventoryPanelChild = (inventory_panel_child_at_point != root_folder); + } // Pass all drag and drop for this floater to the outbox inventory control if (!handled || !isAccepted(*accept)) { - // Always assume we are going to move the drag and drop operation to the outbox root folder - bool move_to_root = true; - - // If the inventory panel is visible, then only override it to the outbox root if we're outside the inventory panel + // Handle the drag and drop directly to the root of the outbox if we're not in the inventory panel // (otherwise the inventory panel itself will handle the drag and drop operation, without any override) - if (mOutboxInventoryPanel->getVisible()) - { - S32 inv_x, inv_y; - localPointToOtherView(x, y, &inv_x, &inv_y, mOutboxInventoryPanel); - - const LLRect& inv_rect = mOutboxInventoryPanel->getRect(); - - move_to_root = !inv_rect.pointInRect(inv_x, inv_y); - } - - // Handle the drag and drop directly to the root of the outbox - if (move_to_root) + if (!pointInInventoryPanel) { - LLFolderView * root_folder = mOutboxInventoryPanel->getRootFolder(); - handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } - if (mOutboxTopLevelDropZone) - { - mOutboxTopLevelDropZone->setBackgroundVisible(handled && !drop && isAccepted(*accept)); - } + mOutboxTopLevelDropZone->setBackgroundVisible(handled && !drop && isAccepted(*accept)); } else { - if (mOutboxTopLevelDropZone) - { - mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); - } + mOutboxTopLevelDropZone->setBackgroundVisible(!pointInInventoryPanelChild); } return handled; @@ -421,20 +414,14 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL LLFloaterOutbox::handleHover(S32 x, S32 y, MASK mask) { - if (mOutboxTopLevelDropZone) - { - mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); - } + mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); return LLFloater::handleHover(x, y, mask); } void LLFloaterOutbox::onMouseLeave(S32 x, S32 y, MASK mask) { - if (mOutboxTopLevelDropZone) - { - mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); - } + mOutboxTopLevelDropZone->setBackgroundVisible(FALSE); LLFloater::onMouseLeave(x, y, mask); } -- cgit v1.2.3 From 00fc2d5a5c24b1cf2aedd81090bf769207fbf41b Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 19 Jan 2012 13:54:32 -0800 Subject: * Added member variables to avoid several per-frame getChild calls. --- indra/newview/llpanelmarketplaceinbox.cpp | 19 ++++++++++++------- indra/newview/llpanelmarketplaceinbox.h | 7 +++++-- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index a5e964f563..66c9c323cb 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -48,6 +48,8 @@ const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams // protected LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p) : LLPanel(p) + , mFreshCountCtrl(NULL) + , mInboxButton(NULL) , mInventoryPanel(NULL) { } @@ -60,6 +62,9 @@ LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox() BOOL LLPanelMarketplaceInbox::postBuild() { LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this)); + + mFreshCountCtrl = getChild<LLUICtrl>("inbox_fresh_new_count"); + mInboxButton = getChild<LLButton>("inbox_btn"); return TRUE; } @@ -216,7 +221,7 @@ void LLPanelMarketplaceInbox::draw() { U32 item_count = getTotalItemCount(); - LLView * fresh_new_count_view = getChildView("inbox_fresh_new_count"); + llassert(mFreshCountCtrl != NULL); if (item_count > 0) { @@ -224,26 +229,26 @@ void LLPanelMarketplaceInbox::draw() LLStringUtil::format_map_t args; args["[NUM]"] = item_count_str; - getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelWithArg", args)); + mInboxButton->setLabel(getString("InboxLabelWithArg", args)); #if SUPPORTING_FRESH_ITEM_COUNT // set green text to fresh item count U32 fresh_item_count = getFreshItemCount(); - fresh_new_count_view->setVisible((fresh_item_count > 0)); + mFreshCountCtrl->setVisible((fresh_item_count > 0)); if (fresh_item_count > 0) { - getChild<LLUICtrl>("inbox_fresh_new_count")->setTextArg("[NUM]", llformat("%d", fresh_item_count)); + mFreshCountCtrl->setTextArg("[NUM]", llformat("%d", fresh_item_count)); } #else - fresh_new_count_view->setVisible(FALSE); + mFreshCountCtrl->setVisible(FALSE); #endif } else { - getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelNoArg")); + mInboxButton->setLabel(getString("InboxLabelNoArg")); - fresh_new_count_view->setVisible(FALSE); + mFreshCountCtrl->setVisible(FALSE); } LLPanel::draw(); diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h index 3531518e51..9eb74581a2 100644 --- a/indra/newview/llpanelmarketplaceinbox.h +++ b/indra/newview/llpanelmarketplaceinbox.h @@ -29,7 +29,9 @@ #include "llpanel.h" +class LLButton; class LLInventoryPanel; +class LLUICtrl; class LLPanelMarketplaceInbox : public LLPanel { @@ -66,9 +68,10 @@ private: void onFocusReceived(); private: - LLInventoryPanel* mInventoryPanel; + LLUICtrl * mFreshCountCtrl; + LLButton * mInboxButton; + LLInventoryPanel * mInventoryPanel; }; #endif //LL_LLPANELMARKETPLACEINBOX_H - -- cgit v1.2.3 From bcdecbdae1510a55d5406a85786bab399e180cac Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 19 Jan 2012 14:23:01 -0800 Subject: EXP-1828 FIX -- Drag and drop to an open folder in the outbox causes it to close automatically * Updated auto-open behavior to ignore items that are already open. --- indra/newview/llfolderview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 6bf0f09747..e0d7d67f7d 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1199,7 +1199,9 @@ void LLFolderView::changeType(LLInventoryModel *model, LLFolderType::EType new_f void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) { - if (mAutoOpenItems.check() == item || mAutoOpenItems.getDepth() >= (U32)AUTO_OPEN_STACK_DEPTH) + if ((mAutoOpenItems.check() == item) || + (mAutoOpenItems.getDepth() >= (U32)AUTO_OPEN_STACK_DEPTH) || + item->isOpen()) { return; } -- cgit v1.2.3 From 216ac700431af0ab7ee45ec5fef03c928f235063 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Thu, 19 Jan 2012 15:24:29 -0800 Subject: EXP-1829 FIX -- Selecting a valid item last allows other selected invalid items to be copied to Outbox with context menu option * Updated context menu default enabled state to use the last state rather than TRUE. Once per frame, the states are all reset to TRUE so this has the effect of AND'ing together successive buildContextMenu functions rather than ignoring previous states. --- indra/newview/llinventorybridge.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3929183be2..12322b2921 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -471,7 +471,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const void hide_context_entries(LLMenuGL& menu, const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries) // If append is TRUE, then new enabled entries + const menuentry_vec_t &disabled_entries) { const LLView::child_list_t *list = menu.getChildList(); @@ -493,7 +493,6 @@ void hide_context_entries(LLMenuGL& menu, hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries); } - bool found = false; menuentry_vec_t::const_iterator itor2; for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2) @@ -529,7 +528,7 @@ void hide_context_entries(LLMenuGL& menu, // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); - BOOL enabled = TRUE; + BOOL enabled = menu_item->getEnabled(); for (itor2 = disabled_entries.begin(); itor2 != disabled_entries.end(); ++itor2) { if (*itor2 == name) -- cgit v1.2.3 From a662b888ed02691b7790c23e31c7d8bcf7cf7f5b Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Thu, 19 Jan 2012 19:40:46 -0800 Subject: EXP-1824 FIX Received Items panel does not collapse correct when Height of panel is maximized in Inventory window --- indra/newview/llsidepanelinventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 3761eb5777..ccf8305c63 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -369,7 +369,7 @@ void LLSidepanelInventory::onToggleInboxBtn() const bool inbox_expanded = inboxButton->getToggleState(); // Enable user_resize on main inventory panel only when inbox is expanded - inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, inbox_expanded); + //inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, inbox_expanded); // Expand/collapse the indicated panel inv_stack->collapsePanel(inboxPanel, !inbox_expanded); -- cgit v1.2.3 From 29ad432c8bdc3a69c7241de28e217d27b71947d6 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Thu, 19 Jan 2012 19:52:49 -0800 Subject: made layoutPanels have constant user_resize and auto_resize attributes --- indra/newview/llchicletbar.cpp | 2 -- indra/newview/llsidepanelinventory.cpp | 6 ------ indra/newview/skins/default/xui/en/panel_chiclet_bar.xml | 1 + 3 files changed, 1 insertion(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index a32fd307f1..f1bc51fbe7 100644 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -212,8 +212,6 @@ void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent) { // Firstly, update layout stack to ensure we deal with correct panel sizes. { - // Set chiclet panel to be autoresized by default. - mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE); // Force the updating of layout to reset panels collapse factor. mToolbarStack->updateLayout(); } diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index ccf8305c63..038b18afbd 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -217,9 +217,6 @@ BOOL LLSidepanelInventory::postBuild() { LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME); - // Disable user_resize on main inventory panel by default - inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false); - // Collapse inbox panel inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true); @@ -368,9 +365,6 @@ void LLSidepanelInventory::onToggleInboxBtn() const bool inbox_expanded = inboxButton->getToggleState(); - // Enable user_resize on main inventory panel only when inbox is expanded - //inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, inbox_expanded); - // Expand/collapse the indicated panel inv_stack->collapsePanel(inboxPanel, !inbox_expanded); diff --git a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml index 6d4008a4ed..ff0146490b 100644 --- a/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_chiclet_bar.xml @@ -27,6 +27,7 @@ min_width="95" mouse_opaque="false" name="chiclet_list_panel" + auto_resize="true" top="0" width="189"> <chiclet_panel -- cgit v1.2.3 From f42a8a768c3028e81a48b19ac75943f15bfedf1e Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Thu, 19 Jan 2012 20:00:42 -0800 Subject: fixed build --- indra/newview/llimfloater.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 228260c41a..f67464078b 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -234,12 +234,6 @@ LLIMFloater::~LLIMFloater() //virtual BOOL LLIMFloater::postBuild() { - // User-resizable control panels in P2P sessions look ugly (EXT-3470). - if (mDialog == IM_NOTHING_SPECIAL || mDialog == IM_SESSION_P2P_INVITE) - { - getChild<LLLayoutStack>("im_panels")->setPanelUserResize("panel_im_control_panel", FALSE); - } - const LLUUID& other_party_id = LLIMModel::getInstance()->getOtherParticipantID(mSessionID); if (other_party_id.notNull()) { -- cgit v1.2.3 From a73013f7081db15aae93cc82feb895139b1847db Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 20 Jan 2012 13:41:43 -0800 Subject: EXP-1799 FIX -- Replace and Add to Outfit options appear as grayed out in Inventory * Modified build context menu code to not disable items that are invisible so secondary background fetch can coalesce menu options with proper state. * Removed "Move to Merchant Outbox" context menu option. --- indra/newview/llinventorybridge.cpp | 17 +++++------------ indra/newview/skins/default/xui/en/menu_inventory.xml | 8 -------- 2 files changed, 5 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 12322b2921..97e61f4c99 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -519,7 +519,6 @@ void hide_context_entries(LLMenuGL& menu, { menu_item->setVisible(FALSE); } - menu_item->setEnabled(FALSE); } else { @@ -528,14 +527,10 @@ void hide_context_entries(LLMenuGL& menu, // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); - BOOL enabled = menu_item->getEnabled(); - for (itor2 = disabled_entries.begin(); itor2 != disabled_entries.end(); ++itor2) + bool enabled = (menu_item->getEnabled() == TRUE); + for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2) { - if (*itor2 == name) - { - enabled = FALSE; - break; - } + enabled &= (*itor2 != name); } menu_item->setEnabled(enabled); @@ -613,12 +608,10 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, copyable = inv_item->getPermissions().allowCopyBy(gAgent.getID()); } - const std::string merchant_action = ((copyable == true) ? "Merchant Copy" : "Merchant Move"); - items.push_back(merchant_action); - + items.push_back(std::string("Merchant Copy")); if (!canListOnMarketplaceNow()) { - disabled_items.push_back(merchant_action); + disabled_items.push_back(std::string("Merchant Copy")); } } } diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 31dcdfffbb..ef4a1bc061 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -685,14 +685,6 @@ function="Inventory.DoToSelected" parameter="copy_to_outbox" /> </menu_item_call> - <menu_item_call - label="Move to Merchant Outbox" - layout="topleft" - name="Merchant Move"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="move_to_outbox" /> - </menu_item_call> <menu_item_call label="Send to Marketplace" layout="topleft" -- cgit v1.2.3 From c8a2f6515a47c625d97802bd9f7bd833be65fe2c Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 20 Jan 2012 16:10:32 -0800 Subject: EXP-1799 FIX -- Replace and Add to Outfit options appear as grayed out in Inventory * Refactored LLFolderBridge::buildContextMenu fetch to clear and rebuild basic context menu options after the fetch rather than trying to merge the two. --- indra/newview/llinventorybridge.cpp | 86 +++++++++++++++++++++++-------------- indra/newview/llinventorybridge.h | 8 +++- 2 files changed, 59 insertions(+), 35 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 97e61f4c99..472be8cf5c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -519,6 +519,8 @@ void hide_context_entries(LLMenuGL& menu, { menu_item->setVisible(FALSE); } + + menu_item->setEnabled(FALSE); } else { @@ -601,13 +603,6 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, { items.push_back(std::string("Marketplace Separator")); - bool copyable = true; - LLViewerInventoryItem* inv_item = gInventory.getItem(mUUID); - if (inv_item) - { - copyable = inv_item->getPermissions().allowCopyBy(gAgent.getID()); - } - items.push_back(std::string("Merchant Copy")); if (!canListOnMarketplaceNow()) { @@ -1138,12 +1133,6 @@ bool LLInvFVBridge::canListOnMarketplace() const return false; } - const LLUUID & outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); - if (outbox_id.isNull()) - { - return false; - } - LLViewerInventoryItem * item = model->getItem(mUUID); if (item) { @@ -2415,7 +2404,6 @@ public: delete this; } - protected: LLUUID mCatID; bool mCopyItems; @@ -2945,12 +2933,38 @@ void LLFolderBridge::staticFolderOptionsMenu() LLFolderBridge* selfp = sSelf.get(); if (selfp) { - selfp->folderOptionsMenu(); + selfp->folderOptionsMenuAfterFetch(); } } -void LLFolderBridge::folderOptionsMenu() +void LLFolderBridge::folderOptionsMenuAfterFetch() { + const U32 flags = mContextMenuFlags; + + mItems.clear(); + mDisabledItems.clear(); + mContextMenuFlags = 0x0; + + LLMenuGL* menup = dynamic_cast<LLMenuGL*>(mMenu.get()); + if (!menup) return; + + // Reset the menu + { + const LLView::child_list_t *list = menup->getChildList(); + + LLView::child_list_t::const_iterator menu_itor; + for (menu_itor = list->begin(); menu_itor != list->end(); ++menu_itor) + { + (*menu_itor)->setVisible(FALSE); + (*menu_itor)->pushVisible(TRUE); + (*menu_itor)->setEnabled(TRUE); + } + } + + // Build basic menu back up + buildContextMenuBaseOptions(*menup, flags); + + // Build folder specific options back up LLInventoryModel* model = getInventoryModel(); if(!model) return; @@ -3032,15 +3046,12 @@ void LLFolderBridge::folderOptionsMenu() } mItems.push_back(std::string("Outfit Separator")); } - LLMenuGL* menup = dynamic_cast<LLMenuGL*>(mMenu.get()); - if (menup) - { - hide_context_entries(*menup, mItems, mDisabledItems); - // Reposition the menu, in case we're adding items to an existing menu. - menup->needsArrange(); - menup->arrangeAndClear(); - } + hide_context_entries(*menup, mItems, mDisabledItems); + + // Reposition the menu, in case we're adding items to an existing menu. + menup->needsArrange(); + menup->arrangeAndClear(); } BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type) @@ -3055,17 +3066,11 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } -// Flags unused -void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +void LLFolderBridge::buildContextMenuBaseOptions(LLMenuGL& menu, U32 flags) { - mItems.clear(); - mDisabledItems.clear(); - - lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; - -// menuentry_vec_t disabled_items; LLInventoryModel* model = getInventoryModel(); - if(!model) return; + llassert(model != NULL); + const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); @@ -3186,6 +3191,21 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mDisabledItems.push_back(std::string("Share")); } } +} + +// Flags unused +void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + mItems.clear(); + mDisabledItems.clear(); + mContextMenuFlags = flags; + + lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; + + LLInventoryModel* model = getInventoryModel(); + if(!model) return; + + buildContextMenuBaseOptions(menu, flags); hide_context_entries(menu, mItems, mDisabledItems); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index cb378b7d7a..56301ce728 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -235,7 +235,8 @@ public: const LLUUID& uuid) : LLInvFVBridge(inventory, root, uuid), mCallingCards(FALSE), - mWearables(FALSE) + mWearables(FALSE), + mContextMenuFlags(0x0) {} BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg); @@ -282,6 +283,8 @@ public: LLHandle<LLFolderBridge> getHandle() { mHandle.bind(this); return mHandle; } protected: + void buildContextMenuBaseOptions(LLMenuGL& menu, U32 flags); + //-------------------------------------------------------------------- // Menu callbacks //-------------------------------------------------------------------- @@ -317,7 +320,7 @@ protected: public: static LLHandle<LLFolderBridge> sSelf; static void staticFolderOptionsMenu(); - void folderOptionsMenu(); + void folderOptionsMenuAfterFetch(); private: BOOL mCallingCards; @@ -325,6 +328,7 @@ private: LLHandle<LLView> mMenu; menuentry_vec_t mItems; menuentry_vec_t mDisabledItems; + U32 mContextMenuFlags; LLRootHandle<LLFolderBridge> mHandle; }; -- cgit v1.2.3 From 039cd701c4fa1dcc32bc63f57aab5a5f995f7498 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Fri, 20 Jan 2012 16:36:25 -0800 Subject: * Modified so "Copy" context menu option is not available for "no copy" items. --- indra/newview/llinventorybridge.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 472be8cf5c..bce3511c80 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1654,11 +1654,7 @@ BOOL LLItemBridge::isItemCopyable() const return FALSE; } - // All items can be copied in god mode since you can - // at least paste-as-link the item, though you - // still may not be able paste the item. - return TRUE; - // return (item->getPermissions().allowCopyBy(gAgent.getID())); + return item->getPermissions().allowCopyBy(gAgent.getID()) || gSavedSettings.getBOOL("InventoryLinking"); } return FALSE; } @@ -1771,12 +1767,8 @@ BOOL LLFolderBridge::isUpToDate() const BOOL LLFolderBridge::isItemCopyable() const { - if (gSavedSettings.getBOOL("InventoryLinking")) - { - // Can copy folders to paste-as-link, but not for straight paste. - return TRUE; - } - return FALSE; + // Can copy folders to paste-as-link, but not for straight paste. + return gSavedSettings.getBOOL("InventoryLinking"); } BOOL LLFolderBridge::copyToClipboard() const -- cgit v1.2.3 From e2d4309ba56b103bbcd215b09c9d877ceb71dc38 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 23 Jan 2012 11:45:47 -0800 Subject: EXP-1799 FIX -- Replace and Add to Outfit options and Copy to Merchant Outbox options can appear in invalid state when a valid folder is last selection EXP-1834 FIX -- Right click context menus on Folders in Merchant Outbox and Library folders can show all inventory options including admin options EXP-1835 FIX -- Right clicking on a folder and selecting New Folder creates folder under My Inventory not within selected folder * Updated folder context menu building to build full options in one step or trigger a load which will rebuild top-level context menu for all selected items when complete. Previous code had an implicit assumption that the selected folder was the only selection after background fetch. --- indra/newview/llinventorybridge.cpp | 257 ++++++++++++++++-------------------- indra/newview/llinventorybridge.h | 9 +- 2 files changed, 116 insertions(+), 150 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bce3511c80..9e21e2fceb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2923,127 +2923,11 @@ void LLFolderBridge::pasteLinkFromClipboard() void LLFolderBridge::staticFolderOptionsMenu() { LLFolderBridge* selfp = sSelf.get(); - if (selfp) - { - selfp->folderOptionsMenuAfterFetch(); - } -} - -void LLFolderBridge::folderOptionsMenuAfterFetch() -{ - const U32 flags = mContextMenuFlags; - - mItems.clear(); - mDisabledItems.clear(); - mContextMenuFlags = 0x0; - - LLMenuGL* menup = dynamic_cast<LLMenuGL*>(mMenu.get()); - if (!menup) return; - - // Reset the menu - { - const LLView::child_list_t *list = menup->getChildList(); - - LLView::child_list_t::const_iterator menu_itor; - for (menu_itor = list->begin(); menu_itor != list->end(); ++menu_itor) - { - (*menu_itor)->setVisible(FALSE); - (*menu_itor)->pushVisible(TRUE); - (*menu_itor)->setEnabled(TRUE); - } - } - - // Build basic menu back up - buildContextMenuBaseOptions(*menup, flags); - - // Build folder specific options back up - LLInventoryModel* model = getInventoryModel(); - if(!model) return; - - const LLInventoryCategory* category = model->getCategory(mUUID); - if(!category) return; - - const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); - if (trash_id == mUUID) return; - if (isItemInTrash()) return; - if (!isAgentInventory()) return; - if (isOutboxFolder()) return; - - LLFolderType::EType type = category->getPreferredType(); - const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); - // BAP change once we're no longer treating regular categories as ensembles. - const bool is_ensemble = (type == LLFolderType::FT_NONE || - LLFolderType::lookupIsEnsembleType(type)); - - // Only enable calling-card related options for non-system folders. - if (!is_system_folder) - { - LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); - if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) - { - mItems.push_back(std::string("Calling Card Separator")); - mItems.push_back(std::string("Conference Chat Folder")); - mItems.push_back(std::string("IM All Contacts In Folder")); - } - } - - if (!isItemRemovable()) - { - mDisabledItems.push_back(std::string("Delete")); - } -#ifndef LL_RELEASE_FOR_DOWNLOAD - if (LLFolderType::lookupIsProtectedType(type)) + if (selfp && selfp->mRoot) { - mItems.push_back(std::string("Delete System Folder")); + selfp->mRoot->updateMenu(); } -#endif - - // wearables related functionality for folders. - //is_wearable - LLFindWearables is_wearable; - LLIsType is_object( LLAssetType::AT_OBJECT ); - LLIsType is_gesture( LLAssetType::AT_GESTURE ); - - if (mWearables || - checkFolderForContentsOfType(model, is_wearable) || - checkFolderForContentsOfType(model, is_object) || - checkFolderForContentsOfType(model, is_gesture) ) - { - mItems.push_back(std::string("Folder Wearables Separator")); - - // Only enable add/replace outfit for non-system folders. - if (!is_system_folder) - { - // Adding an outfit onto another (versus replacing) doesn't make sense. - if (type != LLFolderType::FT_OUTFIT) - { - mItems.push_back(std::string("Add To Outfit")); - } - - mItems.push_back(std::string("Replace Outfit")); - } - if (is_ensemble) - { - mItems.push_back(std::string("Wear As Ensemble")); - } - mItems.push_back(std::string("Remove From Outfit")); - if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) - { - mDisabledItems.push_back(std::string("Remove From Outfit")); - } - if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) - { - mDisabledItems.push_back(std::string("Replace Outfit")); - } - mItems.push_back(std::string("Outfit Separator")); - } - - hide_context_entries(*menup, mItems, mDisabledItems); - - // Reposition the menu, in case we're adding items to an existing menu. - menup->needsArrange(); - menup->arrangeAndClear(); } BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type) @@ -3058,7 +2942,7 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } -void LLFolderBridge::buildContextMenuBaseOptions(LLMenuGL& menu, U32 flags) +void LLFolderBridge::buildContextMenuBaseOptions(U32 flags) { LLInventoryModel* model = getInventoryModel(); llassert(model != NULL); @@ -3079,10 +2963,6 @@ void LLFolderBridge::buildContextMenuBaseOptions(LLMenuGL& menu, U32 flags) mDisabledItems.push_back(std::string("New Body Parts")); } - // clear out old menu and folder pointers - mMenu.markDead(); - sSelf.markDead(); - if(trash_id == mUUID) { // This is the trash. @@ -3185,45 +3065,134 @@ void LLFolderBridge::buildContextMenuBaseOptions(LLMenuGL& menu, U32 flags) } } +void LLFolderBridge::buildContextMenuFolderOptions(U32 flags) +{ + // Build folder specific options back up + LLInventoryModel* model = getInventoryModel(); + if(!model) return; + + const LLInventoryCategory* category = model->getCategory(mUUID); + if(!category) return; + + const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); + if (trash_id == mUUID) return; + if (isItemInTrash()) return; + if (!isAgentInventory()) return; + if (isOutboxFolder()) return; + + LLFolderType::EType type = category->getPreferredType(); + const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); + // BAP change once we're no longer treating regular categories as ensembles. + const bool is_ensemble = (type == LLFolderType::FT_NONE || + LLFolderType::lookupIsEnsembleType(type)); + + // Only enable calling-card related options for non-system folders. + if (!is_system_folder) + { + LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); + if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) + { + mItems.push_back(std::string("Calling Card Separator")); + mItems.push_back(std::string("Conference Chat Folder")); + mItems.push_back(std::string("IM All Contacts In Folder")); + } + } + + if (!isItemRemovable()) + { + mDisabledItems.push_back(std::string("Delete")); + } + +#ifndef LL_RELEASE_FOR_DOWNLOAD + if (LLFolderType::lookupIsProtectedType(type)) + { + mItems.push_back(std::string("Delete System Folder")); + } +#endif + + // wearables related functionality for folders. + //is_wearable + LLFindWearables is_wearable; + LLIsType is_object( LLAssetType::AT_OBJECT ); + LLIsType is_gesture( LLAssetType::AT_GESTURE ); + + if (mWearables || + checkFolderForContentsOfType(model, is_wearable) || + checkFolderForContentsOfType(model, is_object) || + checkFolderForContentsOfType(model, is_gesture) ) + { + mItems.push_back(std::string("Folder Wearables Separator")); + + // Only enable add/replace outfit for non-system folders. + if (!is_system_folder) + { + // Adding an outfit onto another (versus replacing) doesn't make sense. + if (type != LLFolderType::FT_OUTFIT) + { + mItems.push_back(std::string("Add To Outfit")); + } + + mItems.push_back(std::string("Replace Outfit")); + } + if (is_ensemble) + { + mItems.push_back(std::string("Wear As Ensemble")); + } + mItems.push_back(std::string("Remove From Outfit")); + if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID)) + { + mDisabledItems.push_back(std::string("Remove From Outfit")); + } + if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) + { + mDisabledItems.push_back(std::string("Replace Outfit")); + } + mItems.push_back(std::string("Outfit Separator")); + } +} + // Flags unused void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { + sSelf.markDead(); + mItems.clear(); mDisabledItems.clear(); - mContextMenuFlags = flags; lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; LLInventoryModel* model = getInventoryModel(); if(!model) return; - buildContextMenuBaseOptions(menu, flags); - - hide_context_entries(menu, mItems, mDisabledItems); + buildContextMenuBaseOptions(flags); // Add menu items that are dependent on the contents of the folder. - uuid_vec_t folders; - LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID); + LLViewerInventoryCategory* category = (LLViewerInventoryCategory *) model->getCategory(mUUID); if (category) { + uuid_vec_t folders; folders.push_back(category->getUUID()); - } - mMenu = menu.getHandle(); - sSelf = getHandle(); - LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders, FALSE); - fetch->startFetch(); - inc_busy_count(); - if(fetch->isFinished()) - { - // everything is already here - call done. - fetch->done(); - } - else - { - // it's all on its way - add an observer, and the inventory will call done for us when everything is here. - gInventory.addObserver(fetch); + sSelf = getHandle(); + LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders, FALSE); + fetch->startFetch(); + inc_busy_count(); + if (fetch->isFinished()) + { + buildContextMenuFolderOptions(flags); + } + else + { + // it's all on its way - add an observer, and the inventory will call done for us when everything is here. + gInventory.addObserver(fetch); + } } + + hide_context_entries(menu, mItems, mDisabledItems); + + // Reposition the menu, in case we're adding items to an existing menu. + menu.needsArrange(); + menu.arrangeAndClear(); } BOOL LLFolderBridge::hasChildren() const diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 56301ce728..871657a58a 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -235,8 +235,7 @@ public: const LLUUID& uuid) : LLInvFVBridge(inventory, root, uuid), mCallingCards(FALSE), - mWearables(FALSE), - mContextMenuFlags(0x0) + mWearables(FALSE) {} BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg); @@ -283,7 +282,8 @@ public: LLHandle<LLFolderBridge> getHandle() { mHandle.bind(this); return mHandle; } protected: - void buildContextMenuBaseOptions(LLMenuGL& menu, U32 flags); + void buildContextMenuBaseOptions(U32 flags); + void buildContextMenuFolderOptions(U32 flags); //-------------------------------------------------------------------- // Menu callbacks @@ -320,15 +320,12 @@ protected: public: static LLHandle<LLFolderBridge> sSelf; static void staticFolderOptionsMenu(); - void folderOptionsMenuAfterFetch(); private: BOOL mCallingCards; BOOL mWearables; - LLHandle<LLView> mMenu; menuentry_vec_t mItems; menuentry_vec_t mDisabledItems; - U32 mContextMenuFlags; LLRootHandle<LLFolderBridge> mHandle; }; -- cgit v1.2.3 From 83ca425158fb56cab08c8a44ddad93ca222e58d7 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 23 Jan 2012 15:34:01 -0800 Subject: Reverting rev 22217 changes to background fetch so search and recent will fully fetch user inventory --- indra/newview/llinventorymodelbackgroundfetch.cpp | 328 +++++++--------------- indra/newview/llinventorymodelbackgroundfetch.h | 16 +- 2 files changed, 115 insertions(+), 229 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 5f0c744192..91fdd67806 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -50,7 +50,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : mMinTimeBetweenFetches(0.3f), mMaxTimeBetweenFetches(10.f), mTimelyFetchPending(FALSE), - mFetchCount(0) + mBulkFetchCount(0) { } @@ -60,7 +60,7 @@ LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const { - return mFetchQueue.empty() && mFetchCount<=0; + return mFetchQueue.empty() && mBulkFetchCount<=0; } bool LLInventoryModelBackgroundFetch::libraryFetchStarted() const @@ -103,60 +103,44 @@ BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() const return mBackgroundFetchActive; } -void LLInventoryModelBackgroundFetch::start(const LLUUID& id, BOOL recursive) +void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive) { - if (id.isNull()) return; + if (!mAllFoldersFetched || cat_id.notNull()) + { + LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL; - LLViewerInventoryCategory* cat = gInventory.getCategory(id); - if (cat) - { // it's a folder, do a bulk fetch - if (!mAllFoldersFetched) + mBackgroundFetchActive = TRUE; + if (cat_id.isNull()) { - LL_DEBUGS("InventoryFetch") << "Start fetching category: " << id << ", recursive: " << recursive << LL_ENDL; - - mBackgroundFetchActive = TRUE; - if (id.isNull()) + if (!mRecursiveInventoryFetchStarted) { - if (!mRecursiveInventoryFetchStarted) - { - mRecursiveInventoryFetchStarted |= recursive; - mFetchQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursive)); - gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - } - if (!mRecursiveLibraryFetchStarted) - { - mRecursiveLibraryFetchStarted |= recursive; - mFetchQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursive)); - gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - } + mRecursiveInventoryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getRootFolderID(), recursive)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } - else + if (!mRecursiveLibraryFetchStarted) { - // Specific folder requests go to front of queue. - if (mFetchQueue.empty() || mFetchQueue.front().mUUID != id) - { - mFetchQueue.push_front(FetchQueueInfo(id, recursive)); - gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - } - if (id == gInventory.getLibraryRootFolderID()) - { - mRecursiveLibraryFetchStarted |= recursive; - } - if (id == gInventory.getRootFolderID()) - { - mRecursiveInventoryFetchStarted |= recursive; - } + mRecursiveLibraryFetchStarted |= recursive; + mFetchQueue.push_back(FetchQueueInfo(gInventory.getLibraryRootFolderID(), recursive)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); } } - } - else if (LLViewerInventoryItem* itemp = gInventory.getItem(id)) - { - if (!itemp->mIsComplete && (mFetchQueue.empty() || mFetchQueue.front().mUUID != id)) + else { - mBackgroundFetchActive = TRUE; - - mFetchQueue.push_front(FetchQueueInfo(id, false, false)); - gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + // Specific folder requests go to front of queue. + if (mFetchQueue.empty() || mFetchQueue.front().mCatUUID != cat_id) + { + mFetchQueue.push_front(FetchQueueInfo(cat_id, recursive)); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } + if (cat_id == gInventory.getLibraryRootFolderID()) + { + mRecursiveLibraryFetchStarted |= recursive; + } + if (cat_id == gInventory.getRootFolderID()) + { + mRecursiveInventoryFetchStarted |= recursive; + } } } } @@ -174,7 +158,7 @@ void LLInventoryModelBackgroundFetch::stopBackgroundFetch() { mBackgroundFetchActive = FALSE; gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); - mFetchCount=0; + mBulkFetchCount=0; mMinTimeBetweenFetches=0.0f; } } @@ -199,9 +183,10 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (mBackgroundFetchActive && gAgent.getRegion()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - if (gSavedSettings.getBOOL("UseHTTPInventory")) + std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents2"); + if (gSavedSettings.getBOOL("UseHTTPInventory") && !url.empty()) { - bulkFetch(); + bulkFetch(url); return; } @@ -245,7 +230,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } const FetchQueueInfo info = mFetchQueue.front(); - LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); + LLViewerInventoryCategory* cat = gInventory.getCategory(info.mCatUUID); // Category has been deleted, remove from queue. if (!cat) @@ -273,7 +258,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } } // Do I have all my children? - else if (gInventory.isCategoryComplete(info.mUUID)) + else if (gInventory.isCategoryComplete(info.mCatUUID)) { // Finished with this category, remove from queue. mFetchQueue.pop_front(); @@ -328,35 +313,15 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() } } -void LLInventoryModelBackgroundFetch::incrFetchCount(S16 fetching) +void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching) { - mFetchCount += fetching; - if (mFetchCount < 0) + mBulkFetchCount += fetching; + if (mBulkFetchCount < 0) { - mFetchCount = 0; + mBulkFetchCount = 0; } } -class LLInventoryModelFetchItemResponder : public LLInventoryModel::fetchInventoryResponder -{ -public: - LLInventoryModelFetchItemResponder(const LLSD& request_sd) : LLInventoryModel::fetchInventoryResponder(request_sd) {}; - void result(const LLSD& content); - void error(U32 status, const std::string& reason); -}; - -void LLInventoryModelFetchItemResponder::result( const LLSD& content ) -{ - LLInventoryModel::fetchInventoryResponder::result(content); - LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1); -} - -void LLInventoryModelFetchItemResponder::error( U32 status, const std::string& reason ) -{ - LLInventoryModel::fetchInventoryResponder::error(status, reason); - LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1); -} - class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder { @@ -493,7 +458,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) } } - fetcher->incrFetchCount(-1); + fetcher->incrBulkFetch(-1); if (fetcher->isBulkFetchProcessingComplete()) { @@ -512,7 +477,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str llinfos << "LLInventoryModelFetchDescendentsResponder::error " << status << ": " << reason << llendl; - fetcher->incrFetchCount(-1); + fetcher->incrBulkFetch(-1); if (status==499) // timed out { @@ -543,14 +508,12 @@ BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat // Bundle up a bunch of requests to send all at once. // static -void LLInventoryModelBackgroundFetch::bulkFetch() +void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) { //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. //Stopbackgroundfetch will be run from the Responder instead of here. - LLViewerRegion* region = gAgent.getRegion(); - if (!region) return; S16 max_concurrent_fetches=8; F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely. @@ -560,13 +523,12 @@ void LLInventoryModelBackgroundFetch::bulkFetch() } if (gDisconnected || - (mFetchCount > max_concurrent_fetches) || + (mBulkFetchCount > max_concurrent_fetches) || (mFetchTimer.getElapsedTimeF32() < mMinTimeBetweenFetches)) { return; // just bail if we are disconnected } - U32 item_count=0; U32 folder_count=0; U32 max_batch_size=5; @@ -574,159 +536,83 @@ void LLInventoryModelBackgroundFetch::bulkFetch() uuid_vec_t recursive_cats; - LLSD folder_request_body; - LLSD folder_request_body_lib; - LLSD item_request_body; - LLSD item_request_body_lib; + LLSD body; + LLSD body_lib; - while (!(mFetchQueue.empty()) && ((item_count + folder_count) < max_batch_size)) + while (!(mFetchQueue.empty()) && (folder_count < max_batch_size)) { const FetchQueueInfo& fetch_info = mFetchQueue.front(); - if (fetch_info.mIsCategory) - { - - const LLUUID &cat_id = fetch_info.mUUID; - if (cat_id.isNull()) //DEV-17797 - { - LLSD folder_sd; - folder_sd["folder_id"] = LLUUID::null.asString(); - folder_sd["owner_id"] = gAgent.getID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - folder_request_body["folders"].append(folder_sd); - folder_count++; - } - else - { - const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + const LLUUID &cat_id = fetch_info.mCatUUID; + if (cat_id.isNull()) //DEV-17797 + { + LLSD folder_sd; + folder_sd["folder_id"] = LLUUID::null.asString(); + folder_sd["owner_id"] = gAgent.getID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + body["folders"].append(folder_sd); + folder_count++; + } + else + { + const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - if (cat) - { - if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - LLSD folder_sd; - folder_sd["folder_id"] = cat->getUUID(); - folder_sd["owner_id"] = cat->getOwnerID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + if (cat) + { + if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) + { + LLSD folder_sd; + folder_sd["folder_id"] = cat->getUUID(); + folder_sd["owner_id"] = cat->getOwnerID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) - folder_request_body_lib["folders"].append(folder_sd); - else - folder_request_body["folders"].append(folder_sd); - folder_count++; - } - // May already have this folder, but append child folders to list. - if (fetch_info.mRecursive) - { - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) - { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); - } - } - } - } - if (fetch_info.mRecursive) - recursive_cats.push_back(cat_id); - } - else - { - LLViewerInventoryItem* itemp = gInventory.getItem(fetch_info.mUUID); - if (itemp) - { - LLSD item_sd; - item_sd["owner_id"] = itemp->getPermissions().getOwner(); - item_sd["item_id"] = itemp->getUUID(); - if (itemp->getPermissions().getOwner() == gAgent.getID()) - { - item_request_body.append(item_sd); - } - else - { - item_request_body_lib.append(item_sd); - } - //itemp->fetchFromServer(); - item_count++; - } - } + if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) + body_lib["folders"].append(folder_sd); + else + body["folders"].append(folder_sd); + folder_count++; + } + // May already have this folder, but append child folders to list. + if (fetch_info.mRecursive) + { + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(), fetch_info.mRecursive)); + } + } + } + } + if (fetch_info.mRecursive) + recursive_cats.push_back(cat_id); mFetchQueue.pop_front(); } - if (item_count + folder_count > 0) + if (folder_count > 0) { - if (folder_count) + mBulkFetchCount++; + if (body["folders"].size()) { - std::string url = region->getCapability("FetchInventoryDescendents2"); - mFetchCount++; - if (folder_request_body["folders"].size()) - { - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats); - LLHTTPClient::post(url, folder_request_body, fetcher, 300.0); - } - if (folder_request_body_lib["folders"].size()) - { - std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); - - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body_lib, recursive_cats); - LLHTTPClient::post(url_lib, folder_request_body_lib, fetcher, 300.0); - } + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body, recursive_cats); + LLHTTPClient::post(url, body, fetcher, 300.0); } - if (item_count) + if (body_lib["folders"].size()) { - std::string url; - - if (item_request_body.size()) - { - mFetchCount++; - url = region->getCapability("FetchInventory2"); - if (!url.empty()) - { - LLSD body; - body["agent_id"] = gAgent.getID(); - body["items"] = item_request_body; - - LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body)); - } - //else - //{ - // LLMessageSystem* msg = gMessageSystem; - // msg->newMessage("FetchInventory"); - // msg->nextBlock("AgentData"); - // msg->addUUID("AgentID", gAgent.getID()); - // msg->addUUID("SessionID", gAgent.getSessionID()); - // msg->nextBlock("InventoryData"); - // msg->addUUID("OwnerID", mPermissions.getOwner()); - // msg->addUUID("ItemID", mUUID); - // gAgent.sendReliableMessage(); - //} - } - - if (item_request_body_lib.size()) - { - mFetchCount++; - - url = region->getCapability("FetchLib2"); - if (!url.empty()) - { - LLSD body; - body["agent_id"] = gAgent.getID(); - body["items"] = item_request_body_lib; - - LLHTTPClient::post(url, body, new LLInventoryModelFetchItemResponder(body)); - } - } + std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); + + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(body_lib, recursive_cats); + LLHTTPClient::post(url_lib, body_lib, fetcher, 300.0); } mFetchTimer.reset(); } - else if (isBulkFetchProcessingComplete()) { setAllFoldersFetched(); @@ -738,7 +624,7 @@ bool LLInventoryModelBackgroundFetch::fetchQueueContainsNoDescendentsOf(const LL for (fetch_queue_t::const_iterator it = mFetchQueue.begin(); it != mFetchQueue.end(); ++it) { - const LLUUID& fetch_id = (*it).mUUID; + const LLUUID& fetch_id = (*it).mCatUUID; if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) return false; } diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 0745407a8c..c35c785ceb 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -60,10 +60,10 @@ public: bool inventoryFetchInProgress() const; void findLostItems(); - void incrFetchCount(S16 fetching); protected: + void incrBulkFetch(S16 fetching); bool isBulkFetchProcessingComplete() const; - void bulkFetch(); + void bulkFetch(std::string url); void backgroundFetch(); static void backgroundFetchCB(void*); // background fetch idle function @@ -77,7 +77,7 @@ private: BOOL mAllFoldersFetched; BOOL mBackgroundFetchActive; - S16 mFetchCount; + S16 mBulkFetchCount; BOOL mTimelyFetchPending; S32 mNumFetchRetries; @@ -87,11 +87,11 @@ private: struct FetchQueueInfo { - FetchQueueInfo(const LLUUID& id, BOOL recursive, bool is_category = true) : - mUUID(id), mRecursive(recursive), mIsCategory(is_category) - {} - LLUUID mUUID; - bool mIsCategory; + FetchQueueInfo(const LLUUID& id, BOOL recursive) : + mCatUUID(id), mRecursive(recursive) + { + } + LLUUID mCatUUID; BOOL mRecursive; }; typedef std::deque<FetchQueueInfo> fetch_queue_t; -- cgit v1.2.3 From ea6cbc7b6b1de051a9bb1c311c4399a2b4d42cb3 Mon Sep 17 00:00:00 2001 From: Leslie Linden <leslie@lindenlab.com> Date: Mon, 23 Jan 2012 15:55:36 -0800 Subject: Reverting background fetch on an item to the old fetFromServer call to fix regression bug in inventory late loading --- indra/newview/llinventorybridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 9e21e2fceb..c0065a94e6 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1324,7 +1324,8 @@ void LLItemBridge::selectItem() LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem()); if(item && !item->isFinished()) { - LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); + item->fetchFromServer(); + //LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); } } -- cgit v1.2.3