CHUI-91 FIXED Moved block list to a separate People floater tab.

Vadim ProductEngine 2012-04-13 23:31:01 +03:00
parent 61d202a15d
commit 3fdcb8751a
12 changed files with 44 additions and 85 deletions

View File

@ -143,7 +143,8 @@ public:
{
LLMuteList::getInstance()->add(LLMute(getAvatarId(), mFrom, LLMute::OBJECT));
LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with("blocked_to_select", getAvatarId()));
LLFloaterSidePanelContainer::showPanel("people", "panel_people",
LLSD().with("people_panel_tab_name", "blocked_panel").with("blocked_to_select", getAvatarId()));
}
}

View File

@ -1501,7 +1501,8 @@ void LLFloaterPreference::onChangeMaturity()
// but the UI for this will still be enabled
void LLFloaterPreference::onClickBlockList()
{
LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD());
LLFloaterSidePanelContainer::showPanel("people", "panel_people",
LLSD().with("people_panel_tab_name", "blocked_panel"));
}
void LLFloaterPreference::onClickProxySettings()

View File

@ -66,10 +66,7 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(view->getParent());
if (container)
{
LLSD new_params = params;
new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name;
container->onOpen(new_params);
container->openPanel(panel_name, params);
panel = container->getCurrentPanel();
}
else if ((panel = dynamic_cast<LLPanel*>(view)) != NULL)

View File

@ -69,8 +69,6 @@ BOOL LLPanelBlockedList::postBuild()
mBlockedList = getChild<LLScrollListCtrl>("blocked");
mBlockedList->setCommitOnSelectionChange(TRUE);
childSetCommitCallback("back", boost::bind(&LLPanelBlockedList::onBackBtnClick, this), NULL);
LLMuteList::getInstance()->addObserver(this);
refreshBlockedList();
@ -99,7 +97,8 @@ void LLPanelBlockedList::selectBlocked(const LLUUID& mute_id)
void LLPanelBlockedList::showPanelAndSelect(const LLUUID& idToSelect)
{
LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD().with(BLOCKED_PARAM_NAME, idToSelect));
LLFloaterSidePanelContainer::showPanel("people", "panel_people",
LLSD().with("people_panel_tab_name", "blocked_panel").with(BLOCKED_PARAM_NAME, idToSelect));
}
@ -130,17 +129,6 @@ void LLPanelBlockedList::updateButtons()
getChildView("Unblock")->setEnabled(hasSelected);
}
void LLPanelBlockedList::onBackBtnClick()
{
LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if(parent)
{
parent->openPreviousPanel();
}
}
void LLPanelBlockedList::onRemoveBtnClick()
{
std::string name = mBlockedList->getSelectedItemLabel();

View File

@ -68,7 +68,6 @@ private:
void updateButtons();
// UI callbacks
void onBackBtnClick();
void onRemoveBtnClick();
void onPickBtnClick();
void onBlockByNameClick();

View File

@ -72,6 +72,7 @@ static const std::string NEARBY_TAB_NAME = "nearby_panel";
static const std::string FRIENDS_TAB_NAME = "friends_panel";
static const std::string GROUP_TAB_NAME = "groups_panel";
static const std::string RECENT_TAB_NAME = "recent_panel";
static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars
static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
@ -886,6 +887,9 @@ LLUUID LLPanelPeople::getCurrentItemID() const
if (cur_tab == GROUP_TAB_NAME)
return mGroupList->getSelectedUUID();
if (cur_tab == BLOCKED_TAB_NAME)
return LLUUID::null; // FIXME?
llassert(0 && "unknown tab selected");
return LLUUID::null;
}
@ -906,6 +910,8 @@ void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const
mRecentList->getSelectedUUIDs(selected_uuids);
else if (cur_tab == GROUP_TAB_NAME)
mGroupList->getSelectedUUIDs(selected_uuids);
else if (cur_tab == BLOCKED_TAB_NAME)
selected_uuids.clear(); // FIXME?
else
llassert(0 && "unknown tab selected");
@ -1228,10 +1234,6 @@ 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)
@ -1264,10 +1266,6 @@ 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)
@ -1301,10 +1299,6 @@ 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)

View File

@ -14,13 +14,13 @@
single_instance="true"
reuse_instance="true"
title="PEOPLE"
width="333">
width="390">
<panel_container
default_panel_name="panel_people"
follows="all"
height="570"
name="main_panel"
width="333">
width="390">
<panel
class="panel_people"
name="panel_people"
@ -31,11 +31,5 @@
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>

View File

@ -19,8 +19,4 @@
function="CheckControl"
parameter="FriendsListShowPermissions" />
</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="People.Friends.ViewSort.Action" parameter="panel_block_list_sidetray" />
</menu_item_call>
</toggleable_menu>

View File

@ -19,13 +19,4 @@
function="ToggleControl"
parameter="NearbyListShowMap" />
</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="People.Nearby.ViewSort.Action"
userdata="panel_block_list_sidetray" />
</menu_item_call>
</toggleable_menu>

View File

@ -11,8 +11,4 @@
function="CheckControl"
parameter="RecentListShowIcons" />
</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="People.Recent.ViewSort.Action" userdata="panel_block_list_sidetray" />
</menu_item_call>
</toggleable_menu>

View File

@ -9,38 +9,14 @@
min_height="350"
min_width="240"
width="280">
<button
follows="top|left"
height="24"
image_hover_unselected="BackButton_Over"
image_pressed="BackButton_Press"
image_unselected="BackButton_Off"
layout="topleft"
name="back"
left="4"
tab_stop="false"
top="1"
width="30"/>
<text
follows="top|left|right"
font="SansSerifLargeBold"
height="20"
layout="topleft"
left_pad="10"
name="title_text"
text_color="white"
top="5"
width="250">
Block List
</text>
<scroll_list
follows="all"
height="190"
height="220"
layout="topleft"
left="5"
name="blocked"
tool_tip="List of currently blocked Residents"
top="30"
top="0"
width="270">
<scroll_list.columns
name="item_name" />

View File

@ -66,7 +66,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
tab_position="top"
top="0"
halign="center"
width="319">
right="-5">
<!-- ================================= NEARBY tab =========================== -->
@ -606,6 +606,32 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
top_pad="0"
width="307" />
</panel>
<!-- ================================= BLOCKED tab ========================== -->
<panel
background_opaque="true"
background_visible="true"
bg_alpha_color="DkGray"
bg_opaque_color="DkGray"
follows="all"
height="383"
label="BLOCKED"
layout="topleft"
left="0"
help_topic="people_blocked_tab"
name="blocked_panel"
top="0"
width="313">
<panel
class="panel_block_list_sidetray"
height="383"
name="panel_block_list_sidetray"
filename="panel_block_list_sidetray.xml"
label="Blocked Residents &amp; Objects"
font="SansSerifBold"
width="313" />
</panel>
</tab_container>
<panel
follows="bottom|left|right"