EXP-1222 FIXED Added a floater for My Profile side tab.
- Replaced calls to LLSideTray with LLFloaterSidePanelContainer. - Removed obsolete code implementing the tri-state behavior of Profile side panel. - Added People panel XUI which is referenced from Profile panel.meow-7.2.2
parent
679a028fcc
commit
a80d5f2b46
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ public:
|
|||
LLPanelMe();
|
||||
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ bool notifyChildren(const LLSD& info);
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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_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>);
|
||||
|
|
@ -231,6 +232,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>);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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 & Objects"
|
||||
font="SansSerifBold"/>
|
||||
</panel_container>
|
||||
</floater>
|
||||
Loading…
Reference in New Issue