diff options
Diffstat (limited to 'indra')
52 files changed, 693 insertions, 570 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 38d6ff0f58..59e1ca10e6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -228,6 +228,7 @@ set(viewer_SOURCE_FILES llfloatersearch.cpp llfloatersellland.cpp llfloatersettingsdebug.cpp + llfloatersidepanelcontainer.cpp llfloatersidetraytab.cpp llfloatersnapshot.cpp llfloatersounddevices.cpp @@ -792,6 +793,7 @@ set(viewer_HEADER_FILES llfloatersearch.h llfloatersellland.h llfloatersettingsdebug.h + llfloatersidepanelcontainer.h llfloatersidetraytab.h llfloatersnapshot.h llfloatersounddevices.h diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 642a1907f0..1587ed2dd7 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1797,7 +1797,7 @@ void LLAgent::endAnimationUpdateUI() gViewerWindow->showCursor(); // show menus gMenuBarView->setVisible(TRUE); - LLNavigationBar::getInstance()->setVisible(TRUE); + LLNavigationBar::getInstance()->setVisible(TRUE && gSavedSettings.getBOOL("ShowNavbarNavigationPanel")); gStatusBar->setVisibleForMouselook(true); if (gSavedSettings.getBOOL("ShowMiniLocationPanel")) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index b9125ec8d3..404cd8e5b6 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -33,6 +33,7 @@ #include "llagentwearablesfetch.h" #include "llappearancemgr.h" #include "llcallbacklist.h" +#include "llfloatersidepanelcontainer.h" #include "llgesturemgr.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -2015,7 +2016,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id) } const BOOL disable_camera_switch = LLWearableType::getDisableCameraSwitch(wearable->getType()); - LLPanel* panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance"); + LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance"); LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch); } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 3cb9b77010..c638f881a5 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -34,6 +34,7 @@ #include "llattachmentsmgr.h" #include "llcommandhandler.h" #include "lleventtimer.h" +#include "llfloatersidepanelcontainer.h" #include "llgesturemgr.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -116,7 +117,7 @@ public: return true; } - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD()); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD()); return true; } }; @@ -1505,7 +1506,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) void LLAppearanceMgr::updatePanelOutfitName(const std::string& name) { LLSidepanelAppearance* panel_appearance = - dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + dynamic_cast<LLSidepanelAppearance *>(LLFloaterSidePanelContainer::getPanel("appearance")); if (panel_appearance) { panel_appearance->refreshCurrentOutfitName(name); @@ -1943,7 +1944,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego if (gAgentCamera.cameraCustomizeAvatar()) { // switching to outfit editor should automagically save any currently edited wearable - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit")); } LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); @@ -2468,7 +2469,7 @@ public: LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); } LLOutfitsList *outfits_list = - dynamic_cast<LLOutfitsList*>(LLSideTray::getInstance()->getPanel("outfitslist_tab")); + dynamic_cast<LLOutfitsList*>(LLFloaterSidePanelContainer::getPanel("appearance", "outfitslist_tab")); if (outfits_list) { outfits_list->setSelectedOutfitByUUID(mFolderID); diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 4cdfcea64e..fb7517a98b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -47,6 +47,7 @@ #include "llfloatergroups.h" #include "llfloaterreg.h" #include "llfloaterpay.h" +#include "llfloatersidepanelcontainer.h" #include "llfloaterwebcontent.h" #include "llfloaterworldmap.h" #include "llfolderview.h" @@ -438,8 +439,7 @@ void LLAvatarActions::csr(const LLUUID& id, std::string name) void LLAvatarActions::share(const LLUUID& id) { LLSD key; - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); - + LLFloaterSidePanelContainer::showPanel("my_inventory", key); LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,id); @@ -462,7 +462,7 @@ namespace action_give_inventory */ static LLInventoryPanel* get_outfit_editor_inventory_panel() { - LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); + LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); if (NULL == panel_outfit_edit) return NULL; LLInventoryPanel* inventory_panel = panel_outfit_edit->findChild<LLInventoryPanel>("folder_view"); @@ -696,9 +696,11 @@ std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs() if (inventory_selected_uuids.empty()) { - LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory"); - - inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList(); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (sidepanel_inventory) + { + inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList(); + } } return inventory_selected_uuids; diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 254c0adef1..80e0cca780 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -33,6 +33,7 @@ #include "llagentdata.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llfloatersidepanelcontainer.h" #include "llinventory.h" #include "llinventoryfunctions.h" #include "lllistcontextmenu.h" @@ -165,7 +166,7 @@ protected: // absent instance. Explicit relations between components avoids situations // when we tries to construct instance with unsatisfied implicit input conditions. LLPanelOutfitEdit * panel_outfit_edit = - dynamic_cast<LLPanelOutfitEdit*> (LLSideTray::getInstance()->getPanel( + dynamic_cast<LLPanelOutfitEdit*> (LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); if (panel_outfit_edit != NULL) { @@ -237,7 +238,7 @@ protected: // *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel(). // LLSideTray::getInstance()->getPanel() is rather slow variant - LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); + LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceMenuItemClicked, panel_oe, selected_id)); registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id)); registrar.add("BodyPart.Create", boost::bind(&CofBodyPartContextMenu::createNew, this, selected_id)); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 836c580ea8..1eabf32b9f 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -41,6 +41,7 @@ #include "llinventoryclipboard.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" +#include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" #include "lllandmarkactions.h" #include "llnotificationsutil.h" @@ -360,7 +361,7 @@ struct LLFavoritesSort LLFavoritesBarCtrl::Params::Params() : image_drag_indication("image_drag_indication"), - chevron_button("chevron_button"), + more_button("more_button"), label("label") { } @@ -389,10 +390,10 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) gInventory.addObserver(this); //make chevron button - LLButton::Params chevron_button_params(p.chevron_button); - chevron_button_params.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this)); - mChevronButton = LLUICtrlFactory::create<LLButton> (chevron_button_params); - addChild(mChevronButton); + LLTextBox::Params more_button_params(p.more_button); + mMoreTextBox = LLUICtrlFactory::create<LLTextBox> (more_button_params); + mMoreTextBox->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this)); + addChild(mMoreTextBox); LLTextBox::Params label_param(p.label); mBarLabel = LLUICtrlFactory::create<LLTextBox> (label_param); @@ -692,7 +693,7 @@ void LLFavoritesBarCtrl::updateButtons() const child_list_t* childs = getChildList(); child_list_const_iter_t child_it = childs->begin(); int first_changed_item_index = 0; - int rightest_point = getRect().mRight - mChevronButton->getRect().getWidth(); + int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth(); //lets find first changed button while (child_it != childs->end() && first_changed_item_index < mItems.count()) { @@ -735,9 +736,9 @@ void LLFavoritesBarCtrl::updateButtons() } // we have to remove ChevronButton to make sure that the last item will be LandmarkButton to get the right aligning // keep in mind that we are cutting all buttons in space between the last visible child of favbar and ChevronButton - if (mChevronButton->getParent() == this) + if (mMoreTextBox->getParent() == this) { - removeChild(mChevronButton); + removeChild(mMoreTextBox); } int last_right_edge = 0; //calculate new buttons offset @@ -777,13 +778,13 @@ void LLFavoritesBarCtrl::updateButtons() S32 buttonHGap = button_params.rect.left; // default value LLRect rect; // Chevron button should stay right aligned - rect.setOriginAndSize(getRect().mRight - mChevronButton->getRect().getWidth() - buttonHGap, 0, - mChevronButton->getRect().getWidth(), - mChevronButton->getRect().getHeight()); + rect.setOriginAndSize(getRect().mRight - mMoreTextBox->getRect().getWidth() - buttonHGap, 0, + mMoreTextBox->getRect().getWidth(), + mMoreTextBox->getRect().getHeight()); - addChild(mChevronButton); - mChevronButton->setRect(rect); - mChevronButton->setVisible(TRUE); + addChild(mMoreTextBox); + mMoreTextBox->setRect(rect); + mMoreTextBox->setVisible(TRUE); } // Update overflow menu LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mOverflowMenuHandle.get()); @@ -816,8 +817,8 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem int width = required_width > def_button_width? def_button_width : required_width; LLFavoriteLandmarkButton* fav_btn = NULL; - // do we have a place for next button + double buttonHGap + mChevronButton ? - if(curr_x + width + 2*button_x_delta + mChevronButton->getRect().getWidth() > getRect().mRight ) + // do we have a place for next button + double buttonHGap + mMoreTextBox ? + if(curr_x + width + 2*button_x_delta + mMoreTextBox->getRect().getWidth() > getRect().mRight ) { return NULL; } @@ -967,7 +968,7 @@ void LLFavoritesBarCtrl::showDropDownMenu() menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); - menu->setButtonRect(mChevronButton->getRect(), this); + menu->setButtonRect(mMoreTextBox->getRect(), this); LLMenuGL::showPopup(this, menu, getRect().getWidth() - max_width, 0); } @@ -1057,7 +1058,7 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) key["type"] = "landmark"; key["id"] = mSelectedItemID; - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); } else if (action == "copy_slurl") { diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 1a28731c4f..a41795a080 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -40,7 +40,7 @@ public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { Optional<LLUIImage*> image_drag_indication; - Optional<LLButton::Params> chevron_button; + Optional<LLTextBox::Params> more_button; Optional<LLTextBox::Params> label; Params(); }; @@ -135,7 +135,7 @@ private: BOOL mShowDragMarker; LLUICtrl* mLandingTab; LLUICtrl* mLastTab; - LLButton* mChevronButton; + LLTextBox* mMoreTextBox; LLTextBox* mBarLabel; LLUUID mDragItemId; diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp new file mode 100644 index 0000000000..c73ec90a12 --- /dev/null +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -0,0 +1,101 @@ +/** + * @file llfloatersidepanelcontainer.cpp + * @brief LLFloaterSidePanelContainer class definition + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" + +// newview includes +#include "llsidetraypanelcontainer.h" +#include "lltransientfloatermgr.h" + +//static +const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel"); + +LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params) +: LLFloater(key, params) +{ + // Prevent transient floaters (e.g. IM windows) from hiding + // when this floater is clicked. + LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this); +} + +LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this); +} + +void LLFloaterSidePanelContainer::onOpen(const LLSD& key) +{ + getChild<LLPanel>(sMainPanelName)->onOpen(key); +} + +LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params) +{ + LLView* view = findChildView(panel_name, true); + if (!view) return NULL; + + openFloater(); + + LLPanel* panel = NULL; + + 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); + + panel = container->getCurrentPanel(); + } + else if ((panel = dynamic_cast<LLPanel*>(view)) != NULL) + { + panel->onOpen(params); + } + + return panel; +} + +void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const LLSD& panel_name) +{ + LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name); + if (floaterp) + { + floaterp->openChildPanel(sMainPanelName, panel_name); + } +} + +LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name) +{ + LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name); + if (floaterp) + { + return floaterp->findChild<LLPanel>(panel_name, true); + } + + return NULL; +} diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h new file mode 100644 index 0000000000..b230500f56 --- /dev/null +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -0,0 +1,79 @@ +/** + * @file llfloatersidepanelcontainer.h + * @brief LLFloaterSidePanelContainer class + * + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERSIDEPANELCONTAINER_H +#define LL_LLFLOATERSIDEPANELCONTAINER_H + +#include "llfloater.h" + +/** + * Class LLFloaterSidePanelContainer + * + * Provides an interface for all former Side Tray panels. + * + * This class helps to make sure that clicking a floater containing the side panel + * doesn't make transient floaters (e.g. IM windows) hide, so that it's possible to + * drag an inventory item from My Inventory window to a docked IM window, + * i.e. share the item (see VWR-22891). + */ +class LLFloaterSidePanelContainer : public LLFloater +{ +private: + static const std::string sMainPanelName; + +public: + LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams()); + ~LLFloaterSidePanelContainer(); + + /*virtual*/ void onOpen(const LLSD& key); + + LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params); + + static void showPanel(const std::string& floater_name, const LLSD& panel_name); + + static LLPanel* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName); + + /** + * Gets the panel of given type T (doesn't show it or do anything else with it). + * + * @param floater_name a string specifying the floater to be searched for a child panel. + * @param panel_name a string specifying the child panel to get. + * @returns a pointer to the panel of given type T. + */ + template <typename T> + static T* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName) + { + T* panel = dynamic_cast<T*>(getPanel(floater_name, panel_name)); + if (!panel) + { + llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl; + } + return panel; + } +}; + +#endif // LL_LLFLOATERSIDEPANELCONTAINER_H diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index ee076f68ea..29d7a4a6b0 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -28,6 +28,7 @@ #include "llinspectobject.h" // Viewer +#include "llfloatersidepanelcontainer.h" #include "llinspect.h" #include "llmediaentry.h" #include "llnotificationsutil.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper @@ -640,7 +641,7 @@ void LLInspectObject::onClickMoreInfo() { LLSD key; key["task"] = "task"; - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); + LLFloaterSidePanelContainer::showPanel("my_inventory", key); closeFloater(); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a36aa3dedf..b6041c7f31 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -39,6 +39,7 @@ #include "llavataractions.h" #include "llfloateropenobject.h" #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" #include "llfolderview.h" #include "llfriendcard.h" @@ -3851,7 +3852,7 @@ void LLLandmarkBridge::performAction(LLInventoryModel* model, std::string action key["type"] = "landmark"; key["id"] = item->getUUID(); - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); } } else @@ -4780,7 +4781,7 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category ) if (gAgentCamera.cameraCustomizeAvatar()) { // switching to outfit editor should automagically save any currently edited wearable - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit")); } remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 0af013fde5..acec02b507 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -47,6 +47,7 @@ #include "llappviewer.h" //#include "llfirstuse.h" #include "llfloaterinventory.h" +#include "llfloatersidepanelcontainer.h" #include "llfocusmgr.h" #include "llfolderview.h" #include "llgesturemgr.h" @@ -459,22 +460,28 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id) { - LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", item_uuid).with("object", object_id)); + LLFloaterSidePanelContainer::showPanel("my_inventory", LLSD().with("id", item_uuid).with("object", object_id)); } void show_item_profile(const LLUUID& item_uuid) { LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid); - LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", linked_uuid)); + LLFloaterSidePanelContainer::showPanel("my_inventory", LLSD().with("id", linked_uuid)); } void show_item_original(const LLUUID& item_uuid) { + LLFloater* floater_my_inventory = LLFloaterReg::getInstance("my_inventory"); + if (!floater_my_inventory) + { + llwarns << "Could not find My Inventory floater" << llendl; + return; + } + //sidetray inventory panel - LLSidepanelInventory *sidepanel_inventory = - dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); - bool reset_inventory_filter = !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory"); + bool reset_inventory_filter = !floater_my_inventory->isInVisibleChain(); LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(); if (!active_panel) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 615d3aefde..27db28367c 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -35,6 +35,7 @@ #include "llavataractions.h" #include "llfloaterinventory.h" #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llfolderview.h" #include "llimfloater.h" #include "llimview.h" @@ -1077,10 +1078,9 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data) BOOL is_inventorysp_active() { - if (!LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")) return FALSE; - LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - if (!inventorySP) return FALSE; - return inventorySP->isMainInventoryPanelActive(); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return FALSE; + return sidepanel_inventory->isMainInventoryPanelActive(); } // static @@ -1090,34 +1090,24 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) LLInventoryPanel* res = NULL; LLFloater* active_inv_floaterp = NULL; - // A. If the inventory side panel is open, use that preferably. - if (is_inventorysp_active()) + LLFloater* floater_my_inventory = LLFloaterReg::getInstance("my_inventory"); + if (!floater_my_inventory) { - LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - if (inventorySP) - { - return inventorySP->getActivePanel(); - } + llwarns << "Could not find My Inventory floater" << llendl; + return FALSE; } - // or if it is in floater undocked from sidetray get it and remember z order of floater to later compare it - // with other inventory floaters order. - else if (!LLSideTray::getInstance()->isTabAttached("sidebar_inventory")) + + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + + // A. If the inventory side panel floater is open, use that preferably. + if (is_inventorysp_active()) { - LLSidepanelInventory *inventorySP = - dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - LLFloater* inv_floater = LLFloaterReg::findInstance("side_bar_tab", LLSD("sidebar_inventory")); - if (inventorySP && inv_floater) - { - res = inventorySP->getActivePanel(); - z_min = gFloaterView->getZOrder(inv_floater); - active_inv_floaterp = inv_floater; - } - else - { - llwarns << "Inventory tab is detached from sidetray, but either panel or floater were not found!" << llendl; - } + // Get the floater's z order to compare it to other inventory floaters' order later. + res = sidepanel_inventory->getActivePanel(); + z_min = gFloaterView->getZOrder(floater_my_inventory); + active_inv_floaterp = floater_my_inventory; } - + // B. Iterate through the inventory floaters and return whichever is on top. LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) @@ -1147,14 +1137,9 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) // C. If no panels are open and we don't want to force open a panel, then just abort out. if (!auto_open) return NULL; - // D. Open the inventory side panel and use that. - LLSD key; - LLSidepanelInventory *sidepanel_inventory = - dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key)); - if (sidepanel_inventory) - { - return sidepanel_inventory->getActivePanel(); - } + // D. Open the inventory side panel floater and use that. + floater_my_inventory->openFloater(); + return sidepanel_inventory->getActivePanel(); return NULL; } diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 1c8f6b6c98..f519ad759e 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -44,6 +44,7 @@ // newview includes #include "llagent.h" +#include "llfloatersidepanelcontainer.h" #include "llinventoryobserver.h" #include "lllandmarkactions.h" #include "lllandmarklist.h" @@ -600,7 +601,7 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent void LLLocationInputCtrl::onInfoButtonClicked() { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent")); } void LLLocationInputCtrl::onForSaleButtonClicked() @@ -618,11 +619,11 @@ void LLLocationInputCtrl::onAddLandmarkButtonClicked() key["type"] = "landmark"; key["id"] = landmark->getUUID(); - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); } else { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark")); } } @@ -1087,12 +1088,12 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata) if(!landmark) { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark")); } else { - LLSideTray::getInstance()->showPanel("panel_places", - LLSD().with("type", "landmark").with("id",landmark->getUUID())); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID())); + } } else if (item == "cut") diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 9d54ad7463..4c0823874c 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -269,7 +269,6 @@ LLNavigationBar::LLNavigationBar() mBtnForward(NULL), mBtnHome(NULL), mCmbLocation(NULL), - mSearchComboBox(NULL), mPurgeTPHistoryItems(false), mSaveToLocationHistory(false) { @@ -291,10 +290,7 @@ BOOL LLNavigationBar::postBuild() mBtnForward = getChild<LLPullButton>("forward_btn"); mBtnHome = getChild<LLButton>("home_btn"); - mCmbLocation= getChild<LLLocationInputCtrl>("location_combo"); - mSearchComboBox = getChild<LLSearchComboBox>("search_combo_box"); - - fillSearchComboBox(); + mCmbLocation= getChild<LLLocationInputCtrl>("location_combo"); mBtnBack->setEnabled(FALSE); mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this)); @@ -309,8 +305,6 @@ BOOL LLNavigationBar::postBuild() mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this)); mCmbLocation->setCommitCallback(boost::bind(&LLNavigationBar::onLocationSelection, this)); - - mSearchComboBox->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this)); mTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> setTeleportFinishedCallback(boost::bind(&LLNavigationBar::onTeleportFinished, this, _1)); @@ -344,26 +338,6 @@ void LLNavigationBar::setVisible(BOOL visible) } } - -void LLNavigationBar::fillSearchComboBox() -{ - if(!mSearchComboBox) - { - return; - } - - LLSearchHistory::getInstance()->load(); - - LLSearchHistory::search_history_list_t search_list = - LLSearchHistory::getInstance()->getSearchHistoryList(); - LLSearchHistory::search_history_list_t::const_iterator it = search_list.begin(); - for( ; search_list.end() != it; ++it) - { - LLSearchHistory::LLSearchHistoryItem item = *it; - mSearchComboBox->add(item.search_query); - } -} - void LLNavigationBar::draw() { if(mPurgeTPHistoryItems) @@ -416,16 +390,6 @@ void LLNavigationBar::onHomeButtonClicked() gAgent.teleportHome(); } -void LLNavigationBar::onSearchCommit() -{ - std::string search_query = mSearchComboBox->getSimple(); - if(!search_query.empty()) - { - LLSearchHistory::getInstance()->addEntry(search_query); - } - invokeSearch(search_query); -} - void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata) { int idx = userdata.asInteger(); @@ -736,151 +700,3 @@ int LLNavigationBar::getDefFavBarHeight() { return mDefaultFpRect.getHeight(); } - -void LLNavigationBar::showNavigationPanel(BOOL visible) -{ - bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"); - - LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite"); - LLPanel* navPanel = getChild<LLPanel>("navigation_panel"); - - LLRect nbRect(getRect()); - LLRect fbRect(fb->getRect()); - - navPanel->setVisible(visible); - - if (visible) - { - if (fpVisible) - { - // Navigation Panel must be shown. Favorites Panel is visible. - - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), mDefaultNbRect.getHeight()); - fbRect.setLeftTopAndSize(fbRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight()); - - // this is duplicated in 'else' section because it should be called BEFORE fb->reshape - reshape(nbRect.getWidth(), nbRect.getHeight()); - setRect(nbRect); - // propagate size to parent container - getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); - - fb->reshape(fbRect.getWidth(), fbRect.getHeight()); - fb->setRect(fbRect); - } - else - { - // Navigation Panel must be shown. Favorites Panel is hidden. - - S32 height = mDefaultNbRect.getHeight() - mDefaultFpRect.getHeight() - FAVBAR_TOP_PADDING; - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), height); - - reshape(nbRect.getWidth(), nbRect.getHeight()); - setRect(nbRect); - getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); - } - } - else - { - if (fpVisible) - { - // Navigation Panel must be hidden. Favorites Panel is visible. - - S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING; - S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1; - - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight); - fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight()); - - // this is duplicated in 'else' section because it should be called BEFORE fb->reshape - reshape(nbRect.getWidth(), nbRect.getHeight()); - setRect(nbRect); - getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); - - fb->reshape(fbRect.getWidth(), fbRect.getHeight()); - fb->setRect(fbRect); - } - else - { - // Navigation Panel must be hidden. Favorites Panel is hidden. - - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0); - - reshape(nbRect.getWidth(), nbRect.getHeight()); - setRect(nbRect); - getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); - } - } - - getChildView("bg_icon")->setVisible( visible && fpVisible); - getChildView("bg_icon_no_fav_bevel")->setVisible( visible && !fpVisible); - getChildView("bg_icon_no_nav_bevel")->setVisible( !visible && fpVisible); -} - -void LLNavigationBar::showFavoritesPanel(BOOL visible) -{ - bool npVisible = gSavedSettings.getBOOL("ShowNavbarNavigationPanel"); - - LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite"); - - LLRect nbRect(getRect()); - LLRect fbRect(fb->getRect()); - - if (visible) - { - if (npVisible) - { - // Favorites Panel must be shown. Navigation Panel is visible. - - S32 fbHeight = fbRect.getHeight(); - S32 newHeight = nbRect.getHeight() + fbHeight + FAVBAR_TOP_PADDING; - - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight); - fbRect.setLeftTopAndSize(mDefaultFpRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight()); - } - else - { - // Favorites Panel must be shown. Navigation Panel is hidden. - - S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING; - S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1; - - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight); - fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight()); - } - - reshape(nbRect.getWidth(), nbRect.getHeight()); - setRect(nbRect); - getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); - - fb->reshape(fbRect.getWidth(), fbRect.getHeight()); - fb->setRect(fbRect); - } - else - { - if (npVisible) - { - // Favorites Panel must be hidden. Navigation Panel is visible. - - S32 fbHeight = fbRect.getHeight(); - S32 newHeight = nbRect.getHeight() - fbHeight - FAVBAR_TOP_PADDING; - - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight); - } - else - { - // Favorites Panel must be hidden. Navigation Panel is hidden. - - nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0); - } - - reshape(nbRect.getWidth(), nbRect.getHeight()); - setRect(nbRect); - getParent()->reshape(nbRect.getWidth(), nbRect.getHeight()); - } - - getChildView("bg_icon")->setVisible( npVisible && visible); - getChildView("bg_icon_no_fav_bevel")->setVisible( npVisible && !visible); - getChildView("bg_icon_no_nav_bevel")->setVisible( !npVisible && visible); - - fb->setVisible(visible); -} diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 3c9f8a762d..e4ce9e3998 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -98,9 +98,6 @@ public: void handleLoginComplete(); void clearHistoryCache(); - void showNavigationPanel(BOOL visible); - void showFavoritesPanel(BOOL visible); - int getDefNavBarHeight(); int getDefFavBarHeight(); @@ -121,7 +118,6 @@ private: void onHomeButtonClicked(); void onLocationSelection(); void onLocationPrearrange(const LLSD& data); - void onSearchCommit(); void onTeleportFinished(const LLVector3d& global_agent_pos); void onTeleportFailed(); void onRegionNameResponse( @@ -131,8 +127,6 @@ private: U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport); - void fillSearchComboBox(); - static void destroyClass() { if (LLNavigationBar::instanceExists()) @@ -145,7 +139,6 @@ private: LLPullButton* mBtnBack; LLPullButton* mBtnForward; LLButton* mBtnHome; - LLSearchComboBox* mSearchComboBox; LLLocationInputCtrl* mCmbLocation; LLRect mDefaultNbRect; LLRect mDefaultFpRect; diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 10887aa53a..c2739867b1 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -35,6 +35,7 @@ #include "llaccordionctrltab.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llfloatersidepanelcontainer.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "lllistcontextmenu.h" @@ -327,7 +328,7 @@ protected: static void editOutfit() { - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit")); } static void renameOutfit(const LLUUID& outfit_cat_id) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index a9cc247d1b..1b9eb4813b 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -42,6 +42,7 @@ #include "llagentui.h" #include "llcallbacklist.h" #include "lldndbutton.h" +#include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" #include "llfolderviewitem.h" #include "llinventorymodelbackgroundfetch.h" @@ -367,7 +368,7 @@ void LLLandmarksPanel::onSelectorButtonClicked() key["type"] = "landmark"; key["id"] = listenerp->getUUID(); - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); } } @@ -786,7 +787,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const } else { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark")); } } else if ("category" == command_name) @@ -1309,7 +1310,13 @@ void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark, landmark->getGlobalPos(landmark_global_pos); // let's toggle pick panel into panel places - LLPanel* panel_places = LLSideTray::getInstance()->getPanel("panel_places");//-> sidebar_places + LLPanel* panel_places = NULL; + LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("places"); + if (floaterp) + { + panel_places = floaterp->findChild<LLPanel>("main_panel"); + } + if (!panel_places) { llassert(NULL != panel_places); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 858f5cf575..c1341af2ef 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -38,6 +38,7 @@ #include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "llfiltereditor.h" +#include "llfloatersidepanelcontainer.h" #include "llfloaterreg.h" #include "llmenubutton.h" #include "lloutfitobserver.h" @@ -579,8 +580,13 @@ void LLPanelMainInventory::updateItemcountText() void LLPanelMainInventory::onFocusReceived() { - LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory"); - + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (!sidepanel_inventory) + { + llwarns << "Could not find Inventory Panel in My Inventory floater" << llendl; + return; + } + sidepanel_inventory->clearSelections(false, true, true); } @@ -1164,7 +1170,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (command_name == "share") { - LLSidepanelInventory* parent = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); return parent ? parent->canShare() : FALSE; } diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 0579ecbb90..a336472fc0 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -32,6 +32,7 @@ #include "llappviewer.h" #include "llbutton.h" #include "llinventorypanel.h" +#include "llfloatersidepanelcontainer.h" #include "llfolderview.h" #include "llsidepanelinventory.h" #include "llviewercontrol.h" @@ -67,7 +68,7 @@ BOOL LLPanelMarketplaceInbox::postBuild() void LLPanelMarketplaceInbox::onSelectionChange() { - LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); sidepanel_inventory->updateVerbs(); } @@ -113,9 +114,11 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel() void LLPanelMarketplaceInbox::onFocusReceived() { - LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory"); - - sidepanel_inventory->clearSelections(true, false, true); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->clearSelections(true, false, true); + } gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } @@ -186,9 +189,10 @@ std::string LLPanelMarketplaceInbox::getBadgeString() const { std::string item_count_str(""); + LLPanel *inventory_panel = LLFloaterSidePanelContainer::getPanel("my_inventory"); + // If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel - if (getParent()->getVisible() && - (LLSideTray::getInstance()->getCollapsed() || !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory"))) + if (getParent()->getVisible() && inventory_panel && !inventory_panel->isInVisibleChain()) { U32 item_count = getFreshItemCount(); diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index 73fb92ff72..c0de5deb0a 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -33,6 +33,7 @@ #include "llbutton.h" #include "llcoros.h" #include "lleventcoro.h" +#include "llfloatersidepanelcontainer.h" #include "llinventorypanel.h" #include "llloadingindicator.h" #include "llnotificationsutil.h" @@ -89,16 +90,20 @@ void LLPanelMarketplaceOutbox::handleLoginComplete() void LLPanelMarketplaceOutbox::onFocusReceived() { - LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory"); - - sidepanel_inventory->clearSelections(true, true, false); + LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->clearSelections(true, true, false); + } } void LLPanelMarketplaceOutbox::onSelectionChange() { - LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - - sidepanel_inventory->updateVerbs(); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->updateVerbs(); + } } LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel() 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/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index a90f864ae2..3ac0d6616b 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -31,6 +31,7 @@ #include "llnotificationsutil.h" #include "lltabcontainer.h" +#include "llfloatersidepanelcontainer.h" #include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" #include "llagentwearables.h" @@ -222,7 +223,7 @@ void LLPanelOutfitsInventory::onSave() //static LLPanelOutfitsInventory* LLPanelOutfitsInventory::findInstance() { - return dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); + return dynamic_cast<LLPanelOutfitsInventory*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfits_inventory")); } ////////////////////////////////////////////////////////////////////////////////// @@ -319,8 +320,7 @@ void LLPanelOutfitsInventory::onWearablesLoading() // static LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP() { - static LLSidepanelAppearance* panel_appearance = - dynamic_cast<LLSidepanelAppearance*> - (LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance* panel_appearance = + dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance")); return panel_appearance; } 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/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 1e510a2d7b..0129ac753a 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -39,6 +39,7 @@ #include "llfiltereditor.h" #include "llfirstuse.h" #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llmenubutton.h" #include "llnotificationsutil.h" #include "lltabcontainer.h" @@ -115,7 +116,7 @@ public: LLSD key; key["type"] = "remote_place"; key["id"] = parcel_id; - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); return true; } } @@ -151,18 +152,16 @@ class LLPlacesInventoryObserver : public LLInventoryAddedObserver { public: LLPlacesInventoryObserver(LLPanelPlaces* places_panel) : - mPlaces(places_panel), - mTabsCreated(false) + mPlaces(places_panel) {} /*virtual*/ void changed(U32 mask) { LLInventoryAddedObserver::changed(mask); - if (!mTabsCreated && mPlaces) + if (mPlaces && !mPlaces->tabsCreated()) { mPlaces->createTabs(); - mTabsCreated = true; } } @@ -175,7 +174,6 @@ protected: private: LLPanelPlaces* mPlaces; - bool mTabsCreated; }; class LLPlacesRemoteParcelInfoObserver : public LLRemoteParcelInfoObserver @@ -244,7 +242,8 @@ LLPanelPlaces::LLPanelPlaces() mPlaceMenu(NULL), mLandmarkMenu(NULL), mPosGlobal(), - isLandmarkEditModeOn(false) + isLandmarkEditModeOn(false), + mTabsCreated(false) { mParcelObserver = new LLPlacesParcelObserver(this); mInventoryObserver = new LLPlacesInventoryObserver(this); @@ -252,7 +251,7 @@ LLPanelPlaces::LLPanelPlaces() gInventory.addObserver(mInventoryObserver); - LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( + mAgentParcelChangedConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( boost::bind(&LLPanelPlaces::updateVerbs, this)); //buildFromFile( "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() @@ -268,6 +267,11 @@ LLPanelPlaces::~LLPanelPlaces() delete mInventoryObserver; delete mParcelObserver; delete mRemoteParcelObserver; + + if (mAgentParcelChangedConnection.connected()) + { + mAgentParcelChangedConnection.disconnect(); + } } BOOL LLPanelPlaces::postBuild() @@ -349,6 +353,9 @@ BOOL LLPanelPlaces::postBuild() LLComboBox* folder_combo = mLandmarkInfo->getChild<LLComboBox>("folder_combo"); folder_combo->setCommitCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this)); + createTabs(); + updateVerbs(); + return TRUE; } @@ -1025,7 +1032,7 @@ void LLPanelPlaces::changedParcelSelection() void LLPanelPlaces::createTabs() { - if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance())) + if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance() && !mTabsCreated)) return; LLLandmarksPanel* landmarks_panel = new LLLandmarksPanel(); @@ -1059,6 +1066,8 @@ void LLPanelPlaces::createTabs() // Filter applied to show all items. if (mActivePanel) mActivePanel->onSearchEdit(mActivePanel->getFilterSubString()); + + mTabsCreated = true; } void LLPanelPlaces::changedGlobalPos(const LLVector3d &global_pos) diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index b335f88a48..85bdc2c4e1 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -77,6 +77,8 @@ public: std::string getPlaceInfoType() { return mPlaceInfoType; } + bool tabsCreated() { return mTabsCreated;} + /*virtual*/ S32 notifyParent(const LLSD& info); private: @@ -146,7 +148,12 @@ private: bool isLandmarkEditModeOn; + // Holds info whether "My Landmarks" and "Teleport History" tabs have been created. + bool mTabsCreated; + LLSafeHandle<LLParcelSelection> mParcel; + + boost::signals2::connection mAgentParcelChangedConnection; }; #endif //LL_LLPANELPLACES_H diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index dfa8c75493..52dd70f005 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -39,6 +39,7 @@ #include "llaccordionctrl.h" #include "llaccordionctrltab.h" #include "llflatlistview.h" +#include "llfloatersidepanelcontainer.h" #include "llnotificationsutil.h" #include "lltextbox.h" #include "lltoggleablemenu.h" @@ -221,7 +222,7 @@ void LLTeleportHistoryFlatItem::showPlaceInfoPanel(S32 index) params["id"] = index; params["type"] = "teleport_history"; - LLSideTray::getInstance()->showPanel("panel_places", params); + LLFloaterSidePanelContainer::showPanel("places", params); } void LLTeleportHistoryFlatItem::onProfileBtnClick() @@ -396,7 +397,7 @@ BOOL LLTeleportHistoryPanel::postBuild() mTeleportHistory = LLTeleportHistoryStorage::getInstance(); if (mTeleportHistory) { - mTeleportHistory->setHistoryChangedCallback(boost::bind(&LLTeleportHistoryPanel::onTeleportHistoryChange, this, _1)); + mTeleportHistoryChangedConnection = mTeleportHistory->setHistoryChangedCallback(boost::bind(&LLTeleportHistoryPanel::onTeleportHistoryChange, this, _1)); } mHistoryAccordion = getChild<LLAccordionCtrl>("history_accordion"); diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 3d29454d15..47b607a2f4 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -119,6 +119,8 @@ private: LLContextMenu* mAccordionTabMenu; LLHandle<LLView> mGearMenuHandle; LLMenuButton* mMenuGearButton; + + boost::signals2::connection mTeleportHistoryChangedConnection; }; diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 7087541fc8..b6e32dba78 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -31,6 +31,7 @@ #include "llagent.h" #include "llagentui.h" #include "llclipboard.h" +#include "llfloatersidepanelcontainer.h" #include "lllandmarkactions.h" #include "lllocationinputctrl.h" #include "llnotificationsutil.h" @@ -436,12 +437,11 @@ void LLPanelTopInfoBar::onContextMenuItemClicked(const LLSD::String& item) if(landmark == NULL) { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark")); } else { - LLSideTray::getInstance()->showPanel("panel_places", - LLSD().with("type", "landmark").with("id",landmark->getUUID())); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID())); } } else if (item == "copy") @@ -456,5 +456,5 @@ void LLPanelTopInfoBar::onContextMenuItemClicked(const LLSD::String& item) void LLPanelTopInfoBar::onInfoButtonClicked() { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent")); } diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index f19b54c1d4..87e9bb7b28 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -31,6 +31,7 @@ #include "lltoggleablemenu.h" #include "llappearancemgr.h" +#include "llfloatersidepanelcontainer.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" @@ -44,7 +45,7 @@ // Context menu and Gear menu helper. static void edit_outfit() { - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit")); } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 28ec11d1c7..a356013830 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -32,6 +32,7 @@ #include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llfloatersidepanelcontainer.h" #include "llfolderview.h" #include "llinventorypanel.h" #include "llfiltereditor.h" @@ -456,7 +457,7 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) //static void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data, BOOL disable_camera_switch) { - LLSideTray::getInstance()->showPanel("sidepanel_appearance"); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD()); LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data); if (panel) diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index bd62b5c101..0226896f54 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -34,6 +34,7 @@ #include "llbutton.h" #include "lldate.h" #include "llfirstuse.h" +#include "llfloatersidepanelcontainer.h" #include "llfoldertype.h" #include "llhttpclient.h" #include "llinventorybridge.h" @@ -172,16 +173,20 @@ LLSidepanelInventory::~LLSidepanelInventory() void handleInventoryDisplayInboxChanged() { - LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - - sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); + } } void handleInventoryDisplayOutboxChanged() { - LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - - sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox")); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox")); + } } BOOL LLSidepanelInventory::postBuild() @@ -283,6 +288,9 @@ BOOL LLSidepanelInventory::postBuild() gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged)); gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged)); + // Update the verbs buttons state. + updateVerbs(); + return TRUE; } diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index ed4d278e90..477718d118 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -32,6 +32,7 @@ #include "llcommandhandler.h" #include "llfloaterhelpbrowser.h" #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" #include "llpanellogin.h" #include "llregionhandle.h" @@ -246,7 +247,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL& key["y"] = global_pos.mdV[VY]; key["z"] = global_pos.mdV[VZ]; - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); } } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index b87ca1eaec..cd522c9121 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -538,18 +538,12 @@ bool toggle_show_navigation_panel(const LLSD& newvalue) { bool value = newvalue.asBoolean(); - LLNavigationBar::getInstance()->showNavigationPanel(value); + LLNavigationBar::getInstance()->setVisible(value); gSavedSettings.setBOOL("ShowMiniLocationPanel", !value); return true; } -bool toggle_show_favorites_panel(const LLSD& newvalue) -{ - LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean()); - return true; -} - bool toggle_show_mini_location_panel(const LLSD& newvalue) { bool value = newvalue.asBoolean(); @@ -732,7 +726,6 @@ void settings_setup_listeners() gSavedSettings.getControl("UseDebugMenus")->getSignal()->connect(boost::bind(&show_debug_menus)); gSavedSettings.getControl("AgentPause")->getSignal()->connect(boost::bind(&toggle_agent_pause, _2)); gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2)); - gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); gSavedSettings.getControl("ShowMiniLocationPanel")->getSignal()->connect(boost::bind(&toggle_show_mini_location_panel, _2)); gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(boost::bind(&toggle_updater_service_active, _2)); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b44e7283da..09a50300d0 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -94,6 +94,7 @@ #include "llfloaterscriptlimits.h" #include "llfloatersellland.h" #include "llfloatersettingsdebug.h" +#include "llfloatersidepanelcontainer.h" #include "llfloatersidetraytab.h" #include "llfloatersnapshot.h" #include "llfloatersounddevices.h" @@ -164,6 +165,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterAboutUtil::registerFloater(); LLFloaterReg::add("fast_timers", "floater_fast_timers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFastTimerView>); LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>); + LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>); @@ -227,6 +229,8 @@ 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_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>); @@ -235,6 +239,8 @@ 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>); LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreferenceProxy>); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index ad65a8846c..50fb5a00e4 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -34,7 +34,9 @@ #include "llagent.h" #include "llagentcamera.h" #include "llagentwearables.h" +#include "llfloatersidepanelcontainer.h" #include "llviewerfoldertype.h" +#include "llfloatersidepanelcontainer.h" #include "llfolderview.h" #include "llviewercontrol.h" #include "llconsole.h" @@ -220,7 +222,7 @@ public: // support secondlife:///app/inventory/show if (params[0].asString() == "show") { - LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD()); + LLFloaterSidePanelContainer::showPanel("my_inventory", LLSD()); return true; } @@ -976,7 +978,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) if( gAgentCamera.cameraCustomizeAvatar() ) { // If we're in appearance editing mode, the current tab may need to be refreshed - LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance")); if (panel) { panel->showDefaultSubpart(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0f983ed0d5..5e781e0e4c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -30,6 +30,7 @@ // linden library includes #include "llavatarnamecache.h" // IDEVO #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llcombobox.h" #include "llinventorypanel.h" #include "llnotifications.h" @@ -2588,7 +2589,7 @@ void handle_object_inspect() { LLSD key; key["task"] = "task"; - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); + LLFloaterSidePanelContainer::showPanel("my_inventory", key); } /* @@ -3712,7 +3713,7 @@ void handle_reset_view() if (gAgentCamera.cameraCustomizeAvatar()) { // switching to outfit selector should automagically save any currently edited wearable - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits")); } gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); @@ -5279,7 +5280,7 @@ class LLWorldCreateLandmark : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "create_landmark")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark")); return true; } @@ -5289,7 +5290,7 @@ class LLWorldPlaceProfile : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent")); return true; } @@ -5530,22 +5531,22 @@ void handle_viewer_disable_message_log(void*) void handle_customize_avatar() { - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits")); } void handle_edit_outfit() { - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit")); } void handle_edit_shape() { - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_shape")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_shape")); } void handle_edit_physics() { - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_physics")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_physics")); } void handle_report_abuse() @@ -5615,18 +5616,18 @@ class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) { - std::string panel_name = userdata.asString(); + std::string floater_name = userdata.asString(); - LLPanel* panel = LLSideTray::getInstance()->getPanel(panel_name); + LLPanel* panel = LLFloaterSidePanelContainer::getPanel(floater_name); if (panel) { if (panel->isInVisibleChain()) { - LLSideTray::getInstance()->hidePanel(panel_name); + LLFloaterReg::getInstance(floater_name)->closeFloater(); } else { - LLSideTray::getInstance()->showPanel(panel_name); + LLFloaterReg::getInstance(floater_name)->openFloater(); } } return true; @@ -5637,9 +5638,9 @@ class LLSidetrayPanelVisible : public view_listener_t { bool handleEvent(const LLSD& userdata) { - std::string panel_name = userdata.asString(); + std::string floater_name = userdata.asString(); // Toggle the panel - if (LLSideTray::getInstance()->isPanelActive(panel_name)) + if (LLFloaterReg::getInstance(floater_name)->isInVisibleChain()) { return true; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6435904fee..e5877dcf3a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -61,6 +61,7 @@ #include "llfloaterlandholdings.h" #include "llfloaterpostcard.h" #include "llfloaterpreference.h" +#include "llfloatersidepanelcontainer.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" #include "llinventoryfunctions.h" @@ -1192,9 +1193,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam LLInventoryCategory* parent_folder = gInventory.getCategory(item->getParentUUID()); if ("inventory_handler" == from_name) { - //we have to filter inventory_handler messages to avoid notification displaying - LLSideTray::getInstance()->showPanel("panel_places", - LLSD().with("type", "landmark").with("id", item->getUUID())); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id", item->getUUID())); } else if("group_offer" == from_name) { @@ -1203,7 +1202,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam LLSD args; args["type"] = "landmark"; args["id"] = obj_id; - LLSideTray::getInstance()->showPanel("panel_places", args); + LLFloaterSidePanelContainer::showPanel("places", args); continue; } diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 4798bb536f..b308e952ad 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -32,6 +32,7 @@ #include "llaudioengine.h" #include "llavataractions.h" #include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" #include "llinventorybridge.h" @@ -80,7 +81,7 @@ public: LLSD key; key["type"] = "landmark"; key["id"] = landmark_inv_id; - LLSideTray::getInstance()->showPanel("panel_places", key); + LLFloaterSidePanelContainer::showPanel("places", key); } static void processForeignLandmark(LLLandmark* landmark, const LLUUID& object_id, const LLUUID& notecard_inventory_id, diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6d69932e93..7c930b80c2 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1899,12 +1899,7 @@ void LLViewerWindow::initWorldUI() if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { - navbar->showNavigationPanel(FALSE); - } - - if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel")) - { - navbar->showFavoritesPanel(FALSE); + navbar->setVisible(FALSE); } // Top Info bar @@ -2198,7 +2193,9 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) LLNavigationBar* navbarp = LLUI::getRootView()->findChild<LLNavigationBar>("navigation_bar"); if (navbarp) { - navbarp->setVisible( visible ); + // when it's time to show navigation bar we need to ensure that the user wants to see it + // i.e. ShowNavbarNavigationPanel option is true + navbarp->setVisible( visible && gSavedSettings.getBOOL("ShowNavbarNavigationPanel") ); } } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index d1c0990f90..276e8f462d 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -30,6 +30,7 @@ #include "llagentcamera.h" #include "llagentwearables.h" #include "lldictionary.h" +#include "llfloatersidepanelcontainer.h" #include "lllocaltextureobject.h" #include "llnotificationsutil.h" #include "llviewertexturelist.h" @@ -697,7 +698,7 @@ void LLWearable::removeFromAvatar( LLWearableType::EType type, BOOL upload_bake if(gAgentCamera.cameraCustomizeAvatar()) { - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit")); + LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit")); } gAgentAvatarp->updateVisualParams(); @@ -967,7 +968,7 @@ void LLWearable::revertValues() syncImages(mSavedTEMap, mTEMap); - LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance")); if( panel ) { panel->updateScrollingPanelList(); @@ -1008,7 +1009,7 @@ void LLWearable::saveValues() syncImages(mTEMap, mSavedTEMap); - LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::getPanel("appearance")); if( panel ) { panel->updateScrollingPanelList(); diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml new file mode 100644 index 0000000000..8f97887b3f --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> + +<floater + legacy_header_height="18" + can_resize="true" + height="588" + layout="topleft" + name="floater_my_appearance" + save_rect="true" + single_instance="true" + title="MY APPEARANCE" + width="333"> + <panel + top="18" + class="sidepanel_appearance" + name="main_panel" + filename="sidepanel_appearance.xml" + label="Edit Appearance" + font="SansSerifBold"/> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_my_inventory.xml b/indra/newview/skins/default/xui/en/floater_my_inventory.xml new file mode 100644 index 0000000000..fd03a5324e --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_my_inventory.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<floater + can_close="true" + can_resize="true" + height="570" + help_topic="sidebar_inventory" + min_width="333" + min_height="440" + name="floater_my_inventory" + save_rect="true" + save_visibility="true" + title="My Inventory" + width="333" > + <panel + class="sidepanel_inventory" + name="main_panel" + filename="sidepanel_inventory.xml" + follows="all" + top="0"/> +</floater> 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> diff --git a/indra/newview/skins/default/xui/en/floater_places.xml b/indra/newview/skins/default/xui/en/floater_places.xml new file mode 100644 index 0000000000..d589eb7d20 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_places.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> + +<floater + legacy_header_height="18" + can_resize="true" + height="588" + layout="topleft" + name="floater_places" + save_rect="true" + title="PLACES" + width="333"> + <panel + top="18" + class="panel_places" + name="main_panel" + filename="panel_places.xml" + label="Places" + font="SansSerifBold"/> +</floater> diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 448f10a93c..6ece01b2ba 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -16,7 +16,7 @@ orientation="vertical" top="19"> <layout_panel auto_resize="false" - height="60" + height="34" mouse_opaque="false" name="nav_bar_container" tab_stop="false" diff --git a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml index 3f38d734b9..b517fd7957 100644 --- a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml @@ -9,7 +9,7 @@ visible="false" width="128"> <menu_item_check - label="Show Navigation Bar" + label="Show Navigation & Favorites Bar" layout="topleft" name="ShowNavbarNavigationPanel"> <on_click @@ -20,17 +20,6 @@ parameter="ShowNavbarNavigationPanel" /> </menu_item_check> <menu_item_check - label="Show Favorites Bar" - layout="topleft" - name="ShowNavbarFavoritesPanel"> - <on_click - function="ToggleControl" - parameter="ShowNavbarFavoritesPanel" /> - <on_check - function="CheckControl" - parameter="ShowNavbarFavoritesPanel" /> - </menu_item_check> - <menu_item_check label="Show Mini-Location Bar" layout="topleft" name="ShowMiniLocationPanel"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2e93243b0f..5ec62d82c0 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -75,10 +75,10 @@ visible="true"> <menu_item_check.on_check function="SidetrayPanelVisible" - parameter="sidepanel_inventory" /> + parameter="my_inventory" /> <menu_item_check.on_click function="ShowSidetrayPanel" - parameter="sidepanel_inventory" /> + parameter="my_inventory" /> </menu_item_check> <menu_item_check label="My Gestures" diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 8a7bd53054..719d3531ed 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -5,21 +5,21 @@ bg_opaque_color="MouseGray" follows="left|top|right" focus_root="true" - height="60" + height="34" layout="topleft" name="navigation_bar" chrome="true" - width="600"> + width="800"> <icon follows="all" image_name="NavBar_BG" mouse_opaque="false" name="bg_icon" scale_image="true" - visible="true" + visible="false" left="0" top="0" - height="60" + height="34" width="600"/> <icon follows="all" @@ -30,7 +30,7 @@ visible="false" left="0" top="0" - height="60" + height="34" width="600"/> <icon follows="all" @@ -41,145 +41,153 @@ visible="false" left="0" top="0" - height="60" + height="34" width="600"/> - <panel - background_visible="false" - follows="left|top|right" - top="3" - height="23" - layout="topleft" - name="navigation_panel" - width="600"> - <pull_button - follows="left|top" - direction="down" - height="23" - image_overlay="Arrow_Left_Off" - image_bottom_pad="1" - layout="topleft" - left="10" - name="back_btn" - tool_tip="Go back to previous location" - top="2" - width="31" /> - <pull_button - follows="left|top" - direction="down" - height="23" - image_overlay="Arrow_Right_Off" - image_bottom_pad="1" - layout="topleft" - left_pad="0" - name="forward_btn" - tool_tip="Go forward one location" - top_delta="0" - width="31" /> - <button - follows="left|top" - height="23" - image_bottom_pad="1" - image_overlay="Home_Off" - layout="topleft" - left_pad="7" - name="home_btn" - tool_tip="Teleport to my home location" - top_delta="0" - width="32" /> - <location_input - follows="left|right|top" - halign="right" - height="23" - label="Location" - layout="topleft" - left_pad="7" - max_chars="254" - mouse_opaque="false" - name="location_combo" - top_delta="0" - width="266"> - <combo_list - mouse_wheel_opaque="true"/> - <!-- *TODO: Delete. Let the location_input use the correct art sizes. - <location_input.add_landmark_button - height="18" - name="location_combo_add" - width="20" /> - <location_input.info_button - height="18" - name="location_combo_info" - width="20" /> - --> - </location_input> - <!-- <button --> - <!-- follows="right|top" --> - <!-- height="20" --> - <!-- image_disabled="TextField_Search_Off" --> - <!-- image_disabled_selected="TextField_Search_Off" --> - <!-- image_hover_selected="TextField_Search_Off" --> - <!-- image_hover_unselected="TextField_Search_Off" --> - <!-- image_selected="TextField_Search_Off" --> - <!-- image_unselected="TextField_Search_Off" --> - <!-- layout="topleft" --> - <!-- left_pad="5" --> - <!-- mouse_opaque="false" --> - <!-- name="search_bg" --> - <!-- top_delta="0" --> - <!-- width="168" /> --> - <search_combo_box - follows="right|top" - halign="right" - height="23" - label="Search" - layout="topleft" - right="-10" - mouse_opaque="false" - name="search_combo_box" - tool_tip="Search" - top_delta="0" - width="200" > - <combo_editor - label="Search [SECOND_LIFE]" - name="search_combo_editor"/> - <combo_list - draw_border="true" - border.highlight_light_color="FocusColor" - border.highlight_dark_color="FocusColor" - border.shadow_light_color="FocusColor" - border.shadow_dark_color="FocusColor"/> - </search_combo_box> - </panel> - <favorites_bar - follows="left|right|top" - font="SansSerifSmall" - height="15" - layout="topleft" - left="0" - name="favorite" - image_drag_indication="Accordion_ArrowOpened_Off" - bottom="55" - tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" - width="590"> - <label - follows="left|top" - height="15" - layout="topleft" - left="10" - name="favorites_bar_label" - text_color="LtGray" - tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" - top="12" - width="102"> - Favorites Bar - </label> - <chevron_button name=">>" - image_unselected="TabIcon_Close_Off" - image_selected="TabIcon_Close_Off" - tab_stop="false" - follows="left|bottom" - tool_tip="Show more of My Favorites" - width="15" - top="15" - height="15"/> - </favorites_bar> + <layout_stack + use_border="true" + bevel_style="none" + follows="all" + height="34" + layout="topleft" + left="0" + mouse_opaque="false" + name="nvp_stack" + orientation="horizontal" + top="0" + width="800"> + <layout_panel + follows="top|left" + layout="topleft" + auto_resize="true" + user_resize="true" + min_width="340" + name="navigation_layout_panel" + width="340"> + <panel + background_visible="false" + follows="left|top|right" + top="3" + height="23" + layout="topleft" + left="0" + name="navigation_panel" + width="340"> + <pull_button + follows="left|top" + direction="down" + height="23" + image_overlay="Arrow_Left_Off" + image_bottom_pad="1" + layout="topleft" + left="10" + name="back_btn" + tool_tip="Go back to previous location" + top="2" + width="31" /> + <pull_button + follows="left|top" + direction="down" + height="23" + image_overlay="Arrow_Right_Off" + image_bottom_pad="1" + layout="topleft" + left_pad="0" + name="forward_btn" + tool_tip="Go forward one location" + top_delta="0" + width="31" /> + <button + follows="left|top" + height="23" + image_bottom_pad="1" + image_overlay="Home_Off" + layout="topleft" + left_pad="7" + name="home_btn" + tool_tip="Teleport to my home location" + top_delta="0" + width="32"/> + <location_input + follows="all" + halign="right" + height="23" + label="Location" + layout="topleft" + left_pad="7" + max_chars="254" + mouse_opaque="false" + name="location_combo" + top_delta="0" + width="215"> + <combo_list + mouse_wheel_opaque="true"/> + </location_input> + </panel> + </layout_panel> + + <layout_panel + auto_resize="false" + layout="topleft" + max_width="5" + min_width="5" + name="nav_bar_resize_handle_panel" + user_resize="false" + width="5"> + <icon + follows="top|right" + height="25" + image_name="ChatBarHandle" + layout="topleft" + left="-6" + name="resize_handle" + top="4" + width="5" /> + </layout_panel> + + <layout_panel + follows="top|left" + layout="topleft" + auto_resize="true" + user_resize="true" + min_width="335" + name="favorites_layout_panel" + width="335"> + <favorites_bar + follows="left|right|top" + font="SansSerifSmall" + height="20" + layout="topleft" + left="0" + name="favorite" + image_drag_indication="Accordion_ArrowOpened_Off" + tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" + width="331"> + <label + follows="left|top" + height="15" + layout="topleft" + left="10" + name="favorites_bar_label" + text_color="LtGray" + tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" + top="12" + width="102"> + Favorites Bar + </label> + <!-- More button actually is a text box. --> + <more_button + follows="left|bottom" + font.name="SansSerifSmall" + font.style="UNDERLINE" + name=">>" + tab_stop="false" + tool_tip="Show more of My Favorites" + top="15" + width="50"> + More... + </more_button> + </favorites_bar> + </layout_panel> + + </layout_stack> </panel> |