diff options
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 10 | ||||
-rwxr-xr-x | indra/newview/llnavigationbar.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.h | 3 | ||||
-rw-r--r-- | indra/newview/llpanelplaces.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 26 |
7 files changed, 49 insertions, 9 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index c76920c9ce..6e01c82fe1 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -847,7 +847,7 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update) int j = first_changed_item_index; for (; j < mItems.size(); j++) { - last_new_button = createButton(mItems[j], button_params, last_right_edge); + last_new_button = createButton(mItems[j], button_params, j == 0? last_right_edge + 4 : last_right_edge); if (!last_new_button) { break; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 179c64b5c5..19dbbeb60e 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -58,6 +58,7 @@ #include "llweb.h" #include "llhints.h" +#include "llfloatersidepanelcontainer.h" #include "llinventorymodel.h" #include "lllandmarkactions.h" @@ -290,6 +291,7 @@ BOOL LLNavigationBar::postBuild() mBtnBack = getChild<LLPullButton>("back_btn"); mBtnForward = getChild<LLPullButton>("forward_btn"); mBtnHome = getChild<LLButton>("home_btn"); + mBtnLandmarks = getChild<LLButton>("landmarks_btn"); mCmbLocation= getChild<LLLocationInputCtrl>("location_combo"); @@ -305,6 +307,8 @@ BOOL LLNavigationBar::postBuild() mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this)); + mBtnLandmarks->setClickedCallback(boost::bind(&LLNavigationBar::onLandmarksButtonClicked, this)); + mCmbLocation->setCommitCallback(boost::bind(&LLNavigationBar::onLocationSelection, this)); mTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> @@ -401,6 +405,12 @@ void LLNavigationBar::onHomeButtonClicked() gAgent.teleportHome(); } +void LLNavigationBar::onLandmarksButtonClicked() +{ + LLFloaterReg::toggleInstanceOrBringToFront("places"); + LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "open_landmark_tab")); +} + void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata) { int idx = userdata.asInteger(); diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index a44c6dd699..646911a62c 100755 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -119,6 +119,7 @@ private: void onNavigationButtonHeldUp(LLButton* nav_button); void onForwardButtonClicked(); void onHomeButtonClicked(); + void onLandmarksButtonClicked(); void onLocationSelection(); void onLocationPrearrange(const LLSD& data); void onTeleportFinished(const LLVector3d& global_agent_pos); @@ -144,6 +145,7 @@ private: LLPullButton* mBtnBack; LLPullButton* mBtnForward; LLButton* mBtnHome; + LLButton* mBtnLandmarks; LLLocationInputCtrl* mCmbLocation; LLRect mDefaultNbRect; LLRect mDefaultFpRect; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index ccd8497484..d763a6e1ec 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -65,6 +65,7 @@ static const std::string ADD_BUTTON_NAME = "add_btn"; static const std::string ADD_FOLDER_BUTTON_NAME = "add_folder_btn"; static const std::string TRASH_BUTTON_NAME = "trash_btn"; +static const std::string TAB_FAVORITES = "tab_favorites"; // helper functions static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::string& string); @@ -383,7 +384,7 @@ void LLLandmarksPanel::updateShowFolderState() void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus) { - if (selectItemInAccordionTab(mFavoritesInventoryPanel, "tab_favorites", obj_id, take_keyboard_focus)) + if (selectItemInAccordionTab(mFavoritesInventoryPanel, TAB_FAVORITES, obj_id, take_keyboard_focus)) { return; } @@ -506,6 +507,12 @@ void LLLandmarksPanel::updateSortOrder(LLInventoryPanel* panel, bool byDate) } } +void LLLandmarksPanel::resetSelection() +{ + getChild<LLAccordionCtrlTab>(TAB_FAVORITES)->setDisplayChildren(true); + getChild<LLAccordionCtrlTab>(TAB_FAVORITES)->showAndFocusHeader(); +} + // virtual void LLLandmarksPanel::processParcelInfo(const LLParcelData& parcel_data) { @@ -550,7 +557,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel() initLandmarksPanel(mFavoritesInventoryPanel); mFavoritesInventoryPanel->getFilter().setEmptyLookupMessage("FavoritesNoMatchingItems"); - initAccordion("tab_favorites", mFavoritesInventoryPanel, true); + initAccordion(TAB_FAVORITES, mFavoritesInventoryPanel, true); } void LLLandmarksPanel::initLandmarksInventoryPanel() diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index c11cbe05ae..2031501f5d 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -82,6 +82,8 @@ public: void updateMenuVisibility(LLUICtrl* menu); + void resetSelection(); + protected: /** * @return true - if current selected panel is not null and selected item is a landmark @@ -105,6 +107,7 @@ protected: void updateSortOrder(LLInventoryPanel* panel, bool byDate); + //LLRemoteParcelInfoObserver interface /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); /*virtual*/ void setParcelID(const LLUUID& parcel_id); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 53870fb5c7..1f3f58ffa3 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -1056,6 +1056,10 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) { landmarks_panel->setItemSelected(mItem->getUUID(), TRUE); } + else + { + landmarks_panel->resetSelection(); + } } } } 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 c7edba21f8..2d5f22d0d8 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -151,7 +151,7 @@ layout="topleft" auto_resize="true" user_resize="true" - min_width="185" + min_width="237" name="favorites_layout_panel" width="320"> <icon @@ -163,18 +163,32 @@ name="resize_handle" top="4" width="5" /> - + <button + height="16" + width="16" + layout="topleft" + mouse_opaque="true" + follows="left|top" + name="landmarks_btn" + tool_tip="My Landmarks" + top="9" + left_pad="10" + image_selected="Icon_Gear" + image_pressed="Icon_Gear" + image_unselected="Icon_Gear" + is_toggle="true"> + </button> <favorites_bar follows="left|right|top" font="SansSerifSmall" height="20" layout="topleft" - left="0" + left_pad="0" top="4" name="favorite" image_drag_indication="Accordion_ArrowOpened_Off" tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" - width="320"> + width="268"> <label follows="left|top" height="13" @@ -185,8 +199,8 @@ tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" top="13" valign="bottom" - width="102"> - Favorites Bar + width="205"> + Your saved locations will appear here. </label> <!-- More button actually is a text box. --> <more_button |