summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llavataractions.cpp12
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp18
-rw-r--r--indra/newview/llfloatersidepanelcontainer.h23
-rw-r--r--indra/newview/llinspectobject.cpp3
-rw-r--r--indra/newview/llinventoryfunctions.cpp17
-rw-r--r--indra/newview/llinventorypanel.cpp57
-rw-r--r--indra/newview/llpanelmaininventory.cpp12
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp16
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.cpp17
-rw-r--r--indra/newview/llsidepanelinventory.cpp20
-rw-r--r--indra/newview/llviewerfloaterreg.cpp1
-rw-r--r--indra/newview/llviewerinventory.cpp3
-rw-r--r--indra/newview/llviewermenu.cpp14
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_inventory.xml20
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml4
-rw-r--r--indra/newview/skins/minimal/xui/en/panel_bottomtray.xml2
16 files changed, 158 insertions, 81 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 4cdfcea64e..efb46166b8 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -47,6 +47,7 @@
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llfloaterpay.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterwebcontent.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
@@ -438,8 +439,7 @@ void LLAvatarActions::csr(const LLUUID& id, std::string name)
void LLAvatarActions::share(const LLUUID& id)
{
LLSD key;
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
-
+ LLFloaterSidePanelContainer::showPanel("my_inventory", key);
LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,id);
@@ -696,9 +696,11 @@ std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
if (inventory_selected_uuids.empty())
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList();
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (sidepanel_inventory)
+ {
+ inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList();
+ }
}
return inventory_selected_uuids;
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index cf66fd1792..c73ec90a12 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -33,6 +33,9 @@
#include "llsidetraypanelcontainer.h"
#include "lltransientfloatermgr.h"
+//static
+const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
+
LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params)
: LLFloater(key, params)
{
@@ -48,7 +51,7 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
{
- getChild<LLPanel>("main_panel")->onOpen(key);
+ getChild<LLPanel>(sMainPanelName)->onOpen(key);
}
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
@@ -82,6 +85,17 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
if (floaterp)
{
- floaterp->openChildPanel("main_panel", panel_name);
+ floaterp->openChildPanel(sMainPanelName, panel_name);
}
}
+
+LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name)
+{
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
+ if (floaterp)
+ {
+ return floaterp->findChild<LLPanel>(panel_name, true);
+ }
+
+ return NULL;
+}
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 7b4e7643ae..0d17a14c0b 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -51,6 +51,29 @@ public:
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
static void showPanel(const std::string& floater_name, const LLSD& panel_name);
+
+ static LLPanel* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName);
+
+ /**
+ * Gets the panel of given type T (doesn't show it or do anything else with it).
+ *
+ * @param floater_name a string specifying the floater to be searched for a child panel.
+ * @param panel_name a string specifying the child panel to get.
+ * @returns a pointer to the panel of given type T.
+ */
+ template <typename T>
+ static T* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName)
+ {
+ T* panel = dynamic_cast<T*>(getPanel(floater_name, panel_name));
+ if (!panel)
+ {
+ llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl;
+ }
+ return panel;
+ }
+
+private:
+ static const std::string sMainPanelName;
};
#endif // LL_LLFLOATERSIDEPANELCONTAINER_H
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index ee076f68ea..29d7a4a6b0 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -28,6 +28,7 @@
#include "llinspectobject.h"
// Viewer
+#include "llfloatersidepanelcontainer.h"
#include "llinspect.h"
#include "llmediaentry.h"
#include "llnotificationsutil.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper
@@ -640,7 +641,7 @@ void LLInspectObject::onClickMoreInfo()
{
LLSD key;
key["task"] = "task";
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+ LLFloaterSidePanelContainer::showPanel("my_inventory", key);
closeFloater();
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 0af013fde5..acec02b507 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -47,6 +47,7 @@
#include "llappviewer.h"
//#include "llfirstuse.h"
#include "llfloaterinventory.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfocusmgr.h"
#include "llfolderview.h"
#include "llgesturemgr.h"
@@ -459,22 +460,28 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id)
{
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", item_uuid).with("object", object_id));
+ LLFloaterSidePanelContainer::showPanel("my_inventory", LLSD().with("id", item_uuid).with("object", object_id));
}
void show_item_profile(const LLUUID& item_uuid)
{
LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid);
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", linked_uuid));
+ LLFloaterSidePanelContainer::showPanel("my_inventory", LLSD().with("id", linked_uuid));
}
void show_item_original(const LLUUID& item_uuid)
{
+ LLFloater* floater_my_inventory = LLFloaterReg::getInstance("my_inventory");
+ if (!floater_my_inventory)
+ {
+ llwarns << "Could not find My Inventory floater" << llendl;
+ return;
+ }
+
//sidetray inventory panel
- LLSidepanelInventory *sidepanel_inventory =
- dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
- bool reset_inventory_filter = !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory");
+ bool reset_inventory_filter = !floater_my_inventory->isInVisibleChain();
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel();
if (!active_panel)
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 173e5c6ae6..c4f810fc93 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -35,6 +35,7 @@
#include "llavataractions.h"
#include "llfloaterinventory.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llimfloater.h"
#include "llimview.h"
@@ -1071,10 +1072,9 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data)
BOOL is_inventorysp_active()
{
- if (!LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")) return FALSE;
- LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
- if (!inventorySP) return FALSE;
- return inventorySP->isMainInventoryPanelActive();
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return FALSE;
+ return sidepanel_inventory->isMainInventoryPanelActive();
}
// static
@@ -1084,34 +1084,24 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
LLInventoryPanel* res = NULL;
LLFloater* active_inv_floaterp = NULL;
- // A. If the inventory side panel is open, use that preferably.
- if (is_inventorysp_active())
+ LLFloater* floater_my_inventory = LLFloaterReg::getInstance("my_inventory");
+ if (!floater_my_inventory)
{
- LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
- if (inventorySP)
- {
- return inventorySP->getActivePanel();
- }
+ llwarns << "Could not find My Inventory floater" << llendl;
+ return FALSE;
}
- // or if it is in floater undocked from sidetray get it and remember z order of floater to later compare it
- // with other inventory floaters order.
- else if (!LLSideTray::getInstance()->isTabAttached("sidebar_inventory"))
+
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+
+ // A. If the inventory side panel floater is open, use that preferably.
+ if (is_inventorysp_active())
{
- LLSidepanelInventory *inventorySP =
- dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
- LLFloater* inv_floater = LLFloaterReg::findInstance("side_bar_tab", LLSD("sidebar_inventory"));
- if (inventorySP && inv_floater)
- {
- res = inventorySP->getActivePanel();
- z_min = gFloaterView->getZOrder(inv_floater);
- active_inv_floaterp = inv_floater;
- }
- else
- {
- llwarns << "Inventory tab is detached from sidetray, but either panel or floater were not found!" << llendl;
- }
+ // Get the floater's z order to compare it to other inventory floaters' order later.
+ res = sidepanel_inventory->getActivePanel();
+ z_min = gFloaterView->getZOrder(floater_my_inventory);
+ active_inv_floaterp = floater_my_inventory;
}
-
+
// B. Iterate through the inventory floaters and return whichever is on top.
LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
@@ -1141,14 +1131,9 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
// C. If no panels are open and we don't want to force open a panel, then just abort out.
if (!auto_open) return NULL;
- // D. Open the inventory side panel and use that.
- LLSD key;
- LLSidepanelInventory *sidepanel_inventory =
- dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key));
- if (sidepanel_inventory)
- {
- return sidepanel_inventory->getActivePanel();
- }
+ // D. Open the inventory side panel floater and use that.
+ floater_my_inventory->openFloater();
+ return sidepanel_inventory->getActivePanel();
return NULL;
}
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 858f5cf575..c1341af2ef 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -38,6 +38,7 @@
#include "llinventorymodelbackgroundfetch.h"
#include "llinventorypanel.h"
#include "llfiltereditor.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterreg.h"
#include "llmenubutton.h"
#include "lloutfitobserver.h"
@@ -579,8 +580,13 @@ void LLPanelMainInventory::updateItemcountText()
void LLPanelMainInventory::onFocusReceived()
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (!sidepanel_inventory)
+ {
+ llwarns << "Could not find Inventory Panel in My Inventory floater" << llendl;
+ return;
+ }
+
sidepanel_inventory->clearSelections(false, true, true);
}
@@ -1164,7 +1170,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "share")
{
- LLSidepanelInventory* parent = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
return parent ? parent->canShare() : FALSE;
}
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 2cb91f771f..a412eabc0a 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -32,6 +32,7 @@
#include "llappviewer.h"
#include "llbutton.h"
#include "llinventorypanel.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llsidepanelinventory.h"
#include "llviewercontrol.h"
@@ -67,7 +68,7 @@ BOOL LLPanelMarketplaceInbox::postBuild()
void LLPanelMarketplaceInbox::onSelectionChange()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
sidepanel_inventory->updateVerbs();
}
@@ -112,9 +113,11 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
void LLPanelMarketplaceInbox::onFocusReceived()
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- sidepanel_inventory->clearSelections(true, false, true);
+ LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->clearSelections(true, false, true);
+ }
gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString());
}
@@ -185,9 +188,10 @@ std::string LLPanelMarketplaceInbox::getBadgeString() const
{
std::string item_count_str("");
+ LLPanel *inventory_panel = LLFloaterSidePanelContainer::getPanel("my_inventory");
+
// If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel
- if (getParent()->getVisible() &&
- (LLSideTray::getInstance()->getCollapsed() || !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")))
+ if (getParent()->getVisible() && inventory_panel && !inventory_panel->isInVisibleChain())
{
U32 item_count = getFreshItemCount();
diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp
index 839369bffe..f0a4b9898d 100644
--- a/indra/newview/llpanelmarketplaceoutbox.cpp
+++ b/indra/newview/llpanelmarketplaceoutbox.cpp
@@ -33,6 +33,7 @@
#include "llbutton.h"
#include "llcoros.h"
#include "lleventcoro.h"
+#include "llfloatersidepanelcontainer.h"
#include "llinventorypanel.h"
#include "llloadingindicator.h"
#include "llnotificationsutil.h"
@@ -89,16 +90,20 @@ void LLPanelMarketplaceOutbox::handleLoginComplete()
void LLPanelMarketplaceOutbox::onFocusReceived()
{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- sidepanel_inventory->clearSelections(true, true, false);
+ LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->clearSelections(true, true, false);
+ }
}
void LLPanelMarketplaceOutbox::onSelectionChange()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->updateVerbs();
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->updateVerbs();
+ }
}
LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel()
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 9814e5b81a..e223de5469 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -34,6 +34,7 @@
#include "llbutton.h"
#include "lldate.h"
#include "llfirstuse.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfoldertype.h"
#include "llhttpclient.h"
#include "llinventorybridge.h"
@@ -172,16 +173,20 @@ LLSidepanelInventory::~LLSidepanelInventory()
void handleInventoryDisplayInboxChanged()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
+ }
}
void handleInventoryDisplayOutboxChanged()
{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox"));
+ LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory");
+ if (sidepanel_inventory)
+ {
+ sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox"));
+ }
}
BOOL LLSidepanelInventory::postBuild()
@@ -283,6 +288,9 @@ BOOL LLSidepanelInventory::postBuild()
gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged));
+ // Update the verbs buttons state.
+ updateVerbs();
+
return TRUE;
}
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index b30ef11978..bca166e390 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -223,6 +223,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMove>);
LLFloaterReg::add("mute_object_by_name", "floater_mute_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGetBlockedObjectName>);
LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>);
+ LLFloaterReg::add("my_inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("my_profile", "floater_my_profile.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index ad65a8846c..d798f1900f 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -35,6 +35,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llviewerfoldertype.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llviewercontrol.h"
#include "llconsole.h"
@@ -220,7 +221,7 @@ public:
// support secondlife:///app/inventory/show
if (params[0].asString() == "show")
{
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD());
+ LLFloaterSidePanelContainer::showPanel("my_inventory", LLSD());
return true;
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 63d6e0ac30..a71900167c 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2634,7 +2634,7 @@ void handle_object_inspect()
{
LLSD key;
key["task"] = "task";
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+ LLFloaterSidePanelContainer::showPanel("my_inventory", key);
}
/*
@@ -5661,18 +5661,18 @@ class LLShowSidetrayPanel : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- std::string panel_name = userdata.asString();
+ std::string floater_name = userdata.asString();
- LLPanel* panel = LLSideTray::getInstance()->getPanel(panel_name);
+ LLPanel* panel = LLFloaterSidePanelContainer::getPanel(floater_name);
if (panel)
{
if (panel->isInVisibleChain())
{
- LLSideTray::getInstance()->hidePanel(panel_name);
+ LLFloaterReg::getInstance(floater_name)->closeFloater();
}
else
{
- LLSideTray::getInstance()->showPanel(panel_name);
+ LLFloaterReg::getInstance(floater_name)->openFloater();
}
}
return true;
@@ -5683,9 +5683,9 @@ class LLSidetrayPanelVisible : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- std::string panel_name = userdata.asString();
+ std::string floater_name = userdata.asString();
// Toggle the panel
- if (LLSideTray::getInstance()->isPanelActive(panel_name))
+ if (LLFloaterReg::getInstance(floater_name)->isInVisibleChain())
{
return true;
}
diff --git a/indra/newview/skins/default/xui/en/floater_my_inventory.xml b/indra/newview/skins/default/xui/en/floater_my_inventory.xml
new file mode 100644
index 0000000000..fd03a5324e
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_my_inventory.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<floater
+ can_close="true"
+ can_resize="true"
+ height="570"
+ help_topic="sidebar_inventory"
+ min_width="333"
+ min_height="440"
+ name="floater_my_inventory"
+ save_rect="true"
+ save_visibility="true"
+ title="My Inventory"
+ width="333" >
+ <panel
+ class="sidepanel_inventory"
+ name="main_panel"
+ filename="sidepanel_inventory.xml"
+ follows="all"
+ top="0"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 36ebe73753..2e9a66de5b 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -67,10 +67,10 @@
visible="true">
<menu_item_check.on_check
function="SidetrayPanelVisible"
- parameter="sidepanel_inventory" />
+ parameter="my_inventory" />
<menu_item_check.on_click
function="ShowSidetrayPanel"
- parameter="sidepanel_inventory" />
+ parameter="my_inventory" />
</menu_item_check>
<menu_item_check
label="My Gestures"
diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml
index d722c54081..21dcacaabb 100644
--- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml
@@ -324,7 +324,7 @@
width="100">
<bottomtray_button.commit_callback
function="ShowSidetrayPanel"
- parameter="panel_people" />
+ parameter="people" />
</bottomtray_button>
</layout_panel>
<layout_panel