summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llavataractions.cpp2
-rw-r--r--indra/newview/llfloateroutbox.cpp40
-rw-r--r--indra/newview/llfloateroutbox.h1
-rw-r--r--indra/newview/llsidepanelinventory.cpp92
-rw-r--r--indra/newview/llsidepanelinventory.h14
-rw-r--r--indra/newview/skins/default/xui/en/floater_merchant_outbox.xml20
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_outbox_inventory.xml1
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml50
9 files changed, 69 insertions, 158 deletions
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"