From 96a94a5840dca8a453ec14611dd8b2eb385deebb Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Fri, 14 Oct 2011 23:53:43 +0200 Subject: 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. --- indra/newview/llpanelme.cpp | 8 +--- indra/newview/llpanelme.h | 1 - indra/newview/llpanelprofile.cpp | 35 +---------------- indra/newview/llpanelprofile.h | 5 --- indra/newview/llviewerfloaterreg.cpp | 2 +- .../skins/default/xui/en/floater_my_profile.xml | 20 ---------- .../newview/skins/default/xui/en/floater_picks.xml | 20 ++++++++++ indra/newview/skins/default/xui/en/panel_me.xml | 45 +++------------------- .../skins/default/xui/en/panel_pick_info.xml | 2 +- indra/newview/skins/default/xui/en/panel_picks.xml | 17 ++++---- 10 files changed, 39 insertions(+), 116 deletions(-) delete mode 100644 indra/newview/skins/default/xui/en/floater_my_profile.xml create mode 100644 indra/newview/skins/default/xui/en/floater_picks.xml (limited to 'indra') diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 0b687009bf..7e47a96f44 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -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 } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h index 22cbb9e055..b0f5d184cc 100644 --- a/indra/newview/llpanelme.h +++ b/indra/newview/llpanelme.h @@ -57,7 +57,6 @@ private: void buildEditPanel(); void onEditProfileClicked(); - void onCancelClicked(); LLPanelMyProfileEdit * mEditPanel; diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 27390fca78..5ce59d8959 100755 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -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("tabs"); - - getTabCtrl()->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2)); - LLPanelPicks* panel_picks = findChild(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(); diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index fca359f51e..bd4457c240 100755 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -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; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e5a80f2420..390c2f1ee9 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -234,7 +234,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("mute_object_by_name", "floater_mute_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("my_inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("my_profile", "floater_my_profile.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); @@ -251,6 +250,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); diff --git a/indra/newview/skins/default/xui/en/floater_my_profile.xml b/indra/newview/skins/default/xui/en/floater_my_profile.xml deleted file mode 100644 index 713515d041..0000000000 --- a/indra/newview/skins/default/xui/en/floater_my_profile.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - diff --git a/indra/newview/skins/default/xui/en/floater_picks.xml b/indra/newview/skins/default/xui/en/floater_picks.xml new file mode 100644 index 0000000000..2d307028e4 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_picks.xml @@ -0,0 +1,20 @@ + + + + diff --git a/indra/newview/skins/default/xui/en/panel_me.xml b/indra/newview/skins/default/xui/en/panel_me.xml index 84b5d11ba7..23e7814cad 100644 --- a/indra/newview/skins/default/xui/en/panel_me.xml +++ b/indra/newview/skins/default/xui/en/panel_me.xml @@ -10,43 +10,10 @@ name="panel_me" top="0" width="333"> - - - - - + diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml index 7daa52b2d9..24046d5cca 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml @@ -117,7 +117,7 @@ + top_pad="0" + width="312">