summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llavataractions.cpp11
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp2
-rw-r--r--indra/newview/llfloatersidepanelcontainer.h18
-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/llnavigationbar.cpp38
-rw-r--r--indra/newview/llnavigationbar.h4
-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/llpanelme.cpp40
-rw-r--r--indra/newview/llpanelme.h1
-rwxr-xr-xindra/newview/llpanelpicks.cpp17
-rw-r--r--indra/newview/llsidepanelinventory.cpp20
-rw-r--r--indra/newview/llviewerfloaterreg.cpp3
-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/floater_my_profile.xml19
-rw-r--r--indra/newview/skins/default/xui/en/floater_people.xml41
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml37
-rw-r--r--indra/newview/skins/minimal/xui/en/panel_bottomtray.xml2
24 files changed, 217 insertions, 199 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index db5bbf7167..fb7517a98b 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -439,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);
@@ -697,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 ab874e4b9f..c73ec90a12 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -72,7 +72,7 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
panel = container->getCurrentPanel();
}
- else if (panel = dynamic_cast<LLPanel*>(view))
+ else if ((panel = dynamic_cast<LLPanel*>(view)) != NULL)
{
panel->onOpen(params);
}
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index 5c05f26f45..b230500f56 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -56,6 +56,24 @@ public:
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;
+ }
};
#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/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 133168f0ba..4c0823874c 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -269,7 +269,6 @@ LLNavigationBar::LLNavigationBar()
mBtnForward(NULL),
mBtnHome(NULL),
mCmbLocation(NULL),
- mSearchComboBox(NULL),
mPurgeTPHistoryItems(false),
mSaveToLocationHistory(false)
{
@@ -291,10 +290,7 @@ BOOL LLNavigationBar::postBuild()
mBtnForward = getChild<LLPullButton>("forward_btn");
mBtnHome = getChild<LLButton>("home_btn");
- mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
- mSearchComboBox = getChild<LLSearchComboBox>("search_combo_box");
-
- fillSearchComboBox();
+ mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
mBtnBack->setEnabled(FALSE);
mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this));
@@ -309,8 +305,6 @@ BOOL LLNavigationBar::postBuild()
mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this));
mCmbLocation->setCommitCallback(boost::bind(&LLNavigationBar::onLocationSelection, this));
-
- mSearchComboBox->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this));
mTeleportFinishConnection = LLViewerParcelMgr::getInstance()->
setTeleportFinishedCallback(boost::bind(&LLNavigationBar::onTeleportFinished, this, _1));
@@ -344,26 +338,6 @@ void LLNavigationBar::setVisible(BOOL visible)
}
}
-
-void LLNavigationBar::fillSearchComboBox()
-{
- if(!mSearchComboBox)
- {
- return;
- }
-
- LLSearchHistory::getInstance()->load();
-
- LLSearchHistory::search_history_list_t search_list =
- LLSearchHistory::getInstance()->getSearchHistoryList();
- LLSearchHistory::search_history_list_t::const_iterator it = search_list.begin();
- for( ; search_list.end() != it; ++it)
- {
- LLSearchHistory::LLSearchHistoryItem item = *it;
- mSearchComboBox->add(item.search_query);
- }
-}
-
void LLNavigationBar::draw()
{
if(mPurgeTPHistoryItems)
@@ -416,16 +390,6 @@ void LLNavigationBar::onHomeButtonClicked()
gAgent.teleportHome();
}
-void LLNavigationBar::onSearchCommit()
-{
- std::string search_query = mSearchComboBox->getSimple();
- if(!search_query.empty())
- {
- LLSearchHistory::getInstance()->addEntry(search_query);
- }
- invokeSearch(search_query);
-}
-
void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata)
{
int idx = userdata.asInteger();
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index f200253de5..e4ce9e3998 100644
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -118,7 +118,6 @@ private:
void onHomeButtonClicked();
void onLocationSelection();
void onLocationPrearrange(const LLSD& data);
- void onSearchCommit();
void onTeleportFinished(const LLVector3d& global_agent_pos);
void onTeleportFailed();
void onRegionNameResponse(
@@ -128,8 +127,6 @@ private:
U64 region_handle, const std::string& url,
const LLUUID& snapshot_id, bool teleport);
- void fillSearchComboBox();
-
static void destroyClass()
{
if (LLNavigationBar::instanceExists())
@@ -142,7 +139,6 @@ private:
LLPullButton* mBtnBack;
LLPullButton* mBtnForward;
LLButton* mBtnHome;
- LLSearchComboBox* mSearchComboBox;
LLLocationInputCtrl* mCmbLocation;
LLRect mDefaultNbRect;
LLRect mDefaultFpRect;
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/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 1347a02a52..4d86fa15df 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -37,7 +37,6 @@
#include "llfirstuse.h"
#include "llfloaterreg.h"
#include "llhints.h"
-#include "llsidetray.h"
#include "llviewercontrol.h"
#include "llviewerdisplayname.h"
@@ -89,45 +88,6 @@ void LLPanelMe::onOpen(const LLSD& key)
//}
}
-bool LLPanelMe::notifyChildren(const LLSD& info)
-{
- if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state")
- {
- // Implement task panel tri-state behavior.
- //
- // When the button of an active open task panel is clicked, side tray
- // calls notifyChildren() on the panel, passing task-panel-action=>handle-tri-state as an argument.
- // The task panel is supposed to handle this by reverting to the default view,
- // i.e. closing any dependent panels like "pick info" or "profile edit".
-
- bool on_default_view = true;
-
- const LLRect& task_panel_rect = getRect();
- for (LLView* child = getFirstChild(); child; child = findNextSibling(child))
- {
- LLPanel* panel = dynamic_cast<LLPanel*>(child);
- if (!panel)
- continue;
-
- // *HACK: implement panel stack instead (e.g. me->pick_info->pick_edit).
- if (panel->getRect().getWidth() == task_panel_rect.getWidth() &&
- panel->getRect().getHeight() == task_panel_rect.getHeight() &&
- panel->getVisible())
- {
- panel->setVisible(FALSE);
- on_default_view = false;
- }
- }
-
- if (on_default_view)
- LLSideTray::getInstance()->collapseSideBar();
-
- return true; // this notification is only supposed to be handled by task panels
- }
-
- return LLPanel::notifyChildren(info);
-}
-
void LLPanelMe::buildEditPanel()
{
if (NULL == mEditPanel)
diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h
index f27f5a268e..22cbb9e055 100644
--- a/indra/newview/llpanelme.h
+++ b/indra/newview/llpanelme.h
@@ -49,7 +49,6 @@ public:
LLPanelMe();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ bool notifyChildren(const LLSD& info);
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index ddce83c616..15b5fc8301 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -48,11 +48,11 @@
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llavatarpropertiesprocessor.h"
+#include "llfloatersidepanelcontainer.h"
#include "llpanelavatar.h"
#include "llpanelprofile.h"
#include "llpanelpick.h"
#include "llpanelclassified.h"
-#include "llsidetray.h"
static const std::string XML_BTN_NEW = "new_btn";
static const std::string XML_BTN_DELETE = "trash_btn";
@@ -133,7 +133,7 @@ public:
params["id"] = gAgent.getID();
params["open_tab_name"] = "panel_picks";
params["show_tab_panel"] = "create_pick";
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ LLFloaterSidePanelContainer::showPanel("my_profile", params);
}
void editPick(LLPickData* pick_info)
@@ -146,8 +146,7 @@ public:
params["snapshot_id"] = pick_info->snapshot_id;
params["pick_name"] = pick_info->name;
params["pick_desc"] = pick_info->desc;
-
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ LLFloaterSidePanelContainer::showPanel("my_profile", params);
}
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type)
@@ -252,7 +251,7 @@ public:
params["id"] = gAgent.getID();
params["open_tab_name"] = "panel_picks";
params["show_tab_panel"] = "create_classified";
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ LLFloaterSidePanelContainer::showPanel("my_profile", params);
}
void openClassified(LLAvatarClassifiedInfo* c_info)
@@ -270,7 +269,11 @@ public:
params["classified_name"] = c_info->name;
params["classified_desc"] = c_info->description;
params["from_search"] = true;
- LLSideTray::getInstance()->showPanel("panel_profile_view", params);
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("people");
+ if (floaterp)
+ {
+ floaterp->openChildPanel("panel_profile_view", params);
+ }
}
else if (mRequestVerb == "edit")
{
@@ -283,7 +286,7 @@ public:
params["open_tab_name"] = "panel_picks";
params["show_tab_panel"] = "edit_classified";
params["classified_id"] = c_info->classified_id;
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ LLFloaterSidePanelContainer::showPanel("my_profile", params);
}
else
{
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 665e0a2bd6..3532c78eda 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -224,6 +224,8 @@ 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>);
LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>);
@@ -232,6 +234,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>);
LLFloaterPayUtil::registerFloater();
+ LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("postcard", "floater_postcard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostcard>);
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 6b5b47d0db..50fb5a00e4 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -36,6 +36,7 @@
#include "llagentwearables.h"
#include "llfloatersidepanelcontainer.h"
#include "llviewerfoldertype.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llviewercontrol.h"
#include "llconsole.h"
@@ -221,7 +222,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 1dd5b05818..28c1101de4 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/floater_my_profile.xml b/indra/newview/skins/default/xui/en/floater_my_profile.xml
new file mode 100644
index 0000000000..b3ebe7f791
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_my_profile.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<floater
+ can_close="true"
+ can_resize="true"
+ height="570"
+ help_topic="sidebar_me"
+ min_width="333"
+ min_height="440"
+ name="floater_profile"
+ save_rect="true"
+ save_visibility="true"
+ title="My Profile"
+ width="333" >
+ <panel
+ class="panel_me"
+ name="main_panel"
+ filename="panel_me.xml"
+ follows="all"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml
new file mode 100644
index 0000000000..13e0738e52
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_people.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<floater
+ can_close="true"
+ can_resize="true"
+ height="570"
+ help_topic="sidebar_people"
+ min_width="333"
+ min_height="440"
+ name="floater_people"
+ save_rect="true"
+ save_visibility="true"
+ title="People"
+ width="333" >
+ <panel_container
+ follows="all"
+ height="570"
+ name="main_panel"
+ default_panel_name="panel_people"
+ width="333">
+ <panel
+ class="panel_people"
+ name="panel_people"
+ filename="panel_people.xml"/>
+ <panel
+ class="panel_profile_view"
+ name="panel_profile_view"
+ filename="panel_profile_view.xml"/>
+ <panel
+ class="panel_group_info_sidetray"
+ name="panel_group_info_sidetray"
+ filename="panel_group_info_sidetray.xml"
+ label="Group Profile"
+ font="SansSerifBold"/>
+ <panel
+ class="panel_block_list_sidetray"
+ name="panel_block_list_sidetray"
+ filename="panel_block_list_sidetray.xml"
+ label="Blocked Residents &amp; Objects"
+ font="SansSerifBold"/>
+ </panel_container>
+</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/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 54befa38e9..719d3531ed 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -60,9 +60,9 @@
layout="topleft"
auto_resize="true"
user_resize="true"
- min_width="500"
+ min_width="340"
name="navigation_layout_panel"
- width="500">
+ width="340">
<panel
background_visible="false"
follows="left|top|right"
@@ -71,7 +71,7 @@
layout="topleft"
left="0"
name="navigation_panel"
- width="500">
+ width="340">
<pull_button
follows="left|top"
direction="down"
@@ -118,33 +118,10 @@
mouse_opaque="false"
name="location_combo"
top_delta="0"
- width="213">
+ width="215">
<combo_list
mouse_wheel_opaque="true"/>
</location_input>
- <search_combo_box
- follows="top|right"
- halign="right"
- height="23"
- label="Search"
- layout="topleft"
- left_pad="7"
- mouse_opaque="false"
- name="search_combo_box"
- tool_tip="Search"
- top_delta="0"
- width="152" >
- <combo_editor
- label="Search [SECOND_LIFE]"
- name="search_combo_editor"/>
- <combo_list
- draw_border="true"
- border.highlight_light_color="FocusColor"
- border.highlight_dark_color="FocusColor"
- border.shadow_light_color="FocusColor"
- border.shadow_dark_color="FocusColor"
- mouse_wheel_opaque="true"/>
- </search_combo_box>
</panel>
</layout_panel>
@@ -172,9 +149,9 @@
layout="topleft"
auto_resize="true"
user_resize="true"
- min_width="190"
+ min_width="335"
name="favorites_layout_panel"
- width="290">
+ width="335">
<favorites_bar
follows="left|right|top"
font="SansSerifSmall"
@@ -184,7 +161,7 @@
name="favorite"
image_drag_indication="Accordion_ArrowOpened_Off"
tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
- width="290">
+ width="331">
<label
follows="left|top"
height="15"
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