EXP-1311 FIXED (Modified My Profile floater to become Picks floater: removed unused profile panel.)

- Modified My Profile floater to become Picks floater: removed unused profile panel.
master
Paul ProductEngine 2011-10-14 23:53:43 +02:00
parent c224e589d0
commit 96a94a5840
9 changed files with 22 additions and 99 deletions

View File

@ -84,7 +84,7 @@ void LLPanelMe::buildEditPanel()
// All profile editing should go through the web.
//mEditPanel->childSetAction("save_btn", boost::bind(&LLPanelMe::onSaveChangesClicked, this), this);
mEditPanel->childSetAction("cancel_btn", boost::bind(&LLPanelMe::onCancelClicked, this), this);
//mEditPanel->childSetAction("cancel_btn", boost::bind(&LLPanelMe::onCancelClicked, this), this);
}
}
@ -92,12 +92,6 @@ void LLPanelMe::buildEditPanel()
void LLPanelMe::onEditProfileClicked()
{
buildEditPanel();
togglePanel(mEditPanel, getAvatarId()); // open
}
void LLPanelMe::onCancelClicked()
{
togglePanel(mEditPanel); // close
}
//////////////////////////////////////////////////////////////////////////

View File

@ -57,7 +57,6 @@ private:
void buildEditPanel();
void onEditProfileClicked();
void onCancelClicked();
LLPanelMyProfileEdit * mEditPanel;

View File

@ -261,7 +261,6 @@ void LLPanelProfile::ChildStack::dump()
LLPanelProfile::LLPanelProfile()
: LLPanel()
, mTabCtrl(NULL)
, mAvatarId(LLUUID::null)
{
mChildStack.setParent(this);
@ -269,10 +268,6 @@ LLPanelProfile::LLPanelProfile()
BOOL LLPanelProfile::postBuild()
{
mTabCtrl = getChild<LLTabContainer>("tabs");
getTabCtrl()->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2));
LLPanelPicks* panel_picks = findChild<LLPanelPicks>(PANEL_PICKS);
panel_picks->setProfilePanel(this);
@ -293,18 +288,7 @@ void LLPanelProfile::reshape(S32 width, S32 height, BOOL called_from_parent)
void LLPanelProfile::onOpen(const LLSD& key)
{
// open the desired panel
if (key.has("open_tab_name"))
{
getTabContainer()[PANEL_PICKS]->onClosePanel();
// onOpen from selected panel will be called from onTabSelected callback
getTabCtrl()->selectTabByName(key["open_tab_name"]);
}
else
{
getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
getTabContainer()[PANEL_PICKS]->onOpen(getAvatarId());
// support commands to open further pieces of UI
if (key.has("show_tab_panel"))
@ -362,23 +346,6 @@ void LLPanelProfile::onOpen(const LLSD& key)
}
}
void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key)
{
// TRUE - we need to open/expand "panel"
bool expand = getChildList()->front() != panel; // mTabCtrl->getVisible();
if (expand)
{
openPanel(panel, key);
}
else
{
closePanel(panel);
getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
}
void LLPanelProfile::onTabSelected(const LLSD& param)
{
std::string tab_name = param.asString();

View File

@ -46,8 +46,6 @@ public:
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void onOpen(const LLSD& key);
virtual void togglePanel(LLPanel*, const LLSD& key = LLSD());
virtual void openPanel(LLPanel* panel, const LLSD& params);
virtual void closePanel(LLPanel* panel);
@ -60,8 +58,6 @@ protected:
virtual void onTabSelected(const LLSD& param);
LLTabContainer* getTabCtrl() { return mTabCtrl; }
const LLUUID& getAvatarId() { return mAvatarId; }
void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
@ -97,7 +93,6 @@ private:
};
//-- ChildStack ends ------------------------------------------------------
LLTabContainer* mTabCtrl;
profile_tabs_t mTabContainer;
ChildStack mChildStack;
LLUUID mAvatarId;

View File

@ -234,7 +234,6 @@ void LLViewerFloaterReg::registerFloaters()
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>);
@ -251,6 +250,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreferenceProxy>);
LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHardwareSettings>);
LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPerms>);
LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>);
LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview");
LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewGesture>, "preview");

View File

@ -3,14 +3,14 @@
open_positioning="cascading"
can_close="true"
can_resize="true"
height="570"
height="572"
help_topic="sidebar_me"
min_width="333"
min_height="440"
name="floater_profile"
name="floater_picks"
save_rect="true"
save_visibility="true"
title="MY PROFILE"
title="Picks"
width="333" >
<panel
class="panel_me"

View File

@ -10,43 +10,10 @@
name="panel_me"
top="0"
width="333">
<!--<text
type="string"
follows="top|left|right"
font="SansSerifHugeBold"
height="20"
layout="topleft"
left="15"
name="user_name"
text_color="white"
top="0"
mouse_opaque="true"
width="280">
(Loading...)
</text> -->
<tab_container
follows="all"
height="555"
halign="center"
layout="topleft"
left="5"
name="tabs"
tab_min_width="95"
tab_height="30"
tab_position="top"
top_pad="10"
width="317">
<panel
class="panel_my_profile"
filename="panel_my_profile.xml"
label="MY PROFILE"
help_topic="panel_my_profile_tab"
name="panel_profile" />
<panel
class="panel_picks"
filename="panel_picks.xml"
label="MY PICKS"
help_topic="panel_my_picks_tab"
name="panel_picks" />
</tab_container>
<panel
class="panel_picks"
filename="panel_picks.xml"
label="MY PICKS"
help_topic="panel_my_picks_tab"
name="panel_picks"/>
</panel>

View File

@ -117,7 +117,7 @@
</scroll_container>
<panel
follows="left|right|bottom"
height="35"
height="23"
layout="topleft"
top_pad="5"
left="8"

View File

@ -4,12 +4,12 @@ bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
follows="all"
height="548"
height="571"
label="Picks"
layout="topleft"
left="0"
left="8"
name="panel_picks"
top="0"
top_pad="0"
width="313">
<string
name="no_picks"
@ -30,7 +30,7 @@ bg_opaque_color="DkGray2"
<accordion
fit_parent="true"
follows="all"
height="485"
height="514"
layout="topleft"
left="0"
name="accordion"
@ -81,10 +81,10 @@ bg_opaque_color="DkGray2"
left="1"
height="27"
label="bottom_panel"
layout="bottom"
layout="topleft"
name="edit_panel"
top_pad="-2"
width="313">
top_pad="0"
width="312">
<layout_stack
follows="bottom|left|right"
@ -149,8 +149,9 @@ bg_opaque_color="DkGray2"
follows="bottom|left|right"
layout="topleft"
left="0"
height="40"
height="30"
name="buttons_cucks"
top_pad="0"
width="313">
<layout_stack