From 5baf0de6a396b120aba4e2351ed5bff70f2562ef Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Mon, 19 Sep 2011 19:13:39 +0300 Subject: EXP-1203 FIXED (As a FUI user, I want the address bar and favorites to be on one line) - Relocated address bar, combined with favorite landmarks EXP-1208 - Added dragger to change amount of space allocated to address bar and favorites bar EXP-1217 - Modified Favorites ->> More spillover EXP-1218 - Combined context menu menuitems for favorites & address bars EXP-1219 --- indra/newview/llfavoritesbar.cpp | 8 +- indra/newview/llfavoritesbar.h | 4 +- indra/newview/llnavigationbar.cpp | 148 ---------- indra/newview/llnavigationbar.h | 3 - indra/newview/llviewercontrol.cpp | 9 +- indra/newview/llviewerwindow.cpp | 11 +- indra/newview/skins/default/xui/en/main_view.xml | 2 +- .../skins/default/xui/en/menu_hide_navbar.xml | 13 +- .../skins/default/xui/en/panel_navigation_bar.xml | 319 +++++++++++---------- 9 files changed, 188 insertions(+), 329 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 0b17d64eb0..63519b7c21 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -360,7 +360,7 @@ struct LLFavoritesSort LLFavoritesBarCtrl::Params::Params() : image_drag_indication("image_drag_indication"), - chevron_button("chevron_button"), + more_button("more_button"), label("label") { } @@ -389,9 +389,9 @@ 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 (chevron_button_params); + LLTextBox::Params more_button_params(p.more_button); + mChevronButton = LLUICtrlFactory::create (more_button_params); + mChevronButton->setClickedCallback(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this)); addChild(mChevronButton); LLTextBox::Params label_param(p.label); diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 1a28731c4f..3811de3e2f 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -40,7 +40,7 @@ public: struct Params : public LLInitParam::Block { Optional image_drag_indication; - Optional chevron_button; + Optional more_button; Optional label; Params(); }; @@ -135,7 +135,7 @@ private: BOOL mShowDragMarker; LLUICtrl* mLandingTab; LLUICtrl* mLastTab; - LLButton* mChevronButton; + LLTextBox* mChevronButton; LLTextBox* mBarLabel; LLUUID mDragItemId; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 9d54ad7463..133168f0ba 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -736,151 +736,3 @@ int LLNavigationBar::getDefFavBarHeight() { return mDefaultFpRect.getHeight(); } - -void LLNavigationBar::showNavigationPanel(BOOL visible) -{ - bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"); - - LLFavoritesBarCtrl* fb = getChild("favorite"); - LLPanel* navPanel = getChild("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("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..f200253de5 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(); 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/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5893259d96..3665ed4b5b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1885,12 +1885,7 @@ void LLViewerWindow::initWorldUI() if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { - navbar->showNavigationPanel(FALSE); - } - - if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel")) - { - navbar->showFavoritesPanel(FALSE); + navbar->setVisible(FALSE); } // Top Info bar @@ -2196,7 +2191,9 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) LLNavigationBar* navbarp = LLUI::getRootView()->findChild("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/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index a7d1aa963c..688349aa16 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"> - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/minimal/xui/en/floater_help_browser.xml b/indra/newview/skins/minimal/xui/en/floater_help_browser.xml deleted file mode 100644 index 477f210352..0000000000 --- a/indra/newview/skins/minimal/xui/en/floater_help_browser.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - Loading... - - - - - - - - - diff --git a/indra/newview/skins/minimal/xui/en/floater_media_browser.xml b/indra/newview/skins/minimal/xui/en/floater_media_browser.xml deleted file mode 100644 index 4862146c94..0000000000 --- a/indra/newview/skins/minimal/xui/en/floater_media_browser.xml +++ /dev/null @@ -1,242 +0,0 @@ - - - - http://www.secondlife.com - - - http://support.secondlife.com - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/minimal/xui/en/floater_nearby_chat.xml b/indra/newview/skins/minimal/xui/en/floater_nearby_chat.xml deleted file mode 100644 index 74ac885202..0000000000 --- a/indra/newview/skins/minimal/xui/en/floater_nearby_chat.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - diff --git a/indra/newview/skins/minimal/xui/en/floater_side_bar_tab.xml b/indra/newview/skins/minimal/xui/en/floater_side_bar_tab.xml deleted file mode 100644 index 83b1260620..0000000000 --- a/indra/newview/skins/minimal/xui/en/floater_side_bar_tab.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/indra/newview/skins/minimal/xui/en/floater_web_content.xml b/indra/newview/skins/minimal/xui/en/floater_web_content.xml deleted file mode 100644 index 1d9a967d5a..0000000000 --- a/indra/newview/skins/minimal/xui/en/floater_web_content.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/minimal/xui/en/inspect_avatar.xml b/indra/newview/skins/minimal/xui/en/inspect_avatar.xml deleted file mode 100644 index 853d5f8735..0000000000 --- a/indra/newview/skins/minimal/xui/en/inspect_avatar.xml +++ /dev/null @@ -1,206 +0,0 @@ - - - - - -[AGE] - - -[SL_PROFILE] - - - - - - This is my second life description and I really think it is great. But for some reason my description is super extra long because I like to talk a whole lot - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/minimal/xui/en/panel_group_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_group_control_panel.xml deleted file mode 100644 index abddc59296..0000000000 --- a/indra/newview/skins/minimal/xui/en/panel_group_control_panel.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - + -- cgit v1.2.3 From cb699e3f2d64999e9817d0c4df5b7f9484e8e722 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 27 Sep 2011 10:52:47 -0700 Subject: EXP-1252 Opening chat history crashes browser (from dev work in progress) EXP-1253 Entering text in chat bar does not show for other users (dev work in progress) --- indra/newview/llbottomtray.cpp | 6 +++--- indra/newview/llnearbychat.cpp | 39 +++++++-------------------------------- indra/newview/llnearbychat.h | 6 +++--- 3 files changed, 13 insertions(+), 38 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 7a60903950..55c63edd74 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -400,7 +400,7 @@ void LLBottomTray::onMouselookModeOut() { mIsInLiteMode = false; mBottomTrayLite->setVisible(FALSE); - mNearbyChatBar->getChatBox()->setText(mBottomTrayLite->mNearbyChatBar->getChatBox()->getText()); + //mNearbyChatBar->getChatBox()->setText(mBottomTrayLite->mNearbyChatBar->getChatBox()->getText()); setVisible(TRUE); } @@ -413,8 +413,8 @@ void LLBottomTray::onMouselookModeIn() getParent()->addChild(mBottomTrayLite); mBottomTrayLite->setShape(getLocalRect()); - mBottomTrayLite->mNearbyChatBar->getChatBox()->setText(mNearbyChatBar->getChatBox()->getText()); - mBottomTrayLite->mGesturePanel->setVisible(gSavedSettings.getBOOL("ShowGestureButton")); + //mBottomTrayLite->mNearbyChatBar->getChatBox()->setText(mNearbyChatBar->getChatBox()->getText()); + //mBottomTrayLite->mGesturePanel->setVisible(gSavedSettings.getBOOL("ShowGestureButton")); mIsInLiteMode = true; } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 361912a5cb..8d57ae3a32 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -58,7 +58,7 @@ static const S32 RESIZE_BAR_THICKNESS = 3; LLNearbyChat::LLNearbyChat(const LLSD& key) - : LLDockableFloater(NULL, false, false, key) + : LLFloater(key) ,mChatHistory(NULL) { @@ -86,20 +86,9 @@ BOOL LLNearbyChat::postBuild() mChatHistory = getChild("chat_history"); - if(!LLDockableFloater::postBuild()) + if(!LLFloater::postBuild()) return false; - if (getDockControl() == NULL) - { - setDockControl(new LLDockControl( - LLFloaterReg::getInstance("chat_bar"), this, - getDockTongue(), LLDockControl::TOP, boost::bind(&LLNearbyChat::getAllowedRect, this, _1))); - } - - //fix for EXT-4621 - //chrome="true" prevents floater from stilling capture - setIsChrome(true); - //chrome="true" hides floater caption if (mDragHandle) mDragHandle->setTitleVisible(TRUE); @@ -118,20 +107,6 @@ void LLNearbyChat::applySavedVariables() setRect(rect); } } - - - if(!LLFloater::getControlGroup()->controlExists(mDocStateControl)) - { - setDocked(true); - } - else - { - if (mDocStateControl.size() > 1) - { - bool dockState = LLFloater::getControlGroup()->getBOOL(mDocStateControl); - setDocked(dockState); - } - } } std::string appendTime() @@ -229,17 +204,17 @@ void LLNearbyChat::setVisible(BOOL visible) } } - LLDockableFloater::setVisible(visible); + LLFloater::setVisible(visible); } void LLNearbyChat::onOpen(const LLSD& key ) { - LLDockableFloater::onOpen(key); + LLFloater::onOpen(key); } void LLNearbyChat::setRect (const LLRect &rect) { - LLDockableFloater::setRect(rect); + LLFloater::setRect(rect); } void LLNearbyChat::getAllowedRect(LLRect& rect) @@ -367,7 +342,7 @@ BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask) if(mChatHistory) mChatHistory->setFocus(TRUE); - return LLDockableFloater::handleMouseDown(x, y, mask); + return LLFloater::handleMouseDown(x, y, mask); } void LLNearbyChat::draw() @@ -380,5 +355,5 @@ void LLNearbyChat::draw() setTransparencyType(hasFocus() ? TT_ACTIVE : TT_INACTIVE); } - LLDockableFloater::draw(); + LLFloater::draw(); } diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 2ea79797f8..834a31bbf0 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -1,4 +1,4 @@ -/** + /** * @file llnearbychat.h * @brief nearby chat history scrolling panel implementation * @@ -27,14 +27,14 @@ #ifndef LL_LLNEARBYCHAT_H_ #define LL_LLNEARBYCHAT_H_ -#include "lldockablefloater.h" #include "llscrollbar.h" #include "llviewerchat.h" +#include "llfloater.h" class LLResizeBar; class LLChatHistory; -class LLNearbyChat: public LLDockableFloater +class LLNearbyChat: public LLFloater { public: LLNearbyChat(const LLSD& key); -- cgit v1.2.3 From 0f3221e25d6261d7f29b5b37391156c07fde1d0c Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Tue, 27 Sep 2011 21:05:05 +0300 Subject: EXP-1225 FIXED Added a floater for My Inventory side tab. - Replaced calls to LLSideTray with LLFloaterSidePanelContainer. - Added LLFloaterSidePanelContainer::getPanel() for getting custom type panels. --- indra/newview/llavataractions.cpp | 12 +++-- indra/newview/llfloatersidepanelcontainer.cpp | 18 ++++++- indra/newview/llfloatersidepanelcontainer.h | 23 +++++++++ indra/newview/llinspectobject.cpp | 3 +- indra/newview/llinventoryfunctions.cpp | 17 +++++-- indra/newview/llinventorypanel.cpp | 57 ++++++++-------------- indra/newview/llpanelmaininventory.cpp | 12 +++-- indra/newview/llpanelmarketplaceinbox.cpp | 16 +++--- indra/newview/llpanelmarketplaceoutbox.cpp | 17 ++++--- indra/newview/llsidepanelinventory.cpp | 20 +++++--- indra/newview/llviewerfloaterreg.cpp | 1 + indra/newview/llviewerinventory.cpp | 3 +- indra/newview/llviewermenu.cpp | 14 +++--- .../skins/default/xui/en/floater_my_inventory.xml | 20 ++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 4 +- .../skins/minimal/xui/en/panel_bottomtray.xml | 2 +- 16 files changed, 158 insertions(+), 81 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_my_inventory.xml (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 4cdfcea64e..efb46166b8 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); @@ -696,9 +696,11 @@ std::set LLAvatarActions::getInventorySelectedUUIDs() if (inventory_selected_uuids.empty()) { - LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel("sidepanel_inventory"); - - inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList(); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("my_inventory"); + if (sidepanel_inventory) + { + inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList(); + } } return inventory_selected_uuids; diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index cf66fd1792..c73ec90a12 100644 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -33,6 +33,9 @@ #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) { @@ -48,7 +51,7 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer() void LLFloaterSidePanelContainer::onOpen(const LLSD& key) { - getChild("main_panel")->onOpen(key); + getChild(sMainPanelName)->onOpen(key); } LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params) @@ -82,6 +85,17 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance(floater_name); if (floaterp) { - floaterp->openChildPanel("main_panel", panel_name); + floaterp->openChildPanel(sMainPanelName, panel_name); } } + +LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name) +{ + LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance(floater_name); + if (floaterp) + { + return floaterp->findChild(panel_name, true); + } + + return NULL; +} diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h index 7b4e7643ae..0d17a14c0b 100644 --- a/indra/newview/llfloatersidepanelcontainer.h +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -51,6 +51,29 @@ public: 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 + static T* getPanel(const std::string& floater_name, const std::string& panel_name = sMainPanelName) + { + T* panel = dynamic_cast(getPanel(floater_name, panel_name)); + if (!panel) + { + llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl; + } + return panel; + } + +private: + static const std::string sMainPanelName; }; #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/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(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("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 173e5c6ae6..c4f810fc93 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" @@ -1071,10 +1072,9 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data) BOOL is_inventorysp_active() { - if (!LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")) return FALSE; - LLSidepanelInventory *inventorySP = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - if (!inventorySP) return FALSE; - return inventorySP->isMainInventoryPanelActive(); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("my_inventory"); + if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return FALSE; + return sidepanel_inventory->isMainInventoryPanelActive(); } // static @@ -1084,34 +1084,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(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("my_inventory"); + + // A. If the inventory side panel floater is open, use that preferably. + if (is_inventorysp_active()) { - LLSidepanelInventory *inventorySP = - dynamic_cast(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) @@ -1141,14 +1131,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(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/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("sidepanel_inventory"); - + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("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(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel("my_inventory"); return parent ? parent->canShare() : FALSE; } diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 2cb91f771f..a412eabc0a 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(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("my_inventory"); sidepanel_inventory->updateVerbs(); } @@ -112,9 +113,11 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel() void LLPanelMarketplaceInbox::onFocusReceived() { - LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel("sidepanel_inventory"); - - sidepanel_inventory->clearSelections(true, false, true); + LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->clearSelections(true, false, true); + } gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString()); } @@ -185,9 +188,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 839369bffe..f0a4b9898d 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("sidepanel_inventory"); - - sidepanel_inventory->clearSelections(true, true, false); + LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->clearSelections(true, true, false); + } } void LLPanelMarketplaceOutbox::onSelectionChange() { - LLSidepanelInventory* sidepanel_inventory = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - - sidepanel_inventory->updateVerbs(); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->updateVerbs(); + } } LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel() diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 9814e5b81a..e223de5469 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(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - - sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("my_inventory"); + if (sidepanel_inventory) + { + sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); + } } void handleInventoryDisplayOutboxChanged() { - LLSidepanelInventory* sidepanel_inventory = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); - - sidepanel_inventory->enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox")); + LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("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/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b30ef11978..bca166e390 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -223,6 +223,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mute_object_by_name", "floater_mute_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("my_inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("my_profile", "floater_my_profile.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index ad65a8846c..d798f1900f 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -35,6 +35,7 @@ #include "llagentcamera.h" #include "llagentwearables.h" #include "llviewerfoldertype.h" +#include "llfloatersidepanelcontainer.h" #include "llfolderview.h" #include "llviewercontrol.h" #include "llconsole.h" @@ -220,7 +221,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; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 63d6e0ac30..a71900167c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2634,7 +2634,7 @@ void handle_object_inspect() { LLSD key; key["task"] = "task"; - LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); + LLFloaterSidePanelContainer::showPanel("my_inventory", key); } /* @@ -5661,18 +5661,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; @@ -5683,9 +5683,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/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 @@ + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 36ebe73753..2e9a66de5b 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -67,10 +67,10 @@ visible="true"> + parameter="my_inventory" /> + parameter="my_inventory" /> + parameter="people" /> Date: Tue, 27 Sep 2011 22:06:56 +0300 Subject: EXP-1226 FIXED (Create and register a floater for Appearance side tab) - Added xml for a new floater Appearance and registred it in the floaterreg - Removed side tray dependencies - Added static helper method: LLFloaterSidePanelContainer::getPanel --- indra/newview/llagentwearables.cpp | 3 ++- indra/newview/llappearancemgr.cpp | 9 +++++---- indra/newview/llavataractions.cpp | 3 ++- indra/newview/llcofwearables.cpp | 5 +++-- indra/newview/llfloatersidepanelcontainer.cpp | 18 ++++++++++++++++-- indra/newview/llfloatersidepanelcontainer.h | 5 +++++ indra/newview/llinventorybridge.cpp | 2 +- indra/newview/lloutfitslist.cpp | 3 ++- indra/newview/llpaneloutfitsinventory.cpp | 8 ++++---- indra/newview/llpanelwearing.cpp | 3 ++- indra/newview/llsidepanelappearance.cpp | 3 ++- indra/newview/llviewerfloaterreg.cpp | 1 + indra/newview/llviewerinventory.cpp | 3 ++- indra/newview/llviewermenu.cpp | 10 +++++----- indra/newview/llwearable.cpp | 7 ++++--- .../skins/default/xui/en/floater_my_appearance.xml | 20 ++++++++++++++++++++ 16 files changed, 76 insertions(+), 27 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_my_appearance.xml (limited to 'indra/newview') 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(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + dynamic_cast(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(LLSideTray::getInstance()->getPanel("outfitslist_tab")); + dynamic_cast(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..db5bbf7167 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" @@ -462,7 +463,7 @@ namespace action_give_inventory */ static LLInventoryPanel* get_outfit_editor_inventory_panel() { - LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); + LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); if (NULL == panel_outfit_edit) return NULL; LLInventoryPanel* inventory_panel = panel_outfit_edit->findChild("folder_view"); 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 (LLSideTray::getInstance()->getPanel( + dynamic_cast (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(LLSideTray::getInstance()->getPanel("panel_outfit_edit")); + LLPanelOutfitEdit* panel_oe = dynamic_cast(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/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index cff46e80eb..ab874e4b9f 100644 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -33,6 +33,9 @@ #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) { @@ -48,7 +51,7 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer() void LLFloaterSidePanelContainer::onOpen(const LLSD& key) { - getChild("main_panel")->onOpen(key); + getChild(sMainPanelName)->onOpen(key); } LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params) @@ -82,6 +85,17 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance(floater_name); if (floaterp) { - floaterp->openChildPanel("main_panel", panel_name); + floaterp->openChildPanel(sMainPanelName, panel_name); } } + +LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name) +{ + LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance(floater_name); + if (floaterp) + { + return floaterp->findChild(panel_name, true); + } + + return NULL; +} diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h index 7b4e7643ae..5c05f26f45 100644 --- a/indra/newview/llfloatersidepanelcontainer.h +++ b/indra/newview/llfloatersidepanelcontainer.h @@ -42,6 +42,9 @@ */ class LLFloaterSidePanelContainer : public LLFloater { +private: + static const std::string sMainPanelName; + public: LLFloaterSidePanelContainer(const LLSD& key, const Params& params = getDefaultParams()); ~LLFloaterSidePanelContainer(); @@ -51,6 +54,8 @@ public: 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); }; #endif // LL_LLFLOATERSIDEPANELCONTAINER_H diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0b3d6d8030..b6041c7f31 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4781,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/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/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(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); + return dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfits_inventory")); } ////////////////////////////////////////////////////////////////////////////////// @@ -319,8 +320,7 @@ void LLPanelOutfitsInventory::onWearablesLoading() // static LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP() { - static LLSidepanelAppearance* panel_appearance = - dynamic_cast - (LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance* panel_appearance = + dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance")); return panel_appearance; } 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(data); if (panel) diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b28373c6d5..665e0a2bd6 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -161,6 +161,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterAboutUtil::registerFloater(); LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index ad65a8846c..6b5b47d0db 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -34,6 +34,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llagentwearables.h" +#include "llfloatersidepanelcontainer.h" #include "llviewerfoldertype.h" #include "llfolderview.h" #include "llviewercontrol.h" @@ -976,7 +977,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(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance")); if (panel) { panel->showDefaultSubpart(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 63d6e0ac30..1dd5b05818 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3758,7 +3758,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); @@ -5576,22 +5576,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() 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(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance")); if( panel ) { panel->updateScrollingPanelList(); @@ -1008,7 +1009,7 @@ void LLWearable::saveValues() syncImages(mTEMap, mSavedTEMap); - LLSidepanelAppearance *panel = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + LLSidepanelAppearance *panel = dynamic_cast(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 @@ + + + + + -- cgit v1.2.3 From b6feeea2b550b981dbb04558902020e8cae16f7b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 27 Sep 2011 12:40:06 -0700 Subject: * Updated toybox to center bottom button and add delimeter --- indra/newview/skins/default/xui/en/floater_toybox.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 60a39b0bff..092eddaa53 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -46,6 +46,7 @@ - + top="85" /> + + -- cgit v1.2.3 From c7f5aebbb71228b705059be248e82e83ee0f9475 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 27 Sep 2011 15:41:41 -0700 Subject: Nearby chat panel --- .../skins/default/xui/en/panel_nearby_chat.xml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 indra/newview/skins/default/xui/en/panel_nearby_chat.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml new file mode 100644 index 0000000000..f766236b2e --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml @@ -0,0 +1,35 @@ + + + + + -- cgit v1.2.3 From bce16356c9e1fb76bd92a3530375e4c6c7a5430a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Sep 2011 17:47:52 -0700 Subject: fixed wobble when toggling inbox/outbox --- indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 7a176ff367..2b5e3143a4 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -67,6 +67,8 @@ top="0" orientation="vertical" name="inbox_outbox_layout_stack" + open_time_constant="0.02" + close_time_constant="0.02" height="235" width="330"> Date: Tue, 27 Sep 2011 19:06:02 -0700 Subject: EXP-1258 WIP toggle buttons between icons and icons+text modes fixed button layout for icon+text layout stack now uses floating point precision to avoid clamping panels to 0 --- indra/newview/skins/default/xui/en/floater_test_toolbar.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_test_toolbar.xml b/indra/newview/skins/default/xui/en/floater_test_toolbar.xml index fbfbe51a69..067c1fed82 100644 --- a/indra/newview/skins/default/xui/en/floater_test_toolbar.xml +++ b/indra/newview/skins/default/xui/en/floater_test_toolbar.xml @@ -8,6 +8,7 @@ translate="false" width="500"> Date: Wed, 28 Sep 2011 15:27:34 -0700 Subject: EXP-1262 Hitting single letters reserved for shortcuts inworld opens chat but not associated shortcuts (like Mouselook and Fly) EXP-1266 Communicate > Nearby Chat menu item does not bring up chat floater --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9a06423422..148b80e817 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1493,7 +1493,7 @@ Type S32 Value - 1 + 0 ChatBubbleOpacity diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2e93243b0f..923430d6fd 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -227,10 +227,10 @@ use_mac_ctrl="true"> + parameter="chat_bar" /> + parameter="chat_bar" /> Date: Wed, 28 Sep 2011 15:27:53 -0700 Subject: removing old xml nearby chat --- .../skins/default/xui/en/floater_nearby_chat.xml | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 indra/newview/skins/default/xui/en/floater_nearby_chat.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml deleted file mode 100644 index ab966dbb0e..0000000000 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - -- cgit v1.2.3 From 21543fdf26e8104d00bd683bdff5185d6dd620ef Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 28 Sep 2011 16:23:04 -0700 Subject: EXP-1257 : Implemented loading of toolbar settings per user account. Also factorize a bit and clean up the related saveToolbars code. --- indra/newview/llviewerwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7c930b80c2..6c9ee17a76 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1950,9 +1950,11 @@ void LLViewerWindow::initWorldUI() buttons_panel->setFollowsAll(); buttons_panel_container->addChild(buttons_panel); - // Make the toolbars visible + // Load and make the toolbars visible + // Note: we need to load the toolbars only *after* the user is logged in and IW if (gToolBarView) { + gToolBarView->loadToolbars(); gToolBarView->setVisible(TRUE); } } -- cgit v1.2.3 From fdf042bdb9aeefa209694e04d4012a3a1f911a52 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 28 Sep 2011 16:54:34 -0700 Subject: EXP-1205 PROGRESS -- As a User, I want a toybox which will contain all buttons that I can d&d into the toolbars EXP-1233 FIX -- Populate the toybox floater window with all FUI toolbar buttons indicated as such in the "commands.xml" definition. EXP-1267 FIX -- Enable/disable buttons in the toybox * Hooked up button callbacks to the toolbar buttons * Fixed toybox button enable/disable to function properly and live update as buttons change states. * Removed the toybox toolbar background image Reviewed by Leyla --- indra/newview/app_settings/commands.xml | 42 +++++++++++----------- indra/newview/llfloatertoybox.cpp | 19 +++++++--- .../skins/default/xui/en/floater_toybox.xml | 4 ++- 3 files changed, 38 insertions(+), 27 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 4a33b24075..5fbd9248c1 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -6,7 +6,7 @@ label_ref="Command_Avatar_Label" tooltip_ref="Command_Avatar_Tooltip" function="Floater.ToolbarToggle" - param="avatar" + parameter="avatar" /> diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index beb928ea36..c3fa322f85 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -67,9 +67,6 @@ BOOL LLFloaterToybox::postBuild() if (command->availableInToybox()) { mToolBar->addCommand(command->id()); - - llassert(gToolBarView != NULL); - mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id())); } } @@ -93,17 +90,29 @@ void LLFloaterToybox::onClose(bool app_quitting) void LLFloaterToybox::draw() { + llassert(gToolBarView != NULL); + + LLCommandManager& cmdMgr = LLCommandManager::instance(); + + for (U32 i = 0; i < cmdMgr.commandCount(); i++) + { + LLCommand * command = cmdMgr.getCommand(i); + + if (command->availableInToybox()) + { + mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id())); + } + } + LLFloater::draw(); } void LLFloaterToybox::onFocusReceived() { - } void LLFloaterToybox::onBtnRestoreDefaults() { - } diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 092eddaa53..feb19571b2 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -59,7 +59,9 @@ read_only="true" right="-20" side="top" - top="85" /> + top="85"> + + Date: Thu, 29 Sep 2011 21:43:07 +0300 Subject: EXP-1209 FIXED Sidetray removed. - Removed all sidetray dependencies and the sidetray itself. - Also removed LLFloaterSidetrayTab and LLSidetrayListener as unused. --- indra/newview/CMakeLists.txt | 6 - indra/newview/app_settings/settings.xml | 11 - indra/newview/llagentwearables.cpp | 1 - indra/newview/llappearancemgr.cpp | 4 +- indra/newview/llappviewer.cpp | 7 - indra/newview/llavataractions.cpp | 1 - indra/newview/llbottomtray.cpp | 1 - indra/newview/llchathistory.cpp | 2 - indra/newview/llcofwearables.cpp | 8 - indra/newview/llfavoritesbar.cpp | 1 - indra/newview/llfloaterpreference.cpp | 7 +- indra/newview/llfloatersidetraytab.cpp | 52 - indra/newview/llfloatersidetraytab.h | 49 - indra/newview/llgroupactions.cpp | 1 - indra/newview/llimfloater.cpp | 38 - indra/newview/llimfloater.h | 4 - indra/newview/llinspectobject.cpp | 1 - indra/newview/llinventorybridge.cpp | 1 - indra/newview/llinventoryfunctions.cpp | 1 - indra/newview/llinventorypanel.cpp | 1 - indra/newview/lllocationinputctrl.cpp | 1 - indra/newview/llnavigationbar.cpp | 1 - indra/newview/llnearbychat.cpp | 1 - indra/newview/lloutfitslist.cpp | 1 - indra/newview/llpanelblockedlist.cpp | 1 - indra/newview/llpanelgroup.cpp | 1 - indra/newview/llpanelimcontrolpanel.cpp | 1 - indra/newview/llpanellandmarks.cpp | 1 - indra/newview/llpanelmaininventory.cpp | 1 - indra/newview/llpanelmarketplaceinbox.cpp | 8 - indra/newview/llpanelmarketplaceinbox.h | 4 +- indra/newview/llpanelmarketplaceoutbox.cpp | 1 - indra/newview/llpanelme.cpp | 14 - indra/newview/llpanelobjectinventory.cpp | 1 - indra/newview/llpaneloutfitsinventory.cpp | 1 - indra/newview/llpanelpeople.cpp | 3 +- indra/newview/llpanelplaces.cpp | 1 - indra/newview/llpanelteleporthistory.cpp | 1 - indra/newview/llpaneltopinfobar.cpp | 1 - indra/newview/llpaneltopinfobar.h | 2 +- indra/newview/llpanelwearing.cpp | 1 - indra/newview/llscreenchannel.cpp | 41 +- indra/newview/llscreenchannel.h | 1 - indra/newview/llsidepanelappearance.cpp | 2 - indra/newview/llsidepanelinventory.cpp | 5 +- indra/newview/llsidepanelinventory.h | 2 +- indra/newview/llsidetray.cpp | 1489 -------------------- indra/newview/llsidetray.h | 260 ---- indra/newview/llsidetraylistener.cpp | 179 --- indra/newview/llsidetraylistener.h | 53 - indra/newview/llstartup.cpp | 1 - indra/newview/llurldispatcher.cpp | 1 - indra/newview/llviewerfloaterreg.cpp | 2 - indra/newview/llviewerinventory.cpp | 1 - indra/newview/llviewermenu.cpp | 45 +- indra/newview/llviewermessage.cpp | 5 +- indra/newview/llviewertexteditor.cpp | 1 - indra/newview/llviewerwindow.cpp | 27 - indra/newview/llviewerwindow.h | 2 - indra/newview/llwearable.cpp | 1 - indra/newview/llworldview.cpp | 61 - indra/newview/skins/default/xui/en/main_view.xml | 19 - indra/newview/skins/default/xui/en/menu_login.xml | 8 - .../default/xui/en/panel_preferences_move.xml | 10 - 64 files changed, 29 insertions(+), 2431 deletions(-) delete mode 100644 indra/newview/llfloatersidetraytab.cpp delete mode 100644 indra/newview/llfloatersidetraytab.h delete mode 100644 indra/newview/llsidetray.cpp delete mode 100644 indra/newview/llsidetray.h delete mode 100644 indra/newview/llsidetraylistener.cpp delete mode 100644 indra/newview/llsidetraylistener.h delete mode 100644 indra/newview/llworldview.cpp (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 59e1ca10e6..c488d51ba5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -229,7 +229,6 @@ set(viewer_SOURCE_FILES llfloatersellland.cpp llfloatersettingsdebug.cpp llfloatersidepanelcontainer.cpp - llfloatersidetraytab.cpp llfloatersnapshot.cpp llfloatersounddevices.cpp llfloatertelehub.cpp @@ -442,8 +441,6 @@ set(viewer_SOURCE_FILES llsidepanelinventorysubpanel.cpp llsidepaneliteminfo.cpp llsidepaneltaskinfo.cpp - llsidetray.cpp - llsidetraylistener.cpp llsidetraypanelcontainer.cpp llsky.cpp llslurl.cpp @@ -794,7 +791,6 @@ set(viewer_HEADER_FILES llfloatersellland.h llfloatersettingsdebug.h llfloatersidepanelcontainer.h - llfloatersidetraytab.h llfloatersnapshot.h llfloatersounddevices.h llfloatertelehub.h @@ -1002,8 +998,6 @@ set(viewer_HEADER_FILES llsidepanelinventorysubpanel.h llsidepaneliteminfo.h llsidepaneltaskinfo.h - llsidetray.h - llsidetraylistener.h llsidetraypanelcontainer.h llsky.h llslurl.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 148b80e817..3d3185600b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9921,17 +9921,6 @@ Value 0 - SidebarCameraMovement - - Comment - Reflects world rect changing while changing sidebar visibility. - Persist - 1 - Type - Boolean - Value - 0 - GroupListShowIcons Comment diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 404cd8e5b6..ccbf6bf932 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -43,7 +43,6 @@ #include "llnotificationsutil.h" #include "lloutfitobserver.h" #include "llsidepanelappearance.h" -#include "llsidetray.h" #include "lltexlayer.h" #include "lltooldraganddrop.h" #include "llviewerregion.h" diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c638f881a5..e5369dc2b8 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -44,7 +44,6 @@ #include "lloutfitslist.h" #include "llselectmgr.h" #include "llsidepanelappearance.h" -#include "llsidetray.h" #include "llviewerobjectlist.h" #include "llvoavatar.h" #include "llvoavatarself.h" @@ -2466,7 +2465,8 @@ public: // add may be processed after login process is finished if (mShowPanel) { - LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + LLFloaterSidePanelContainer::showPanel("appearance", "panel_outfits_inventory", key); + } LLOutfitsList *outfits_list = dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance", "outfitslist_tab")); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 43c8750b02..7b75bbf430 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,7 +81,6 @@ #include "llviewermenufile.h" #include "llvoicechannel.h" #include "llvoavatarself.h" -#include "llsidetray.h" #include "llurlmatch.h" #include "lltextutil.h" #include "lllogininstance.h" @@ -3499,8 +3498,6 @@ void LLAppViewer::requestQuit() gFloaterView->closeAllChildren(true); } - LLSideTray::getInstance()->notifyChildren(LLSD().with("request","quit")); - send_stats(); gLogoutTimer.reset(); @@ -4559,10 +4556,6 @@ void LLAppViewer::idleShutdown() return; } - if (LLSideTray::getInstance()->notifyChildren(LLSD().with("request","wait_quit"))) - { - return; - } diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index fb7517a98b..b14c02a5d6 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -61,7 +61,6 @@ #include "llpaneloutfitedit.h" #include "llpanelprofile.h" #include "llrecentpeople.h" -#include "llsidetray.h" #include "lltrans.h" #include "llviewercontrol.h" #include "llviewerobjectlist.h" diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 19061c55ca..98712f1334 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -48,7 +48,6 @@ #include "llimfloater.h" // for LLIMFloater #include "llnearbychatbar.h" #include "llnearbychatbarlistener.h" -#include "llsidetray.h" #include "llspeakbutton.h" #include "llsplitbutton.h" #include "llsyswellwindow.h" diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d6773b8b29..7a444edd43 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -59,8 +59,6 @@ #include "llviewercontrol.h" -#include "llsidetray.h"//for blocked objects panel - static LLDefaultChildRegistry::Register r("chat_history"); const static std::string NEW_LINE(rawstr_to_utf8("\n")); diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 80e0cca780..54598f90c8 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -41,7 +41,6 @@ #include "llviewermenu.h" #include "llwearableitemslist.h" #include "llpaneloutfitedit.h" -#include "llsidetray.h" #include "lltrans.h" static LLRegisterPanelClassWrapper t_cof_wearables("cof_wearables"); @@ -160,11 +159,6 @@ public: protected: static void replaceWearable(const LLUUID& item_id) { - // *TODO: Most probable that accessing to LLPanelOutfitEdit instance should be: - // LLSideTray::getInstance()->getSidepanelAppearance()->getPanelOutfitEdit() - // without casting. Getter methods provides possibility to check and construct - // 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 (LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); @@ -236,8 +230,6 @@ protected: LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; LLUUID selected_id = mUUIDs.back(); - // *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel(). - // LLSideTray::getInstance()->getPanel() is rather slow variant LLPanelOutfitEdit* panel_oe = dynamic_cast(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)); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 1eabf32b9f..6dcfa95a0e 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -45,7 +45,6 @@ #include "llfloaterworldmap.h" #include "lllandmarkactions.h" #include "llnotificationsutil.h" -#include "llsidetray.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" #include "llviewermenu.h" diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d8b6b2e966..47c86ae549 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -67,7 +67,6 @@ #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llsliderctrl.h" -#include "llsidetray.h" #include "lltabcontainer.h" #include "lltrans.h" #include "llviewercontrol.h" @@ -1497,11 +1496,7 @@ void LLFloaterPreference::onChangeMaturity() // but the UI for this will still be enabled void LLFloaterPreference::onClickBlockList() { - // don't create side tray on demand - if (LLSideTray::instanceCreated()) - { - LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); - } + LLFloaterSidePanelContainer::showPanel("people", "panel_block_list_sidetray", LLSD()); } void LLFloaterPreference::onDoubleClickCheckBox(LLUICtrl* ctrl) diff --git a/indra/newview/llfloatersidetraytab.cpp b/indra/newview/llfloatersidetraytab.cpp deleted file mode 100644 index 9f15e62d84..0000000000 --- a/indra/newview/llfloatersidetraytab.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file llfloatersidetraytab.cpp - * @brief LLFloaterSideTrayTab class definition - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llfloatersidetraytab.h" - -// newview includes -#include "lltransientfloatermgr.h" -#include "llsidetray.h" - -LLFloaterSideTrayTab::LLFloaterSideTrayTab(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); -} - -LLFloaterSideTrayTab::~LLFloaterSideTrayTab() -{ - LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this); -} - -void LLFloaterSideTrayTab::onClose(bool app_quitting) -{ - // The floater is already being closed, so don't toggle it once more (that may crash viewer). - LLSideTray::getInstance()->setTabDocked(getName(), /* dock = */ true, /* toggle_floater = */ false); -} diff --git a/indra/newview/llfloatersidetraytab.h b/indra/newview/llfloatersidetraytab.h deleted file mode 100644 index 89f2444a0e..0000000000 --- a/indra/newview/llfloatersidetraytab.h +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @file llfloatersidetraytab.h - * @brief LLFloaterSideTrayTab class definition - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_LLFLOATERSIDETRAYTAB_H -#define LL_LLFLOATERSIDETRAYTAB_H - -#include "llfloater.h" - -/** - * When a side tray tab gets detached, it's wrapped in an instance of this class. - * - * This class helps to make sure that clicking a detached side tray tab doesn't - * make transient floaters (e.g. IM windows) hide, so that it's possible to - * drag an inventory item from detached My Inventory window to a docked IM window, - * i.e. share the item (see VWR-22891). - */ -class LLFloaterSideTrayTab : public LLFloater -{ -public: - LLFloaterSideTrayTab(const LLSD& key, const Params& params = getDefaultParams()); - ~LLFloaterSideTrayTab(); - - void onClose(bool app_quitting); -}; - -#endif // LL_LLFLOATERSIDETRAYTAB_H diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index cbbd66d868..623ebb76f2 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -38,7 +38,6 @@ #include "llgroupmgr.h" #include "llimview.h" // for gIMMgr #include "llnotificationsutil.h" -#include "llsidetray.h" #include "llstatusbar.h" // can_afford_transaction() #include "llimfloater.h" #include "groupchatlistener.h" diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 50a9c56518..14d85246e9 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -55,15 +55,9 @@ #include "llinventorymodel.h" #include "llrootview.h" #include "llspeakers.h" -#include "llsidetray.h" #include "llviewerchat.h" -static const S32 RECT_PADDING_NOT_INIT = -1; -static const S32 RECT_PADDING_NEED_RECALC = -2; - -S32 LLIMFloater::sAllowedRectRightPadding = RECT_PADDING_NOT_INIT; - LLIMFloater::LLIMFloater(const LLUUID& session_id) : LLTransientDockableFloater(NULL, true, session_id), mControlPanel(NULL), @@ -472,41 +466,9 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) return floater; } -//static -bool LLIMFloater::resetAllowedRectPadding() -{ - //reset allowed rect right padding if "SidebarCameraMovement" option - //or sidebar state changed - sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC ; - return true; -} - void LLIMFloater::getAllowedRect(LLRect& rect) { - if (sAllowedRectRightPadding == RECT_PADDING_NOT_INIT) //wasn't initialized - { - gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLIMFloater::resetAllowedRectPadding)); - - LLSideTray* side_bar = LLSideTray::getInstance(); - side_bar->setVisibleWidthChangeCallback(boost::bind(&LLIMFloater::resetAllowedRectPadding)); - sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC; - } - rect = gViewerWindow->getWorldViewRectScaled(); - if (sAllowedRectRightPadding == RECT_PADDING_NEED_RECALC) //recalc allowed rect right padding - { - LLPanel* side_bar_tabs = - gViewerWindow->getRootView()->getChild ( - "side_bar_tabs"); - sAllowedRectRightPadding = side_bar_tabs->getRect().getWidth(); - LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs); - - if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE) - { - sAllowedRectRightPadding += LLSideTray::getInstance()->getVisibleWidth(); - } - } - rect.mRight -= sAllowedRectRightPadding; } void LLIMFloater::setDocked(bool docked, bool pop_on_undock) diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 5158f6c1f7..8a3020ea10 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -156,10 +156,6 @@ private: static void closeHiddenIMToasts(); - static bool resetAllowedRectPadding(); - //need to keep this static for performance issues - static S32 sAllowedRectRightPadding; - static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response); LLPanelChatControlPanel* mControlPanel; diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 29d7a4a6b0..026c8a0923 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -46,7 +46,6 @@ #include "llmenubutton.h" #include "llresmgr.h" // getMonetaryString #include "llsafehandle.h" -#include "llsidetray.h" #include "lltextbox.h" // for description truncation #include "lltoggleablemenu.h" #include "lltrans.h" diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b6041c7f31..2066cbc6b2 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -60,7 +60,6 @@ #include "llpreviewtexture.h" #include "llselectmgr.h" #include "llsidepanelappearance.h" -#include "llsidetray.h" #include "lltrans.h" #include "llviewerassettype.h" #include "llviewerfoldertype.h" diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index acec02b507..21a026bcf7 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -71,7 +71,6 @@ #include "llscrollbar.h" #include "llscrollcontainer.h" #include "llselectmgr.h" -#include "llsidetray.h" #include "llsidepanelinventory.h" #include "lltabcontainer.h" #include "lltooldraganddrop.h" diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 27db28367c..b0f9cb28e6 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -43,7 +43,6 @@ #include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" #include "llsidepanelinventory.h" -#include "llsidetray.h" #include "llviewerattachmenu.h" #include "llviewerfoldertype.h" #include "llvoavatarself.h" diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index f519ad759e..025181ead5 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -49,7 +49,6 @@ #include "lllandmarkactions.h" #include "lllandmarklist.h" #include "llteleporthistory.h" -#include "llsidetray.h" #include "llslurl.h" #include "llstatusbar.h" // getHealth() #include "lltrans.h" diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 4c0823874c..fc264db5af 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -45,7 +45,6 @@ #include "llpaneltopinfobar.h" #include "llteleporthistory.h" #include "llsearchcombobox.h" -#include "llsidetray.h" #include "llslurl.h" #include "llurlregistry.h" #include "llurldispatcher.h" diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index a16ea0e7d3..9eaa64a124 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -32,7 +32,6 @@ #include "llrootview.h" //#include "llchatitemscontainerctrl.h" #include "lliconctrl.h" -#include "llsidetray.h" #include "llfloatersidepanelcontainer.h" #include "llfocusmgr.h" #include "llresizebar.h" diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index c2739867b1..1dc4d796ab 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -42,7 +42,6 @@ #include "llmenubutton.h" #include "llnotificationsutil.h" #include "lloutfitobserver.h" -#include "llsidetray.h" #include "lltoggleablemenu.h" #include "lltransutil.h" #include "llviewermenu.h" diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 856dabb6b7..5c85ec438c 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -38,7 +38,6 @@ // project include #include "llfloateravatarpicker.h" #include "llfloatersidepanelcontainer.h" -#include "llsidetray.h" #include "llsidetraypanelcontainer.h" static LLRegisterPanelClassWrapper t_panel_blocked_list("panel_block_list_sidetray"); diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 70dcf61d7d..ae217958f0 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -50,7 +50,6 @@ #include "llpanelgroupnotices.h" #include "llpanelgroupgeneral.h" -#include "llsidetray.h" #include "llaccordionctrltab.h" #include "llaccordionctrl.h" diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index e370f2f622..0295ad151f 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -40,7 +40,6 @@ #include "llparticipantlist.h" #include "llimview.h" #include "llvoicechannel.h" -#include "llsidetray.h" #include "llspeakers.h" #include "lltrans.h" diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 1b9eb4813b..a65631b8d8 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -52,7 +52,6 @@ #include "llmenubutton.h" #include "llplacesinventorybridge.h" #include "llplacesinventorypanel.h" -#include "llsidetray.h" #include "lltoggleablemenu.h" #include "llviewermenu.h" #include "llviewerregion.h" diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index c1341af2ef..6562b259c3 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -52,7 +52,6 @@ #include "llviewermenu.h" #include "llviewertexturelist.h" #include "llsidepanelinventory.h" -#include "llsidetray.h" const std::string FILTERS_FILENAME("filters.xml"); diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index a336472fc0..d1aea51a09 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -59,8 +59,6 @@ LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox() // virtual BOOL LLPanelMarketplaceInbox::postBuild() { - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceInbox::handleLoginComplete, this)); - LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this)); return TRUE; @@ -74,12 +72,6 @@ void LLPanelMarketplaceInbox::onSelectionChange() } -void LLPanelMarketplaceInbox::handleLoginComplete() -{ - // Set us up as the class to drive the badge value for the sidebar_inventory button - LLSideTray::getInstance()->setTabButtonBadgeDriver("sidebar_inventory", this); -} - LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel() { LLView * inbox_inventory_placeholder = getChild("inbox_inventory_placeholder"); diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h index 705a095cf0..3531518e51 100644 --- a/indra/newview/llpanelmarketplaceinbox.h +++ b/indra/newview/llpanelmarketplaceinbox.h @@ -28,11 +28,10 @@ #define LL_LLPANELMARKETPLACEINBOX_H #include "llpanel.h" -#include "llsidetray.h" class LLInventoryPanel; -class LLPanelMarketplaceInbox : public LLPanel, public LLSideTrayTabBadgeDriver +class LLPanelMarketplaceInbox : public LLPanel { public: @@ -61,7 +60,6 @@ public: std::string getBadgeString() const; private: - void handleLoginComplete(); void onSelectionChange(); diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp index c0de5deb0a..d4f9654e6e 100644 --- a/indra/newview/llpanelmarketplaceoutbox.cpp +++ b/indra/newview/llpanelmarketplaceoutbox.cpp @@ -40,7 +40,6 @@ #include "llpanelmarketplaceinbox.h" #include "llsdutil.h" #include "llsidepanelinventory.h" -#include "llsidetray.h" #include "lltimer.h" #include "llviewernetwork.h" #include "llagent.h" diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 4d86fa15df..0b687009bf 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -72,20 +72,6 @@ BOOL LLPanelMe::postBuild() void LLPanelMe::onOpen(const LLSD& key) { LLPanelProfile::onOpen(key); - - // Removed this action as per SOCIAL-431 The first time a new resident opens the profile tab - // in the sidebar, they see the old profile editing panel - // - //// Force Edit My Profile if this is the first time when user is opening Me Panel (EXT-5068) - //bool opened = gSavedSettings.getBOOL("MePanelOpened"); - //// In some cases Side Tray my call onOpen() twice, check getCollapsed() to be sure this - //// is the last time onOpen() is called - //if( !opened && !LLSideTray::getInstance()->getCollapsed() ) - //{ - // buildEditPanel(); - // openPanel(mEditPanel, getAvatarId()); - // gSavedSettings.setBOOL("MePanelOpened", true); - //} } void LLPanelMe::buildEditPanel() diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 44364b5831..98ea680504 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -57,7 +57,6 @@ #include "llpreviewtexture.h" #include "llscrollcontainer.h" #include "llselectmgr.h" -#include "llsidetray.h" #include "llstatusbar.h" #include "lltooldraganddrop.h" #include "lltrans.h" diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 3ac0d6616b..f90236f6f2 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -41,7 +41,6 @@ #include "llpanelwearing.h" #include "llsaveoutfitcombobtn.h" #include "llsidepanelappearance.h" -#include "llsidetray.h" #include "llviewerfoldertype.h" static const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 86e481d953..80c431f481 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -57,7 +57,6 @@ #include "llinventoryobserver.h" #include "llnetmap.h" #include "llpanelpeoplemenus.h" -#include "llsidetray.h" #include "llsidetraypanelcontainer.h" #include "llrecentpeople.h" #include "llviewercontrol.h" // for gSavedSettings @@ -1452,7 +1451,7 @@ bool LLPanelPeople::notifyChildren(const LLSD& info) container->onOpen(LLSD().with(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName())); } else - LLSideTray::getInstance()->collapseSideBar(); + LLFloaterReg::hideFloaterInstance("people"); return true; // this notification is only supposed to be handled by task panels } diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 0129ac753a..7f8f9b29af 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -65,7 +65,6 @@ #include "llpanelplaceprofile.h" #include "llpanelteleporthistory.h" #include "llremoteparcelrequest.h" -#include "llsidetray.h" #include "llteleporthistorystorage.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 52dd70f005..79171dbcb9 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -31,7 +31,6 @@ #include "llfloaterworldmap.h" #include "llpanelteleporthistory.h" -#include "llsidetray.h" #include "llworldmap.h" #include "llteleporthistorystorage.h" #include "lltextutil.h" diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index b6e32dba78..5ed23d2f42 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -36,7 +36,6 @@ #include "lllocationinputctrl.h" #include "llnotificationsutil.h" #include "llparcel.h" -#include "llsidetray.h" #include "llslurl.h" #include "llstatusbar.h" #include "lltrans.h" diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h index 583e91d15e..e934b522be 100644 --- a/indra/newview/llpaneltopinfobar.h +++ b/indra/newview/llpaneltopinfobar.h @@ -148,7 +148,7 @@ private: void setParcelInfoText(const std::string& new_text); /** - * Implementation of LLDestroyClass + * Implementation of LLDestroyClass */ static void destroyClass() { diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 87e9bb7b28..e2801c09bd 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -36,7 +36,6 @@ #include "llinventorymodel.h" #include "llinventoryobserver.h" #include "llmenubutton.h" -#include "llsidetray.h" #include "llviewermenu.h" #include "llwearableitemslist.h" #include "llsdserialize.h" diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index e3bc67a414..a3b0574bca 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -41,7 +41,6 @@ #include "llsyswellwindow.h" #include "llimfloater.h" #include "llscriptfloater.h" -#include "llsidetray.h" #include @@ -83,25 +82,8 @@ bool LLScreenChannelBase::isHovering() return mHoveredToast->isHovered(); } -void LLScreenChannelBase::resetPositionAndSize() -{ - LLRect rc = gViewerWindow->getWorldViewRectScaled(); - updatePositionAndSize(rc, rc); -} - void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) { - /* - take sidetray into account - screenchannel should not overlap sidetray - */ - S32 world_rect_padding = 0; - if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE - && LLSideTray::instanceCreated ()) - { - world_rect_padding += LLSideTray::getInstance()->getVisibleWidth(); - } - - S32 top_delta = old_world_rect.mTop - new_world_rect.mTop; LLRect this_rect = getRect(); @@ -111,10 +93,10 @@ void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect ne case CA_LEFT : break; case CA_CENTRE : - this_rect.setCenterAndSize( (new_world_rect.getWidth() - world_rect_padding) / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight()); + this_rect.setCenterAndSize( (new_world_rect.getWidth()) / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight()); break; case CA_RIGHT : - this_rect.setLeftTopAndSize(new_world_rect.mRight - world_rect_padding - this_rect.getWidth(), + this_rect.setLeftTopAndSize(new_world_rect.mRight - this_rect.getWidth(), this_rect.mTop, this_rect.getWidth(), this_rect.getHeight()); @@ -126,12 +108,6 @@ void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect ne void LLScreenChannelBase::init(S32 channel_left, S32 channel_right) { - if(LLSideTray::instanceCreated()) - { - LLSideTray* side_bar = LLSideTray::getInstance(); - side_bar->setVisibleWidthChangeCallback(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this)); - } - // top and bottom set by updateBottom() setRect(LLRect(channel_left, 0, channel_right, 0)); updateBottom(); @@ -203,17 +179,6 @@ std::list LLScreenChannel::findToasts(const Matcher& matcher) //-------------------------------------------------------------------------- void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) { - /* - take sidetray into account - screenchannel should not overlap sidetray - */ - S32 world_rect_padding = 0; - if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE - && LLSideTray::instanceCreated ()) - { - world_rect_padding += LLSideTray::getInstance()->getVisibleWidth(); - } - - LLRect this_rect = getRect(); switch(mChannelAlignment) @@ -226,7 +191,7 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo return; case CA_RIGHT : this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); - this_rect.setLeftTopAndSize(new_world_rect.mRight - world_rect_padding - this_rect.getWidth(), + this_rect.setLeftTopAndSize(new_world_rect.mRight - this_rect.getWidth(), this_rect.mTop, this_rect.getWidth(), this_rect.getHeight()); diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index d207d13981..8f11c82673 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -59,7 +59,6 @@ public: // Channel's outfit-functions // update channel's size and position in the World View virtual void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect); - void resetPositionAndSize(); // initialization of channel's shape and position virtual void init(S32 channel_left, S32 channel_right); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index a356013830..853656905c 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -42,7 +42,6 @@ #include "lloutfitobserver.h" #include "llpaneleditwearable.h" #include "llpaneloutfitsinventory.h" -#include "llsidetray.h" #include "lltextbox.h" #include "lluictrlfactory.h" #include "llviewercontrol.h" @@ -164,7 +163,6 @@ void LLSidepanelAppearance::onOpen(const LLSD& key) else { // Switch to the requested panel. - // *TODO: replace this crap with LLSideTrayPanelContainer std::string type = key["type"].asString(); if (type == "my_outfits") { diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 0226896f54..f9dc70ccc0 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -282,19 +282,20 @@ BOOL LLSidepanelInventory::postBuild() enableOutbox(gSavedSettings.getBOOL("InventoryDisplayOutbox")); // Trigger callback for after login so we can setup to track inbox and outbox changes after initial inventory load - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::handleLoginComplete, this)); + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInboxOutbox, this)); } gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged)); gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged)); + updateInboxOutbox(); // Update the verbs buttons state. updateVerbs(); return TRUE; } -void LLSidepanelInventory::handleLoginComplete() +void LLSidepanelInventory::updateInboxOutbox() { // // Track inbox and outbox folder changes diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index b7d11f7f9b..4e34926a4b 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -47,7 +47,7 @@ public: virtual ~LLSidepanelInventory(); private: - void handleLoginComplete(); + void updateInboxOutbox(); public: void observeInboxOutboxCreation(); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp deleted file mode 100644 index 55d6378ad8..0000000000 --- a/indra/newview/llsidetray.cpp +++ /dev/null @@ -1,1489 +0,0 @@ -/** - * @file llsidetray.cpp - * @brief SideBar implementation - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "lltextbox.h" - -#include "llagentcamera.h" -#include "llappviewer.h" -#include "llbadge.h" -#include "llbottomtray.h" -#include "llfloaterreg.h" -#include "llfirstuse.h" -#include "llhints.h" -#include "llsidetray.h" -#include "llviewerwindow.h" -#include "llaccordionctrl.h" -#include "llfocusmgr.h" -#include "llrootview.h" -#include "llnavigationbar.h" -#include "llpanelmarketplaceinbox.h" - -#include "llaccordionctrltab.h" - -#include "llfloater.h" //for gFloaterView -#include "lliconctrl.h"//for OpenClose tab icon -#include "llsidetraypanelcontainer.h" -#include "llscreenchannel.h" -#include "llchannelmanager.h" -#include "llwindow.h"//for SetCursor -#include "lltransientfloatermgr.h" - -#include "llsidepanelappearance.h" - -#include "llsidetraylistener.h" - -//#include "llscrollcontainer.h" - -using namespace std; -using namespace LLNotificationsUI; - -class LLSideTrayButton; - -static LLRootViewRegistry::Register t1("side_tray"); -static LLDefaultChildRegistry::Register t2("sidetray_tab"); - -static const S32 BOTTOM_BAR_PAD = 5; - -static const std::string COLLAPSED_NAME = "<<"; -static const std::string EXPANDED_NAME = ">>"; - -static const std::string TAB_PANEL_CAPTION_NAME = "sidetray_tab_panel"; -static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title"; - -LLSideTray* LLSideTray::sInstance = 0; - -static LLSideTrayListener sSideTrayListener(LLSideTray::getInstance); - -// static -LLSideTray* LLSideTray::getInstance() -{ - if (!sInstance) - { - sInstance = LLUICtrlFactory::createFromFile("panel_side_tray.xml",NULL, LLRootView::child_registry_t::instance()); - sInstance->setXMLFilename("panel_side_tray.xml"); - } - - return sInstance; -} - -// static -bool LLSideTray::instanceCreated () -{ - return sInstance!=0; -} - -////////////////////////////////////////////////////////////////////////////// -// LLSideTrayTab -// Represents a single tab in the side tray, only used by LLSideTray -////////////////////////////////////////////////////////////////////////////// - -class LLSideTrayTab: public LLPanel -{ - LOG_CLASS(LLSideTrayTab); - friend class LLUICtrlFactory; - friend class LLSideTray; -public: - - struct Params - : public LLInitParam::Block - { - // image name - Optional image; - Optional image_selected; - Optional tab_title; - Optional description; - Optional badge; - - Params() - : image("image"), - image_selected("image_selected"), - tab_title("tab_title","no title"), - description("description","no description"), - badge("badge") - {}; - }; -protected: - LLSideTrayTab(const Params& params); - - void dock(LLFloater* floater_tab); - void undock(LLFloater* floater_tab); - - LLSideTray* getSideTray(); - -public: - virtual ~LLSideTrayTab(); - - /*virtual*/ BOOL postBuild (); - /*virtual*/ bool addChild (LLView* view, S32 tab_group); - - - void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE); - - static LLSideTrayTab* createInstance (); - - const std::string& getDescription () const { return mDescription;} - - void onOpen (const LLSD& key); - - void toggleTabDocked(bool toggle_floater = true); - void setDocked(bool dock); - bool isDocked() const; - - BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); - - LLPanel* getPanel(); - - LLButton* createButton(bool allowTearOff, LLUICtrl::commit_callback_t callback); - -private: - std::string mTabTitle; - std::string mImage; - std::string mImageSelected; - std::string mDescription; - - LLView* mMainPanel; - - bool mHasBadge; - LLBadge::Params mBadgeParams; - LLSideTrayButton* mSideTrayButton; -}; - -////////////////////////////////////////////////////////////////////////////// -// LLSideTrayButton -// Side Tray tab button with "tear off" handling. -////////////////////////////////////////////////////////////////////////////// - -class LLSideTrayButton : public LLButton -{ -public: - /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask) - { - // Route future Mouse messages here preemptively. (Release on mouse up.) - // No handler needed for focus lost since this class has no state that depends on it. - gFocusMgr.setMouseCapture(this); - - localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY); - - // Note: don't pass on to children - return TRUE; - } - - /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask) - { - // We only handle the click if the click both started and ended within us - if( !hasMouseCapture() ) return FALSE; - - S32 screen_x; - S32 screen_y; - localPointToScreen(x, y, &screen_x, &screen_y); - - S32 delta_x = screen_x - mDragLastScreenX; - S32 delta_y = screen_y - mDragLastScreenY; - - LLSideTray* side_tray = LLSideTray::getInstance(); - - // Check if the tab we are dragging is docked. - if (!side_tray->isTabAttached(mTabName)) return FALSE; - - // Same value is hardcoded in LLDragHandle::handleHover(). - const S32 undock_threshold = 12; - - // Detach a tab if it has been pulled further than undock_threshold. - if (delta_x <= -undock_threshold || delta_x >= undock_threshold || - delta_y <= -undock_threshold || delta_y >= undock_threshold) - { - LLSideTrayTab* tab = side_tray->getTab(mTabName); - if (!tab) return FALSE; - - tab->setDocked(false); - - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab->getName()); - if (!floater_tab) return FALSE; - - LLRect original_rect = floater_tab->getRect(); - S32 header_snap_y = floater_tab->getHeaderHeight() / 2; - S32 snap_x = screen_x - original_rect.mLeft - original_rect.getWidth() / 2; - S32 snap_y = screen_y - original_rect.mTop + header_snap_y; - - // Move the floater to appear "under" the mouse pointer. - floater_tab->setRect(original_rect.translate(snap_x, snap_y)); - - // Snap the mouse pointer to the center of the floater header - // and call 'mouse down' event handler to begin dragging. - floater_tab->handleMouseDown(original_rect.getWidth() / 2, - original_rect.getHeight() - header_snap_y, - mask); - - return TRUE; - } - - return FALSE; - } - - void setBadgeDriver(LLSideTrayTabBadgeDriver* driver) - { - mBadgeDriver = driver; - } - - void setVisible(BOOL visible) - { - setBadgeVisibility(visible); - - LLButton::setVisible(visible); - } - -protected: - LLSideTrayButton(const LLButton::Params& p) - : LLButton(p) - , mDragLastScreenX(0) - , mDragLastScreenY(0) - , mBadgeDriver(NULL) - { - // Find out the tab name to use in handleHover(). - size_t pos = getName().find("_button"); - llassert(pos != std::string::npos); - mTabName = getName().substr(0, pos); - } - - friend class LLUICtrlFactory; - - void draw() - { - if (mBadgeDriver) - { - setBadgeLabel(mBadgeDriver->getBadgeString()); - } - - LLButton::draw(); - } - -private: - S32 mDragLastScreenX; - S32 mDragLastScreenY; - - std::string mTabName; - LLSideTrayTabBadgeDriver* mBadgeDriver; -}; - - -//////////////////////////////////////////////////// -// LLSideTrayTab implementation -//////////////////////////////////////////////////// - -LLSideTrayTab::LLSideTrayTab(const Params& p) -: LLPanel(), - mTabTitle(p.tab_title), - mImage(p.image), - mImageSelected(p.image_selected), - mDescription(p.description), - mMainPanel(NULL), - mBadgeParams(p.badge), - mSideTrayButton(NULL) -{ - mHasBadge = p.badge.isProvided(); -} - -LLSideTrayTab::~LLSideTrayTab() -{ -} - -bool LLSideTrayTab::addChild(LLView* view, S32 tab_group) -{ - if(mMainPanel == 0 && TAB_PANEL_CAPTION_NAME != view->getName())//skip our caption panel - mMainPanel = view; - return LLPanel::addChild(view,tab_group); - //return res; -} - -//virtual -BOOL LLSideTrayTab::postBuild() -{ - LLPanel* title_panel = LLUICtrlFactory::getInstance()->createFromFile("panel_side_tray_tab_caption.xml",this, child_registry_t::instance()); - string name = title_panel->getName(); - LLPanel::addChild(title_panel); - - title_panel->getChild(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle); - - getChild("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, false)); - getChild("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, true)); - - return LLPanel::postBuild(); -} - -static const S32 splitter_margin = 1; - -void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent ) -{ - LLPanel::reshape(width, height, called_from_parent); - LLView* title_panel = findChildView(TAB_PANEL_CAPTION_NAME, true); - if (!title_panel) - { - // not fully constructed yet - return; - } - - S32 title_height = title_panel->getRect().getHeight(); - title_panel->setOrigin( 0, height - title_height ); - title_panel->reshape(width,title_height); - - LLRect sRect; - sRect.setLeftTopAndSize( splitter_margin, height - title_height - splitter_margin, - width - 2*splitter_margin, height - title_height - 2*splitter_margin); - mMainPanel->setShape(sRect); -} - -void LLSideTrayTab::onOpen (const LLSD& key) -{ - LLPanel *panel = getPanel(); - if(panel) - panel->onOpen(key); -} - -// Attempts to get the existing side tray instance. -// Needed to avoid recursive calls of LLSideTray::getInstance(). -LLSideTray* LLSideTrayTab::getSideTray() -{ - // First, check if the side tray is our parent (i.e. we're attached). - LLSideTray* side_tray = dynamic_cast(getParent()); - if (!side_tray) - { - // Detached? Ok, check if the instance exists at all/ - if (LLSideTray::instanceCreated()) - { - side_tray = LLSideTray::getInstance(); - } - else - { - llerrs << "No safe way to get the side tray instance" << llendl; - } - } - - return side_tray; -} - -void LLSideTrayTab::toggleTabDocked(bool toggle_floater /* = true */) -{ - // *FIX: Calling this method twice per frame would crash the viewer. - - std::string tab_name = getName(); - - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); - if (!floater_tab) return; - - bool docking = !isDocked(); - - if (mSideTrayButton) - { - mSideTrayButton->setVisible(docking); - } - - // Hide the "Tear Off" button when a tab gets undocked - // and show "Dock" button instead. - getChild("undock")->setVisible(docking); - getChild("dock")->setVisible(!docking); - - if (docking) - { - dock(floater_tab); - } - else - { - undock(floater_tab); - } - - // Open/close the floater *after* we reparent the tab panel, - // so that it doesn't receive redundant visibility change notifications. - if (toggle_floater) - { - LLFloaterReg::toggleInstance("side_bar_tab", tab_name); - } -} - -// Same as toggleTabDocked() apart from making sure that we do exactly what we want. -void LLSideTrayTab::setDocked(bool dock) -{ - if (isDocked() == dock) - { - llwarns << "Tab " << getName() << " is already " << (dock ? "docked" : "undocked") << llendl; - return; - } - - toggleTabDocked(); -} - -bool LLSideTrayTab::isDocked() const -{ - return dynamic_cast(getParent()) != NULL; -} - -BOOL LLSideTrayTab::handleScrollWheel(S32 x, S32 y, S32 clicks) -{ - // Let children handle the event - LLUICtrl::handleScrollWheel(x, y, clicks); - - // and then eat it to prevent in-world scrolling (STORM-351). - return TRUE; -} - -void LLSideTrayTab::dock(LLFloater* floater_tab) -{ - LLSideTray* side_tray = getSideTray(); - if (!side_tray) return; - - // Before docking the tab, reset its (and its children's) transparency to default (STORM-688). - floater_tab->updateTransparency(TT_DEFAULT); - - if (!side_tray->addTab(this)) - { - llwarns << "Failed to add tab " << getName() << " to side tray" << llendl; - return; - } - - setRect(side_tray->getLocalRect()); - reshape(getRect().getWidth(), getRect().getHeight()); - - // Select the re-docked tab. - side_tray->selectTabByName(getName()); - - if (side_tray->getCollapsed()) - { - side_tray->expandSideBar(false); - } -} - -static void on_minimize(LLSidepanelAppearance* panel, LLSD minimized) -{ - if (!panel) return; - bool visible = !minimized.asBoolean(); - LLSD visibility; - visibility["visible"] = visible; - // Do not reset accordion state on minimize (STORM-375) - visibility["reset_accordion"] = false; - panel->updateToVisibility(visibility); -} - -void LLSideTrayTab::undock(LLFloater* floater_tab) -{ - LLSideTray* side_tray = getSideTray(); - if (!side_tray) return; - - // Remember whether the tab have been active before detaching - // because removeTab() will change active tab. - bool was_active = side_tray->getActiveTab() == this; - - // Remove the tab from Side Tray's tabs list. - // We have to do it despite removing the tab from Side Tray's child view tree - // by addChild(). Otherwise the tab could be accessed by the pointer in LLSideTray::mTabs. - if (!side_tray->removeTab(this)) - { - llwarns << "Failed to remove tab " << getName() << " from side tray" << llendl; - return; - } - - // If we're undocking while side tray is collapsed we need to explicitly show the panel. - if (!getVisible()) - { - setVisible(true); - } - - floater_tab->addChild(this); - floater_tab->setTitle(mTabTitle); - floater_tab->setName(getName()); - - // Resize handles get obscured by added panel so move them to front. - floater_tab->moveResizeHandlesToFront(); - - // Reshape the floater if needed. - LLRect floater_rect; - if (floater_tab->hasSavedRect()) - { - // We've got saved rect for the floater, hence no need to reshape it. - floater_rect = floater_tab->getLocalRect(); - } - else - { - // Detaching for the first time. Reshape the floater. - floater_rect = side_tray->getLocalRect(); - - // Reduce detached floater height by small BOTTOM_BAR_PAD not to make it flush with the bottom bar. - floater_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight() + BOTTOM_BAR_PAD; - floater_rect.makeValid(); - floater_tab->reshape(floater_rect.getWidth(), floater_rect.getHeight()); - } - - // Reshape the panel. - { - LLRect panel_rect = floater_tab->getLocalRect(); - panel_rect.mTop -= floater_tab->getHeaderHeight(); - panel_rect.makeValid(); - setRect(panel_rect); - reshape(panel_rect.getWidth(), panel_rect.getHeight()); - } - - // Set FOLLOWS_ALL flag for the tab to follow floater dimensions upon resizing. - setFollowsAll(); - - // Camera view may need to be changed for appearance panel(STORM-301) on minimize of floater, - // so setting callback here. - if (getName() == "sidebar_appearance") - { - LLSidepanelAppearance* panel_appearance = dynamic_cast(getPanel()); - if(panel_appearance) - { - floater_tab->setMinimizeCallback(boost::bind(&on_minimize, panel_appearance, _2)); - } - } - - if (!side_tray->getCollapsed()) - { - side_tray->collapseSideBar(); - } - - if (!was_active) - { - // When a tab other then current active tab is detached from Side Tray - // onOpen() should be called as tab visibility is changed. - onOpen(LLSD()); - } -} - -LLPanel* LLSideTrayTab::getPanel() -{ - LLPanel* panel = dynamic_cast(mMainPanel); - return panel; -} - -LLSideTrayTab* LLSideTrayTab::createInstance () -{ - LLSideTrayTab::Params tab_params; - tab_params.tab_title("openclose"); - - LLSideTrayTab* tab = LLUICtrlFactory::create(tab_params); - return tab; -} - -// Now that we know the definition of LLSideTrayTab, we can implement -// tab_cast. -template <> -LLPanel* tab_cast(LLSideTrayTab* tab) { return tab; } - -////////////////////////////////////////////////////////////////////////////// -// LLSideTray -////////////////////////////////////////////////////////////////////////////// - -LLSideTray::Params::Params() -: collapsed("collapsed",false), - tab_btn_image_normal("tab_btn_image",LLUI::getUIImage("taskpanel/TaskPanel_Tab_Off.png")), - tab_btn_image_selected("tab_btn_image_selected",LLUI::getUIImage("taskpanel/TaskPanel_Tab_Selected.png")), - default_button_width("tab_btn_width",32), - default_button_height("tab_btn_height",32), - default_button_margin("tab_btn_margin",0) -{} - -//virtual -LLSideTray::LLSideTray(const Params& params) - : LLPanel(params) - ,mActiveTab(0) - ,mCollapsed(false) - ,mCollapseButton(0) -{ - mCollapsed=params.collapsed; - - LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar(); - - // register handler function to process data from the xml. - // panel_name should be specified via "parameter" attribute. - commit.add("SideTray.ShowPanel", boost::bind(&LLSideTray::showPanel, this, _2, LLUUID::null)); - commit.add("SideTray.Toggle", boost::bind(&LLSideTray::onToggleCollapse, this)); - commit.add("SideTray.Collapse", boost::bind(&LLSideTray::collapseSideBar, this)); - LLTransientFloaterMgr::getInstance()->addControlView(this); - LLView* side_bar_tabs = gViewerWindow->getRootView()->getChildView("side_bar_tabs"); - if (side_bar_tabs != NULL) - { - LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs); - } - - LLPanel::Params p; - p.name = "buttons_panel"; - p.mouse_opaque = false; - mButtonsPanel = LLUICtrlFactory::create(p); -} - - -BOOL LLSideTray::postBuild() -{ - createButtons(); - - arrange(); - selectTabByName("sidebar_home"); - - if(mCollapsed) - collapseSideBar(); - - setMouseOpaque(false); - - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this)); - - // Remember original tabs order, so that we can restore it if user detaches and then re-attaches a tab. - for (child_vector_const_iter_t it = mTabs.begin(); it != mTabs.end(); ++it) - { - std::string tab_name = (*it)->getName(); - mOriginalTabOrder.push_back(tab_name); - } - - //EXT-8045 - //connect all already created channels to reflect sidetray collapse/expand - std::vector& channels = LLChannelManager::getInstance()->getChannelList(); - for(std::vector::iterator it = channels.begin();it!=channels.end();++it) - { - if ((*it).channel) - { - setVisibleWidthChangeCallback(boost::bind(&LLScreenChannelBase::resetPositionAndSize, (*it).channel)); - } - } - - return true; -} - -void LLSideTray::setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver) -{ - mTabButtonBadgeDrivers[tabName] = driver; -} - -void LLSideTray::handleLoginComplete() -{ - //reset tab to "home" tab if it was changesd during login process - selectTabByName("sidebar_home"); - - for (badge_map_t::iterator it = mTabButtonBadgeDrivers.begin(); it != mTabButtonBadgeDrivers.end(); ++it) - { - LLButton* button = mTabButtons[it->first]; - LLSideTrayButton* side_button = dynamic_cast(button); - - if (side_button) - { - side_button->setBadgeDriver(it->second); - } - else - { - llwarns << "Unable to find button " << it->first << " to set the badge driver. " << llendl; - } - } - - detachTabs(); -} - -LLSideTrayTab* LLSideTray::getTab(const std::string& name) -{ - return findChild(name,false); -} - -bool LLSideTray::isTabAttached(const std::string& name) -{ - LLSideTrayTab* tab = getTab(name); - llassert(tab); - if (!tab) return false; - - return std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end(); -} - -bool LLSideTray::hasTabs() -{ - // The open/close tab doesn't count. - return mTabs.size() > 1; -} - -void LLSideTray::toggleTabButton(LLSideTrayTab* tab) -{ - if(tab == NULL) - return; - std::string name = tab->getName(); - std::map::iterator it = mTabButtons.find(name); - if(it != mTabButtons.end()) - { - LLButton* btn = it->second; - bool new_state = !btn->getToggleState(); - btn->setToggleState(new_state); - // Only highlight the tab if side tray is expanded (STORM-157). - btn->setImageOverlay( new_state && !getCollapsed() ? tab->mImageSelected : tab->mImage ); - } -} - -LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel_name, const LLSD& params) -{ - LLView* view = tab->findChildView(panel_name, true); - if (!view) return NULL; - - std::string tab_name = tab->getName(); - - bool tab_attached = isTabAttached(tab_name); - - if (tab_attached && LLUI::sSettingGroups["config"]->getBOOL("OpenSidePanelsInFloaters")) - { - tab->setDocked(false); - tab_attached = false; - } - - // Select tab and expand Side Tray only when a tab is attached. - if (tab_attached) - { - selectTabByName(tab_name); - if (mCollapsed) - expandSideBar(); - } - else - { - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); - if (!floater_tab) return NULL; - - floater_tab->openFloater(tab_name); - } - - LLSideTrayPanelContainer* container = dynamic_cast(view->getParent()); - if (container) - { - LLSD new_params = params; - new_params[LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME] = panel_name; - container->onOpen(new_params); - - return container->getCurrentPanel(); - } - - LLPanel* panel = dynamic_cast(view); - if (panel) - { - panel->onOpen(params); - } - - return panel; -} - -bool LLSideTray::selectTabByIndex(size_t index) -{ - if(index>=mTabs.size()) - return false; - - LLSideTrayTab* sidebar_tab = mTabs[index]; - return selectTabByName(sidebar_tab->getName()); -} - -bool LLSideTray::selectTabByName(const std::string& name, bool keep_prev_visible) -{ - LLSideTrayTab* tab_to_keep_visible = NULL; - LLSideTrayTab* new_tab = getTab(name); - if (!new_tab) return false; - - // Bail out if already selected. - if (new_tab == mActiveTab) - return false; - - //deselect old tab - if (mActiveTab) - { - // Keep previously active tab visible if requested. - if (keep_prev_visible) tab_to_keep_visible = mActiveTab; - toggleTabButton(mActiveTab); - } - - //select new tab - mActiveTab = new_tab; - - if (mActiveTab) - { - toggleTabButton(mActiveTab); - LLSD key;//empty - mActiveTab->onOpen(key); - } - - //arrange(); - - //hide all tabs - show active tab - child_vector_const_iter_t child_it; - for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) - { - LLSideTrayTab* sidebar_tab = *child_it; - - bool vis = sidebar_tab == mActiveTab; - - // Force keeping the tab visible if requested. - vis |= sidebar_tab == tab_to_keep_visible; - - // When the last tab gets detached, for a short moment the "Toggle Sidebar" pseudo-tab - // is shown. So, to avoid the flicker we make sure it never gets visible. - vis &= (*child_it)->getName() != "sidebar_openclose"; - - sidebar_tab->setVisible(vis); - } - return true; -} - -bool LLSideTray::addChild(LLView* view, S32 tab_group) -{ - LLSideTrayTab* tab_panel = dynamic_cast(view); - - if (tab_panel) - { - mTabs.push_back(tab_panel); - } - - return LLUICtrl::addChild(view, tab_group); -} - -bool LLSideTray::removeTab(LLSideTrayTab* tab) -{ - if (!tab) return false; - std::string tab_name = tab->getName(); - - // Look up the tab in the list of known tabs. - child_vector_iter_t tab_it = std::find(mTabs.begin(), mTabs.end(), tab); - if (tab_it == mTabs.end()) - { - llwarns << "Cannot find tab named " << tab_name << llendl; - return false; - } - - // Find the button corresponding to the tab. - button_map_t::iterator btn_it = mTabButtons.find(tab_name); - if (btn_it == mTabButtons.end()) - { - llwarns << "Cannot find button for tab named " << tab_name << llendl; - return false; - } - LLButton* btn = btn_it->second; - - // Deselect the tab. - if (mActiveTab == tab) - { - // Select the next tab (or first one, if we're removing the last tab), - // skipping the fake open/close tab (STORM-155). - child_vector_iter_t next_tab_it = tab_it; - do - { - next_tab_it = (next_tab_it < (mTabs.end() - 1)) ? next_tab_it + 1 : mTabs.begin(); - } - while ((*next_tab_it)->getName() == "sidebar_openclose"); - - selectTabByName((*next_tab_it)->getName(), true); // Don't hide the tab being removed. - } - - // Remove the tab. - removeChild(tab); - mTabs.erase(tab_it); - - // Add the tab to detached tabs list. - mDetachedTabs.push_back(tab); - - // Remove the button from the buttons panel so that it isn't drawn anymore. - mButtonsPanel->removeChild(btn); - - // Re-arrange remaining tabs. - arrange(); - - return true; -} - -bool LLSideTray::addTab(LLSideTrayTab* tab) -{ - if (tab == NULL) return false; - - std::string tab_name = tab->getName(); - - // Make sure the tab isn't already in the list. - if (std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end()) - { - llwarns << "Attempt to re-add existing tab " << tab_name << llendl; - return false; - } - - // Look up the corresponding button. - button_map_t::const_iterator btn_it = mTabButtons.find(tab_name); - if (btn_it == mTabButtons.end()) - { - llwarns << "Tab " << tab_name << " has no associated button" << llendl; - return false; - } - LLButton* btn = btn_it->second; - - // Insert the tab at its original position. - LLUICtrl::addChild(tab); - { - tab_order_vector_const_iter_t new_tab_orig_pos = - std::find(mOriginalTabOrder.begin(), mOriginalTabOrder.end(), tab_name); - llassert(new_tab_orig_pos != mOriginalTabOrder.end()); - child_vector_iter_t insert_pos = mTabs.end(); - - for (child_vector_iter_t tab_it = mTabs.begin(); tab_it != mTabs.end(); ++tab_it) - { - tab_order_vector_const_iter_t cur_tab_orig_pos = - std::find(mOriginalTabOrder.begin(), mOriginalTabOrder.end(), (*tab_it)->getName()); - llassert(cur_tab_orig_pos != mOriginalTabOrder.end()); - - if (new_tab_orig_pos < cur_tab_orig_pos) - { - insert_pos = tab_it; - break; - } - } - - mTabs.insert(insert_pos, tab); - } - - // Add the button to the buttons panel so that it's drawn again. - mButtonsPanel->addChildInBack(btn); - - // Arrange tabs after inserting a new one. - arrange(); - - // Remove the tab from the list of detached tabs. - child_vector_iter_t tab_it = std::find(mDetachedTabs.begin(), mDetachedTabs.end(), tab); - if (tab_it != mDetachedTabs.end()) - { - mDetachedTabs.erase(tab_it); - } - - return true; -} - -LLButton* LLSideTrayTab::createButton(bool allowTearOff, LLUICtrl::commit_callback_t callback) -{ - static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams()); - - LLRect rect; - rect.setOriginAndSize(0, 0, sidetray_params.default_button_width, sidetray_params.default_button_height); - - LLButton::Params bparams; - - // Append "_button" to the side tray tab name - std::string button_name = getName() + "_button"; - bparams.name(button_name); - bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_TOP); - bparams.rect (rect); - bparams.tab_stop(false); - bparams.image_unselected(sidetray_params.tab_btn_image_normal); - bparams.image_selected(sidetray_params.tab_btn_image_selected); - bparams.image_disabled(sidetray_params.tab_btn_image_normal); - bparams.image_disabled_selected(sidetray_params.tab_btn_image_selected); - - if (mHasBadge) - { - bparams.badge = mBadgeParams; - } - - LLButton* button; - if (allowTearOff) - { - mSideTrayButton = LLUICtrlFactory::create(bparams); - - button = mSideTrayButton; - } - else - { - // "Open/Close" button shouldn't allow "tear off" - // hence it is created as LLButton instance. - button = LLUICtrlFactory::create(bparams); - } - - button->setClickedCallback(callback); - - button->setToolTip(mTabTitle); - - if(mImage.length()) - { - button->setImageOverlay(mImage); - } - - return button; -} - -void LLSideTray::createButtons() -{ - //create buttons for tabs - child_vector_const_iter_t child_it = mTabs.begin(); - for ( ; child_it != mTabs.end(); ++child_it) - { - LLSideTrayTab* sidebar_tab = *child_it; - - std::string name = sidebar_tab->getName(); - - // The "OpenClose" button will open/close the whole panel - if (name == "sidebar_openclose") - { - mCollapseButton = sidebar_tab->createButton(false, boost::bind(&LLSideTray::onToggleCollapse, this)); - - mButtonsPanel->addChildInBack(mCollapseButton); - - LLHints::registerHintTarget("side_panel_btn", mCollapseButton->getHandle()); - } - else - { - LLButton* button = sidebar_tab->createButton(true, boost::bind(&LLSideTray::onTabButtonClick, this, name)); - - mButtonsPanel->addChildInBack(button); - - mTabButtons[name] = button; - } - } - - LLHints::registerHintTarget("inventory_btn", mTabButtons["sidebar_inventory"]->getHandle()); -} - -void LLSideTray::processTriState () -{ - if(mCollapsed) - expandSideBar(); - else - { -#if 0 // *TODO: EXT-2092 - - // Tell the active task panel to switch to its default view - // or collapse side tray if already on the default view. - LLSD info; - info["task-panel-action"] = "handle-tri-state"; - mActiveTab->notifyChildren(info); -#else - collapseSideBar(); -#endif - } -} - -void LLSideTray::onTabButtonClick(string name) -{ - LLSideTrayTab* tab = getTab(name); - if (!tab) return; - - if(tab == mActiveTab) - { - processTriState (); - return; - } - selectTabByName (name); - if(mCollapsed) - expandSideBar(); -} - -void LLSideTray::onToggleCollapse() -{ - LLFirstUse::notUsingSidePanel(false); - if(mCollapsed) - { - expandSideBar(); - //selectTabByName("sidebar_openclose"); - } - else - collapseSideBar(); -} - - -void LLSideTray::reflectCollapseChange() -{ - updateSidetrayVisibility(); - - setFocus(!mCollapsed); - - gFloaterView->refresh(); -} - -void LLSideTray::arrange() -{ - static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams()); - - updateSidetrayVisibility(); - - LLRect ctrl_rect; - ctrl_rect.setLeftTopAndSize(0, - mButtonsPanel->getRect().getHeight() - sidetray_params.default_button_width, - sidetray_params.default_button_width, - sidetray_params.default_button_height); - - mCollapseButton->setRect(ctrl_rect); - - //arrange tab buttons - //arrange tab buttons - child_vector_const_iter_t child_it; - int offset = (sidetray_params.default_button_height+sidetray_params.default_button_margin)*2; - for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) - { - LLSideTrayTab* sidebar_tab = *child_it; - - ctrl_rect.setLeftTopAndSize(0, - mButtonsPanel->getRect().getHeight()-offset, - sidetray_params.default_button_width, - sidetray_params.default_button_height); - - if(mTabButtons.find(sidebar_tab->getName()) == mTabButtons.end()) - continue; - - LLButton* btn = mTabButtons[sidebar_tab->getName()]; - - btn->setRect(ctrl_rect); - offset+=sidetray_params.default_button_height; - offset+=sidetray_params.default_button_margin; - - btn->setVisible(ctrl_rect.mBottom > 0); - } - - //arrange tabs - for ( child_vector_t::iterator child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) - { - LLSideTrayTab* sidebar_tab = *child_it; - sidebar_tab->setShape(getLocalRect()); - } - - // The tab buttons should be shown only if there is at least one non-detached tab. - // Also hide them in mouse-look mode. - mButtonsPanel->setVisible(hasTabs() && !gAgentCamera.cameraMouselook()); -} - -// Detach those tabs that were detached when the viewer exited last time. -void LLSideTray::detachTabs() -{ - // copy mTabs because LLSideTray::toggleTabDocked() modifies it. - child_vector_t tabs = mTabs; - - for (child_vector_const_iter_t it = tabs.begin(); it != tabs.end(); ++it) - { - LLSideTrayTab* tab = *it; - - std::string floater_ctrl_name = LLFloater::getControlName("side_bar_tab", LLSD(tab->getName())); - std::string vis_ctrl_name = LLFloaterReg::getVisibilityControlName(floater_ctrl_name); - if (!LLFloater::getControlGroup()->controlExists(vis_ctrl_name)) continue; - - bool is_visible = LLFloater::getControlGroup()->getBOOL(vis_ctrl_name); - if (!is_visible) continue; - - llassert(isTabAttached(tab->getName())); - tab->setDocked(false); - } -} - -void LLSideTray::collapseSideBar() -{ - mCollapsed = true; - // Reset all overlay images, because there is no "selected" tab when the - // whole side tray is hidden. - child_vector_const_iter_t it = mTabs.begin(); - for ( ; it != mTabs.end(); ++it ) - { - LLSideTrayTab* tab = *it; - std::string name = tab->getName(); - std::map::const_iterator btn_it = - mTabButtons.find(name); - if (btn_it != mTabButtons.end()) - { - LLButton* btn = btn_it->second; - btn->setImageOverlay( tab->mImage ); - } - } - - // OpenClose tab doesn't put its button in mTabButtons - LLSideTrayTab* openclose_tab = getTab("sidebar_openclose"); - if (openclose_tab) - { - mCollapseButton->setImageOverlay( openclose_tab->mImage ); - } - //mActiveTab->setVisible(FALSE); - reflectCollapseChange(); - setFocus( FALSE ); -} - -void LLSideTray::expandSideBar(bool open_active) -{ - mCollapsed = false; - LLSideTrayTab* openclose_tab = getTab("sidebar_openclose"); - if (openclose_tab) - { - mCollapseButton->setImageOverlay( openclose_tab->mImageSelected ); - } - - if (open_active) - { - mActiveTab->onOpen(LLSD()); - } - - reflectCollapseChange(); - - - std::string name = mActiveTab->getName(); - std::map::const_iterator btn_it = - mTabButtons.find(name); - if (btn_it != mTabButtons.end()) - { - LLButton* btn = btn_it->second; - btn->setImageOverlay( mActiveTab->mImageSelected ); - } -} - -void LLSideTray::highlightFocused() -{ - /* uncomment in case something change - if(!mActiveTab) - return; - BOOL dependent_has_focus = gFocusMgr.childHasKeyboardFocus(this); - setBackgroundOpaque( dependent_has_focus ); - mActiveTab->setBackgroundOpaque( dependent_has_focus ); - */ -} - -//virtual -BOOL LLSideTray::handleMouseDown (S32 x, S32 y, MASK mask) -{ - BOOL ret = LLPanel::handleMouseDown(x,y,mask); - if(ret) - setFocus(true); - return ret; -} - -void LLSideTray::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - LLPanel::reshape(width, height, called_from_parent); - if(!mActiveTab) - return; - - arrange(); -} - -// This is just LLView::findChildView specialized to restrict the search to LLPanels. -// Optimization for EXT-4068 to avoid searching down to the individual item level -// when inventories are large. -LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse) -{ - for (LLView::child_list_const_iter_t child_it = panel->beginChild(); - child_it != panel->endChild(); ++child_it) - { - LLPanel *child_panel = dynamic_cast(*child_it); - if (!child_panel) - continue; - if (child_panel->getName() == name) - return child_panel; - } - if (recurse) - { - for (LLView::child_list_const_iter_t child_it = panel->beginChild(); - child_it != panel->endChild(); ++child_it) - { - LLPanel *child_panel = dynamic_cast(*child_it); - if (!child_panel) - continue; - LLPanel *found_panel = findChildPanel(child_panel,name,recurse); - if (found_panel) - { - return found_panel; - } - } - } - return NULL; -} - -/** - * Activate tab with "panel_name" panel - * if no such tab - return false, otherwise true. - * TODO* In some cases a pointer to a panel of - * a specific class may be needed so this method - * would need to use templates. - */ -LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& params) -{ - LLPanel* new_panel = NULL; - - // Look up the tab in the list of detached tabs. - child_vector_const_iter_t child_it; - for ( child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it) - { - new_panel = openChildPanel(*child_it, panel_name, params); - if (new_panel) break; - } - - // Look up the tab in the list of attached tabs. - for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) - { - new_panel = openChildPanel(*child_it, panel_name, params); - if (new_panel) break; - } - - return new_panel; -} - -bool LLSideTray::hidePanel(const std::string& panel_name) -{ - bool panelHidden = false; - - LLPanel* panelp = getPanel(panel_name); - - if (panelp) - { - LLView* parentp = panelp->getParent(); - - // Collapse the side bar if the panel or the panel's parent is an attached tab - if (isTabAttached(panel_name) || (parentp && isTabAttached(parentp->getName()))) - { - collapseSideBar(); - panelHidden = true; - } - else - { - panelHidden = LLFloaterReg::hideInstance("side_bar_tab", panel_name); - - if (!panelHidden) - { - // Look up the panel in the list of detached tabs. - for (child_vector_const_iter_t child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it) - { - LLPanel *detached_panel = dynamic_cast(*child_it); - - if (detached_panel) - { - // Hide this detached panel if it is a parent of our panel - if (findChildPanel(detached_panel, panel_name, true) != NULL) - { - panelHidden = LLFloaterReg::hideInstance("side_bar_tab", detached_panel->getName()); - break; - } - } - } - } - } - } - - return panelHidden; -} - -void LLSideTray::togglePanel(LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params) -{ - if(!sub_panel) - return; - - // If a panel is visible and attached to Side Tray (has LLSideTray among its ancestors) - // it should be toggled off by collapsing Side Tray. - if (sub_panel->isInVisibleChain() && sub_panel->hasAncestor(this)) - { - LLSideTray::getInstance()->collapseSideBar(); - } - else - { - LLSideTray::getInstance()->showPanel(panel_name, params); - } -} - -LLPanel* LLSideTray::getPanel(const std::string& panel_name) -{ - // Look up the panel in the list of detached tabs. - for ( child_vector_const_iter_t child_it = mDetachedTabs.begin(); child_it != mDetachedTabs.end(); ++child_it) - { - LLPanel *panel = findChildPanel(*child_it,panel_name,true); - if(panel) - { - return panel; - } - } - - // Look up the panel in the list of attached tabs. - for ( child_vector_const_iter_t child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) - { - LLPanel *panel = findChildPanel(*child_it,panel_name,true); - if(panel) - { - return panel; - } - } - return NULL; -} - -LLPanel* LLSideTray::getActivePanel() -{ - if (mActiveTab && !mCollapsed) - { - return mActiveTab->getPanel(); - } - return NULL; -} - -bool LLSideTray::isPanelActive(const std::string& panel_name) -{ - LLPanel *panel = getActivePanel(); - if (!panel) return false; - return (panel->getName() == panel_name); -} - -void LLSideTray::setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater /* = true*/) -{ - // Lookup tab by name. - LLSideTrayTab* tab = getTab(tab_name); - if (!tab) - { // not a docked tab, look through detached tabs - for(child_vector_iter_t tab_it = mDetachedTabs.begin(), tab_end_it = mDetachedTabs.end(); - tab_it != tab_end_it; - ++tab_it) - { - if ((*tab_it)->getName() == tab_name) - { - tab = *tab_it; - break; - } - } - - } - - llassert(tab != NULL); - - // Toggle its dock state. - if (tab && tab->isDocked() != dock) - { - tab->toggleTabDocked(toggle_floater); - } -} - - -void LLSideTray::updateSidetrayVisibility() -{ - // set visibility of parent container based on collapsed state - LLView* parent = getParent(); - if (parent) - { - bool old_visibility = parent->getVisible(); - bool new_visibility = !mCollapsed && !gAgentCamera.cameraMouselook(); - - if (old_visibility != new_visibility) - { - parent->setVisible(new_visibility); - - // Signal change of visible width. - //llinfos << "Visible: " << new_visibility << llendl; - mVisibleWidthChangeSignal(this, new_visibility); - } - } -} - -S32 LLSideTray::getVisibleWidth() -{ - return (isInVisibleChain() && !mCollapsed) ? getRect().getWidth() : 0; -} - -void LLSideTray::setVisibleWidthChangeCallback(const commit_signal_t::slot_type& cb) -{ - mVisibleWidthChangeSignal.connect(cb); -} diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h deleted file mode 100644 index 17158329dc..0000000000 --- a/indra/newview/llsidetray.h +++ /dev/null @@ -1,260 +0,0 @@ -/** - * @file LLSideTray.h - * @brief SideBar header file - * - * $LicenseInfo:firstyear=2004&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_LLSIDETRAY_H_ -#define LL_LLSIDETRAY_H_ - -#include "llpanel.h" -#include "string" - -class LLAccordionCtrl; -class LLSideTrayTab; - -// Define an interface for side tab button badge values -class LLSideTrayTabBadgeDriver -{ -public: - virtual std::string getBadgeString() const = 0; -}; - -// Deal with LLSideTrayTab being opaque. Generic do-nothing cast... -template -T tab_cast(LLSideTrayTab* tab) { return tab; } -// specialized for implementation in presence of LLSideTrayTab definition -template <> -LLPanel* tab_cast(LLSideTrayTab* tab); - -// added inheritance from LLDestroyClass to enable Side Tray perform necessary actions -// while disconnecting viewer in LLAppViewer::disconnectViewer(). -// LLDestroyClassList::instance().fireCallbacks() calls destroyClass method. See EXT-245. -class LLSideTray : public LLPanel, private LLDestroyClass -{ - friend class LLUICtrlFactory; - friend class LLDestroyClass; - friend class LLSideTrayTab; - friend class LLSideTrayButton; -public: - - LOG_CLASS(LLSideTray); - - struct Params - : public LLInitParam::Block - { - // initial state - Optional collapsed; - Optional tab_btn_image_normal, - tab_btn_image_selected; - - Optional default_button_width, - default_button_height, - default_button_margin; - - Params(); - }; - - static LLSideTray* getInstance (); - static bool instanceCreated (); -protected: - LLSideTray(const Params& params); - typedef std::vector child_vector_t; - typedef child_vector_t::iterator child_vector_iter_t; - typedef child_vector_t::const_iterator child_vector_const_iter_t; - typedef child_vector_t::reverse_iterator child_vector_reverse_iter_t; - typedef child_vector_t::const_reverse_iterator child_vector_const_reverse_iter_t; - typedef std::vector tab_order_vector_t; - typedef tab_order_vector_t::const_iterator tab_order_vector_const_iter_t; - -public: - - // interface functions - - /** - * Select tab with specific name and set it active - * - * @param name Tab to switch to. - * @param keep_prev_visible Whether to keep the previously selected tab visible. - */ - bool selectTabByName (const std::string& name, bool keep_prev_visible = false); - - /** - * Select tab with specific index and set it active - */ - bool selectTabByIndex(size_t index); - - /** - * Activate tab with "panel_name" panel - * if no such tab - return NULL, otherwise a pointer to the panel - * Pass params as array, or they may be overwritten(example - params["name"]="nearby") - */ - LLPanel* showPanel (const std::string& panel_name, const LLSD& params = LLSD()); - - bool hidePanel (const std::string& panel_name); - - /** - * Toggling Side Tray tab which contains "sub_panel" child of "panel_name" panel. - * If "sub_panel" is not visible Side Tray is opened to display it, - * otherwise Side Tray is collapsed. - * params are passed to "panel_name" panel onOpen(). - */ - void togglePanel (LLPanel* &sub_panel, const std::string& panel_name, const LLSD& params = LLSD()); - - /* - * get the panel (don't show it or do anything else with it) - */ - LLPanel* getPanel (const std::string& panel_name); - LLPanel* getActivePanel (); - bool isPanelActive (const std::string& panel_name); - - void setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater = true); - - /* - * get the panel of given type T (don't show it or do anything else with it) - */ - template - T* getPanel(const std::string& panel_name) - { - T* panel = dynamic_cast(getPanel(panel_name)); - if (!panel) - { - llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl; - return NULL; - } - return panel; - } - - /* - * collapse SideBar, hiding visible tab and moving tab buttons - * to the right corner of the screen - */ - void collapseSideBar (); - - /* - * expand SideBar - * - * @param open_active Whether to call onOpen() for the active tab. - */ - void expandSideBar(bool open_active = true); - - - /** - *hightlight if focused. manly copypaste from highlightFocusedFloater - */ - void highlightFocused(); - - void setVisible(BOOL visible) - { - if (getParent()) getParent()->setVisible(visible); - } - - LLPanel* getButtonsPanel() { return mButtonsPanel; } - - bool getCollapsed() { return mCollapsed; } - - void setTabButtonBadgeDriver(std::string tabName, LLSideTrayTabBadgeDriver* driver); - -public: - virtual ~LLSideTray(){}; - - virtual BOOL postBuild(); - - BOOL handleMouseDown (S32 x, S32 y, MASK mask); - - void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE); - - - /** - * @return side tray width if it's visible and expanded, 0 otherwise. - * - * Not that width of the tab buttons is not included. - * - * @see setVisibleWidthChangeCallback() - */ - S32 getVisibleWidth(); - - void setVisibleWidthChangeCallback(const commit_signal_t::slot_type& cb); - - void updateSidetrayVisibility(); - - void handleLoginComplete(); - - bool isTabAttached (const std::string& name); - -protected: - bool addChild (LLView* view, S32 tab_group); - bool removeTab (LLSideTrayTab* tab); // Used to detach tabs temporarily - bool addTab (LLSideTrayTab* tab); // Used to re-attach tabs - bool hasTabs (); - - const LLSideTrayTab* getActiveTab() const { return mActiveTab; } - LLSideTrayTab* getTab(const std::string& name); - - void createButtons (); - - void arrange (); - void detachTabs (); - void reflectCollapseChange(); - void processTriState (); - - void toggleTabButton (LLSideTrayTab* tab); - - LLPanel* openChildPanel (LLSideTrayTab* tab, const std::string& panel_name, const LLSD& params); - - void onTabButtonClick(std::string name); - void onToggleCollapse(); - -private: - // Implementation of LLDestroyClass - static void destroyClass() - { - // Disable SideTray to avoid crashes. EXT-245 - if (LLSideTray::instanceCreated()) - LLSideTray::getInstance()->setEnabled(FALSE); - } - -private: - // Since we provide no public way to query mTabs and mDetachedTabs, give - // LLSideTrayListener friend access. - friend class LLSideTrayListener; - LLPanel* mButtonsPanel; - typedef std::map button_map_t; - button_map_t mTabButtons; - typedef std::map badge_map_t; - badge_map_t mTabButtonBadgeDrivers; - child_vector_t mTabs; - child_vector_t mDetachedTabs; - tab_order_vector_t mOriginalTabOrder; - LLSideTrayTab* mActiveTab; - - commit_signal_t mVisibleWidthChangeSignal; - - LLButton* mCollapseButton; - bool mCollapsed; - - static LLSideTray* sInstance; -}; - -#endif - diff --git a/indra/newview/llsidetraylistener.cpp b/indra/newview/llsidetraylistener.cpp deleted file mode 100644 index cd6fa28948..0000000000 --- a/indra/newview/llsidetraylistener.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/** - * @file llsidetraylistener.cpp - * @author Nat Goodspeed - * @date 2011-02-15 - * @brief Implementation for llsidetraylistener. - * - * $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$ - */ - -// Precompiled header -#include "llviewerprecompiledheaders.h" -// associated header -#include "llsidetraylistener.h" -// STL headers -// std headers -// external library headers -// other Linden headers -#include "llsidetray.h" -#include "llsdutil.h" - -LLSideTrayListener::LLSideTrayListener(const Getter& getter): - LLEventAPI("LLSideTray", - "Operations on side tray (e.g. query state, query tabs)"), - mGetter(getter) -{ - add("getCollapsed", "Send on [\"reply\"] an [\"open\"] Boolean", - &LLSideTrayListener::getCollapsed, LLSDMap("reply", LLSD())); - add("getTabs", - "Send on [\"reply\"] a map of tab names and info about them", - &LLSideTrayListener::getTabs, LLSDMap("reply", LLSD())); - add("getPanels", - "Send on [\"reply\"] data about panels available with SideTray.ShowPanel", - &LLSideTrayListener::getPanels, LLSDMap("reply", LLSD())); -} - -void LLSideTrayListener::getCollapsed(const LLSD& event) const -{ - sendReply(LLSDMap("open", ! mGetter()->getCollapsed()), event); -} - -void LLSideTrayListener::getTabs(const LLSD& event) const -{ - LLSD reply; - - LLSideTray* tray = mGetter(); - LLSD::Integer ord(0); - for (LLSideTray::child_list_const_iter_t chi(tray->beginChild()), chend(tray->endChild()); - chi != chend; ++chi, ++ord) - { - LLView* child = *chi; - // How much info is important? Toss in as much as seems reasonable for - // each tab. But to me, at least for the moment, the most important - // item is the tab name. - LLSD info; - // I like the idea of returning a map keyed by tab name. But as - // compared to an array of maps, that loses sequence information. - // Address that by indicating the original order in each map entry. - info["ord"] = ord; - info["visible"] = bool(child->getVisible()); - info["enabled"] = bool(child->getEnabled()); - info["available"] = child->isAvailable(); - reply[child->getName()] = info; - } - - sendReply(reply, event); -} - -static LLSD getTabInfo(LLPanel* tab) -{ - LLSD panels; - for (LLPanel::tree_iterator_t ti(tab->beginTreeDFS()), tend(tab->endTreeDFS()); - ti != tend; ++ti) - { - // *ti is actually an LLView*, which had better not be NULL - LLView* view(*ti); - if (! view) - { - LL_ERRS("LLSideTrayListener") << "LLSideTrayTab '" << tab->getName() - << "' has a NULL child LLView*" << LL_ENDL; - } - - // The logic we use to decide what "panel" names to return is heavily - // based on LLSideTray::showPanel(): the function that actually - // implements the "SideTray.ShowPanel" operation. showPanel(), in - // turn, depends on LLSideTray::openChildPanel(): when - // openChildPanel() returns non-NULL, showPanel() stops searching - // attached and detached LLSideTrayTab tabs. - - // For each LLSideTrayTab, openChildPanel() first calls - // findChildView(panel_name, true). In other words, panel_name need - // not be a direct LLSideTrayTab child, it's sought recursively. - // That's why we use (begin|end)TreeDFS() in this loop. - - // But this tree_iterator_t loop will actually traverse every widget - // in every panel. Returning all those names will not help our caller: - // passing most such names to openChildPanel() would not do what we - // want. Even though the code suggests that passing ANY valid - // side-panel widget name to openChildPanel() will open the tab - // containing that widget, results could get confusing since followup - // (onOpen()) logic wouldn't be invoked, and showPanel() wouldn't stop - // searching because openChildPanel() would return NULL. - - // We must filter these LLView items, using logic that (sigh!) mirrors - // openChildPanel()'s own. - - // openChildPanel() returns a non-NULL LLPanel* when either: - // - the LLView is a direct child of an LLSideTrayPanelContainer - // - the LLView is itself an LLPanel. - // But as LLSideTrayPanelContainer can directly contain LLView items - // that are NOT themselves LLPanels (e.g. "sidebar_me" contains an - // LLButton called "Jump Right Arrow"), we'd better focus only on - // LLSideTrayPanelContainer children that are themselves LLPanel - // items. Which means that the second test completely subsumes the - // first. - LLPanel* panel(dynamic_cast(view)); - if (panel) - { - // Maybe it's overkill to construct an LLSD::Map for each panel, but - // the possibility remains that we might want to deliver more info - // about each panel than just its name. - panels.append(LLSDMap("name", panel->getName())); - } - } - - return LLSDMap("panels", panels); -} - -void LLSideTrayListener::getPanels(const LLSD& event) const -{ - LLSD reply; - - LLSideTray* tray = mGetter(); - // Iterate through the attached tabs. - LLSD::Integer ord(0); - for (LLSideTray::child_vector_t::const_iterator - ati(tray->mTabs.begin()), atend(tray->mTabs.end()); - ati != atend; ++ati) - { - // We don't have access to LLSideTrayTab: the class definition is - // hidden in llsidetray.cpp. But as LLSideTrayTab isa LLPanel, use the - // LLPanel API. Unfortunately, without the LLSideTrayTab definition, - // the compiler doesn't even know this LLSideTrayTab* is an LLPanel*. - // Persuade it. - LLPanel* tab(tab_cast(*ati)); - reply[tab->getName()] = getTabInfo(tab).with("attached", true).with("ord", ord); - } - - // Now iterate over the detached tabs. These can also be opened via - // SideTray.ShowPanel. - ord = 0; - for (LLSideTray::child_vector_t::const_iterator - dti(tray->mDetachedTabs.begin()), dtend(tray->mDetachedTabs.end()); - dti != dtend; ++dti) - { - LLPanel* tab(tab_cast(*dti)); - reply[tab->getName()] = getTabInfo(tab).with("attached", false).with("ord", ord); - } - - sendReply(reply, event); -} diff --git a/indra/newview/llsidetraylistener.h b/indra/newview/llsidetraylistener.h deleted file mode 100644 index 51e2137762..0000000000 --- a/indra/newview/llsidetraylistener.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file llsidetraylistener.h - * @author Nat Goodspeed - * @date 2011-02-15 - * @brief - * - * $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$ - */ - -#if ! defined(LL_LLSIDETRAYLISTENER_H) -#define LL_LLSIDETRAYLISTENER_H - -#include "lleventapi.h" -#include - -class LLSideTray; -class LLSD; - -class LLSideTrayListener: public LLEventAPI -{ - typedef boost::function Getter; - -public: - LLSideTrayListener(const Getter& getter); - -private: - void getCollapsed(const LLSD& event) const; - void getTabs(const LLSD& event) const; - void getPanels(const LLSD& event) const; - - Getter mGetter; -}; - -#endif /* ! defined(LL_LLSIDETRAYLISTENER_H) */ diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 749acea6c1..4511a4806a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -131,7 +131,6 @@ #include "llsecondlifeurls.h" #include "llselectmgr.h" #include "llsky.h" -#include "llsidetray.h" #include "llstatview.h" #include "llstatusbar.h" // sendMoneyBalanceRequest(), owns L$ balance #include "llsurface.h" diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 477718d118..f6d7ceeec3 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -36,7 +36,6 @@ #include "llfloaterworldmap.h" #include "llpanellogin.h" #include "llregionhandle.h" -#include "llsidetray.h" #include "llslurl.h" #include "llstartup.h" // gStartupState #include "llweb.h" diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0b3b8e23a5..174a4d6409 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -95,7 +95,6 @@ #include "llfloatersellland.h" #include "llfloatersettingsdebug.h" #include "llfloatersidepanelcontainer.h" -#include "llfloatersidetraytab.h" #include "llfloatersnapshot.h" #include "llfloatersounddevices.h" #include "llfloatertelehub.h" @@ -276,7 +275,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml", &LLFloaterReg::build); LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 50fb5a00e4..f8ef81b9f4 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -45,7 +45,6 @@ #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" #include "llgesturemgr.h" -#include "llsidetray.h" #include "llinventorybridge.h" #include "llinventorypanel.h" diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5e781e0e4c..fbfde711a9 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -83,7 +83,6 @@ #include "llrootview.h" #include "llsceneview.h" #include "llselectmgr.h" -#include "llsidetray.h" #include "llstatusbar.h" #include "lltextureview.h" #include "lltoolcomp.h" @@ -3348,15 +3347,6 @@ bool enable_sitdown_self() return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } -// Used from the login screen to aid in UI work on side tray -void handle_show_side_tray() -{ - LLSideTray* side_tray = LLSideTray::getInstance(); - LLView* root = gViewerWindow->getRootView(); - // automatically removes and re-adds if there already - root->addChild(side_tray); -} - // Toggle one of "People" panel tabs in side tray. class LLTogglePanelPeopleTab : public view_listener_t { @@ -3367,21 +3357,11 @@ class LLTogglePanelPeopleTab : public view_listener_t LLSD param; param["people_panel_tab_name"] = panel_name; - static LLPanel* friends_panel = NULL; - static LLPanel* groups_panel = NULL; - static LLPanel* nearby_panel = NULL; - - if (panel_name == "friends_panel") - { - return togglePeoplePanel(friends_panel, panel_name, param); - } - else if (panel_name == "groups_panel") - { - return togglePeoplePanel(groups_panel, panel_name, param); - } - else if (panel_name == "nearby_panel") + if ( panel_name == "friends_panel" + || panel_name == "groups_panel" + || panel_name == "nearby_panel") { - return togglePeoplePanel(nearby_panel, panel_name, param); + return togglePeoplePanel(panel_name, param); } else { @@ -3389,16 +3369,20 @@ class LLTogglePanelPeopleTab : public view_listener_t } } - static bool togglePeoplePanel(LLPanel* &panel, const std::string& panel_name, const LLSD& param) + static bool togglePeoplePanel(const std::string& panel_name, const LLSD& param) { + LLPanel *panel = LLFloaterSidePanelContainer::getPanel("people", panel_name); if(!panel) + return false; + + if (panel->isInVisibleChain()) { - panel = LLSideTray::getInstance()->getPanel(panel_name); - if(!panel) - return false; + LLFloaterReg::hideInstance("people"); + } + else + { + LLFloaterSidePanelContainer::showPanel("people", "panel_people", param) ; } - - LLSideTray::getInstance()->togglePanel(panel, "panel_people", param); return true; } @@ -8067,7 +8051,6 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedCheckDebugKeys(), "Advanced.CheckDebugKeys"); view_listener_t::addMenu(new LLAdvancedToggleDebugWindowProc(), "Advanced.ToggleDebugWindowProc"); view_listener_t::addMenu(new LLAdvancedCheckDebugWindowProc(), "Advanced.CheckDebugWindowProc"); - commit.add("Advanced.ShowSideTray", boost::bind(&handle_show_side_tray)); // Advanced > XUI commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance())); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5665a68add..1c07d36e7e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -74,7 +74,6 @@ #include "llrecentpeople.h" #include "llscriptfloater.h" #include "llselectmgr.h" -#include "llsidetray.h" #include "llstartup.h" #include "llsky.h" #include "llslurl.h" @@ -6800,7 +6799,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelLandCovenant::updateEstateOwnerName(owner_name); LLFloaterBuyLand::updateEstateOwnerName(owner_name); - LLPanelPlaceProfile* panel = LLSideTray::getInstance()->getPanel("panel_place_profile"); + LLPanelPlaceProfile* panel = LLFloaterSidePanelContainer::getPanel("places", "panel_place_profile"); if (panel) { panel->updateEstateName(estate_name); @@ -6934,7 +6933,7 @@ void onCovenantLoadComplete(LLVFS *vfs, LLPanelLandCovenant::updateCovenantText(covenant_text); LLFloaterBuyLand::updateCovenantText(covenant_text, asset_uuid); - LLPanelPlaceProfile* panel = LLSideTray::getInstance()->getPanel("panel_place_profile"); + LLPanelPlaceProfile* panel = LLFloaterSidePanelContainer::getPanel("places", "panel_place_profile"); if (panel) { panel->updateCovenantText(covenant_text); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index b308e952ad..0a9fae68a6 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -51,7 +51,6 @@ #include "llpreviewtexture.h" #include "llscrollbar.h" #include "llscrollcontainer.h" -#include "llsidetray.h" #include "lltooldraganddrop.h" #include "lltooltip.h" #include "lltrans.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6c9ee17a76..149f9893d7 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -133,7 +133,6 @@ #include "llpreviewtexture.h" #include "llprogressview.h" #include "llresmgr.h" -#include "llsidetray.h" #include "llselectmgr.h" #include "llrootview.h" #include "llrendersphere.h" @@ -1773,7 +1772,6 @@ void LLViewerWindow::initBase() // placeholder widget that controls where "world" is rendered mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle(); - mNonSideTrayView = main_view->getChildView("non_side_tray_view")->getHandle(); mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle(); mPopupView = main_view->getChild("popup_holder"); mHintHolder = main_view->getChild("hint_holder")->getHandle(); @@ -1934,22 +1932,6 @@ void LLViewerWindow::initWorldUI() panel_ssf_container->addChild(panel_stand_stop_flying); panel_ssf_container->setVisible(TRUE); - // put sidetray in container - LLPanel* side_tray_container = getRootView()->getChild("side_tray_container"); - LLSideTray* sidetrayp = LLSideTray::getInstance(); - sidetrayp->setShape(side_tray_container->getLocalRect()); - // don't follow right edge to avoid spurious resizes, since we are using a fixed width layout - sidetrayp->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_BOTTOM); - side_tray_container->addChild(sidetrayp); - side_tray_container->setVisible(FALSE); - - // put sidetray buttons in their own panel - LLPanel* buttons_panel = sidetrayp->getButtonsPanel(); - LLPanel* buttons_panel_container = getRootView()->getChild("side_bar_tabs"); - buttons_panel->setShape(buttons_panel_container->getLocalRect()); - buttons_panel->setFollowsAll(); - buttons_panel_container->addChild(buttons_panel); - // Load and make the toolbars visible // Note: we need to load the toolbars only *after* the user is logged in and IW if (gToolBarView) @@ -3310,9 +3292,6 @@ void LLViewerWindow::updateKeyboardFocus() // make sure floater visible order is in sync with tab order gFloaterView->syncFloaterTabOrder(); } - - if(LLSideTray::instanceCreated())//just getInstance will create sidetray. we don't want this - LLSideTray::getInstance()->highlightFocused(); } static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View"); @@ -3336,12 +3315,6 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) new_world_rect.mTop = llround((F32)new_world_rect.mTop * mDisplayScale.mV[VY]); } - if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE) - { - // use right edge of window, ignoring sidebar - new_world_rect.mRight = mWindowRectRaw.mRight; - } - if (mWorldViewRectRaw != new_world_rect) { mWorldViewRectRaw = new_world_rect; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 47e0fdeab1..872eb12753 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -282,7 +282,6 @@ public: void updateKeyboardFocus(); void updateWorldViewRect(bool use_full_window=false); - LLView* getNonSideTrayView() { return mNonSideTrayView.get(); } LLView* getFloaterViewHolder() { return mFloaterViewHolder.get(); } LLView* getToolBarHolder() { return mToolBarHolder.get(); } LLView* getHintHolder() { return mHintHolder.get(); } @@ -445,7 +444,6 @@ protected: std::string mInitAlert; // Window / GL initialization requires an alert LLHandle mWorldViewPlaceholder; // widget that spans the portion of screen dedicated to rendering the 3d world - LLHandle mNonSideTrayView; // parent of world view + bottom bar, etc...everything but the side tray LLHandle mFloaterViewHolder; // container for floater_view LLHandle mToolBarHolder; // container for toolbars LLHandle mHintHolder; // container for hints diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 276e8f462d..d8aa0b7d5c 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -37,7 +37,6 @@ #include "llinventorymodel.h" #include "llinventoryobserver.h" #include "llsidepanelappearance.h" -#include "llsidetray.h" #include "lltexlayer.h" #include "lltexglobalcolor.h" #include "lltrans.h" diff --git a/indra/newview/llworldview.cpp b/indra/newview/llworldview.cpp deleted file mode 100644 index f5dc2a5290..0000000000 --- a/indra/newview/llworldview.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file llworldview.cpp - * @brief LLWorldView class implementation - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llworldview.h" - -#include "llviewercontrol.h" -#include "llsidetray.h" -///////////////////////////////////////////////////// -// LLFloaterView - -static LLDefaultChildRegistry::Register r("world_view"); - -LLWorldView::LLWorldView(const Params& p) -: LLUICtrl (p) -{ - gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLWorldView::toggleSidebarCameraMovement, this, _2)); -} - -void LLWorldView::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - //if (FALSE == gSavedSettings.getBOOL("SidebarCameraMovement") ) - //{ - // LLView* main_view = LLUI::getRootView()->findChild("main_view"); - // if(main_view) - // { - // width = main_view->getRect().getWidth(); - // } - //} - - LLUICtrl::reshape(width, height, called_from_parent); -} -void LLWorldView::toggleSidebarCameraMovement(const LLSD::Boolean& new_visibility) -{ - reshape(getParent()->getRect().getWidth(),getRect().getHeight()); -} - diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 6ece01b2ba..d8f593715f 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -90,14 +90,6 @@ top="0" visible="false" width="1024"/> - - - - - Date: Thu, 29 Sep 2011 15:01:15 -0700 Subject: EXP-1211, EXP-1257 : Save and load the button type along with the toolbars, add a force default load option, enforce consistency between menus and toolbars --- indra/newview/app_settings/toolbars.xml | 6 ++++-- indra/newview/skins/default/xui/en/menu_toolbars.xml | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml index 55327ea919..19dec78c63 100644 --- a/indra/newview/app_settings/toolbars.xml +++ b/indra/newview/app_settings/toolbars.xml @@ -1,6 +1,7 @@ - + @@ -10,7 +11,8 @@ - + diff --git a/indra/newview/skins/default/xui/en/menu_toolbars.xml b/indra/newview/skins/default/xui/en/menu_toolbars.xml index de13fec670..59912b5503 100644 --- a/indra/newview/skins/default/xui/en/menu_toolbars.xml +++ b/indra/newview/skins/default/xui/en/menu_toolbars.xml @@ -12,11 +12,11 @@ + name="icons_with_text"> + parameter="icons_with_text" /> + parameter="icons_with_text" /> Date: Thu, 29 Sep 2011 15:25:24 -0700 Subject: * Updated toybox so it will always display buttons in alphabetical order based on the localized button labels. --- indra/newview/llfloatertoybox.cpp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index c3fa322f85..d7f114043d 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -33,6 +33,7 @@ #include "llpanel.h" #include "lltoolbar.h" #include "lltoolbarview.h" +#include "lltrans.h" LLFloaterToybox::LLFloaterToybox(const LLSD& key) @@ -47,6 +48,14 @@ LLFloaterToybox::~LLFloaterToybox() { } +bool compare_localized_command_labels(LLCommand * cmd1, LLCommand * cmd2) +{ + std::string lab1 = LLTrans::getString(cmd1->labelRef()); + std::string lab2 = LLTrans::getString(cmd2->labelRef()); + + return (lab1 < lab2); +} + BOOL LLFloaterToybox::postBuild() { center(); @@ -54,11 +63,13 @@ BOOL LLFloaterToybox::postBuild() mBtnRestoreDefaults = getChild("btn_restore_defaults"); mToolBar = getChild("toybox_toolbar"); + LLCommandManager& cmdMgr = LLCommandManager::instance(); + // - // Create Buttons + // Sort commands by localized labels so they will appear alphabetized in all languages // - LLCommandManager& cmdMgr = LLCommandManager::instance(); + std::list alphabetized_commands; for (U32 i = 0; i < cmdMgr.commandCount(); i++) { @@ -66,10 +77,21 @@ BOOL LLFloaterToybox::postBuild() if (command->availableInToybox()) { - mToolBar->addCommand(command->id()); + alphabetized_commands.push_back(command); } } + alphabetized_commands.sort(compare_localized_command_labels); + + // + // Create Buttons + // + + for (std::list::iterator it = alphabetized_commands.begin(); it != alphabetized_commands.end(); ++it) + { + mToolBar->addCommand((*it)->id()); + } + return TRUE; } -- cgit v1.2.3 From 66e21e0330b2f66b986a1ed76873af9752dcf2e1 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 29 Sep 2011 17:03:36 -0700 Subject: * Added latest set of FUI buttons and labels according to the wiki * Hooked up commands to their respective floaters --- indra/newview/app_settings/commands.xml | 118 ++++++++++++---------- indra/newview/skins/default/textures/textures.xml | 44 ++++---- indra/newview/skins/default/xui/en/strings.xml | 78 +++++++------- 3 files changed, 132 insertions(+), 108 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 5fbd9248c1..224c1b4b48 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -1,12 +1,28 @@ + + + - + - - - - - - + diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index be68c2873e..57ce7fe57a 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -125,27 +125,29 @@ with the same filename but different name - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index feea555fdc..158e1c711d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -16,16 +16,16 @@ Detecting hardware... Loading [APP_NAME]... Clearing cache... - Initializing Texture Cache... + Initializing texture cache... Initializing VFS... - Graphics Initialization Failed. Please Update Your Graphics Driver! + Graphics initialization failed. Please update your graphics driver! Restoring... - Changing Resolution... + Changing resolution... - Fullbright (Legacy) + Fullbright (legacy) Logging in. [APP_NAME] may appear frozen. Please wait. @@ -38,8 +38,8 @@ Initializing multimedia... Loading fonts... Verifying cache files (can take 60-90 seconds)... - Processing Response... - Initializing World... + Processing response... + Initializing world... Decoding images... Initializing QuickTime... QuickTime not found - unable to initialize. @@ -56,7 +56,7 @@ Too many certificates were in the servers Certificate chain. Please contact your Grid administrator. The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrator. - Network Error: Could not establish connection, please check your network connection. + Network error: Could not establish connection, please check your network connection. Login failed. Quit http://join.secondlife.com/ @@ -3652,47 +3652,53 @@ Try enclosing path to the editor with double quotes. Hiding Particles + + About land + Appearance Avatar - Change the appearance of your avatar Build - Building, reshaping terrain Chat - Chat with people nearby Compass - + Destinations Gestures - - How To - - Landmarks - + How to + Inventory Map - - Mini Map - + Marketplace + Mini-map Move - - My Land - Information about the land you're visiting - My Stuff - View and use your belongings People - Places - Destination guide + Preferences + Profile Search - Find... - Settings - Preferences - Shop - Snapshot - Take a picture Speak - Speak with people nearby using your microphone - Upload - View - Changing your view of the world + Nearby voice + + Information about the land you're visiting + Change your avatar + Choose a complete avatar + Building objects and reshaping them + Chat with people nearby using text + Compass + Destinations of interest + Gestures for your avatar + How to do common tasks + View and use your belongings + Map of the world + Go shopping + Show nearby people + Moving your avatar + Friends, groups, and nearby people + Places you've saved + Preferences + Edit or view your profile + Find places, events, people + Take a picture + Speak with people nearby using your microphone + Changing camera angle + People nearby with voice capability -- cgit v1.2.3 From 8fa45941b6ce99c462f19628a17d4db2396286b9 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Fri, 30 Sep 2011 10:00:49 -0700 Subject: EXP-1264 Chat log shows as blank if closing viewer with chat log open and then opening chat floater on next login EXP-1271 Remove UI hints --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llnearbychatbar.cpp | 17 ++++++++++++++--- indra/newview/llnearbychatbar.h | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 148b80e817..1abea6c883 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3190,7 +3190,7 @@ Type Boolean Value - 1 + 0 EnableVoiceChat diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 258aa9a8bf..dbe30e1847 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -451,6 +451,16 @@ BOOL LLNearbyChatBar::postBuild() return TRUE; } +void LLNearbyChatBar::applyRectControl() +{ + LLFloater::applyRectControl(); + if (getRect().getHeight() > getMinHeight()) + { + getChildView("nearby_chat")->setVisible(true); + mExpandedHeight = getRect().getHeight(); + } +} + void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp) { // Update things with the new font whohoo @@ -690,14 +700,15 @@ void LLNearbyChatBar::onToggleNearbyChatPanel() if (nearby_chat->getVisible()) { + mExpandedHeight = getRect().getHeight(); nearby_chat->setVisible(FALSE); - reshape(getRect().getWidth(), 60); - mResizeHandle[0]->setMaxHeight(60); + reshape(getRect().getWidth(), getMinHeight()); + mResizeHandle[0]->setMaxHeight(getMinHeight()); } else { nearby_chat->setVisible(TRUE); - reshape(getRect().getWidth(), 360); + reshape(getRect().getWidth(), mExpandedHeight); mResizeHandle[0]->setMaxHeight(S32_MAX); } } diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 1d28a21ef3..0415f12a0d 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -127,6 +127,8 @@ protected: void onChatBoxCommit(); void onChatFontChange(LLFontGL* fontp); + /* virtual */ void applyRectControl(); + void onToggleNearbyChatPanel(); static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); @@ -140,6 +142,8 @@ protected: LLLineEditor* mChatBox; LLOutputMonitorCtrl* mOutputMonitor; LLLocalSpeakerMgr* mSpeakerMgr; + + S32 mExpandedHeight; }; #endif -- cgit v1.2.3 From ccd619013d851b5a63976205ea06002e92d7f468 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 30 Sep 2011 13:37:03 -0700 Subject: Found and removed duplicate command icon definitions. --- indra/newview/skins/default/textures/textures.xml | 68 ++++++++--------------- 1 file changed, 23 insertions(+), 45 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 57ce7fe57a..4462fb792f 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -125,29 +125,29 @@ with the same filename but different name - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -762,26 +762,4 @@ with the same filename but different name - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From cdc80b1dd34ef533d7500bf1ab89abf3c5d81bb3 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 30 Sep 2011 15:25:02 -0700 Subject: EXP-1205 PROGRESS -- As a User, I want a toybox which will contain all buttons that I can d&d into the toolbars EXP-1268 FIX -- The "Restore Defaults" button should reset the left/right/bottom toolbars to their default states * LLToolBarView::loadDefaultToolbars now a static function * Toybox button callback hooked up to properly restore defaults Reviewed by Merov --- indra/newview/llfloatertoybox.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index d7f114043d..7a6afb4e33 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -61,6 +61,8 @@ BOOL LLFloaterToybox::postBuild() center(); mBtnRestoreDefaults = getChild("btn_restore_defaults"); + mBtnRestoreDefaults->setCommitCallback(boost::bind(&LLToolBarView::loadDefaultToolbars)); + mToolBar = getChild("toybox_toolbar"); LLCommandManager& cmdMgr = LLCommandManager::instance(); -- cgit v1.2.3 From 462f6a00285a92701ecba7cf69d5236f337e0781 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 30 Sep 2011 15:25:41 -0700 Subject: * Updated howto and profile windows to point to different buttons. Web content is still problematic for FUI floaters. --- indra/newview/app_settings/commands.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 224c1b4b48..77bf7cace3 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -70,7 +70,7 @@ label_ref="Command_HowTo_Label" tooltip_ref="Command_HowTo_Tooltip" function="Floater.ToolbarToggle" - parameter="floater_help_browser" + parameter="help_browser" /> Date: Fri, 30 Sep 2011 16:57:08 -0700 Subject: param block cleanup added Flag as value type moved Batch to BatchBlock renamed Choice to ChoiceBlock made merging of parameters for ValueParams consistent (fillFrom and overwriteFrom are inverses of each other now) made iteration over Multiple type params easier initial schema param blocks --- indra/newview/llnamelistctrl.h | 2 +- indra/newview/skins/default/xui/en/panel_toolbar_view.xml | 3 --- indra/newview/skins/default/xui/en/widgets/toolbar.xml | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index d64fdbe6a5..ca9956dc53 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -61,7 +61,7 @@ public: {} }; - struct NameColumn : public LLInitParam::Choice + struct NameColumn : public LLInitParam::ChoiceBlock { Alternative column_index; Alternative column_name; diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index fa7632920b..7bbacc0152 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -33,7 +33,6 @@ follows="all" mouse_opaque="false"> Date: Fri, 30 Sep 2011 18:51:17 -0700 Subject: made toolbars conform to visual specs added ability to specify clip rects in textures.xml --- indra/newview/llviewertexturelist.cpp | 44 +++++++++++++++------- indra/newview/llviewertexturelist.h | 7 +++- indra/newview/skins/default/textures/textures.xml | 6 ++- indra/newview/skins/default/xui/en/main_view.xml | 4 +- .../skins/default/xui/en/panel_toolbar_view.xml | 3 ++ .../skins/default/xui/en/widgets/toolbar.xml | 28 +++++++++----- 6 files changed, 65 insertions(+), 27 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 30ef8b8a29..c64488251a 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1342,7 +1342,8 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority) const BOOL use_mips = FALSE; const LLRect scale_rect = LLRect::null; - return loadUIImageByID(image_id, use_mips, scale_rect, (LLViewerTexture::EBoostLevel)priority); + const LLRect clip_rect = LLRect::null; + return loadUIImageByID(image_id, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority); } LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority) @@ -1356,32 +1357,33 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori const BOOL use_mips = FALSE; const LLRect scale_rect = LLRect::null; - return loadUIImageByName(image_name, image_name, use_mips, scale_rect, (LLViewerTexture::EBoostLevel)priority); + const LLRect clip_rect = LLRect::null; + return loadUIImageByName(image_name, image_name, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority); } LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, - BOOL use_mips, const LLRect& scale_rect, LLViewerTexture::EBoostLevel boost_priority ) + BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority ) { if (boost_priority == LLViewerTexture::BOOST_NONE) { boost_priority = LLViewerTexture::BOOST_UI; } LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority); - return loadUIImage(imagep, name, use_mips, scale_rect); + return loadUIImage(imagep, name, use_mips, scale_rect, clip_rect); } LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, - BOOL use_mips, const LLRect& scale_rect, LLViewerTexture::EBoostLevel boost_priority) + BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority) { if (boost_priority == LLViewerTexture::BOOST_NONE) { boost_priority = LLViewerTexture::BOOST_UI; } LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority); - return loadUIImage(imagep, id.asString(), use_mips, scale_rect); + return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect); } -LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect) +LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect) { if (!imagep) return NULL; @@ -1402,13 +1404,14 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st LLUIImageLoadData* datap = new LLUIImageLoadData; datap->mImageName = name; datap->mImageScaleRegion = scale_rect; + datap->mImageClipRegion = clip_rect; imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL); } return new_imagep; } -LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect) +LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect) { // look for existing image uuid_ui_image_map_t::iterator found_it = mUIImages.find(name); @@ -1418,7 +1421,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s llerrs << "UI Image " << name << " already loaded." << llendl; } - return loadUIImageByName(name, filename, use_mips, scale_rect); + return loadUIImageByName(name, filename, use_mips, scale_rect, clip_rect); } //static @@ -1432,6 +1435,7 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v LLUIImageLoadData* image_datap = (LLUIImageLoadData*)user_data; std::string ui_image_name = image_datap->mImageName; LLRect scale_rect = image_datap->mImageScaleRegion; + LLRect clip_rect = image_datap->mImageClipRegion; if (final) { delete image_datap; @@ -1448,9 +1452,21 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v // from power-of-2 gl image if (success && imagep.notNull() && src_vi && (src_vi->getUrl().compare(0, 7, "file://")==0)) { - F32 clip_x = (F32)src_vi->getOriginalWidth() / (F32)src_vi->getFullWidth(); - F32 clip_y = (F32)src_vi->getOriginalHeight() / (F32)src_vi->getFullHeight(); - imagep->setClipRegion(LLRectf(0.f, clip_y, clip_x, 0.f)); + F32 full_width = (F32)src_vi->getFullWidth(); + F32 full_height = (F32)src_vi->getFullHeight(); + F32 clip_x = (F32)src_vi->getOriginalWidth() / full_width; + F32 clip_y = (F32)src_vi->getOriginalHeight() / full_height; + if (clip_rect != LLRect::null) + { + imagep->setClipRegion(LLRectf(llclamp((F32)clip_rect.mLeft / full_width, 0.f, 1.f), + llclamp((F32)clip_rect.mTop / full_height, 0.f, 1.f), + llclamp((F32)clip_rect.mRight / full_width, 0.f, 1.f), + llclamp((F32)clip_rect.mBottom / full_height, 0.f, 1.f))); + } + else + { + imagep->setClipRegion(LLRectf(0.f, clip_y, clip_x, 0.f)); + } if (scale_rect != LLRect::null) { imagep->setScaleRegion( @@ -1471,6 +1487,7 @@ struct UIImageDeclaration : public LLInitParam::Block Optional file_name; Optional preload; Optional scale; + Optional clip; Optional use_mips; UIImageDeclaration() @@ -1478,6 +1495,7 @@ struct UIImageDeclaration : public LLInitParam::Block file_name("file_name"), preload("preload", false), scale("scale"), + clip("clip"), use_mips("use_mips", false) {} }; @@ -1572,7 +1590,7 @@ bool LLUIImageList::initFromFile() { continue; } - preloadUIImage(image.name, file_name, image.use_mips, image.scale); + preloadUIImage(image.name, file_name, image.use_mips, image.scale, image.clip); } if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload")) diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 7f4dd0ae88..e0a362596d 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -220,24 +220,27 @@ public: bool initFromFile(); - LLPointer preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect); + LLPointer preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect); static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); private: LLPointer loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, + const LLRect& clip_rect = LLRect::null, LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); LLPointer loadUIImageByID(const LLUUID& id, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, + const LLRect& clip_rect = LLRect::null, LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); - LLPointer loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null); + LLPointer loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null); struct LLUIImageLoadData { std::string mImageName; LLRect mImageScaleRegion; + LLRect mImageClipRegion; }; typedef std::map< std::string, LLPointer > uuid_ui_image_map_t; diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 4462fb792f..68773947ec 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -473,7 +473,11 @@ with the same filename but different name - + + + + + diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index d8f593715f..cf566d7d23 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -100,12 +100,12 @@ visible="false" width="500"/> - + visible="false"/>--> diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index 7bbacc0152..44da813f61 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -39,6 +39,7 @@ width="30" mouse_opaque="false"> - - - Date: Mon, 3 Oct 2011 11:28:22 -0700 Subject: updated xui for toybox to reflect changes to param blocks --- indra/newview/skins/default/xui/en/floater_toybox.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index feb19571b2..de39032cbf 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -48,8 +48,8 @@ button_display_mode="icons_with_text" follows="all" left="20" - max_button_width="140" - min_button_width="70" + button_icon_and_text.max_button_width="140" + button_icon_and_text.min_button_width="70" name="toybox_toolbar" pad_left="5" pad_right="5" -- cgit v1.2.3 From cd467cc34f876920b35d3570f50dbad54ce4a42c Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 3 Oct 2011 16:27:24 -0700 Subject: EXP-1286 : First pass at Drag and Drop of tools. Not functional. Most hooks into the LLToolDragAndDrop system in to support the new AT_WIDGET and SOURCE_VIEWER --- indra/newview/CMakeLists.txt | 2 + indra/newview/lltoolbarview.cpp | 390 ++++++++++++++++++++++++++++++++++++ indra/newview/lltoolbarview.h | 102 ++++++++++ indra/newview/lltooldraganddrop.cpp | 5 + indra/newview/lltooldraganddrop.h | 3 +- indra/newview/llviewerassettype.cpp | 4 +- 6 files changed, 504 insertions(+), 2 deletions(-) create mode 100644 indra/newview/lltoolbarview.cpp create mode 100644 indra/newview/lltoolbarview.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c488d51ba5..ce47cca16f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -481,6 +481,7 @@ set(viewer_SOURCE_FILES lltoastpanel.cpp lltoastscripttextbox.cpp lltool.cpp + lltoolbarview.cpp lltoolbrush.cpp lltoolcomp.cpp lltooldraganddrop.cpp @@ -1039,6 +1040,7 @@ set(viewer_HEADER_FILES lltoastpanel.h lltoastscripttextbox.h lltool.h + lltoolbarview.h lltoolbrush.h lltoolcomp.h lltooldraganddrop.h diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp new file mode 100644 index 0000000000..929486a185 --- /dev/null +++ b/indra/newview/lltoolbarview.cpp @@ -0,0 +1,390 @@ +/** + * @file lltoolbarview.cpp + * @author Merov Linden + * @brief User customizable toolbar 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$ + */ + +#include "linden_common.h" + +#include "lltoolbarview.h" + +#include "lldir.h" +#include "llxmlnode.h" +#include "lltoolbar.h" +#include "llbutton.h" +#include "lltooldraganddrop.h" +#include "llclipboard.h" + +#include + +LLToolBarView* gToolBarView = NULL; + +static LLDefaultChildRegistry::Register r("toolbar_view"); +bool LLToolBarView::sDragStarted = false; + +LLToolBarView::Toolbar::Toolbar() +: button_display_mode("button_display_mode"), + commands("command") +{} + +LLToolBarView::ToolbarSet::ToolbarSet() +: left_toolbar("left_toolbar"), + right_toolbar("right_toolbar"), + bottom_toolbar("bottom_toolbar") +{} + + +LLToolBarView::LLToolBarView(const LLToolBarView::Params& p) +: LLUICtrl(p), + mToolbarLeft(NULL), + mToolbarRight(NULL), + mToolbarBottom(NULL) +{ +} + +void LLToolBarView::initFromParams(const LLToolBarView::Params& p) +{ + // Initialize the base object + LLUICtrl::initFromParams(p); +} + +LLToolBarView::~LLToolBarView() +{ + saveToolbars(); +} + +BOOL LLToolBarView::postBuild() +{ + mToolbarLeft = getChild("toolbar_left"); + mToolbarRight = getChild("toolbar_right"); + mToolbarBottom = getChild("toolbar_bottom"); + + mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); + mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); + mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3)); + + mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); + mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); + mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3)); + + mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); + mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); + mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3)); + + return TRUE; +} + +bool LLToolBarView::hasCommand(const LLCommandId& commandId) const +{ + bool has_command = false; + if (mToolbarLeft && !has_command) + { + has_command = mToolbarLeft->hasCommand(commandId); + } + if (mToolbarRight && !has_command) + { + has_command = mToolbarRight->hasCommand(commandId); + } + if (mToolbarBottom && !has_command) + { + has_command = mToolbarBottom->hasCommand(commandId); + } + return has_command; +} + +bool LLToolBarView::addCommand(const LLCommandId& command, LLToolBar* toolbar) +{ + LLCommandManager& mgr = LLCommandManager::instance(); + if (mgr.getCommand(command)) + { + toolbar->addCommand(command); + } + else + { + llwarns << "Toolbars creation : the command " << command.name() << " cannot be found in the command manager" << llendl; + return false; + } + return true; +} + +bool LLToolBarView::loadToolbars(bool force_default) +{ + LLToolBarView::ToolbarSet toolbar_set; + + // Load the toolbars.xml file + std::string toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "toolbars.xml"); + if (force_default) + { + toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "toolbars.xml"); + } + else if (!gDirUtilp->fileExists(toolbar_file)) + { + llwarns << "User toolbars def not found -> use default" << llendl; + toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "toolbars.xml"); + } + + LLXMLNodePtr root; + if(!LLXMLNode::parseFile(toolbar_file, root, NULL)) + { + llerrs << "Unable to load toolbars from file: " << toolbar_file << llendl; + return false; + } + if(!root->hasName("toolbars")) + { + llwarns << toolbar_file << " is not a valid toolbars definition file" << llendl; + return false; + } + + // Parse the toolbar settings + LLXUIParser parser; + parser.readXUI(root, toolbar_set, toolbar_file); + if (!toolbar_set.validateBlock()) + { + llerrs << "Unable to validate toolbars from file: " << toolbar_file << llendl; + return false; + } + + // Clear the toolbars now before adding the loaded commands and settings + if (mToolbarLeft) + { + mToolbarLeft->clearCommandsList(); + } + if (mToolbarRight) + { + mToolbarRight->clearCommandsList(); + } + if (mToolbarBottom) + { + mToolbarBottom->clearCommandsList(); + } + + // Add commands to each toolbar + if (toolbar_set.left_toolbar.isProvided() && mToolbarLeft) + { + if (toolbar_set.left_toolbar.button_display_mode.isProvided()) + { + U32 button_type = toolbar_set.left_toolbar.button_display_mode; + mToolbarLeft->setButtonType((LLToolBarEnums::ButtonType)(button_type)); + } + BOOST_FOREACH(LLCommandId::Params& command, toolbar_set.left_toolbar.commands) + { + addCommand(LLCommandId(command),mToolbarLeft); + } + } + if (toolbar_set.right_toolbar.isProvided() && mToolbarRight) + { + if (toolbar_set.right_toolbar.button_display_mode.isProvided()) + { + U32 button_type = toolbar_set.right_toolbar.button_display_mode; + mToolbarRight->setButtonType((LLToolBarEnums::ButtonType)(button_type)); + } + BOOST_FOREACH(LLCommandId::Params& command, toolbar_set.right_toolbar.commands) + { + addCommand(LLCommandId(command),mToolbarRight); + } + } + if (toolbar_set.bottom_toolbar.isProvided() && mToolbarBottom) + { + if (toolbar_set.bottom_toolbar.button_display_mode.isProvided()) + { + U32 button_type = toolbar_set.bottom_toolbar.button_display_mode; + mToolbarBottom->setButtonType((LLToolBarEnums::ButtonType)(button_type)); + } + BOOST_FOREACH(LLCommandId::Params& command, toolbar_set.bottom_toolbar.commands) + { + addCommand(LLCommandId(command),mToolbarBottom); + } + } + return true; +} + +void LLToolBarView::saveToolbars() const +{ + // Build the parameter tree from the toolbar data + LLToolBarView::ToolbarSet toolbar_set; + if (mToolbarLeft) + { + toolbar_set.left_toolbar.button_display_mode = (int)(mToolbarLeft->getButtonType()); + addToToolset(mToolbarLeft->getCommandsList(),toolbar_set.left_toolbar); + } + if (mToolbarRight) + { + toolbar_set.right_toolbar.button_display_mode = (int)(mToolbarRight->getButtonType()); + addToToolset(mToolbarRight->getCommandsList(),toolbar_set.right_toolbar); + } + if (mToolbarBottom) + { + toolbar_set.bottom_toolbar.button_display_mode = (int)(mToolbarBottom->getButtonType()); + addToToolset(mToolbarBottom->getCommandsList(),toolbar_set.bottom_toolbar); + } + + // Serialize the parameter tree + LLXMLNodePtr output_node = new LLXMLNode("toolbars", false); + LLXUIParser parser; + parser.writeXUI(output_node, toolbar_set); + + // Write the resulting XML to file + if(!output_node->isNull()) + { + const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "toolbars.xml"); + LLFILE *fp = LLFile::fopen(filename, "w"); + if (fp != NULL) + { + LLXMLNode::writeHeaderToFile(fp); + output_node->writeToFile(fp); + fclose(fp); + } + } +} + +// Enumerate the commands in command_list and add them as Params to the toolbar +void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const +{ + for (command_id_list_t::const_iterator it = command_list.begin(); + it != command_list.end(); + ++it) + { + LLCommandId::Params command; + command.name = it->name(); + toolbar.commands.add(command); + } +} + +void LLToolBarView::draw() +{ + static bool debug_print = true; + static S32 old_width = 0; + static S32 old_height = 0; + + //LLPanel* sizer_left = getChild("sizer_left"); + + LLRect bottom_rect, left_rect, right_rect; + + if (mToolbarBottom) + { + mToolbarBottom->getParent()->reshape(mToolbarBottom->getParent()->getRect().getWidth(), mToolbarBottom->getRect().getHeight()); + mToolbarBottom->localRectToOtherView(mToolbarBottom->getLocalRect(), &bottom_rect, this); + } + if (mToolbarLeft) + { + mToolbarLeft->getParent()->reshape(mToolbarLeft->getRect().getWidth(), mToolbarLeft->getParent()->getRect().getHeight()); + mToolbarLeft->localRectToOtherView(mToolbarLeft->getLocalRect(), &left_rect, this); + } + if (mToolbarRight) + { + mToolbarRight->getParent()->reshape(mToolbarRight->getRect().getWidth(), mToolbarRight->getParent()->getRect().getHeight()); + mToolbarRight->localRectToOtherView(mToolbarRight->getLocalRect(), &right_rect, this); + } + + if ((old_width != getRect().getWidth()) || (old_height != getRect().getHeight())) + debug_print = true; + if (debug_print) + { + LLRect ctrl_rect = getRect(); + llinfos << "Merov debug : draw control rect = " << ctrl_rect.mLeft << ", " << ctrl_rect.mTop << ", " << ctrl_rect.mRight << ", " << ctrl_rect.mBottom << llendl; + llinfos << "Merov debug : draw bottom rect = " << bottom_rect.mLeft << ", " << bottom_rect.mTop << ", " << bottom_rect.mRight << ", " << bottom_rect.mBottom << llendl; + llinfos << "Merov debug : draw left rect = " << left_rect.mLeft << ", " << left_rect.mTop << ", " << left_rect.mRight << ", " << left_rect.mBottom << llendl; + llinfos << "Merov debug : draw right rect = " << right_rect.mLeft << ", " << right_rect.mTop << ", " << right_rect.mRight << ", " << right_rect.mBottom << llendl; + old_width = ctrl_rect.getWidth(); + old_height = ctrl_rect.getHeight(); + debug_print = false; + } + // Debug draw + LLColor4 back_color = LLColor4::blue; + LLColor4 back_color_vert = LLColor4::red; + LLColor4 back_color_hori = LLColor4::yellow; + back_color[VALPHA] = 0.5f; + back_color_hori[VALPHA] = 0.5f; + back_color_vert[VALPHA] = 0.5f; + //gl_rect_2d(getLocalRect(), back_color, TRUE); + //gl_rect_2d(bottom_rect, back_color_hori, TRUE); + //gl_rect_2d(left_rect, back_color_vert, TRUE); + //gl_rect_2d(right_rect, back_color_vert, TRUE); + + LLUICtrl::draw(); +} + + +// ---------------------------------------- +// Drag and Drop hacks (under construction) +// ---------------------------------------- + + +void LLToolBarView::startDragItem( S32 x, S32 y, const LLUUID& uuid) +{ + llinfos << "Merov debug: startDragItem() : x = " << x << ", y = " << y << llendl; + LLToolDragAndDrop::getInstance()->setDragStart( x, y ); + sDragStarted = false; +} + +BOOL LLToolBarView::handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type) +{ +// llinfos << "Merov debug: handleDragItem() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; + if (LLToolDragAndDrop::getInstance()->isOverThreshold( x, y )) + { + if (!sDragStarted) + { + std::vector types; + uuid_vec_t cargo_ids; + types.push_back(DAD_WIDGET); + cargo_ids.push_back(uuid); + gClipboard.setSourceObject(uuid,LLAssetType::AT_WIDGET); + LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER; + LLUUID srcID; + llinfos << "Merov debug: handleDragItem() : beginMultiDrag()" << llendl; + LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID); + sDragStarted = true; + return TRUE; + } + else + { + MASK mask = 0; + return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask ); + } + } + return FALSE; +} + +BOOL LLToolBarView::handleDrop( EDragAndDropType cargo_type, void* cargo_data, const LLUUID& toolbar_id) +{ + LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; + llinfos << "Merov debug : handleDrop. Drop " << inv_item->getUUID() << " named " << inv_item->getName() << " of type " << inv_item->getType() << " to toolbar " << toolbar_id << " under cargo type " << cargo_type << llendl; + + LLAssetType::EType type = inv_item->getType(); + if (type == LLAssetType::AT_WIDGET) + { + llinfos << "Merov debug : handleDrop. Drop source is a widget -> that's where we'll get code in..." << llendl; + // Find out if he command is in one of the toolbar + // If it is, pull it out of the toolbar + // Now insert it in the toolbar in the correct spot... + } + else + { + llinfos << "Merov debug : handleDrop. Drop source is not a widget -> nothing to do" << llendl; + } + + return TRUE; +} + + diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h new file mode 100644 index 0000000000..4e1b855e3d --- /dev/null +++ b/indra/newview/lltoolbarview.h @@ -0,0 +1,102 @@ +/** + * @file lltoolbarview.h + * @author Merov Linden + * @brief User customizable toolbar 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_LLTOOLBARVIEW_H +#define LL_LLTOOLBARVIEW_H + +#include "lluictrl.h" +#include "lltoolbar.h" +#include "llcommandmanager.h" + +class LLUICtrlFactory; + +// Parent of all LLToolBar + +class LLToolBarView : public LLUICtrl +{ +public: + // Xui structure of the toolbar panel + struct Params : public LLInitParam::Block {}; + + // Note: valid children for LLToolBarView are stored in this registry + typedef LLDefaultChildRegistry child_registry_t; + + // Xml structure of the toolbars.xml setting + // Those live in a toolbars.xml found in app_settings (for the default) and in + // the user folder for the user specific (saved) settings + struct Toolbar : public LLInitParam::Block + { + Mandatory button_display_mode; + Multiple commands; + Toolbar(); + }; + struct ToolbarSet : public LLInitParam::Block + { + Optional left_toolbar, + right_toolbar, + bottom_toolbar; + ToolbarSet(); + }; + + // Derived methods + virtual ~LLToolBarView(); + virtual BOOL postBuild(); + virtual void draw(); + + // Toolbar view interface with the rest of the world + // Checks if the commandId is being used somewhere in one of the toolbars + bool hasCommand(const LLCommandId& commandId) const; + // Loads the toolbars from the existing user or default settings + bool loadToolbars(bool force_default = false); // return false if load fails + bool loadDefaultToolbars() { return loadToolbars(true); } + + static void startDragItem( S32 x, S32 y, const LLUUID& uuid); + static BOOL handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); + static BOOL handleDrop( EDragAndDropType cargo_type, void* cargo_data, const LLUUID& folder_id); + +protected: + friend class LLUICtrlFactory; + LLToolBarView(const Params&); + + void initFromParams(const Params&); + +private: + void saveToolbars() const; + bool addCommand(const LLCommandId& commandId, LLToolBar* toolbar); + void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const; + + // Pointers to the toolbars handled by the toolbar view + LLToolBar* mToolbarLeft; + LLToolBar* mToolbarRight; + LLToolBar* mToolbarBottom; + + static bool sDragStarted; +}; + +extern LLToolBarView* gToolBarView; + +#endif // LL_LLTOOLBARVIEW_H diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 3e5ce427a8..a8014b8cde 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -57,6 +57,7 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llworld.h" +#include "llclipboard.h" // syntactic sugar #define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember)) @@ -2495,6 +2496,10 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( item = (LLViewerInventoryItem*)preview->getDragItem(); } } + else if(mSource == SOURCE_VIEWER) + { + item = (LLViewerInventoryItem*)gClipboard.getSourceObject(); + } if(item) return item; if(cat) return cat; return NULL; diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 7b8cce3dc7..92f007a251 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -66,7 +66,8 @@ public: SOURCE_AGENT, SOURCE_WORLD, SOURCE_NOTECARD, - SOURCE_LIBRARY + SOURCE_LIBRARY, + SOURCE_VIEWER }; void beginDrag(EDragAndDropType type, diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp index b103f11597..a4b1c2155f 100644 --- a/indra/newview/llviewerassettype.cpp +++ b/indra/newview/llviewerassettype.cpp @@ -80,7 +80,9 @@ LLViewerAssetDictionary::LLViewerAssetDictionary() addEntry(LLViewerAssetType::AT_LINK_FOLDER, new ViewerAssetEntry(DAD_LINK)); addEntry(LLViewerAssetType::AT_MESH, new ViewerAssetEntry(DAD_MESH)); - + + addEntry(LLViewerAssetType::AT_WIDGET, new ViewerAssetEntry(DAD_WIDGET)); + addEntry(LLViewerAssetType::AT_NONE, new ViewerAssetEntry(DAD_NONE)); }; -- cgit v1.2.3 From edacb7b3363dca6cd28a4ff7ea27154d6a30702f Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 3 Oct 2011 18:52:22 -0700 Subject: implemented Range and ClampedValue classes to standardize min/max settings fixed not serializing named values when values provided from code --- indra/newview/app_settings/toolbars.xml | 4 ++-- indra/newview/skins/default/xui/en/floater_toybox.xml | 4 ++-- indra/newview/skins/default/xui/en/widgets/toolbar.xml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml index 19dec78c63..a9345b3b0a 100644 --- a/indra/newview/app_settings/toolbars.xml +++ b/indra/newview/app_settings/toolbars.xml @@ -1,7 +1,7 @@ + button_display_mode="icons_with_text"> @@ -12,7 +12,7 @@ + button_display_mode="icons_only"> diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index de39032cbf..972ae1487a 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -48,8 +48,8 @@ button_display_mode="icons_with_text" follows="all" left="20" - button_icon_and_text.max_button_width="140" - button_icon_and_text.min_button_width="70" + button_icon_and_text.button_width.max="140" + button_icon_and_text.button_width.min="70" name="toybox_toolbar" pad_left="5" pad_right="5" diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 8422e3943d..0c7e7cff56 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -12,8 +12,8 @@ bg_opaque_image_overlay="MouseGray" background_opaque="true"/> Date: Tue, 4 Oct 2011 10:50:10 -0700 Subject: potential fix for build --- indra/newview/lltoolbarview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 2ea2f608cc..65f63926b6 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -25,7 +25,7 @@ * $/LicenseInfo$ */ -#include "linden_common.h" +#include "llviewerprecompiledheaders.h" #include "lltoolbarview.h" -- cgit v1.2.3 From 530d5af4073f4dda4003005c9c117af53b84aa9d Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 4 Oct 2011 12:05:27 -0700 Subject: EXP-1204 PROGRESS -- As a User I want flexible floater management with no sidetray EXP-1292 FIX -- Mini-map floater can't be closed by clicking the sidebar button again. * Mini-map floater text updated * Mini-map floater behavior now acts more like other windows, has a title, etc. --- indra/newview/llfloatermap.cpp | 50 +--------------------- indra/newview/llfloatermap.h | 6 --- indra/newview/skins/default/xui/en/floater_map.xml | 28 ++++++------ .../skins/default/xui/en/menu_bottomtray.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- .../skins/default/xui/en/panel_bottomtray.xml | 4 +- 6 files changed, 18 insertions(+), 74 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 641e64247b..8713513054 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -100,16 +100,13 @@ BOOL LLFloaterMap::postBuild() mTextBoxSouthWest = getChild ("floater_map_southwest"); mTextBoxNorthWest = getChild ("floater_map_northwest"); - stretchMiniMap(getRect().getWidth() - MAP_PADDING_LEFT - MAP_PADDING_RIGHT - ,getRect().getHeight() - MAP_PADDING_TOP - MAP_PADDING_BOTTOM); - updateMinorDirections(); // Get the drag handle all the way in back sendChildToBack(getDragHandle()); - setIsChrome(TRUE); - getDragHandle()->setTitleVisible(TRUE); + //setIsChrome(TRUE); + //getDragHandle()->setTitleVisible(TRUE); // keep onscreen gFloaterView->adjustToFitScreen(this, FALSE); @@ -223,40 +220,10 @@ void LLFloaterMap::draw() LLFloater::draw(); } -// virtual -void LLFloaterMap::onFocusReceived() -{ - setBackgroundOpaque(true); - LLPanel::onFocusReceived(); -} - -// virtual -void LLFloaterMap::onFocusLost() -{ - setBackgroundOpaque(false); - LLPanel::onFocusLost(); -} - -void LLFloaterMap::stretchMiniMap(S32 width,S32 height) -{ - //fix for ext-7112 - //by default ctrl can't overlap caption area - if(mMap) - { - LLRect map_rect; - map_rect.setLeftTopAndSize( MAP_PADDING_LEFT, getRect().getHeight() - MAP_PADDING_TOP, width, height); - mMap->reshape( width, height, 1); - mMap->setRect(map_rect); - } -} - void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) { LLFloater::reshape(width, height, called_from_parent); - stretchMiniMap(width - MAP_PADDING_LEFT - MAP_PADDING_RIGHT - ,height - MAP_PADDING_TOP - MAP_PADDING_BOTTOM); - updateMinorDirections(); } @@ -285,16 +252,3 @@ void LLFloaterMap::handleZoom(const LLSD& userdata) mMap->setScale(scale); } } - -void LLFloaterMap::setMinimized(BOOL b) -{ - LLFloater::setMinimized(b); - if(b) - { - setTitle(getString("mini_map_caption")); - } - else - { - setTitle(""); - } -} diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 5cf66a594b..8a1b965e62 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -45,18 +45,12 @@ public: /*virtual*/ BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void draw(); - /*virtual*/ void onFocusLost(); - /*virtual*/ void onFocusReceived(); - /*virtual*/ void setMinimized(BOOL b); - private: void handleZoom(const LLSD& userdata); void setDirectionPos( LLTextBox* text_box, F32 rotation ); void updateMinorDirections(); - void stretchMiniMap(S32 width,S32 height); - LLTextBox* mTextBoxEast; LLTextBox* mTextBoxNorth; LLTextBox* mTextBoxWest; diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index ae99fa8dd5..51f63edc31 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -1,20 +1,17 @@ @@ -27,17 +24,16 @@ [REGION](Double-click to teleport, shift-drag to pan) - MINIMAP + Mini-map + top="189"> N + top="189"> E + top="175"> W + top="189"> S + top="189"> SE + top="189"> NE + top="189"> SW + top="189"> NW diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 07dabe1909..1a102c21bb 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -97,7 +97,7 @@ parameter="ShowWorldMapButton" /> -- cgit v1.2.3 From 29987ec5949d22c462566d453ce1de2c76c154e8 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 4 Oct 2011 12:08:48 -0700 Subject: * Updated strings for FUI crusade --- indra/newview/app_settings/settings.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ad07af5e87..07799d4eee 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9671,7 +9671,7 @@ ShowBuildButton Comment - Shows/Hides Build button in the bottom tray. + Shows/hides build button in the bottom tray. Persist 1 Type @@ -9682,7 +9682,7 @@ ShowCameraButton Comment - Show/Hide View button in the bottom tray. + Show/hide view button in the bottom tray. Persist 1 Type @@ -9770,7 +9770,7 @@ ShowGestureButton Comment - Shows/Hides Gesture button in the bottom tray. + Shows/hides gesture button in the bottom tray. Persist 1 Type @@ -9803,7 +9803,7 @@ ShowMiniMapButton Comment - Shows/Hides Mini-Map button in the bottom tray. + Shows/hides mini-map button in the bottom tray. Persist 1 Type @@ -9814,7 +9814,7 @@ ShowMoveButton Comment - Shows/Hides Move button in the bottom tray. + Shows/hides move button in the bottom tray. Persist 1 Type @@ -9847,7 +9847,7 @@ ShowSearchButton Comment - Shows/Hides Search button in the bottom tray. + Shows/hides search button in the bottom tray. Persist 1 Type @@ -9858,7 +9858,7 @@ ShowSnapshotButton Comment - Shows/Hides Snapshot button button in the bottom tray. + Shows/hides snapshot button button in the bottom tray. Persist 1 Type @@ -9880,7 +9880,7 @@ ShowNavbarFavoritesPanel Comment - Show/Hide Navigation Bar Favorites Panel + Show/hide navigation bar favorites panel Persist 1 Type @@ -9891,7 +9891,7 @@ ShowNavbarNavigationPanel Comment - Show/Hide Navigation Bar Navigation Panel + Show/hide navigation bar navigation panel Persist 1 Type @@ -9902,7 +9902,7 @@ ShowWorldMapButton Comment - Shows/Hides Map button in the bottom tray. + Shows/hides map button in the bottom tray. Persist 1 Type @@ -9913,7 +9913,7 @@ ShowMiniLocationPanel Comment - Show/Hide Mini-Location Panel + Show/hide mini-location panel Persist 1 Type -- cgit v1.2.3 From f3aac4c8ab45d52c4f038ad1a16768d9d8e0b201 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 4 Oct 2011 12:15:41 -0700 Subject: EXP-1289 FIX -- Default bottom bar is showing "Places" button instead of "Destinations" EXP-1290 FIX -- Snapshot button to be removed from the default left sidebar EXP-1291 FIX -- Places command is missing on the default left sidebar * Updated to new default buttons based on the wiki. * Updated button_display_mode to text rather than numbers. --- indra/newview/app_settings/toolbars.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml index 19dec78c63..21084d2c8d 100644 --- a/indra/newview/app_settings/toolbars.xml +++ b/indra/newview/app_settings/toolbars.xml @@ -1,10 +1,10 @@ + button_display_mode="icons_with_text"> - + @@ -12,14 +12,14 @@ + button_display_mode="icons_only"> + - - - + + + - - \ No newline at end of file + -- cgit v1.2.3 From db2e763ff0537785336a330d03bb9307478cb79a Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 4 Oct 2011 14:09:03 -0700 Subject: * Modified commands to add functions for is_enabled, is_running and is_starting, currently not hooked to any functionality. --- indra/newview/app_settings/commands.xml | 92 ++++++++++++++++----------------- indra/newview/llfloatertoybox.cpp | 34 +++--------- indra/newview/llfloatertoybox.h | 4 -- 3 files changed, 52 insertions(+), 78 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 77bf7cace3..3a91ef490d 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -5,183 +5,183 @@ icon="Command_AboutLand_Icon" label_ref="Command_AboutLand_Label" tooltip_ref="Command_AboutLand_Tooltip" - function="Floater.ToolbarToggle" - parameter="about_land" + execute_function="Floater.ToolbarToggle" + execute_parameters="about_land" /> diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index 7a6afb4e33..cf22e071aa 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -61,8 +61,6 @@ BOOL LLFloaterToybox::postBuild() center(); mBtnRestoreDefaults = getChild("btn_restore_defaults"); - mBtnRestoreDefaults->setCommitCallback(boost::bind(&LLToolBarView::loadDefaultToolbars)); - mToolBar = getChild("toybox_toolbar"); LLCommandManager& cmdMgr = LLCommandManager::instance(); @@ -97,46 +95,26 @@ BOOL LLFloaterToybox::postBuild() return TRUE; } -void LLFloaterToybox::onOpen(const LLSD& key) -{ - -} - -BOOL LLFloaterToybox::canClose() -{ - return TRUE; -} - -void LLFloaterToybox::onClose(bool app_quitting) -{ - -} - void LLFloaterToybox::draw() { llassert(gToolBarView != NULL); - LLCommandManager& cmdMgr = LLCommandManager::instance(); + const command_id_list_t& command_list = mToolBar->getCommandsList(); - for (U32 i = 0; i < cmdMgr.commandCount(); i++) + for (command_id_list_t::const_iterator it = command_list.begin(); it != command_list.end(); ++it) { - LLCommand * command = cmdMgr.getCommand(i); + const LLCommandId& id = *it; - if (command->availableInToybox()) - { - mToolBar->enableCommand(command->id(), !gToolBarView->hasCommand(command->id())); - } + const bool commandOnToolbar = gToolBarView->hasCommand(id); + mToolBar->enableCommand(id, !commandOnToolbar); } LLFloater::draw(); } -void LLFloaterToybox::onFocusReceived() -{ -} - void LLFloaterToybox::onBtnRestoreDefaults() { + LLToolBarView::loadDefaultToolbars(); } diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h index 3574e060bf..f7245506c5 100644 --- a/indra/newview/llfloatertoybox.h +++ b/indra/newview/llfloatertoybox.h @@ -42,11 +42,7 @@ public: // virtuals BOOL postBuild(); - void onOpen(const LLSD& key); - BOOL canClose(); - void onClose(bool app_quitting); void draw(); - void onFocusReceived(); protected: void onBtnRestoreDefaults(); -- cgit v1.2.3 From 05879242832607795040573791b0790891367b81 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 4 Oct 2011 14:55:55 -0700 Subject: * Updating "Move" floater to be more FUI-like --- indra/newview/llmoveview.cpp | 2 -- indra/newview/skins/default/xui/en/floater_moveview.xml | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 142ee40cc8..a29526777a 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -92,8 +92,6 @@ LLFloaterMove::~LLFloaterMove() // virtual BOOL LLFloaterMove::postBuild() { - setIsChrome(TRUE); - setTitleVisible(TRUE); // restore title visibility after chrome applying updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) LLDockableFloater::postBuild(); diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 6f29255a6b..3c0905a2a5 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -1,9 +1,9 @@ -- cgit v1.2.3 From 4716969716245ea832400dd087c93a514770cd63 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 4 Oct 2011 15:10:12 -0700 Subject: EXP-1293 Nearby chat toasts no longer appear EXP-1294 Nearby chat floater doesn't accommodate existing chat history when expanded --- indra/newview/llnearbychatbar.cpp | 6 +++++- indra/newview/skins/default/xui/en/floater_chat_bar.xml | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index dbe30e1847..cba4fafe42 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -53,6 +53,8 @@ S32 LLNearbyChatBar::sLastSpecialChatChannel = 0; +const S32 EXPANDED_HEIGHT = 300; + // legacy callback glue void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); @@ -448,13 +450,15 @@ BOOL LLNearbyChatBar::postBuild() // Register for font change notifications LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); + mExpandedHeight = getMinHeight() + EXPANDED_HEIGHT; + return TRUE; } void LLNearbyChatBar::applyRectControl() { LLFloater::applyRectControl(); - if (getRect().getHeight() > getMinHeight()) + if (getRect().getHeight() > getMinHeight()) { getChildView("nearby_chat")->setVisible(true); mExpandedHeight = getRect().getHeight(); diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml index 9d61c94eb1..6977e29b78 100644 --- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml @@ -2,7 +2,7 @@ diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 0c7e7cff56..1585166114 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -21,7 +21,8 @@ chrome="true" image_overlay_alignment="left" use_ellipses="true" - auto_resize="true"/> + auto_resize="true" + flash_color="EmphasisColor"/> + auto_resize="true" + flash_color="EmphasisColor"/> -- cgit v1.2.3 From 352ae994480a960541050c82f83a25262f8b44e0 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 5 Oct 2011 16:39:00 -0700 Subject: adding floater_destinations.xml --- .../skins/default/xui/en/floater_destinations.xml | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 indra/newview/skins/default/xui/en/floater_destinations.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml new file mode 100644 index 0000000000..50a279c046 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_destinations.xml @@ -0,0 +1,25 @@ + + + + -- cgit v1.2.3 From 64d005bfed6c5adcd29df3ae0774747480a0d839 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 5 Oct 2011 17:04:07 -0700 Subject: EXP-1286 : Add DaD to toybox --- indra/newview/llfloatertoybox.cpp | 5 ++++- indra/newview/lltoolbarview.cpp | 16 +++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index cf22e071aa..58bb417b71 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -62,7 +62,10 @@ BOOL LLFloaterToybox::postBuild() mBtnRestoreDefaults = getChild("btn_restore_defaults"); mToolBar = getChild("toybox_toolbar"); - + mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); + mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); + mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4)); + LLCommandManager& cmdMgr = LLCommandManager::instance(); // diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 5f3e386035..c0408e4850 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -377,24 +377,26 @@ BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolb if (command) { // Convert the (x,y) position in rank in toolbar - int rank = toolbar->getRankFromPosition(x,y); + int rank = 0; + if (!toolbar->isReadOnly()) + { + rank = toolbar->getRankFromPosition(x,y); + } // Suppress the command from the toolbars (including the one it's dropped in, // this will handle move position). gToolBarView->mToolbarLeft->removeCommand(command->id()); gToolBarView->mToolbarRight->removeCommand(command->id()); gToolBarView->mToolbarBottom->removeCommand(command->id()); // Now insert it in the toolbar at the detected rank - toolbar->addCommand(command->id(),rank); + if (!toolbar->isReadOnly()) + { + toolbar->addCommand(command->id(),rank); + } } else { llwarns << "Command couldn't be found in command manager" << llendl; } - - } - else - { - llinfos << "Merov debug : handleDrop. Drop source is not a widget -> nothing to do" << llendl; } return TRUE; -- cgit v1.2.3 From fc5030fcfe9d3ffcbb2ad1ae0b1dacd1699a54ce Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 5 Oct 2011 22:46:30 -0700 Subject: EXP-1286 : Clean-up the mess I added to llcommandmanager. All CommandId now have a trusted UUID which is the base for indexing and comparison. --- indra/newview/lltoolbarview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index c0408e4850..95ed603bbf 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -373,7 +373,8 @@ BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolb //llinfos << "Merov debug : handleDrop. Drop source is a widget -> drop it in place..." << llendl; // Get the command from its uuid LLCommandManager& mgr = LLCommandManager::instance(); - LLCommand* command = mgr.getCommand(inv_item->getUUID()); + LLCommandId command_id(inv_item->getUUID()); + LLCommand* command = mgr.getCommand(command_id); if (command) { // Convert the (x,y) position in rank in toolbar -- cgit v1.2.3 From 5d414d6decbf05feae154c992291deab34ed8b92 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 6 Oct 2011 09:40:05 +0300 Subject: Linux build fix. --- indra/newview/llfloaterdestinations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp index fa7e2a742c..647b3b5046 100644 --- a/indra/newview/llfloaterdestinations.cpp +++ b/indra/newview/llfloaterdestinations.cpp @@ -48,4 +48,4 @@ LLFloaterDestinations::~LLFloaterDestinations() BOOL LLFloaterDestinations::postBuild() { return TRUE; -} \ No newline at end of file +} -- cgit v1.2.3 From fc489b12c99abab8a61fb3c7546fe802065fe2b0 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 6 Oct 2011 10:37:22 -0700 Subject: Updated to pass coding policy checks --- indra/newview/llfloaterdestinations.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp index fa7e2a742c..ce36f7759c 100644 --- a/indra/newview/llfloaterdestinations.cpp +++ b/indra/newview/llfloaterdestinations.cpp @@ -48,4 +48,5 @@ LLFloaterDestinations::~LLFloaterDestinations() BOOL LLFloaterDestinations::postBuild() { return TRUE; -} \ No newline at end of file +} + -- cgit v1.2.3 From 63b357758ea83dce34d8bc3e2f8ee7246b5aced5 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 6 Oct 2011 14:38:02 -0700 Subject: EXP-1205 FIX -- Some characters in description of toybox dialog is cut off at the bottom --- indra/newview/skins/default/xui/en/floater_toybox.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 5c6fa5bc86..653788bd3c 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -18,6 +18,7 @@ Date: Thu, 6 Oct 2011 15:19:15 -0700 Subject: EXP-1300 WIP Visual feedback for Drag and Drop removed hover highlighting of buttons when dragging over them also updated toolbar button art to match spec --- indra/newview/skins/default/xui/en/widgets/toolbar.xml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 1585166114..613dc66762 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -12,6 +12,10 @@ bg_opaque_image_overlay="MouseGray" background_opaque="true"/> Date: Thu, 6 Oct 2011 16:42:19 -0700 Subject: Updated FUI toolbar buttons and corresponding floaters including: * About land * Appearance * Gestures * Inventory * Map * Nearby voice * Snapshot --- indra/newview/app_settings/commands.xml | 4 ++-- indra/newview/skins/default/xui/en/floater_about_land.xml | 2 +- indra/newview/skins/default/xui/en/floater_gesture.xml | 2 +- .../newview/skins/default/xui/en/floater_my_appearance.xml | 3 ++- .../newview/skins/default/xui/en/floater_my_inventory.xml | 2 +- indra/newview/skins/default/xui/en/floater_snapshot.xml | 4 ++-- .../skins/default/xui/en/floater_voice_controls.xml | 10 +++++----- indra/newview/skins/default/xui/en/floater_world_map.xml | 2 +- indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 14 +++++++------- 9 files changed, 22 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 1fff95417b..8ee4b7d075 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -96,9 +96,9 @@ label_ref="Command_Inventory_Label" tooltip_ref="Command_Inventory_Tooltip" execute_function="Floater.ToolbarToggle" - execute_parameters="inventory" + execute_parameters="my_inventory" is_running_function="Floater.IsOpen" - is_running_parameters="inventory" + is_running_parameters="my_inventory" /> diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index 9f5e6828d2..c0424f4de3 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -5,7 +5,7 @@ height="465" name="gestures" help_topic="gestures" - title="GESTURES" + title="Gestures" background_visible="true" follows="all" label="Places" diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml index 8f97887b3f..de2aa49c0c 100644 --- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml +++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml @@ -6,9 +6,10 @@ height="588" layout="topleft" name="floater_my_appearance" + help_topic="appearance" save_rect="true" single_instance="true" - title="MY APPEARANCE" + title="Appearance" width="333"> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index f017a7ace6..447549db44 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -2,14 +2,14 @@ - NEARBY VOICE + Nearby voice - Group Call with [GROUP] + Group call with [GROUP] - Conference Call + Conference call diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 019e7cd032..3d997a17f7 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -12,7 +12,7 @@ save_rect="true" save_visibility="true" single_instance="true" - title="WORLD MAP" + title="World map" width="650"> - Received Items ([NUM]) - Received Items + Received items ([NUM]) + Received items + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index 5475fcd245..3c69a0cb6c 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -64,14 +64,32 @@ user_resize="false" mouse_opaque="false" height="100" - width="100"> + width="200"> + width="200"/> + + + + width="200"/> Date: Mon, 10 Oct 2011 14:08:14 -0700 Subject: added compound LLSD parsing to param blocks reviewed by Leslie --- indra/newview/llappviewer.cpp | 47 +++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index fa0b392f1b..5077a0a596 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -109,6 +109,7 @@ // Third party library includes #include +#include #if LL_WINDOWS @@ -2041,42 +2042,37 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, llerrs << "Invalid settings location list" << llendl; } - for(LLInitParam::ParamIterator::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end(); - it != end_it; - ++it) + BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) { // skip settings groups that aren't the one we requested - if (it->name() != location_key) continue; + if (group.name() != location_key) continue; - ELLPath path_index = (ELLPath)it->path_index(); + ELLPath path_index = (ELLPath)group.path_index(); if(path_index <= LL_PATH_NONE || path_index >= LL_PATH_LAST) { llerrs << "Out of range path index in app_settings/settings_files.xml" << llendl; return false; } - LLInitParam::ParamIterator::const_iterator file_it, end_file_it; - for (file_it = it->files.begin(), end_file_it = it->files.end(); - file_it != end_file_it; - ++file_it) + BOOST_FOREACH(const SettingsFile& file, group.files) { - llinfos << "Attempting to load settings for the group " << file_it->name() + llinfos << "Attempting to load settings for the group " << file.name() << " - from location " << location_key << llendl; - LLControlGroup* settings_group = LLControlGroup::getInstance(file_it->name); + LLControlGroup* settings_group = LLControlGroup::getInstance(file.name); if(!settings_group) { - llwarns << "No matching settings group for name " << file_it->name() << llendl; + llwarns << "No matching settings group for name " << file.name() << llendl; continue; } std::string full_settings_path; - if (file_it->file_name_setting.isProvided() - && gSavedSettings.controlExists(file_it->file_name_setting)) + if (file.file_name_setting.isProvided() + && gSavedSettings.controlExists(file.file_name_setting)) { // try to find filename stored in file_name_setting control - full_settings_path = gSavedSettings.getString(file_it->file_name_setting); + full_settings_path = gSavedSettings.getString(file.file_name_setting); if (full_settings_path.empty()) { continue; @@ -2090,16 +2086,16 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, else { // by default, use specified file name - full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file_it->file_name()); + full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file.file_name()); } - if(settings_group->loadFromFile(full_settings_path, set_defaults, file_it->persistent)) + if(settings_group->loadFromFile(full_settings_path, set_defaults, file.persistent)) { // success! llinfos << "Loaded settings file " << full_settings_path << llendl; } else { // failed to load - if(file_it->required) + if(file.required) { llerrs << "Error: Cannot load required settings file from: " << full_settings_path << llendl; return false; @@ -2122,20 +2118,15 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, std::string LLAppViewer::getSettingsFilename(const std::string& location_key, const std::string& file) { - for(LLInitParam::ParamIterator::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end(); - it != end_it; - ++it) + BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) { - if (it->name() == location_key) + if (group.name() == location_key) { - LLInitParam::ParamIterator::const_iterator file_it, end_file_it; - for (file_it = it->files.begin(), end_file_it = it->files.end(); - file_it != end_file_it; - ++file_it) + BOOST_FOREACH(const SettingsFile& settings_file, group.files) { - if (file_it->name() == file) + if (settings_file.name() == file) { - return file_it->file_name; + return settings_file.file_name; } } } -- cgit v1.2.3 From da3c7da7a585ea14a5a494ac7f36e7714bc86ab8 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 10 Oct 2011 15:04:00 -0700 Subject: side toolbar buttons are now squares again --- indra/newview/skins/default/xui/en/widgets/toolbar.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index d36b015005..60e7c34d84 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -33,9 +33,9 @@ image_pressed="PushButton_Press" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" - desired_height="35" - button_width.min="35" - button_width.max="35" + desired_height="38" + button_width.min="38" + button_width.max="38" follows="left|top" label="" chrome="true" -- cgit v1.2.3 From 0526d673093b2279777dc8be5aae9cc33cb1c822 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 10 Oct 2011 15:31:25 -0700 Subject: EXP-1312 FIX Floaters should appear in region not covered by toolbars moved floater snap region to middle of toolbars and constrained floaters to that snap region also made toybox floater pass all drag and drop events along to toolbar --- indra/newview/llfloatertoybox.cpp | 11 +++++++++++ indra/newview/llfloatertoybox.h | 5 +++++ indra/newview/skins/default/xui/en/main_view.xml | 7 ------- indra/newview/skins/default/xui/en/panel_toolbar_view.xml | 7 +++++++ 4 files changed, 23 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index 609041803a..fa60022911 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -120,5 +120,16 @@ void LLFloaterToybox::onBtnRestoreDefaults() LLToolBarView::loadDefaultToolbars(); } +BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) +{ + S32 local_x = x - mToolBar->getRect().mLeft; + S32 local_y = y - mToolBar->getRect().mBottom; + return mToolBar->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); +} + // eof diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h index f7245506c5..f0a6cf1a8b 100644 --- a/indra/newview/llfloatertoybox.h +++ b/indra/newview/llfloatertoybox.h @@ -43,6 +43,11 @@ public: // virtuals BOOL postBuild(); void draw(); + /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); protected: void onBtnRestoreDefaults(); diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 57baa7cdd3..96d070ae50 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -74,13 +74,6 @@ user_resize="false" name="hud container" width="500"> - + Date: Mon, 10 Oct 2011 15:44:31 -0700 Subject: Added picks command and icon. Changed toolbar button text layout to halign left. --- indra/newview/app_settings/commands.xml | 10 +++++ indra/newview/skins/default/textures/textures.xml | 45 +++++++++++---------- .../skins/default/textures/toolbar_icons/picks.png | Bin 0 -> 1368 bytes .../skins/default/xui/en/floater_toybox.xml | 1 + indra/newview/skins/default/xui/en/strings.xml | 2 + .../skins/default/xui/en/widgets/toolbar.xml | 2 + 6 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 indra/newview/skins/default/textures/toolbar_icons/picks.png (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index dab57d44bd..f5581baa19 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -152,6 +152,16 @@ is_running_function="Floater.IsOpen" is_running_parameters="people" /> + - - - - - - + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/textures/toolbar_icons/picks.png b/indra/newview/skins/default/textures/toolbar_icons/picks.png new file mode 100644 index 0000000000..4499bf562b Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/picks.png differ diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index 653788bd3c..90b7e906a5 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -74,6 +74,7 @@ image_color="ButtonImageColor" image_color_disabled="ButtonImageColor" flash_color="ButtonUnselectedFgColor" + halign="left" hover_glow_amount="0.15" display_pressed_state="false" /> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f021fdd6a1..d12dda88be 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3668,6 +3668,7 @@ Try enclosing path to the editor with double quotes. Mini-map Move People + Picks Places Preferences Profile @@ -3692,6 +3693,7 @@ Try enclosing path to the editor with double quotes. Show nearby people Moving your avatar Friends, groups, and nearby people + Favorite places Places you've saved Preferences Edit or view your profile diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 60e7c34d84..09967de7cc 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -14,6 +14,7 @@ background_opaque="true"/> Date: Mon, 10 Oct 2011 17:03:12 -0700 Subject: converted bad toolbars.xml file from error to warning --- indra/newview/lltoolbarview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 44b244f163..a0e080b783 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -152,7 +152,7 @@ bool LLToolBarView::loadToolbars(bool force_default) LLXMLNodePtr root; if(!LLXMLNode::parseFile(toolbar_file, root, NULL)) { - llerrs << "Unable to load toolbars from file: " << toolbar_file << llendl; + llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl; return false; } if(!root->hasName("toolbars")) -- cgit v1.2.3 From fd03ae299bfaf83789e511912d99d204c0833e7f Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 10 Oct 2011 17:08:51 -0700 Subject: EXP-1274 Create floater for "Avatar Picker" content EXP-1299 Nearby Voice floater can't be closed by clicking the sidebar button again. EXP-1306 Prompt text to "Change your avatar" and "Destinations" floaters get pushed down one line when the floater dialog gets resized to minimum width --- indra/newview/CMakeLists.txt | 2 + indra/newview/llcallfloater.cpp | 19 ++------ indra/newview/llcallfloater.h | 2 +- indra/newview/llfloateravatar.cpp | 54 ++++++++++++++++++++++ indra/newview/llfloateravatar.h | 43 +++++++++++++++++ indra/newview/llfloaterdestinations.cpp | 1 + indra/newview/llnearbychatbar.cpp | 7 ++- indra/newview/llviewerfloaterreg.cpp | 3 +- .../skins/default/xui/en/floater_avatar.xml | 6 +-- .../skins/default/xui/en/floater_destinations.xml | 5 +- 10 files changed, 115 insertions(+), 27 deletions(-) create mode 100644 indra/newview/llfloateravatar.cpp create mode 100644 indra/newview/llfloateravatar.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 941cb6b9f9..97ccfeac29 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -168,6 +168,7 @@ set(viewer_SOURCE_FILES llfloaterabout.cpp llfloateranimpreview.cpp llfloaterauction.cpp + llfloateravatar.cpp llfloateravatarpicker.cpp llfloateravatartextures.cpp llfloaterbeacons.cpp @@ -733,6 +734,7 @@ set(viewer_HEADER_FILES llfloaterabout.h llfloateranimpreview.h llfloaterauction.h + llfloateravatar.h llfloateravatarpicker.h llfloateravatartextures.h llfloaterbeacons.h diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 945a760d05..4c6ddc8be7 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -44,7 +44,6 @@ #include "llparticipantlist.h" #include "llspeakers.h" #include "lltextutil.h" -#include "lltransientfloatermgr.h" #include "llviewercontrol.h" #include "llviewerdisplayname.h" #include "llviewerwindow.h" @@ -97,7 +96,7 @@ static void* create_non_avatar_caller(void*) LLVoiceChannel* LLCallFloater::sCurrentVoiceChannel = NULL; LLCallFloater::LLCallFloater(const LLSD& key) -: LLTransientDockableFloater(NULL, false, key) +: LLFloater(key) , mSpeakerManager(NULL) , mParticipants(NULL) , mAvatarList(NULL) @@ -113,10 +112,6 @@ LLCallFloater::LLCallFloater(const LLSD& key) mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::instance().addObserver(this); - LLTransientFloaterMgr::getInstance()->addControlView(this); - - // force docked state since this floater doesn't save it between recreations - setDocked(true); // update the agent's name if display name setting change LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this)); @@ -139,13 +134,11 @@ LLCallFloater::~LLCallFloater() { LLVoiceClient::getInstance()->removeObserver(this); } - LLTransientFloaterMgr::getInstance()->removeControlView(this); } // virtual BOOL LLCallFloater::postBuild() { - LLTransientDockableFloater::postBuild(); mAvatarList = getChild("speakers_list"); mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLCallFloater::onAvatarListRefreshed, this)); @@ -154,12 +147,6 @@ BOOL LLCallFloater::postBuild() mNonAvatarCaller = findChild("non_avatar_caller"); mNonAvatarCaller->setVisible(FALSE); - LLView *anchor_panel = LLBottomTray::getInstance()->getChild("speak_flyout_btn"); - - setDockControl(new LLDockControl( - anchor_panel, this, - getDockTongue(), LLDockControl::TOP)); - initAgentData(); connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); @@ -204,13 +191,13 @@ void LLCallFloater::draw() if (mParticipants) mParticipants->updateRecentSpeakersOrder(); - LLTransientDockableFloater::draw(); + LLFloater::draw(); } // virtual void LLCallFloater::setFocus( BOOL b ) { - LLTransientDockableFloater::setFocus(b); + LLFloater::setFocus(b); // Force using active floater transparency (STORM-730). // We have to override setFocus() for LLCallFloater because selecting an item diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 00a3f76e56..ea78cd53b7 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -52,7 +52,7 @@ class LLSpeakersDelayActionsStorage; * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel * also provides a 'Leave Call' button to allow the Resident to leave that voice channel. */ -class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipantObserver +class LLCallFloater : public LLFloater, LLVoiceClientParticipantObserver { public: diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp new file mode 100644 index 0000000000..bdc5b581a9 --- /dev/null +++ b/indra/newview/llfloateravatar.cpp @@ -0,0 +1,54 @@ +/** + * @file llfloateravatar.h + * @author Leyla Farazha + * @brief floater for the avatar changer + * + * $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$ + */ + +/** + * Floater that appears when buying an object, giving a preview + * of its contents and their permissions. + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloateravatar.h" +#include "lluictrlfactory.h" + + +LLFloaterAvatar::LLFloaterAvatar(const LLSD& key) + : LLFloater(key) +{ +} + +LLFloaterAvatar::~LLFloaterAvatar() +{ +} + +BOOL LLFloaterAvatar::postBuild() +{ + enableResizeCtrls(true, true, false); + return TRUE; +} + + diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h new file mode 100644 index 0000000000..cadc5e4028 --- /dev/null +++ b/indra/newview/llfloateravatar.h @@ -0,0 +1,43 @@ +/** + * @file llfloateravatar.h + * @author Leyla Farazha + * @brief floater for the avatar changer + * + * $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_FLOATER_AVATAR_H +#define LL_FLOATER_AVATAR_H + +#include "llfloater.h" + +class LLFloaterAvatar: + public LLFloater +{ + friend class LLFloaterReg; +private: + LLFloaterAvatar(const LLSD& key); + /*virtual*/ ~LLFloaterAvatar(); + /*virtual*/ BOOL postBuild(); +}; + +#endif diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp index 52d1f67c36..af21cb593f 100644 --- a/indra/newview/llfloaterdestinations.cpp +++ b/indra/newview/llfloaterdestinations.cpp @@ -47,6 +47,7 @@ LLFloaterDestinations::~LLFloaterDestinations() BOOL LLFloaterDestinations::postBuild() { + enableResizeCtrls(true, true, false); return TRUE; } diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index cba4fafe42..caa20b767c 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -452,6 +452,8 @@ BOOL LLNearbyChatBar::postBuild() mExpandedHeight = getMinHeight() + EXPANDED_HEIGHT; + enableResizeCtrls(true, true, false); + return TRUE; } @@ -462,6 +464,7 @@ void LLNearbyChatBar::applyRectControl() { getChildView("nearby_chat")->setVisible(true); mExpandedHeight = getRect().getHeight(); + enableResizeCtrls(true); } } @@ -707,13 +710,13 @@ void LLNearbyChatBar::onToggleNearbyChatPanel() mExpandedHeight = getRect().getHeight(); nearby_chat->setVisible(FALSE); reshape(getRect().getWidth(), getMinHeight()); - mResizeHandle[0]->setMaxHeight(getMinHeight()); + enableResizeCtrls(true, true, false); } else { nearby_chat->setVisible(TRUE); reshape(getRect().getWidth(), mExpandedHeight); - mResizeHandle[0]->setMaxHeight(S32_MAX); + enableResizeCtrls(true); } } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b0daf9f3c2..619d74e7ac 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -37,6 +37,7 @@ #include "llfloaterabout.h" #include "llfloateranimpreview.h" #include "llfloaterauction.h" +#include "llfloateravatar.h" #include "llfloateravatarpicker.h" #include "llfloateravatartextures.h" #include "llfloaterbeacons.h" @@ -168,7 +169,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("avatar", "floater_avatar.xml", &LLFloaterReg::build); + LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml index a0c1f4c021..666aa2d164 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar.xml @@ -3,11 +3,9 @@ legacy_header_height="225" can_minimize="true" can_close="true" - user_resize="true" can_resize="true" min_height="230" - min_width="455" - max_height="230" + min_width="445" height="230" layout="topleft" name="Avatar" @@ -19,7 +17,7 @@ diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml index 9dd9338f37..669b7eb15a 100644 --- a/indra/newview/skins/default/xui/en/floater_destinations.xml +++ b/indra/newview/skins/default/xui/en/floater_destinations.xml @@ -7,7 +7,6 @@ can_resize="true" min_height="230" min_width="525" - max_height="230" height="230" layout="topleft" name="Destinations" @@ -15,11 +14,11 @@ help_topic="destinations" save_rect="true" title="Destinations" - width="445"> + width="525"> Date: Mon, 10 Oct 2011 17:29:04 -0700 Subject: EXP-1302 PARTIAL Make the Speak button work as a toolbar button First pass - no Push-To-Talk functionality. --- indra/newview/app_settings/commands.xml | 4 ++-- indra/newview/llagent.cpp | 38 ++++++++++++++++++++++++++++++++- indra/newview/llagent.h | 16 +++++++++++++- indra/newview/llbottomtray.cpp | 3 +++ 4 files changed, 57 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index dab57d44bd..139eabcae4 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -207,11 +207,11 @@ icon="Command_Speak_Icon" label_ref="Command_Speak_Label" tooltip_ref="Command_Speak_Tooltip" - execute_function="Floater.ToolbarToggle" + execute_function="Agent.ToggleMicrophone" execute_parameters="speak" is_enabled_function="Agent.IsActionAllowed" is_enabled_parameters="speak" - is_running_function="Floater.IsOpen" + is_running_function="Agent.IsMicrophoneOn" is_running_parameters="speak" /> inputUserControlState(true); + LLVoiceClient::getInstance()->inputUserControlState(false); + } + else + { + LLVoiceClient::getInstance()->inputUserControlState(false); + LLVoiceClient::getInstance()->inputUserControlState(true); + } +} + +// static +bool LLAgent::isMicrophoneOn(const LLSD& sdname) +{ + return gAgent.mMicrophoneOn; +} // ************************************************************ // Enabled this definition to compile a 'hacked' viewer that @@ -261,6 +292,9 @@ LLAgent::LLAgent() : mCurrentFidget(0), mFirstLogin(FALSE), mGenderChosen(FALSE), + + mVoiceConnected(false), + mMicrophoneOn(false), mAppearanceSerialNum(0), @@ -280,6 +314,8 @@ LLAgent::LLAgent() : LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2)); + LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2)); } // Requires gSavedSettings to be initialized. diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 1775a0235c..0355e68b6e 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -282,7 +282,21 @@ public: static void toggleFlying(); static bool enableFlying(); BOOL canFly(); // Does this parcel allow you to fly? - + + //-------------------------------------------------------------------- + // Voice + //-------------------------------------------------------------------- +public: + bool isVoiceConnected() const { return mVoiceConnected; } + void setVoiceConnected(const bool b) { mVoiceConnected = b; } + + static void toggleMicrophone(const LLSD& name); + static bool isMicrophoneOn(const LLSD& sdname); + +private: + bool mVoiceConnected; + bool mMicrophoneOn; + //-------------------------------------------------------------------- // Chat //-------------------------------------------------------------------- diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 98712f1334..af91702f9b 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -387,6 +387,9 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); + + gAgent.setVoiceConnected(voice_status); + getChild("speak_flyout_btn")->setEnabled(voice_status); gMenuBarView->getChild("Nearby Voice")->setEnabled(voice_status); if (voice_status) -- cgit v1.2.3 From 6a570a9bdc2660e4db87e8e7a65b724e1ad8d1b2 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 10 Oct 2011 17:52:37 -0700 Subject: fixed icons moving when clicking on icon-only toolbars --- indra/newview/skins/default/xui/en/widgets/toolbar.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 09967de7cc..be5dfaf18c 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -31,6 +31,8 @@ flash_color="EmphasisColor"/> Date: Mon, 10 Oct 2011 18:00:24 -0700 Subject: EXP-1300 : Simplify and clean up of the DaD which now doesn't duplicate the dragged tool. --- indra/newview/lltoolbarview.cpp | 64 +++++++++++++++++++++++++++++++++++------ indra/newview/lltoolbarview.h | 10 +++---- 2 files changed, 60 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 44b244f163..8273d1491d 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -41,7 +41,6 @@ LLToolBarView* gToolBarView = NULL; static LLDefaultChildRegistry::Register r("toolbar_view"); -bool LLToolBarView::sDragStarted = false; bool isToolDragged() { @@ -331,18 +330,25 @@ void LLToolBarView::draw() void LLToolBarView::startDragTool( S32 x, S32 y, const LLUUID& uuid) { - //llinfos << "Merov debug: startDragTool() : x = " << x << ", y = " << y << llendl; + llinfos << "Merov debug: startDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; + // Flag the tool dragging but don't start it yet + gToolBarView->mDragStarted = false; + gToolBarView->mDragCommand = LLCommandId::null; + gToolBarView->mDragRank = LLToolBar::RANK_NONE; + gToolBarView->mDragToolbar = NULL; LLToolDragAndDrop::getInstance()->setDragStart( x, y ); - sDragStarted = false; } BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type) { -// llinfos << "Merov debug: handleDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; if (LLToolDragAndDrop::getInstance()->isOverThreshold( x, y )) { - if (!sDragStarted) + if (!gToolBarView->mDragStarted) { + llinfos << "Merov debug: handleDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; + // Start the tool dragging: + + // First, create the global drag and drop object std::vector types; uuid_vec_t cargo_ids; types.push_back(DAD_WIDGET); @@ -350,9 +356,35 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp gClipboard.setSourceObject(uuid,LLAssetType::AT_WIDGET); LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER; LLUUID srcID; - //llinfos << "Merov debug: handleDragTool() : beginMultiDrag()" << llendl; LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID); - sDragStarted = true; + llinfos << "Merov debug: beginMultiDrag() launched" << llendl; + + // Second, check if the command is present in one of the 3 toolbars + // If it is, store the command, the toolbar and the rank in the toolbar and + // set a callback on end drag so that we reinsert the command if no drop happened + /* + gToolBarView->mDragCommand = LLCommandId(uuid); + if ((gToolBarView->mDragRank = gToolBarView->mToolbarLeft->removeCommand(gToolBarView->mDragCommand)) != LLToolBar::RANK_NONE) + { + gToolBarView->mDragToolbar = gToolBarView->mToolbarLeft; + } + else if ((gToolBarView->mDragRank = gToolBarView->mToolbarRight->removeCommand(gToolBarView->mDragCommand)) != LLToolBar::RANK_NONE) + { + gToolBarView->mDragToolbar = gToolBarView->mToolbarRight; + } + else if ((gToolBarView->mDragRank = gToolBarView->mToolbarBottom->removeCommand(gToolBarView->mDragCommand)) != LLToolBar::RANK_NONE) + { + gToolBarView->mDragToolbar = gToolBarView->mToolbarBottom; + } + if (gToolBarView->mDragRank != LLToolBar::RANK_NONE) + { + llinfos << "Merov debug: rank of dragged tool = " << gToolBarView->mDragRank << llendl; + LLToolDragAndDrop::getInstance()->setEndDragCallback(boost::bind(&LLToolBarView::onEndDrag, gToolBarView)); + } + */ + + llinfos << "Merov debug: Drag started cleanly" << llendl; + gToolBarView->mDragStarted = true; return TRUE; } else @@ -375,7 +407,7 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t //llinfos << "Merov debug : handleDropTool. Drop source is a widget -> drop it in place..." << llendl; // Get the command from its uuid LLCommandManager& mgr = LLCommandManager::instance(); - LLCommandId command_id("",inv_item->getUUID()); + LLCommandId command_id(inv_item->getUUID()); LLCommand* command = mgr.getCommand(command_id); if (command) { @@ -408,5 +440,19 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t void LLToolBarView::stopDragTool() { - sDragStarted = false; + // Clear the saved command, toolbar and rank + gToolBarView->mDragStarted = false; + gToolBarView->mDragCommand = LLCommandId::null; + gToolBarView->mDragRank = LLToolBar::RANK_NONE; + gToolBarView->mDragToolbar = NULL; } + +void LLToolBarView::onEndDrag() +{ + // If there's a saved command, reinsert it in the saved toolbar + if (gToolBarView->mDragRank != LLToolBar::RANK_NONE) + { + gToolBarView->mDragToolbar->addCommand(gToolBarView->mDragCommand,gToolBarView->mDragRank); + } + stopDragTool(); +} \ No newline at end of file diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index a0c526ac54..6623e63f8a 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -78,6 +78,7 @@ public: static BOOL handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); static BOOL handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); static void stopDragTool(); + void onEndDrag(); protected: friend class LLUICtrlFactory; @@ -94,12 +95,11 @@ private: LLToolBar* mToolbarLeft; LLToolBar* mToolbarRight; LLToolBar* mToolbarBottom; - bool mDragging; - LLToolBarButton* mDragButton; - S32 mMouseX; - S32 mMouseY; - static bool sDragStarted; + LLCommandId mDragCommand; + int mDragRank; + LLToolBar* mDragToolbar; + bool mDragStarted; }; extern LLToolBarView* gToolBarView; -- cgit v1.2.3 From 71879916428e9e15081d73696f46bb4a32877265 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 10 Oct 2011 19:03:40 -0700 Subject: EXP-1300 : Add the caret images and xml (no code yet) --- indra/newview/skins/default/textures/textures.xml | 3 +++ .../textures/toolbar_icons/caret_bottom.png | Bin 0 -> 139 bytes .../default/textures/toolbar_icons/caret_left.png | Bin 0 -> 893 bytes .../default/textures/toolbar_icons/caret_right.png | Bin 0 -> 892 bytes .../skins/default/xui/en/panel_toolbar_view.xml | 30 +++++++++++++++++++++ 5 files changed, 33 insertions(+) create mode 100644 indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png create mode 100644 indra/newview/skins/default/textures/toolbar_icons/caret_left.png create mode 100644 indra/newview/skins/default/textures/toolbar_icons/caret_right.png (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index e7fb836f45..27577d42ea 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -149,6 +149,9 @@ with the same filename but different name + + + diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png new file mode 100644 index 0000000000..82f58b22b9 Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png differ diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_left.png b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png new file mode 100644 index 0000000000..75eecc84ed Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png differ diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_right.png b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png new file mode 100644 index 0000000000..677459ae1c Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png differ diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index bc96bfbab5..5d6967ed32 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -47,6 +47,16 @@ bottom="-10" side="left" button_display_mode="icons_only"> + + @@ -109,6 +129,16 @@ follows="left|right|bottom" button_display_mode="icons_with_text" visible="true"> + -- cgit v1.2.3 From ec23ec68ea8835e4155e083ec5570245b0aef1ec Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 10 Oct 2011 19:17:38 -0700 Subject: EXP-1310 FIX Profile button should open Web Profile floater removed unused LLWeb functions for opening non-web media moved logic inside floaters and away from auxiliary functions --- indra/newview/app_settings/commands.xml | 6 ++--- indra/newview/llavataractions.cpp | 19 +++++++++++----- indra/newview/llavataractions.h | 3 ++- indra/newview/llfloaterhelpbrowser.cpp | 17 +++++++++----- indra/newview/llfloaterhelpbrowser.h | 2 -- indra/newview/llfloaterwebcontent.cpp | 39 ++++++++++++++------------------- indra/newview/llmediactrl.cpp | 11 +--------- indra/newview/llpanelprofile.cpp | 2 +- indra/newview/llviewerfloaterreg.cpp | 4 ++-- indra/newview/llviewerhelp.cpp | 37 +++++++------------------------ indra/newview/llviewerhelp.h | 6 ++--- indra/newview/llviewermenu.cpp | 32 ++++++++++++++++++++++++++- indra/newview/llweb.cpp | 4 +++- indra/newview/llweb.h | 10 ++++----- 14 files changed, 97 insertions(+), 95 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 881bc22144..d758647d3a 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -187,10 +187,8 @@ icon="Command_Profile_Icon" label_ref="Command_Profile_Label" tooltip_ref="Command_Profile_Tooltip" - execute_function="Floater.ToolbarToggle" - execute_parameters="my_profile" - is_running_function="Floater.IsOpen" - is_running_parameters="my_profile" + execute_function="Avatar.ToggleMyProfile" + is_running_function="Avatar.IsMyProfileOpen" /> profile_rect(gSavedSettings, "WebProfileRect"); - LLFloaterWebContent::create(LLFloaterWebContent::Params(). - url(url). - id(agent_id.asString()). - show_chrome(show_chrome). - window_class("profile"). - preferred_media_size(profile_rect)); + LLFloaterWebContent::Params p; + p.url(url). + id(agent_id.asString()). + show_chrome(show_chrome). + window_class("profile"). + preferred_media_size(profile_rect); + LLFloaterReg::showInstance("profile", p); } // static @@ -342,6 +343,12 @@ bool LLAvatarActions::profileVisible(const LLUUID& id) return browser && browser->isShown(); } +//static +LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id) +{ + LLFloaterWebContent *browser = dynamic_cast (LLFloaterReg::findInstance("profile", LLSD().with("id", id))); + return browser; +} //static void LLAvatarActions::hideProfile(const LLUUID& id) diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index fbfd815f41..748b7cb3d1 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -35,7 +35,7 @@ #include class LLInventoryPanel; - +class LLFloater; /** * Friend-related actions (add, remove, offer teleport, etc) @@ -96,6 +96,7 @@ public: static void showProfile(const LLUUID& id); static void hideProfile(const LLUUID& id); static bool profileVisible(const LLUUID& id); + static LLFloater* getProfileFloater(const LLUUID& id); /** * Show avatar on world map. diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp index 3012638d44..fd9c37ae73 100644 --- a/indra/newview/llfloaterhelpbrowser.cpp +++ b/indra/newview/llfloaterhelpbrowser.cpp @@ -39,6 +39,7 @@ #include "llurlhistory.h" #include "llmediactrl.h" #include "llviewermedia.h" +#include "llviewerhelp.h" LLFloaterHelpBrowser::LLFloaterHelpBrowser(const LLSD& key) @@ -74,6 +75,17 @@ void LLFloaterHelpBrowser::buildURLHistory() void LLFloaterHelpBrowser::onOpen(const LLSD& key) { gSavedSettings.setBOOL("HelpFloaterOpen", TRUE); + + std::string topic = key.asString(); + + if (topic == "__local") + { + mBrowser->navigateToLocalPage( "help-offline" , "index.html" ); + } + else + { + mBrowser->navigateTo(LLViewerHelp::instance().getURL(topic)); + } } //virtual @@ -148,8 +160,3 @@ void LLFloaterHelpBrowser::openMedia(const std::string& media_url) mBrowser->navigateTo(media_url, "text/html"); setCurrentURL(media_url); } - -void LLFloaterHelpBrowser::navigateToLocalPage( const std::string& subdir, const std::string& filename_in ) -{ - mBrowser->navigateToLocalPage(subdir, filename_in); -} diff --git a/indra/newview/llfloaterhelpbrowser.h b/indra/newview/llfloaterhelpbrowser.h index afe0f4df69..80b0ecc06b 100644 --- a/indra/newview/llfloaterhelpbrowser.h +++ b/indra/newview/llfloaterhelpbrowser.h @@ -48,8 +48,6 @@ class LLFloaterHelpBrowser : /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); void openMedia(const std::string& media_url); - - void navigateToLocalPage( const std::string& subdir, const std::string& filename_in ); private: void buildURLHistory(); diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 2c9a736aff..c76aeb0498 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -88,20 +88,6 @@ BOOL LLFloaterWebContent::postBuild() return TRUE; } -bool LLFloaterWebContent::matchesKey(const LLSD& key) -{ - LLUUID id = key["id"]; - if (id.notNull()) - { - return id == mKey["id"].asUUID(); - } - else - { - return key["target"].asString() == mKey["target"].asString(); - } -} - - void LLFloaterWebContent::initializeURLHistory() { // start with an empty list @@ -123,6 +109,20 @@ void LLFloaterWebContent::initializeURLHistory() } } +bool LLFloaterWebContent::matchesKey(const LLSD& key) +{ + Params p(mKey); + Params other_p(key); + if (!other_p.target().empty() && other_p.target() != "_blank") + { + return other_p.target() == p.target(); + } + else + { + return other_p.id() == p.id(); + } +} + //static LLFloater* LLFloaterWebContent::create( Params p) { @@ -139,14 +139,7 @@ LLFloater* LLFloaterWebContent::create( Params p) } S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit"); - - LLSD sd; - sd["target"] = p.target; - if(LLFloaterReg::findInstance(p.window_class, sd) != NULL) - { - // There's already a web browser for this tag, so we won't be opening a new window. - } - else if(browser_window_limit != 0) + if(browser_window_limit != 0) { // showInstance will open a new window. Figure out how many web browsers are already open, // and close the least recently opened one if this will put us over the limit. @@ -166,7 +159,7 @@ LLFloater* LLFloaterWebContent::create( Params p) } } - return LLFloaterReg::showInstance(p.window_class, p); + return new LLFloaterWebContent(p); } //static diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 0bdeb114f5..1f1e49726d 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -1122,16 +1122,7 @@ void LLMediaCtrl::onPopup(const LLSD& notification, const LLSD& response) lldebugs << "No gFloaterView for onPopuup()" << llendl; }; - // (for now) open web content floater if that's our parent, otherwise, open the current media floater - // (this will change soon) - if ( floater_name == "web_content" ) - { - LLWeb::loadWebURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]); - } - else - { - LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]); - } + LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]); } else { diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index fd5c3362bb..27390fca78 100755 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -72,7 +72,7 @@ public: std::string agent_name = params[0]; llinfos << "Profile, agent_name " << agent_name << llendl; std::string url = getProfileURL(agent_name); - LLWeb::loadWebURLInternal(url); + LLWeb::loadURLInternal(url); return true; } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 619d74e7ac..3463eec5d8 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -288,7 +288,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("profile", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("profile", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterUIPreviewUtil::registerFloater(); @@ -301,7 +301,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterWindowSizeUtil::registerFloater(); LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index 3a3d4f3881..d1120b6269 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -69,15 +69,12 @@ LLHelpHandler gHelpHandler; ////////////////////////////// // implement LLHelp interface -void LLViewerHelp::showTopic(const std::string &topic) +std::string LLViewerHelp::getURL(const std::string &topic) { // allow overriding the help server with a local help file if( gSavedSettings.getBOOL("HelpUseLocal") ) { - showHelp(); - LLFloaterHelpBrowser* helpbrowser = dynamic_cast(LLFloaterReg::getInstance("help_browser")); - helpbrowser->navigateToLocalPage( "help-offline" , "index.html" ); - return; + return "__local"; } // if the help topic is empty, use the default topic @@ -99,11 +96,12 @@ void LLViewerHelp::showTopic(const std::string &topic) } } - // work out the URL for this topic and display it - showHelp(); - - std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic ); - setRawURL(helpURL); + return LLViewerHelpUtil::buildHelpURL( help_topic ); +} + +void LLViewerHelp::showTopic(const std::string& topic) +{ + LLFloaterReg::showInstance("help_browser", topic); } std::string LLViewerHelp::defaultTopic() @@ -146,23 +144,4 @@ std::string LLViewerHelp::getTopicFromFocus() return defaultTopic(); } -// static -void LLViewerHelp::showHelp() -{ - LLFloaterReg::showInstance("help_browser"); -} - -// static -void LLViewerHelp::setRawURL(std::string url) -{ - LLFloaterHelpBrowser* helpbrowser = dynamic_cast(LLFloaterReg::getInstance("help_browser")); - if (helpbrowser) - { - helpbrowser->openMedia(url); - } - else - { - llwarns << "Eep, help_browser floater not found" << llendl; - } -} diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h index 7612986227..a983012e2e 100644 --- a/indra/newview/llviewerhelp.h +++ b/indra/newview/llviewerhelp.h @@ -45,6 +45,8 @@ class LLViewerHelp : public LLHelp, public LLSingleton /// display the specified help topic in the help viewer /*virtual*/ void showTopic(const std::string &topic); + std::string getURL(const std::string& topic); + // return topic derived from viewer UI focus, else default topic std::string getTopicFromFocus(); @@ -56,10 +58,6 @@ class LLViewerHelp : public LLHelp, public LLSingleton // return topic to use for the top-level help, invoked by F1 /*virtual*/ std::string f1HelpTopic(); - - private: - static void showHelp(); // make sure help UI is visible & raised - static void setRawURL(std::string url); // send URL to help UI }; #endif // header guard diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fbfde711a9..bc0f38dd77 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5370,6 +5370,34 @@ class LLAvatarAddFriend : public view_listener_t } }; + +class LLAvatarToggleMyProfile : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloater* instance = LLAvatarActions::getProfileFloater(gAgent.getID()); + if (LLFloater::isMinimized(instance)) + { + instance->setMinimized(FALSE); + instance->setFocus(TRUE); + } + else if (!LLFloater::isShown(instance)) + { + LLAvatarActions::showProfile(gAgent.getID()); + } + else if (!instance->hasFocus() && !instance->getIsChrome()) + { + instance->setFocus(TRUE); + } + else + { + instance->closeFloater(); + } + return true; + } +}; + + class LLAvatarAddContact : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7229,7 +7257,7 @@ void handle_web_browser_test(const LLSD& param) void handle_web_content_test(const LLSD& param) { std::string url = param.asString(); - LLWeb::loadWebURLInternal(url); + LLWeb::loadURLInternal(url); } void handle_buy_currency_test(void*) @@ -8165,6 +8193,8 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); + view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile"); + enable.add("Avatar.IsMyProfileOpen", boost::bind(&LLAvatarActions::profileVisible, gAgent.getID())); view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 6f7115ff6d..7bc5453688 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -125,7 +125,9 @@ void LLWeb::loadURLInternal(const std::string &url, const std::string& target, c // Explicitly open a Web URL using the Web content floater void LLWeb::loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid) { - LLFloaterWebContent::create(LLFloaterWebContent::Params().url(url).target(target).id(uuid)); + LLFloaterWebContent::Params p; + p.url(url).target(target).id(uuid); + LLFloaterReg::showInstance("web_content", p); } // static diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h index dc5958e57f..376abc0ece 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -46,21 +46,19 @@ public: static void loadURL(const std::string& url, const std::string& target, const std::string& uuid = LLStringUtil::null); static void loadURL(const std::string& url) { loadURL(url, LLStringUtil::null); } /// Load the given url in the user's preferred web browser - static void loadURL(const char* url, const std::string& target) { loadURL( ll_safe_string(url), target); } - static void loadURL(const char* url) { loadURL( ll_safe_string(url), LLStringUtil::null ); } + static void loadURL(const char* url, const std::string& target = LLStringUtil::null) { loadURL( ll_safe_string(url), target); } /// Load the given url in the Second Life internal web browser static void loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null); - static void loadURLInternal(const std::string &url) { loadURLInternal(url, LLStringUtil::null); } + static void loadURLInternal(const std::string &url) { loadURLInternal(url, LLStringUtil::null, LLStringUtil::null);} /// Load the given url in the operating system's web browser, async if we want to return immediately /// before browser has spawned - static void loadURLExternal(const std::string& url) { loadURLExternal(url, LLStringUtil::null); }; + static void loadURLExternal(const std::string& url) {loadURLExternal(url, LLStringUtil::null);} static void loadURLExternal(const std::string& url, const std::string& uuid); static void loadURLExternal(const std::string& url, bool async, const std::string& uuid = LLStringUtil::null); // Explicitly open a Web URL using the Web content floater vs. the more general media browser static void loadWebURL(const std::string& url, const std::string& target, const std::string& uuid); - static void loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid); - static void loadWebURLInternal(const std::string &url) { loadWebURLInternal(url, LLStringUtil::null, LLStringUtil::null); } + static void loadWebURLInternal(const std::string &url, const std::string& target = LLStringUtil::null, const std::string& uuid = LLStringUtil::null); /// Returns escaped url (eg, " " to "%20") - used by all loadURL methods static std::string escapeURL(const std::string& url); -- cgit v1.2.3 From a530382c257809c6ee4371156f332efaaa0e23d9 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 10 Oct 2011 19:19:16 -0700 Subject: added newline --- indra/newview/lltoolbarview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 318bede6f0..7977faeab7 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -455,4 +455,4 @@ void LLToolBarView::onEndDrag() gToolBarView->mDragToolbar->addCommand(gToolBarView->mDragCommand,gToolBarView->mDragRank); } stopDragTool(); -} \ No newline at end of file +} -- cgit v1.2.3 From 767cb5df09cc5053c67fd4b9e2e6e5e276bacb7c Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 11 Oct 2011 14:13:26 +0200 Subject: STORM-1615 WIP Added Russian and Turkish to the list of languages supported by viewer. Changes: * Added the new languages to the list in Preferences / General. * Added a couple of "translated" XUI files for each language. --- .../newview/skins/default/xui/en/panel_preferences_general.xml | 10 ++++++++++ .../newview/skins/default/xui/ru/floater_buy_currency_html.xml | 2 ++ .../newview/skins/default/xui/tr/floater_buy_currency_html.xml | 2 ++ indra/newview/skins/minimal/xui/ru/menu_script_chiclet.xml | 4 ++++ indra/newview/skins/minimal/xui/tr/menu_script_chiclet.xml | 4 ++++ 5 files changed, 22 insertions(+) create mode 100644 indra/newview/skins/default/xui/ru/floater_buy_currency_html.xml create mode 100644 indra/newview/skins/default/xui/tr/floater_buy_currency_html.xml create mode 100644 indra/newview/skins/minimal/xui/ru/menu_script_chiclet.xml create mode 100644 indra/newview/skins/minimal/xui/tr/menu_script_chiclet.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 9c718fdb87..ab7e1e7cd9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -80,6 +80,16 @@ label="Português (Portuguese) - Beta" name="Portugese" value="pt" /> + + + diff --git a/indra/newview/skins/default/xui/tr/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/tr/floater_buy_currency_html.xml new file mode 100644 index 0000000000..77d69aa81d --- /dev/null +++ b/indra/newview/skins/default/xui/tr/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ + + diff --git a/indra/newview/skins/minimal/xui/ru/menu_script_chiclet.xml b/indra/newview/skins/minimal/xui/ru/menu_script_chiclet.xml new file mode 100644 index 0000000000..f95913ef2b --- /dev/null +++ b/indra/newview/skins/minimal/xui/ru/menu_script_chiclet.xml @@ -0,0 +1,4 @@ + + + + diff --git a/indra/newview/skins/minimal/xui/tr/menu_script_chiclet.xml b/indra/newview/skins/minimal/xui/tr/menu_script_chiclet.xml new file mode 100644 index 0000000000..2efe6d7e71 --- /dev/null +++ b/indra/newview/skins/minimal/xui/tr/menu_script_chiclet.xml @@ -0,0 +1,4 @@ + + + + -- cgit v1.2.3 From 70a4936736187bc00fb134e135de4fee75cff664 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 11 Oct 2011 14:45:44 +0200 Subject: STORM-1615 WIP Removed Dutch from the available languages list. --- indra/newview/skins/default/xui/de/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/en/panel_preferences_general.xml | 5 ----- indra/newview/skins/default/xui/es/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/fr/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/it/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/ja/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/nl/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/pl/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/pt/panel_preferences_general.xml | 1 - indra/newview/skins/default/xui/zh/panel_preferences_general.xml | 1 - 10 files changed, 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/de/panel_preferences_general.xml b/indra/newview/skins/default/xui/de/panel_preferences_general.xml index 79b2a544f9..ed22e05a7c 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_general.xml @@ -11,7 +11,6 @@ - diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index ab7e1e7cd9..ddef9a853b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -65,11 +65,6 @@ label="Italiano (Italian) - Beta" name="Italian" value="it" /> - - diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml index 2786798173..5ccf07f7b4 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml @@ -11,7 +11,6 @@ - diff --git a/indra/newview/skins/default/xui/it/panel_preferences_general.xml b/indra/newview/skins/default/xui/it/panel_preferences_general.xml index c576b5f9d8..ee52ee7cb1 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_general.xml @@ -11,7 +11,6 @@ - diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml index e4091972d6..4356f3d47f 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_general.xml @@ -11,7 +11,6 @@ - diff --git a/indra/newview/skins/default/xui/nl/panel_preferences_general.xml b/indra/newview/skins/default/xui/nl/panel_preferences_general.xml index 7be570b27f..d193fb8724 100644 --- a/indra/newview/skins/default/xui/nl/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/nl/panel_preferences_general.xml @@ -76,7 +76,6 @@ - diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_general.xml b/indra/newview/skins/default/xui/pl/panel_preferences_general.xml index 44dcb2112c..fff56eab6e 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_general.xml @@ -11,7 +11,6 @@ - diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml index deeb917e82..e42a8af962 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml @@ -11,7 +11,6 @@ - diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml index cabe13adb8..29f9599c97 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml @@ -11,7 +11,6 @@ - -- cgit v1.2.3 From fce6c0924117a39a4683bccdc127680739abb16f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 11 Oct 2011 16:51:20 +0200 Subject: STORM-1615 WIP Added Simplified Chinese and Traditional Chinese to the list of languages supported by viewer. Language codes: zh (Traditional Chinese), zh_CN (Simplified Chinese). Changes: * Added both languages to the dropdown menu in Preferences / General. * Added a couple of "translated" XUI files for zh_CN to create the necessary folders. --- .../newview/skins/default/xui/en/panel_preferences_general.xml | 10 ++++++++++ .../skins/default/xui/zh_CN/floater_buy_currency_html.xml | 2 ++ indra/newview/skins/minimal/xui/zh/menu_script_chiclet.xml | 4 ++++ indra/newview/skins/minimal/xui/zh_CN/menu_script_chiclet.xml | 4 ++++ 4 files changed, 20 insertions(+) create mode 100644 indra/newview/skins/default/xui/zh_CN/floater_buy_currency_html.xml create mode 100644 indra/newview/skins/minimal/xui/zh/menu_script_chiclet.xml create mode 100644 indra/newview/skins/minimal/xui/zh_CN/menu_script_chiclet.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index ddef9a853b..34c4fdf97c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -90,6 +90,16 @@ label="日本語 (Japanese) - Beta" name="(Japanese)" value="ja" /> + + + diff --git a/indra/newview/skins/minimal/xui/zh/menu_script_chiclet.xml b/indra/newview/skins/minimal/xui/zh/menu_script_chiclet.xml new file mode 100644 index 0000000000..a0a8520650 --- /dev/null +++ b/indra/newview/skins/minimal/xui/zh/menu_script_chiclet.xml @@ -0,0 +1,4 @@ + + + + diff --git a/indra/newview/skins/minimal/xui/zh_CN/menu_script_chiclet.xml b/indra/newview/skins/minimal/xui/zh_CN/menu_script_chiclet.xml new file mode 100644 index 0000000000..371086c374 --- /dev/null +++ b/indra/newview/skins/minimal/xui/zh_CN/menu_script_chiclet.xml @@ -0,0 +1,4 @@ + + + + -- cgit v1.2.3 From 0620e6a79149e455744131703e8bdb74864b69be Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 11 Oct 2011 09:10:08 -0700 Subject: New picks icon --- .../skins/default/textures/toolbar_icons/picks.png | Bin 1368 -> 1396 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/toolbar_icons/picks.png b/indra/newview/skins/default/textures/toolbar_icons/picks.png index 4499bf562b..befda04b42 100644 Binary files a/indra/newview/skins/default/textures/toolbar_icons/picks.png and b/indra/newview/skins/default/textures/toolbar_icons/picks.png differ -- cgit v1.2.3 From 8154c245dd2f7aaee390e0206f460b9dd5b9f693 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 11 Oct 2011 18:14:37 +0200 Subject: EXP-1281 FIXED (As a FUI user, I want all bottom bar floaters to become independent) Made bottom bar dependent floaters independent from it. Also some LLTransientDockableFloaters are just LLFLoaters now. Note: IM Floater and SysWellWindow will be made independent within EXP-1276 --- indra/newview/llcallfloater.cpp | 2 +- indra/newview/llcallfloater.h | 5 +- indra/newview/llfloatercamera.cpp | 14 +- indra/newview/llfloatercamera.h | 5 +- indra/newview/llmoveview.cpp | 76 ++--- indra/newview/llmoveview.h | 6 +- indra/newview/llnearbychat.cpp | 2 +- indra/newview/llnearbychatbar.cpp | 353 --------------------- indra/newview/llnearbychatbar.h | 62 +--- .../skins/default/xui/en/floater_camera.xml | 4 +- 10 files changed, 32 insertions(+), 497 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 4c6ddc8be7..cc2a189b76 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -37,9 +37,9 @@ #include "llavatarnamecache.h" #include "llavatariconctrl.h" #include "llavatarlist.h" -#include "llbottomtray.h" #include "lldraghandle.h" #include "llimfloater.h" +#include "llimview.h" #include "llfloaterreg.h" #include "llparticipantlist.h" #include "llspeakers.h" diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index ea78cd53b7..7282f7a8be 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -28,7 +28,7 @@ #ifndef LL_LLCALLFLOATER_H #define LL_LLCALLFLOATER_H -#include "lltransientdockablefloater.h" +#include "llfloater.h" #include "llvoicechannel.h" #include "llvoiceclient.h" @@ -262,9 +262,6 @@ private: */ static LLVoiceChannel* sCurrentVoiceChannel; - /* virtual */ - LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } - boost::signals2::connection mVoiceChannelStateChangeConnection; }; diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 1dfa904a19..b4658b1edb 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -36,7 +36,6 @@ #include "lljoystickbutton.h" #include "llviewercontrol.h" #include "llviewercamera.h" -#include "llbottomtray.h" #include "lltoolmgr.h" #include "lltoolfocus.h" #include "llslider.h" @@ -314,12 +313,6 @@ void LLFloaterCamera::onOpen(const LLSD& key) { LLFirstUse::viewPopup(); - LLButton *anchor_panel = LLBottomTray::getInstance()->getChild("camera_btn"); - - setDockControl(new LLDockControl( - anchor_panel, this, - getDockTongue(), LLDockControl::TOP)); - mZoom->onOpen(key); // Returns to previous mode, see EXT-2727(View tool should remember state). @@ -343,15 +336,12 @@ void LLFloaterCamera::onClose(bool app_quitting) if (mCurrMode == CAMERA_CTRL_MODE_PAN) mPrevMode = CAMERA_CTRL_MODE_PAN; - // HACK: Should always close as docked to prevent toggleInstance without calling onOpen. - if ( !isDocked() ) - setDocked(true); switchMode(CAMERA_CTRL_MODE_PAN); mClosed = TRUE; } LLFloaterCamera::LLFloaterCamera(const LLSD& val) -: LLTransientDockableFloater(NULL, true, val), +: LLFloater(val), mClosed(FALSE), mCurrMode(CAMERA_CTRL_MODE_PAN), mPrevMode(CAMERA_CTRL_MODE_PAN) @@ -379,7 +369,7 @@ BOOL LLFloaterCamera::postBuild() // ensure that appearance mode is handled while building. See EXT-7796. handleAvatarEditingAppearance(sAppearanceEditing); - return LLDockableFloater::postBuild(); + return TRUE; } void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel) diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index 424191ef26..4572932853 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -27,7 +27,7 @@ #ifndef LLFLOATERCAMERA_H #define LLFLOATERCAMERA_H -#include "lltransientdockablefloater.h" +#include "llfloater.h" #include "lliconctrl.h" #include "lltextbox.h" #include "llflatlistview.h" @@ -45,8 +45,7 @@ enum ECameraControlMode CAMERA_CTRL_MODE_PRESETS }; -class LLFloaterCamera - : public LLTransientDockableFloater +class LLFloaterCamera : public LLFloater { friend class LLFloaterReg; diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index a29526777a..2af01d06c1 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -37,7 +37,6 @@ #include "llagent.h" #include "llagentcamera.h" #include "llvoavatarself.h" // to check gAgentAvatarp->isSitting() -#include "llbottomtray.h" #include "llbutton.h" #include "llfirstuse.h" #include "llfloaterreg.h" @@ -46,7 +45,8 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" #include "llviewercontrol.h" -#include "llselectmgr.h" +#include "llselectmgr.h" +#include "lltoolbarview.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" #include "lltooltip.h" @@ -59,15 +59,13 @@ const F32 MOVE_BUTTON_DELAY = 0.0f; const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed const F32 NUDGE_TIME = 0.25f; // in seconds -const std::string BOTTOM_TRAY_BUTTON_NAME = "movement_btn"; - // // Member functions // // protected LLFloaterMove::LLFloaterMove(const LLSD& key) -: LLTransientDockableFloater(NULL, true, key), +: LLFloater(key), mForwardButton(NULL), mBackwardButton(NULL), mTurnLeftButton(NULL), @@ -94,8 +92,6 @@ BOOL LLFloaterMove::postBuild() { updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) - LLDockableFloater::postBuild(); - // Code that implements floater buttons toggling when user moves via keyboard is located in LLAgent::propagate() mForwardButton = getChild("forward btn"); @@ -153,10 +149,10 @@ BOOL LLFloaterMove::postBuild() // virtual void LLFloaterMove::setVisible(BOOL visible) { - // Do nothing with Stand/Stop Flying panel in excessive calls of this method (from LLTransientFloaterMgr?). + // Do nothing with Stand/Stop Flying panel in excessive calls of this method. if (getVisible() == visible) { - LLTransientDockableFloater::setVisible(visible); + LLFloater::setVisible(visible); return; } @@ -175,7 +171,7 @@ void LLFloaterMove::setVisible(BOOL visible) LLPanelStandStopFlying::getInstance()->reparent(NULL); } - LLTransientDockableFloater::setVisible(visible); + LLFloater::setVisible(visible); } // static @@ -439,30 +435,6 @@ void LLFloaterMove::setModeTitle(const EMovementMode mode) setTitle(title); } -/** - * Updates position of the floater to be center aligned with Move button. - */ -void LLFloaterMove::updatePosition() -{ - LLBottomTray* tray = LLBottomTray::getInstance(); - if (!tray) return; - - LLButton* movement_btn = tray->findChild(BOTTOM_TRAY_BUTTON_NAME); - - if (movement_btn) - { - //align centers of a button and a floater - S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2; - - S32 y = 0; - if (!mModeActionsPanel->getVisible()) - { - y = mModeActionsPanel->getRect().getHeight(); - } - setOrigin(x, y); - } -} - //static void LLFloaterMove::sUpdateFlyingStatus() { @@ -497,8 +469,6 @@ void LLFloaterMove::enableInstance(BOOL bEnable) void LLFloaterMove::onOpen(const LLSD& key) { - LLButton *anchor_panel = LLBottomTray::getInstance()->getChild("movement_btn"); - if (gAgent.getFlying()) { setFlyingMode(TRUE); @@ -511,19 +481,9 @@ void LLFloaterMove::onOpen(const LLSD& key) showModeButtons(FALSE); } - setDockControl(new LLDockControl( - anchor_panel, this, - getDockTongue(), LLDockControl::TOP)); - sUpdateFlyingStatus(); } -//virtual -void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/) -{ - LLTransientDockableFloater::setDocked(docked, pop_on_undock); -} - void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode) { llassert_always(mModeControlButtonMap.end() != mModeControlButtonMap.find(mode)); @@ -734,23 +694,27 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick() */ void LLPanelStandStopFlying::updatePosition() { - LLBottomTray* tray = LLBottomTray::getInstance(); - if (!tray || mAttached) return; - - LLButton* movement_btn = tray->findChild(BOTTOM_TRAY_BUTTON_NAME); + if (mAttached) return; S32 x = 0; - if (movement_btn) + S32 y = 0; + + if(LLView* root = getRootView()) { - // Align centers of the button and the panel. - x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2; + x = root->calcScreenRect().getCenterX() - getRect().getWidth()/2; } - else + + if (LLToolBar* toolbar_bottom = gToolBarView->getChild("toolbar_bottom")) { - x = tray->calcScreenRect().getCenterX() - getRect().getWidth()/2; + y = toolbar_bottom->getRect().getHeight(); } + + if(LLPanel* panel_ssf_container = getRootView()->getChild("stand_stop_flying_container")) + { + panel_ssf_container->setOrigin(0, y); + } + setOrigin(x, 0); } - // EOF diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 1b87864651..744dd866d4 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -28,7 +28,7 @@ #define LL_LLMOVEVIEW_H // Library includes -#include "lltransientdockablefloater.h" +#include "llfloater.h" class LLButton; class LLJoystickAgentTurn; @@ -38,7 +38,7 @@ class LLJoystickAgentSlide; // Classes // class LLFloaterMove -: public LLTransientDockableFloater +: public LLFloater { LOG_CLASS(LLFloaterMove); friend class LLFloaterReg; @@ -58,7 +58,6 @@ public: static void setSittingMode(BOOL bSitting); static void enableInstance(BOOL bEnable); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); static void sUpdateFlyingStatus(); @@ -87,7 +86,6 @@ private: void initModeButtonMap(); void setModeButtonToggleState(const EMovementMode mode); void updateButtonsWithMovementMode(const EMovementMode newMode); - void updatePosition(); void showModeButtons(BOOL bShow); public: diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 9eaa64a124..67d745248f 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -34,6 +34,7 @@ #include "lliconctrl.h" #include "llfloatersidepanelcontainer.h" #include "llfocusmgr.h" +#include "lllogchat.h" #include "llresizebar.h" #include "llresizehandle.h" #include "llmenugl.h" @@ -50,7 +51,6 @@ #include "lldraghandle.h" -#include "llbottomtray.h" #include "llnearbychatbar.h" #include "llfloaterreg.h" #include "lltrans.h" diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index caa20b767c..3073a19d83 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -34,7 +34,6 @@ #include "llfirstuse.h" #include "llnearbychatbar.h" -#include "llbottomtray.h" #include "llagent.h" #include "llgesturemgr.h" #include "llmultigesture.h" @@ -58,8 +57,6 @@ const S32 EXPANDED_HEIGHT = 300; // legacy callback glue void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); -static LLDefaultChildRegistry::Register r("gesture_combo_list"); - struct LLChatTypeTrigger { std::string name; EChatType type; @@ -70,351 +67,6 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { { "/shout" , CHAT_TYPE_SHOUT} }; -//ext-7367 -//Problem: gesture list control (actually LLScrollListCtrl) didn't actually process mouse wheel message. -// introduce new gesture list subclass to "eat" mouse wheel messages (and probably some other messages) -class LLGestureScrollListCtrl: public LLScrollListCtrl -{ -protected: - friend class LLUICtrlFactory; - LLGestureScrollListCtrl(const LLScrollListCtrl::Params& params) - :LLScrollListCtrl(params) - { - } -public: - BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) - { - LLScrollListCtrl::handleScrollWheel( x, y, clicks ); - return TRUE; - } - //See EXT-6598 - //Mouse hover over separator will result in not processing tooltip message - //So eat this message - BOOL handleToolTip(S32 x, S32 y, MASK mask) - { - LLScrollListCtrl::handleToolTip( x, y, mask ); - return TRUE; - } -}; - -LLGestureComboList::Params::Params() -: combo_button("combo_button"), - combo_list("combo_list"), - get_more("get_more", true), - view_all("view_all", true) -{ -} - -LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) -: LLUICtrl(p), - mLabel(p.label), - mViewAllItemIndex(-1), - mGetMoreItemIndex(-1), - mShowViewAll(p.view_all), - mShowGetMore(p.get_more) -{ - LLBottomtrayButton::Params button_params = p.combo_button; - button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); - - mButton = LLUICtrlFactory::create(button_params); - mButton->reshape(getRect().getWidth(),getRect().getHeight()); - mButton->setCommitCallback(boost::bind(&LLGestureComboList::onButtonCommit, this)); - - addChild(mButton); - - LLGestureScrollListCtrl::Params params(p.combo_list); - - params.name("GestureComboList"); - params.commit_callback.function(boost::bind(&LLGestureComboList::onItemSelected, this, _2)); - params.visible(false); - params.commit_on_keyboard_movement(false); - - mList = LLUICtrlFactory::create(params); - addChild(mList); - - //****************************Gesture Part********************************/ - - setCommitCallback(boost::bind(&LLGestureComboList::onCommitGesture, this)); - - // now register us as observer since we have a place to put the results - LLGestureMgr::instance().addObserver(this); - - // refresh list from current active gestures - refreshGestures(); - - setFocusLostCallback(boost::bind(&LLGestureComboList::hideList, this)); -} - -BOOL LLGestureComboList::handleKeyHere(KEY key, MASK mask) -{ - BOOL handled = FALSE; - - if (key == KEY_ESCAPE && mask == MASK_NONE ) - { - hideList(); - handled = TRUE; - } - else - { - handled = mList->handleKeyHere(key, mask); - } - - return handled; -} - -void LLGestureComboList::draw() -{ - LLUICtrl::draw(); - - if(mButton->getToggleState()) - { - showList(); - } -} - -void LLGestureComboList::showList() -{ - LLRect rect = mList->getRect(); - LLRect button_rect = mButton->getRect(); - - // Calculating amount of space between the navigation bar and gestures combo - LLNavigationBar* nb = LLNavigationBar::getInstance(); - - S32 x, nb_bottom; - nb->localPointToOtherView(0, 0, &x, &nb_bottom, this); - - S32 max_height = nb_bottom - button_rect.mTop; - mList->calcColumnWidths(); - rect.setOriginAndSize(button_rect.mLeft, button_rect.mTop, llmax(mList->getMaxContentWidth(),mButton->getRect().getWidth()), max_height); - - mList->setRect(rect); - mList->fitContents( llmax(mList->getMaxContentWidth(),mButton->getRect().getWidth()), max_height); - - gFocusMgr.setKeyboardFocus(this); - - // Show the list and push the button down - mButton->setToggleState(TRUE); - mList->setVisible(TRUE); - sendChildToFront(mList); - LLUI::addPopup(mList); -} - -void LLGestureComboList::onButtonCommit() -{ - if (!mList->getVisible()) - { - // highlight the last selected item from the original selection before potentially selecting a new item - // as visual cue to original value of combo box - LLScrollListItem* last_selected_item = mList->getLastSelectedItem(); - if (last_selected_item) - { - mList->mouseOverHighlightNthItem(mList->getItemIndex(last_selected_item)); - } - - if (mList->getItemCount() != 0) - { - showList(); - } - } - else - { - hideList(); - } -} - -void LLGestureComboList::hideList() -{ - if (mList->getVisible()) - { - mButton->setToggleState(FALSE); - mList->setVisible(FALSE); - mList->mouseOverHighlightNthItem(-1); - LLUI::removePopup(mList); - gFocusMgr.setKeyboardFocus(NULL); - } -} - -S32 LLGestureComboList::getCurrentIndex() const -{ - LLScrollListItem* item = mList->getFirstSelected(); - if( item ) - { - return mList->getItemIndex( item ); - } - return -1; -} - -void LLGestureComboList::onItemSelected(const LLSD& data) -{ - const std::string name = mList->getSelectedItemLabel(); - - S32 cur_id = getCurrentIndex(); - mLastSelectedIndex = cur_id; - if (cur_id != mList->getItemCount()-1 && cur_id != -1) - { - mButton->setLabel(name); - } - - // hiding the list reasserts the old value stored in the text editor/dropdown button - hideList(); - - // commit does the reverse, asserting the value in the list - onCommit(); -} - -void LLGestureComboList::sortByName(bool ascending) -{ - mList->sortOnce(0, ascending); -} - -LLSD LLGestureComboList::getValue() const -{ - LLScrollListItem* item = mList->getFirstSelected(); - if( item ) - { - return item->getValue(); - } - else - { - return LLSD(); - } -} - -void LLGestureComboList::refreshGestures() -{ - //store current selection so we can maintain it - LLSD cur_gesture = getValue(); - - mList->selectFirstItem(); - mList->clearRows(); - mGestures.clear(); - - LLGestureMgr::item_map_t::const_iterator it; - const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures(); - LLSD::Integer idx(0); - for (it = active_gestures.begin(); it != active_gestures.end(); ++it) - { - LLMultiGesture* gesture = (*it).second; - if (gesture) - { - mList->addSimpleElement(gesture->mName, ADD_BOTTOM, LLSD(idx)); - mGestures.push_back(gesture); - idx++; - } - } - - sortByName(); - - // store indices for Get More and View All items (idx is the index followed by the last added Gesture) - if (mShowGetMore) - { - mGetMoreItemIndex = idx; - mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); - } - if (mShowViewAll) - { - mViewAllItemIndex = idx + 1; - mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); - } - - // Insert label after sorting, at top, with separator below it - mList->addSeparator(ADD_TOP); - mList->addSimpleElement(mLabel, ADD_TOP); - - if (cur_gesture.isDefined()) - { - mList->selectByValue(cur_gesture); - - } - else - { - mList->selectFirstItem(); - } - - LLCtrlListInterface* gestures = getListInterface(); - LLMultiGesture* gesture = NULL; - - if (gestures) - { - S32 sel_index = gestures->getFirstSelectedIndex(); - if (sel_index != 0) - { - S32 index = gestures->getSelectedValue().asInteger(); - if (index<0 || index >= (S32)mGestures.size()) - { - llwarns << "out of range gesture access" << llendl; - } - else - { - gesture = mGestures.at(index); - } - } - } - - if(gesture && LLGestureMgr::instance().isGesturePlaying(gesture)) - { - return; - } - - mButton->setLabel(mLabel); -} - -void LLGestureComboList::onCommitGesture() -{ - LLCtrlListInterface* gestures = getListInterface(); - if (gestures) - { - S32 sel_index = gestures->getFirstSelectedIndex(); - if (sel_index == 0) - { - return; - } - - S32 index = gestures->getSelectedValue().asInteger(); - - if (mViewAllItemIndex == index) - { - // The same behavior as Ctrl+G. EXT-823 - LLFloaterReg::toggleInstance("gestures"); - gestures->selectFirstItem(); - return; - } - - if (mGetMoreItemIndex == index) - { - LLWeb::loadURLExternal(gSavedSettings.getString("GesturesMarketplaceURL")); - return; - } - - if (index<0 || index >= (S32)mGestures.size()) - { - llwarns << "out of range gesture index" << llendl; - } - else - { - LLMultiGesture* gesture = mGestures.at(index); - if(gesture) - { - LLGestureMgr::instance().playGesture(gesture); - if(!gesture->mReplaceText.empty()) - { - LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE); - } - } - } - } -} - -LLGestureComboList::~LLGestureComboList() -{ - LLGestureMgr::instance().removeObserver(this); -} - -LLCtrlListInterface* LLGestureComboList::getListInterface() -{ - return mList; -} - LLNearbyChatBar::LLNearbyChatBar(const LLSD& key) : LLFloater(key), mChatBox(NULL) @@ -839,11 +491,6 @@ void LLNearbyChatBar::startChat(const char* line) // static void LLNearbyChatBar::stopChat() { - LLBottomTray *bt = LLBottomTray::getInstance(); - - if (!bt) - return; - LLNearbyChatBar* cb = LLNearbyChatBar::getInstance(); if (!cb) diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 0415f12a0d..a6fd6e5665 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -27,73 +27,15 @@ #ifndef LL_LLNEARBYCHATBAR_H #define LL_LLNEARBYCHATBAR_H -#include "llpanel.h" +#include "llfloater.h" #include "llcombobox.h" #include "llgesturemgr.h" #include "llchat.h" #include "llvoiceclient.h" #include "lloutputmonitorctrl.h" #include "llspeakers.h" -#include "llbottomtray.h" - -class LLGestureComboList - : public LLGestureManagerObserver - , public LLUICtrl -{ -public: - struct Params : public LLInitParam::Block - { - Optional combo_button; - Optional combo_list; - Optional get_more, - view_all; - - Params(); - }; - -protected: - - friend class LLUICtrlFactory; - LLGestureComboList(const Params&); - std::vector mGestures; - std::string mLabel; - bool mShowViewAll; - bool mShowGetMore; - LLSD::Integer mViewAllItemIndex; - LLSD::Integer mGetMoreItemIndex; - -public: - - ~LLGestureComboList(); - - LLCtrlListInterface* getListInterface(); - virtual void showList(); - virtual void hideList(); - virtual BOOL handleKeyHere(KEY key, MASK mask); - - virtual void draw(); - - S32 getCurrentIndex() const; - void onItemSelected(const LLSD& data); - void sortByName(bool ascending = true); - void refreshGestures(); - void onCommitGesture(); - void onButtonCommit(); - virtual LLSD getValue() const; - - // LLGestureManagerObserver trigger - virtual void changed() { refreshGestures(); } - -private: - - LLButton* mButton; - LLScrollListCtrl* mList; - S32 mLastSelectedIndex; -}; - -class LLNearbyChatBar -: public LLFloater +class LLNearbyChatBar : public LLFloater { public: // constructor for inline chat-bars (e.g. hosted in chat history window) diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index da2be18db6..125ca81cde 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -1,9 +1,8 @@ Date: Tue, 11 Oct 2011 10:07:19 -0700 Subject: Added 'execute_stop_function' command parameter to handle mouse down/up actions on toolbar buttons --- indra/newview/app_settings/commands.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index d758647d3a..296d992b34 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -217,6 +217,8 @@ tooltip_ref="Command_Speak_Tooltip" execute_function="Agent.ToggleMicrophone" execute_parameters="speak" + execute_stop_function="" + execute_stop_parameters="speak" is_enabled_function="Agent.IsActionAllowed" is_enabled_parameters="speak" is_running_function="Agent.IsMicrophoneOn" -- cgit v1.2.3 From 3596c0f7e139724f31258ffb96157146aeba77b1 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 11 Oct 2011 15:06:16 -0700 Subject: EXP-1300 : Implemented carets for DaD. Works with small bugs but OK for demo. Still in need of some cleanup --- indra/newview/lltoolbarview.cpp | 7 ------- .../default/textures/toolbar_icons/caret_bottom.png | Bin 139 -> 169 bytes .../skins/default/textures/toolbar_icons/caret_left.png | Bin 893 -> 913 bytes .../default/textures/toolbar_icons/caret_right.png | Bin 892 -> 911 bytes .../newview/skins/default/xui/en/panel_toolbar_view.xml | 13 +++++++------ 5 files changed, 7 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 318bede6f0..164a1c0ca6 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -330,7 +330,6 @@ void LLToolBarView::draw() void LLToolBarView::startDragTool( S32 x, S32 y, const LLUUID& uuid) { - llinfos << "Merov debug: startDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; // Flag the tool dragging but don't start it yet gToolBarView->mDragStarted = false; gToolBarView->mDragCommand = LLCommandId::null; @@ -345,7 +344,6 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp { if (!gToolBarView->mDragStarted) { - llinfos << "Merov debug: handleDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; // Start the tool dragging: // First, create the global drag and drop object @@ -357,7 +355,6 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER; LLUUID srcID; LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID); - llinfos << "Merov debug: beginMultiDrag() launched" << llendl; // Second, check if the command is present in one of the 3 toolbars // If it is, store the command, the toolbar and the rank in the toolbar and @@ -383,7 +380,6 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp } */ - llinfos << "Merov debug: Drag started cleanly" << llendl; gToolBarView->mDragStarted = true; return TRUE; } @@ -399,12 +395,10 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar) { LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; - //llinfos << "Merov debug : handleDropTool. Drop " << inv_item->getUUID() << " named " << inv_item->getName() << " of type " << inv_item->getType() << llendl; LLAssetType::EType type = inv_item->getType(); if (type == LLAssetType::AT_WIDGET) { - //llinfos << "Merov debug : handleDropTool. Drop source is a widget -> drop it in place..." << llendl; // Get the command from its uuid LLCommandManager& mgr = LLCommandManager::instance(); LLCommandId command_id(inv_item->getUUID()); @@ -419,7 +413,6 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t } // Suppress the command from the toolbars (including the one it's dropped in, // this will handle move position). - llinfos << "Merov debug : handleDropTool, " << command_id.name() << ", " << command_id.uuid() << llendl; gToolBarView->mToolbarLeft->removeCommand(command_id); gToolBarView->mToolbarRight->removeCommand(command_id); gToolBarView->mToolbarBottom->removeCommand(command_id); diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png index 82f58b22b9..d506cda5c9 100644 Binary files a/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png and b/indra/newview/skins/default/textures/toolbar_icons/caret_bottom.png differ diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_left.png b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png index 75eecc84ed..b1284aaf79 100644 Binary files a/indra/newview/skins/default/textures/toolbar_icons/caret_left.png and b/indra/newview/skins/default/textures/toolbar_icons/caret_left.png differ diff --git a/indra/newview/skins/default/textures/toolbar_icons/caret_right.png b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png index 677459ae1c..bf6a4ed66c 100644 Binary files a/indra/newview/skins/default/textures/toolbar_icons/caret_right.png and b/indra/newview/skins/default/textures/toolbar_icons/caret_right.png differ diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index 5d6967ed32..9ffd62f7a9 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -48,8 +48,8 @@ side="left" button_display_mode="icons_only"> -- cgit v1.2.3 From ecdcaf149b7def0e40898ac202539376a673c7b1 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 11 Oct 2011 15:33:43 -0700 Subject: FIX EXP-1302 Make the Speak button work as a toolbar button and EXP-1324 Push to talk hot key doesn't change button state of speak button --- indra/newview/app_settings/commands.xml | 4 ++-- indra/newview/llagent.cpp | 27 +++++++++++---------------- indra/newview/llagent.h | 4 ++-- 3 files changed, 15 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 296d992b34..3625ce5088 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -215,9 +215,9 @@ icon="Command_Speak_Icon" label_ref="Command_Speak_Label" tooltip_ref="Command_Speak_Tooltip" - execute_function="Agent.ToggleMicrophone" + execute_function="Agent.PressMicrophone" execute_parameters="speak" - execute_stop_function="" + execute_stop_function="Agent.ReleaseMicrophone" execute_stop_parameters="speak" is_enabled_function="Agent.IsActionAllowed" is_enabled_parameters="speak" diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 8303a5942d..31a73c8c31 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -188,28 +188,23 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) } // static -void LLAgent::toggleMicrophone(const LLSD& name) +void LLAgent::pressMicrophone(const LLSD& name) { - gAgent.mMicrophoneOn = ! gAgent.mMicrophoneOn; + LLFirstUse::speak(false); - if ( gAgent.mMicrophoneOn ) - { - LLFirstUse::speak(false); + LLVoiceClient::getInstance()->inputUserControlState(true); +} - LLVoiceClient::getInstance()->inputUserControlState(true); - LLVoiceClient::getInstance()->inputUserControlState(false); - } - else - { - LLVoiceClient::getInstance()->inputUserControlState(false); - LLVoiceClient::getInstance()->inputUserControlState(true); - } +// static +void LLAgent::releaseMicrophone(const LLSD& name) +{ + LLVoiceClient::getInstance()->inputUserControlState(false); } // static bool LLAgent::isMicrophoneOn(const LLSD& sdname) { - return gAgent.mMicrophoneOn; + return LLVoiceClient::getInstance()->getUserPTTState(); } // ************************************************************ @@ -294,7 +289,6 @@ LLAgent::LLAgent() : mGenderChosen(FALSE), mVoiceConnected(false), - mMicrophoneOn(false), mAppearanceSerialNum(0), @@ -314,7 +308,8 @@ LLAgent::LLAgent() : LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2)); LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2)); } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 0355e68b6e..0f7ed9ce68 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -290,12 +290,12 @@ public: bool isVoiceConnected() const { return mVoiceConnected; } void setVoiceConnected(const bool b) { mVoiceConnected = b; } - static void toggleMicrophone(const LLSD& name); + static void pressMicrophone(const LLSD& name); + static void releaseMicrophone(const LLSD& name); static bool isMicrophoneOn(const LLSD& sdname); private: bool mVoiceConnected; - bool mMicrophoneOn; //-------------------------------------------------------------------- // Chat -- cgit v1.2.3 From 9f0890fc3a6931562843e4597c009778424ee5bc Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Tue, 11 Oct 2011 16:17:23 -0700 Subject: EXP-1293 Nearby chat toasts no longer appear. EXP-1316 Minimized Snapshot floater has a snapshot preview image attached below. EXP-1318 Clicking on nearby chat toasts should bring up Nearby Chat history --- indra/newview/llchatitemscontainerctrl.cpp | 5 +++-- indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llnearbychatbar.cpp | 10 ++++++++++ indra/newview/llnearbychatbar.h | 2 ++ indra/newview/llnearbychathandler.cpp | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 8584885bc9..9a84280f25 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -35,6 +35,7 @@ #include "llfloaterreg.h" #include "lllocalcliprect.h" #include "lltrans.h" +#include "llnearbychatbar.h" #include "llviewercontrol.h" #include "llagentdata.h" @@ -315,12 +316,12 @@ BOOL LLNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) return TRUE; else { - LLFloaterReg::showInstance("nearby_chat",LLSD()); + LLNearbyChatBar::getInstance()->showHistory(); return FALSE; } } - LLFloaterReg::showInstance("nearby_chat",LLSD()); + LLNearbyChatBar::getInstance()->showHistory(); return LLPanel::handleMouseUp(x,y,mask); } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 9d020517d8..8105844b0d 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -2217,7 +2217,7 @@ void LLFloaterSnapshot::draw() LLFloater::draw(); - if (previewp) + if (previewp && !isMinimized()) { if(previewp->getThumbnailImage()) { diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 3073a19d83..cd84275ef0 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -135,6 +135,16 @@ LLNearbyChatBar* LLNearbyChatBar::getInstance() return LLFloaterReg::getTypedInstance("chat_bar"); } +void LLNearbyChatBar::showHistory() +{ + if (!getChildView("nearby_chat")->getVisible()) + { + onToggleNearbyChatPanel(); + } + + openFloater(); +} + void LLNearbyChatBar::draw() { displaySpeakingIndicator(); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index a6fd6e5665..5a7edac1bb 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -59,6 +59,8 @@ public: static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); + void showHistory(); + protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index dcf444b048..7503164fe6 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -581,7 +581,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not sChatWatcher->post(notification); - if( nearby_chat->getVisible() + if( chat_bar->getVisible() && nearby_chat->getVisible() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode -- cgit v1.2.3 From dacfe7b2bdc845640f18db33992924033494e470 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 11 Oct 2011 16:20:02 -0700 Subject: EXP-1300 : Fix caret position in bottom bar, fix misplacement when moving within same toolbar, suppress visible caret in some situations, no caret if toolbar empty --- indra/newview/lltoolbarview.cpp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 8ae9328f6d..86f6477710 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -406,20 +406,35 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t if (command) { // Convert the (x,y) position in rank in toolbar - int rank = 0; + int new_rank = LLToolBar::RANK_NONE; if (!toolbar->isReadOnly()) { - rank = toolbar->getRankFromPosition(x,y); + new_rank = toolbar->getRankFromPosition(x,y); } // Suppress the command from the toolbars (including the one it's dropped in, // this will handle move position). - gToolBarView->mToolbarLeft->removeCommand(command_id); - gToolBarView->mToolbarRight->removeCommand(command_id); - gToolBarView->mToolbarBottom->removeCommand(command_id); + int old_rank = LLToolBar::RANK_NONE; + int rank; + if ((rank = gToolBarView->mToolbarLeft->removeCommand(command_id)) != LLToolBar::RANK_NONE) + { + old_rank = rank; + } + if ((rank = gToolBarView->mToolbarRight->removeCommand(command_id)) != LLToolBar::RANK_NONE) + { + old_rank = rank; + } + if ((rank = gToolBarView->mToolbarBottom->removeCommand(command_id)) != LLToolBar::RANK_NONE) + { + old_rank = rank; + } // Now insert it in the toolbar at the detected rank if (!toolbar->isReadOnly()) { - toolbar->addCommand(command->id(),rank); + if ((old_rank != LLToolBar::RANK_NONE) && (old_rank < new_rank)) + { + new_rank -= 1; + } + toolbar->addCommand(command->id(),new_rank); } } else -- cgit v1.2.3 From 3c06bb26b0fc4204945020c37f00dbdf0ff9338b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 11 Oct 2011 17:19:14 -0700 Subject: New icons with 10% more opacity --- .../skins/default/textures/toolbar_icons/move.png | Bin 1322 -> 1328 bytes .../default/textures/toolbar_icons/nearbyvoice.png | Bin 1280 -> 3160 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/toolbar_icons/move.png b/indra/newview/skins/default/textures/toolbar_icons/move.png index 5854110782..5c2ced7375 100644 Binary files a/indra/newview/skins/default/textures/toolbar_icons/move.png and b/indra/newview/skins/default/textures/toolbar_icons/move.png differ diff --git a/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png index 5bdcb22aa5..46e299cb94 100644 Binary files a/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png and b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png differ -- cgit v1.2.3 From f9e900f5ac9002f5ef3b44b02ac300971288e89b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 11 Oct 2011 17:36:23 -0700 Subject: * New floater positioning code. Better than what's checked in but not great. * Floater updates for positioning and to revert some earlier string changes. --- indra/newview/llappviewer.cpp | 7 +++++-- indra/newview/llfloatercamera.cpp | 2 +- indra/newview/llfloaterpreference.cpp | 1 - indra/newview/llfloatertoybox.cpp | 2 -- indra/newview/skins/default/xui/en/floater_about.xml | 1 + indra/newview/skins/default/xui/en/floater_about_land.xml | 3 ++- indra/newview/skins/default/xui/en/floater_activeim.xml | 2 -- indra/newview/skins/default/xui/en/floater_avatar.xml | 6 +++--- .../newview/skins/default/xui/en/floater_avatar_picker.xml | 1 + indra/newview/skins/default/xui/en/floater_camera.xml | 6 +++++- indra/newview/skins/default/xui/en/floater_chat_bar.xml | 5 ++++- indra/newview/skins/default/xui/en/floater_critical.xml | 2 +- .../newview/skins/default/xui/en/floater_destinations.xml | 7 ++++--- indra/newview/skins/default/xui/en/floater_gesture.xml | 4 +++- .../newview/skins/default/xui/en/floater_help_browser.xml | 3 +-- indra/newview/skins/default/xui/en/floater_im_session.xml | 2 -- indra/newview/skins/default/xui/en/floater_inventory.xml | 1 - .../default/xui/en/floater_inventory_item_properties.xml | 1 - .../newview/skins/default/xui/en/floater_land_holdings.xml | 1 + indra/newview/skins/default/xui/en/floater_map.xml | 5 ++--- .../newview/skins/default/xui/en/floater_media_browser.xml | 1 - .../skins/default/xui/en/floater_media_settings.xml | 1 - .../newview/skins/default/xui/en/floater_model_preview.xml | 2 +- indra/newview/skins/default/xui/en/floater_moveview.xml | 5 ++++- .../newview/skins/default/xui/en/floater_my_appearance.xml | 3 ++- .../newview/skins/default/xui/en/floater_my_inventory.xml | 3 ++- indra/newview/skins/default/xui/en/floater_my_profile.xml | 3 ++- .../skins/default/xui/en/floater_outfit_save_as.xml | 2 +- indra/newview/skins/default/xui/en/floater_people.xml | 1 + indra/newview/skins/default/xui/en/floater_places.xml | 1 + indra/newview/skins/default/xui/en/floater_postcard.xml | 1 - indra/newview/skins/default/xui/en/floater_preferences.xml | 5 +++-- .../skins/default/xui/en/floater_preview_animation.xml | 1 - .../skins/default/xui/en/floater_preview_gesture.xml | 3 +-- .../skins/default/xui/en/floater_preview_notecard.xml | 1 - .../newview/skins/default/xui/en/floater_preview_sound.xml | 1 - .../skins/default/xui/en/floater_preview_texture.xml | 1 - indra/newview/skins/default/xui/en/floater_script.xml | 2 -- .../skins/default/xui/en/floater_script_preview.xml | 1 - .../newview/skins/default/xui/en/floater_script_queue.xml | 1 - indra/newview/skins/default/xui/en/floater_search.xml | 14 +++++++------- indra/newview/skins/default/xui/en/floater_snapshot.xml | 3 ++- .../newview/skins/default/xui/en/floater_sound_devices.xml | 2 +- indra/newview/skins/default/xui/en/floater_sys_well.xml | 2 -- indra/newview/skins/default/xui/en/floater_telehub.xml | 1 - indra/newview/skins/default/xui/en/floater_tools.xml | 1 + indra/newview/skins/default/xui/en/floater_toybox.xml | 4 ++-- .../skins/default/xui/en/floater_voice_controls.xml | 3 ++- indra/newview/skins/default/xui/en/floater_web_content.xml | 1 - indra/newview/skins/default/xui/en/floater_world_map.xml | 4 ++-- .../newview/skins/default/xui/en/outfit_accordion_tab.xml | 2 +- indra/newview/skins/default/xui/en/panel_toast.xml | 1 + indra/newview/skins/default/xui/en/widgets/floater.xml | 4 +++- 53 files changed, 74 insertions(+), 69 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5077a0a596..2a9e411762 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4293,12 +4293,15 @@ void LLAppViewer::idle() return; } - gViewerWindow->updateUI(); + if (!quitRequested()) + { + gViewerWindow->updateUI(); + } /////////////////////////////////////// // Agent and camera movement // - LLCoordGL current_mouse = gViewerWindow->getCurrentMouse(); + LLCoordGL current_mouse = gViewerWindow->getCurrentMouse(); { // After agent and camera moved, figure out if we need to diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index b4658b1edb..aa78bc4f29 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -369,7 +369,7 @@ BOOL LLFloaterCamera::postBuild() // ensure that appearance mode is handled while building. See EXT-7796. handleAvatarEditingAppearance(sAppearanceEditing); - return TRUE; + return LLFloater::postBuild(); } void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 8412d37810..5fdeb46daa 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1913,7 +1913,6 @@ BOOL LLFloaterPreferenceProxy::postBuild() getChild("socks5_password")->setValue(socks_cred->getAuthenticator()["creds"].asString()); } - center(); return TRUE; } diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index fa60022911..84881655f8 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -58,8 +58,6 @@ bool compare_localized_command_labels(LLCommand * cmd1, LLCommand * cmd2) BOOL LLFloaterToybox::postBuild() { - center(); - mBtnRestoreDefaults = getChild("btn_restore_defaults"); mToolBar = getChild("toybox_toolbar"); mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3)); diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 2580c06344..36af475824 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -1,5 +1,6 @@ diff --git a/indra/newview/skins/default/xui/en/floater_activeim.xml b/indra/newview/skins/default/xui/en/floater_activeim.xml index 96fe0aa70c..670c528f08 100644 --- a/indra/newview/skins/default/xui/en/floater_activeim.xml +++ b/indra/newview/skins/default/xui/en/floater_activeim.xml @@ -4,8 +4,6 @@ name="floater_activeim" help_topic="floater_activeim" title="ACTIVE IM" - top="26" - left="0" height="22" width="320" follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml index 666aa2d164..6e5c4ada48 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar.xml @@ -12,12 +12,12 @@ single_instance="true" help_topic="avatar" save_rect="true" - title="Avatar Picker" - width="445"> + title="AVATAR PICKER" + width="635"> diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index a11946d352..cbbbeb6094 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -1,5 +1,6 @@ diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml index 6977e29b78..924e4bc11e 100644 --- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml @@ -1,10 +1,13 @@ - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml deleted file mode 100644 index 0f330a7b98..0000000000 --- a/indra/newview/skins/default/xui/en/panel_side_tray.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From 4c663ca8b997bd74fb3b646c3cb3870555dfeb91 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 13 Oct 2011 15:17:51 -0700 Subject: EXP-1314 FIX -- No floater for Marketplace EXP-1338 FIX -- Clicking on active Toybox buttons triggers clicking sound EXP-1339 FIX -- No minimum resize dimension for Place floater EXP-1340 FIX -- No minimum resize demension for Appearance floater EXP-1341 FIX -- Places Floater doesn't have Help button * Toybox buttons no longer have click sounds * Marketplace button opens external browser to marketplace url * Minimum sizes for places and appearance floaters * Marketplace URL's now all use https --- indra/newview/app_settings/commands.xml | 5 +- indra/newview/app_settings/settings.xml | 70 +++++++++++----------- indra/newview/llviewermenu.cpp | 2 + .../skins/default/xui/en/floater_my_appearance.xml | 2 + .../skins/default/xui/en/floater_places.xml | 3 + .../skins/default/xui/en/floater_toybox.xml | 1 + 6 files changed, 44 insertions(+), 39 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index e4aaca1bd0..c83494df25 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -116,10 +116,7 @@ icon="Command_Marketplace_Icon" label_ref="Command_Marketplace_Label" tooltip_ref="Command_Marketplace_Tooltip" - execute_function="Floater.ToggleOrBringToFront" - execute_parameters="marketplace" - is_running_function="Floater.IsOpen" - is_running_parameters="marketplace" + execute_function="Avatar.OpenMarketplace" /> Type String Value - http://marketplace.secondlife.com/ + https://marketplace.secondlife.com/ MarketplaceURL_objectFemale @@ -5105,7 +5105,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/attachments + https://marketplace.secondlife.com/trampoline/viewer21/attachments MarketplaceURL_objectMale @@ -5116,7 +5116,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/attachments + https://marketplace.secondlife.com/trampoline/viewer21/attachments MarketplaceURL_clothingFemale @@ -5127,7 +5127,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/clothing_female_avatar + https://marketplace.secondlife.com/trampoline/viewer21/clothing_female_avatar MarketplaceURL_clothingMale @@ -5138,7 +5138,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/clothing_male_avatar + https://marketplace.secondlife.com/trampoline/viewer21/clothing_male_avatar MarketplaceURL_bodypartFemale @@ -5149,7 +5149,7 @@ Type String Value - http://marketplace.secondlife.com + https://marketplace.secondlife.com/ MarketplaceURL_bodypartMale @@ -5160,7 +5160,7 @@ Type String Value - http://marketplace.secondlife.com/ + https://marketplace.secondlife.com/ MarketplaceURL_glovesMale @@ -5171,7 +5171,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men + https://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men MarketplaceURL_glovesFemale @@ -5182,7 +5182,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men + https://marketplace.secondlife.com/trampoline/viewer21/gloves_both_women_and_men MarketplaceURL_jacketFemale @@ -5193,7 +5193,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/jacket_womens + https://marketplace.secondlife.com/trampoline/viewer21/jacket_womens MarketplaceURL_jacketMale @@ -5204,7 +5204,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/jacket_mens + https://marketplace.secondlife.com/trampoline/viewer21/jacket_mens MarketplaceURL_shirtFemale @@ -5215,7 +5215,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/shirt_womens + https://marketplace.secondlife.com/trampoline/viewer21/shirt_womens MarketplaceURL_shirtMale @@ -5226,7 +5226,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/shirt_mens + https://marketplace.secondlife.com/trampoline/viewer21/shirt_mens MarketplaceURL_undershirtFemale @@ -5237,7 +5237,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/undershirt_womens + https://marketplace.secondlife.com/trampoline/viewer21/undershirt_womens MarketplaceURL_undershirtMale @@ -5248,7 +5248,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/undershirt_mens + https://marketplace.secondlife.com/trampoline/viewer21/undershirt_mens MarketplaceURL_skirtFemale @@ -5259,7 +5259,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/skirts_women + https://marketplace.secondlife.com/trampoline/viewer21/skirts_women MarketplaceURL_skirtMale @@ -5270,7 +5270,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/skirts_women + https://marketplace.secondlife.com/trampoline/viewer21/skirts_women MarketplaceURL_pantsFemale @@ -5281,7 +5281,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/pants_women + https://marketplace.secondlife.com/trampoline/viewer21/pants_women MarketplaceURL_pantsMale @@ -5292,7 +5292,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/pants_men + https://marketplace.secondlife.com/trampoline/viewer21/pants_men MarketplaceURL_underpantsFemale @@ -5303,7 +5303,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/underwear_women + https://marketplace.secondlife.com/trampoline/viewer21/underwear_women MarketplaceURL_underpantsMale @@ -5314,7 +5314,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/underwear_men + https://marketplace.secondlife.com/trampoline/viewer21/underwear_men MarketplaceURL_shoesFemale @@ -5325,7 +5325,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/shoes_women + https://marketplace.secondlife.com/trampoline/viewer21/shoes_women MarketplaceURL_shoesMale @@ -5336,7 +5336,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/shoes_men + https://marketplace.secondlife.com/trampoline/viewer21/shoes_men MarketplaceURL_socksFemale @@ -5347,7 +5347,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/socks_women + https://marketplace.secondlife.com/trampoline/viewer21/socks_women MarketplaceURL_socksMale @@ -5358,7 +5358,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/socks_women + https://marketplace.secondlife.com/trampoline/viewer21/socks_women MarketplaceURL_tattooMale @@ -5369,7 +5369,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men + https://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men MarketplaceURL_tattooFemale @@ -5380,7 +5380,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men + https://marketplace.secondlife.com/trampoline/viewer21/tattoo_both_women_and_men MarketplaceURL_hairFemale @@ -5391,7 +5391,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/womens_hair + https://marketplace.secondlife.com/trampoline/viewer21/womens_hair MarketplaceURL_hairMale @@ -5402,7 +5402,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/mens_hair + https://marketplace.secondlife.com/trampoline/viewer21/mens_hair MarketplaceURL_eyesFemale @@ -5413,7 +5413,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/womens_eyes + https://marketplace.secondlife.com/trampoline/viewer21/womens_eyes MarketplaceURL_eyesMale @@ -5424,7 +5424,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/mens_eyes + https://marketplace.secondlife.com/trampoline/viewer21/mens_eyes MarketplaceURL_shapeFemale @@ -5435,7 +5435,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/womens_shape + https://marketplace.secondlife.com/trampoline/viewer21/womens_shape MarketplaceURL_shapeMale @@ -5446,7 +5446,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/mens_shape + https://marketplace.secondlife.com/trampoline/viewer21/mens_shape MarketplaceURL_skinFemale @@ -5457,7 +5457,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/womens_skin + https://marketplace.secondlife.com/trampoline/viewer21/womens_skin MarketplaceURL_skinMale @@ -5468,7 +5468,7 @@ Type String Value - http://marketplace.secondlife.com/trampoline/viewer21/mens_skin + https://marketplace.secondlife.com/trampoline/viewer21/mens_skin MaxDragDistance diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 4b90f1952a..5d215c7f6d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8259,6 +8259,8 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile"); enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible)); + + commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL"))); view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml index 758a1d5be9..74c4e22841 100644 --- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml +++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml @@ -11,6 +11,8 @@ save_rect="true" single_instance="true" title="APPEARANCE" + min_height="230" + min_width="333" width="333"> Date: Thu, 13 Oct 2011 16:48:59 -0700 Subject: * Hooked up build FUI toolbar button * Added Shop button to status bar * Changed "Inventory..." menu item to go to same window as toolbar inventory button --- indra/newview/app_settings/commands.xml | 2 +- indra/newview/llstatusbar.cpp | 5 +++- indra/newview/skins/default/textures/textures.xml | 1 + .../default/textures/toolbar_icons/mini_cart.png | Bin 0 -> 2987 bytes indra/newview/skins/default/xui/en/menu_viewer.xml | 18 +++----------- .../skins/default/xui/en/panel_status_bar.xml | 27 ++++++++++++++++++--- 6 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 indra/newview/skins/default/textures/toolbar_icons/mini_cart.png (limited to 'indra/newview') diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index c83494df25..7c6468459c 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -35,7 +35,7 @@ icon="Command_Build_Icon" label_ref="Command_Build_Label" tooltip_ref="Command_Build_Tooltip" - execute_function="Floater.ToggleOrBringToFront" + execute_function="Build.Toggle" execute_parameters="build" is_enabled_function="Agent.IsActionAllowed" is_enabled_parameters="build" diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 1b8be7a5b2..75db269bde 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -169,6 +169,8 @@ BOOL LLStatusBar::postBuild() getChild("buyL")->setCommitCallback( boost::bind(&LLStatusBar::onClickBuyCurrency, this)); + getChild("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL"))); + mBoxBalance = getChild("balance"); mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this ); @@ -345,9 +347,10 @@ void LLStatusBar::setBalance(S32 balance) const S32 HPAD = 24; LLRect balance_rect = mBoxBalance->getTextBoundingRect(); LLRect buy_rect = getChildView("buyL")->getRect(); + LLRect shop_rect = getChildView("goShop")->getRect(); LLView* balance_bg_view = getChildView("balance_bg"); LLRect balance_bg_rect = balance_bg_view->getRect(); - balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + balance_rect.getWidth() + HPAD); + balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + shop_rect.getWidth() + balance_rect.getWidth() + HPAD); balance_bg_view->setShape(balance_bg_rect); } diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 25f1903131..ab1a8f0990 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -137,6 +137,7 @@ with the same filename but different name + diff --git a/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png b/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png new file mode 100644 index 0000000000..9fcf46794d Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png differ diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 69029d2ab9..833e8b9f32 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -34,25 +34,13 @@ + shortcut="control|I" + visible="true"> - - - - +