diff options
author | Seth ProductEngine <slitovchuk@productengine.com> | 2011-09-26 15:21:46 +0300 |
---|---|---|
committer | Seth ProductEngine <slitovchuk@productengine.com> | 2011-09-26 15:21:46 +0300 |
commit | a80d5f2b46b21a8d1a48da4b4d2c740cb8260928 (patch) | |
tree | 10fda3feab008b1a6d5a71cb851758bb74ef80b3 | |
parent | 679a028fcc5615b9725bf11f6949634617fad06d (diff) |
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.
-rw-r--r-- | indra/newview/llpanelme.cpp | 40 | ||||
-rw-r--r-- | indra/newview/llpanelme.h | 1 | ||||
-rwxr-xr-x | indra/newview/llpanelpicks.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_my_profile.xml | 19 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_people.xml | 41 |
6 files changed, 72 insertions, 48 deletions
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 1347a02a52..4d86fa15df 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -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) diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h index f27f5a268e..22cbb9e055 100644 --- a/indra/newview/llpanelme.h +++ b/indra/newview/llpanelme.h @@ -49,7 +49,6 @@ public: LLPanelMe(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ bool notifyChildren(const LLSD& info); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index ddce83c616..15b5fc8301 100755 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -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 { diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b28373c6d5..b30ef11978 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -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>); diff --git a/indra/newview/skins/default/xui/en/floater_my_profile.xml b/indra/newview/skins/default/xui/en/floater_my_profile.xml new file mode 100644 index 0000000000..b3ebe7f791 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_my_profile.xml @@ -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> diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml new file mode 100644 index 0000000000..13e0738e52 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_people.xml @@ -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> |