summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2011-09-28 17:14:50 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2011-09-28 17:14:50 +0300
commitc44db34a15abd2e96b8fd461e9fb3e217fe648cc (patch)
tree0f13e6caf34722040fa0fd3725126ae4a94269cb
parent87db6c59ee2ac5f8cc304d6f8150af5f91e3fb8d (diff)
parent8fd2d69fdf47e0f586c6010c589411e251967038 (diff)
Merge
-rw-r--r--indra/newview/llbottomtray.cpp3
-rw-r--r--indra/newview/llchathistory.cpp3
-rwxr-xr-xindra/newview/llfloaterpreference.cpp3
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp14
-rw-r--r--indra/newview/llfloatersidepanelcontainer.h6
-rw-r--r--indra/newview/llgroupactions.cpp15
-rw-r--r--indra/newview/llnearbychat.cpp3
-rw-r--r--indra/newview/llpanelblockedlist.cpp3
-rw-r--r--indra/newview/llpanelgroup.cpp5
-rw-r--r--indra/newview/llpanelpeople.cpp13
-rwxr-xr-xindra/newview/llpanelpicks.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/floater_people.xml28
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml2
15 files changed, 70 insertions, 39 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 79e6c7b66b..e6448d38ee 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -31,6 +31,7 @@
// library includes
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llflyoutbutton.h"
#include "lllayoutstack.h"
#include "llnotifications.h"
@@ -856,7 +857,7 @@ void LLBottomTray::draw()
}
getChild<LLButton>("show_profile_btn")->setToggleState(LLAvatarActions::profileVisible(gAgent.getID()));
- LLPanel* panel = LLSideTray::getInstance()->getPanel("panel_people");
+ LLPanel* panel = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
if (panel && panel->isInVisibleChain())
{
getChild<LLButton>("show_people_button")->setToggleState(true);
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index c0c9ea1451..d6773b8b29 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -42,6 +42,7 @@
#include "llavataractions.h"
#include "lltrans.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llmutelist.h"
#include "llstylemap.h"
#include "llslurl.h"
@@ -144,7 +145,7 @@ public:
{
LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT));
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId()));
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId()));
}
}
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d65928e385..d8b6b2e966 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -50,6 +50,7 @@
#include "llfloaterreg.h"
#include "llfloaterabout.h"
#include "llfloaterhardwaresettings.h"
+#include "llfloatersidepanelcontainer.h"
#include "llimfloater.h"
#include "llkeyboard.h"
#include "llmodaldialog.h"
@@ -1499,7 +1500,7 @@ void LLFloaterPreference::onClickBlockList()
// don't create side tray on demand
if (LLSideTray::instanceCreated())
{
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray");
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
}
}
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index c73ec90a12..be7a53491d 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -80,18 +80,28 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
return panel;
}
-void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const LLSD& panel_name)
+void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const LLSD& key)
{
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
if (floaterp)
{
- floaterp->openChildPanel(sMainPanelName, panel_name);
+ floaterp->openChildPanel(sMainPanelName, key);
+ }
+}
+
+void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key)
+{
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
+ if (floaterp)
+ {
+ floaterp->openChildPanel(panel_name, key);
}
}
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);
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index b230500f56..10d85867ce 100644
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -53,10 +53,12 @@ public:
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
- static void showPanel(const std::string& floater_name, const LLSD& panel_name);
+ static void showPanel(const std::string& floater_name, const LLSD& key);
+ static void showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key);
+
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).
*
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 97fa551441..cbbd66d868 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -34,6 +34,7 @@
#include "llagent.h"
#include "llcommandhandler.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llgroupmgr.h"
#include "llimview.h" // for gIMMgr
#include "llnotificationsutil.h"
@@ -83,7 +84,7 @@ public:
{
LLSD params;
params["people_panel_tab_name"] = "groups_panel";
- LLSideTray::getInstance()->showPanel("panel_people", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_people", params);
return true;
}
return false;
@@ -243,7 +244,7 @@ static bool isGroupUIVisible()
{
static LLPanel* panel = 0;
if(!panel)
- panel = LLSideTray::getInstance()->getPanel("panel_group_info_sidetray");
+ panel = LLFloaterSidePanelContainer::getPanel("people", "panel_group_info_sidetray");
if(!panel)
return false;
return panel->isInVisibleChain();
@@ -265,7 +266,7 @@ void LLGroupActions::show(const LLUUID& group_id)
params["group_id"] = group_id;
params["open_tab_name"] = "panel_group_info_sidetray";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
void LLGroupActions::refresh_notices()
@@ -278,7 +279,7 @@ void LLGroupActions::refresh_notices()
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "refresh_notices";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
//static
@@ -292,7 +293,7 @@ void LLGroupActions::refresh(const LLUUID& group_id)
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "refresh";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
//static
@@ -303,7 +304,7 @@ void LLGroupActions::createGroup()
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "create";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
//static
@@ -317,7 +318,7 @@ void LLGroupActions::closeGroup(const LLUUID& group_id)
params["open_tab_name"] = "panel_group_info_sidetray";
params["action"] = "close";
- LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params);
}
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 03ebc344f1..44c29fe05e 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -33,6 +33,7 @@
//#include "llchatitemscontainerctrl.h"
#include "lliconctrl.h"
#include "llsidetray.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfocusmgr.h"
#include "llresizebar.h"
#include "llresizehandle.h"
@@ -203,7 +204,7 @@ void LLNearbyChat::onNearbySpeakers()
{
LLSD param;
param["people_panel_tab_name"] = "nearby_panel";
- LLSideTray::getInstance()->showPanel("panel_people",param);
+ LLFloaterSidePanelContainer::showPanel("people", "panel_people", param);
}
diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp
index 81e199d85b..856dabb6b7 100644
--- a/indra/newview/llpanelblockedlist.cpp
+++ b/indra/newview/llpanelblockedlist.cpp
@@ -37,6 +37,7 @@
// project include
#include "llfloateravatarpicker.h"
+#include "llfloatersidepanelcontainer.h"
#include "llsidetray.h"
#include "llsidetraypanelcontainer.h"
@@ -99,7 +100,7 @@ void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id)
void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect)
{
- LLSideTray::getInstance()->showPanel("panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
}
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 76b85d5bec..70dcf61d7d 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -29,6 +29,7 @@
// Library includes
#include "llbutton.h"
+#include "llfloatersidepanelcontainer.h"
#include "lltabcontainer.h"
#include "lltextbox.h"
#include "lluictrlfactory.h"
@@ -597,7 +598,7 @@ void LLPanelGroup::showNotice(const std::string& subject,
//static
void LLPanelGroup::refreshCreatedGroup(const LLUUID& group_id)
{
- LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray");
+ LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray");
if(!panel)
return;
panel->setGroupID(group_id);
@@ -612,7 +613,7 @@ void LLPanelGroup::showNotice(const std::string& subject,
const std::string& inventory_name,
LLOfferInfo* inventory_offer)
{
- LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray");
+ LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray");
if(!panel)
return;
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index e3a7b749ea..8d63ced53a 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -29,6 +29,7 @@
// libs
#include "llavatarname.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llmenubutton.h"
#include "llmenugl.h"
#include "llnotificationsutil.h"
@@ -1283,6 +1284,10 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata)
mAllFriendList->showPermissions(show_permissions);
mOnlineFriendList->showPermissions(show_permissions);
}
+ else if (chosen_item == "panel_block_list_sidetray")
+ {
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
+ }
}
void LLPanelPeople::onGroupsViewSortMenuItemClicked(const LLSD& userdata)
@@ -1315,6 +1320,10 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata)
{
setSortOrder(mNearbyList, E_SORT_BY_DISTANCE);
}
+ else if (chosen_item == "panel_block_list_sidetray")
+ {
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
+ }
}
bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata)
@@ -1348,6 +1357,10 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata)
{
mRecentList->toggleIcons();
}
+ else if (chosen_item == "panel_block_list_sidetray")
+ {
+ LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
+ }
}
bool LLPanelPeople::onFriendsViewSortMenuItemCheck(const LLSD& userdata)
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 15b5fc8301..72c6be4c79 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -35,6 +35,7 @@
#include "lldispatcher.h"
#include "llflatlistview.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llnotificationsutil.h"
#include "lltexturectrl.h"
@@ -269,11 +270,7 @@ public:
params["classified_name"] = c_info->name;
params["classified_desc"] = c_info->description;
params["from_search"] = true;
- LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("people");
- if (floaterp)
- {
- floaterp->openChildPanel("panel_profile_view", params);
- }
+ LLFloaterSidePanelContainer::showPanel("people", "panel_profile_view", params);
}
else if (mRequestVerb == "edit")
{
diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml
index 13e0738e52..4dd3a2f0e1 100644
--- a/indra/newview/skins/default/xui/en/floater_people.xml
+++ b/indra/newview/skins/default/xui/en/floater_people.xml
@@ -1,21 +1,23 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<?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" >
+ can_close="true"
+ can_resize="true"
+ height="570"
+ help_topic="sidebar_people"
+ min_height="440"
+ min_width="333"
+ layout="topleft"
+ name="floater_people"
+ save_rect="true"
+ single_instance="true"
+ title="PEOPLE"
+ width="333">
<panel_container
+ default_panel_name="panel_people"
follows="all"
height="570"
name="main_panel"
- default_panel_name="panel_people"
width="333">
<panel
class="panel_people"
diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml
index 29eeb93ac1..b452f96e7a 100644
--- a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml
@@ -42,6 +42,6 @@
</menu_item_check>
<menu_item_separator layout="topleft" />
<menu_item_call name="show_blocked_list" label="Show Blocked Residents &amp; Objects">
- <menu_item_call.on_click function="SideTray.ShowPanel" parameter="panel_block_list_sidetray" />
+ <menu_item_call.on_click function="People.Friends.ViewSort.Action" parameter="panel_block_list_sidetray" />
</menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
index 65bd2793b6..614dd693c5 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
@@ -52,6 +52,6 @@
</menu_item_check>
<menu_item_separator layout="topleft" />
<menu_item_call name="show_blocked_list" label="Show Blocked Residents &amp; Objects">
- <menu_item_call.on_click function="SideTray.ShowPanel" userdata="panel_block_list_sidetray" />
+ <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="panel_block_list_sidetray" />
</menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml
index 0634e3bd3b..485a5a658c 100644
--- a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml
@@ -34,6 +34,6 @@
</menu_item_check>
<menu_item_separator layout="topleft" />
<menu_item_call name="show_blocked_list" label="Show Blocked Residents &amp; Objects">
- <menu_item_call.on_click function="SideTray.ShowPanel" userdata="panel_block_list_sidetray" />
+ <menu_item_call.on_click function="People.Recent.ViewSort.Action" userdata="panel_block_list_sidetray" />
</menu_item_call>
</toggleable_menu>