From 2bf55caaa884f77fef6180f558b7d73b840ed715 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 3 May 2011 10:13:18 +0200 Subject: [PATCH 1/3] Backed out changeset: b874f75087bd --- indra/newview/app_settings/settings.xml | 13 +--- indra/newview/llbottomtray.cpp | 64 +------------------ indra/newview/llbottomtray.h | 4 -- .../skins/default/xui/en/menu_bottomtray.xml | 11 ---- 4 files changed, 4 insertions(+), 88 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9629e29e64..e167bee700 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9389,18 +9389,7 @@ Value 1 - ShowSpeakButton - - Comment - Shows/Hides Speak button in the bottom tray. - Persist - 1 - Type - Boolean - Value - 1 - - ShowObjectRenderingCost + ShowObjectRenderingCost Comment Show the object rendering cost in build tools diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 362e167731..3ff8c705fc 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -381,14 +381,6 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); } } -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-11-26 (Catznip-2.4.0f) | Modified: Catznip-2.4.0f changeset/e6f3f304e04e -bool LLBottomTray::handleVoiceEnabledToggle(const LLSD& newvalue) -{ - gSavedSettings.setBOOL("ShowSpeakButton", newvalue.asBoolean()); - return true; -} -// [/SL:KB] - void LLBottomTray::onMouselookModeOut() { @@ -561,10 +553,6 @@ BOOL LLBottomTray::postBuild() // Registering Chat Bar to receive Voice client status change notifications. LLVoiceClient::getInstance()->addObserver(this); -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::handleVoiceEnabledToggle, _2)); -// [/SL:KB] - mNearbyChatBar->getChatBox()->setContextMenu(NULL); mChicletPanel = getChild("chiclet_list"); @@ -1365,13 +1353,6 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ } // then shrink Speak button -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - if ( (mSpeakPanel->getVisible()) && (mObjectDefaultWidthMap[RS_BUTTON_SPEAK] > mSpeakPanel->getRect().getWidth()) ) - { - mSpeakBtn->setLabelVisible(false); - } -// [/SL:KB] -/* if (required_width < 0) { @@ -1406,7 +1387,6 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ } } } -*/ } void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& required_width) @@ -1582,9 +1562,6 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const void LLBottomTray::initResizeStateContainers() { // init map with objects should be processed for each type -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild("speak_panel"))); -// [/SL:KB] mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild("gesture_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild("movement_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild("cam_panel"))); @@ -1598,9 +1575,6 @@ void LLBottomTray::initResizeStateContainers() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PLACES, getChild("bottom_sbplaces"))); // init an order of processed buttons -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - mButtonsProcessOrder.push_back(RS_BUTTON_SPEAK); -// [/SL:KB] mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); @@ -1635,15 +1609,13 @@ void LLBottomTray::initResizeStateContainers() // ... and add Speak button because it also can be shrunk. mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + } // this method must be called before restoring of the chat entry field on startup // because it resets chatbar's width according to resize logic. void LLBottomTray::initButtonsVisibility() { -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("ShowSpeakButton")); -// [/SL:KB] setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton")); setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton")); setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton")); @@ -1659,9 +1631,6 @@ void LLBottomTray::initButtonsVisibility() void LLBottomTray::setButtonsControlsAndListeners() { -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - gSavedSettings.getControl("ShowSpeakButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); -// [/SL:KB] gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); @@ -1702,29 +1671,6 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis } panel->setVisible(visible); - -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - S32 posChatBarEnd = mNearbyChatBar->getRect().mRight; - S32 posBtnStart = -1; std::string strBtnName; - - for (state_object_map_t::iterator it = mStateProcessedObjectMap.begin(); it != mStateProcessedObjectMap.end(); ++it) - { - LLPanel* pBtnPanel = it->second; - if ( (pBtnPanel) && (pBtnPanel->getVisible()) ) - { - S32 dist = pBtnPanel->getRect().mLeft - posChatBarEnd; - if ( (dist > 0) && ((-1 == posBtnStart) || (posBtnStart > dist)) ) - { - posBtnStart = dist; - strBtnName = pBtnPanel->getName(); - } - mToolbarStack->setPanelUserResize(pBtnPanel->getName(), FALSE); - } - } - - if (!strBtnName.empty()) - mToolbarStack->setPanelUserResize(strBtnName, TRUE); -// [/SL:KB] } void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification) @@ -1777,12 +1723,8 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible const S32 chatbar_shrunk_width = mChatBarContainer->getRect().getWidth() - get_panel_min_width(mToolbarStack, mChatBarContainer); -// S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel); -// S32 sum_of_curr_widths = get_curr_width(mSpeakPanel); -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b changeset/175f98cb1dc4 - S32 sum_of_min_widths = 0; - S32 sum_of_curr_widths = 0; -// [/SL:KB] + S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel); + S32 sum_of_curr_widths = get_curr_width(mSpeakPanel); resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index d594d40d6b..3a9ba8ce66 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -105,10 +105,6 @@ public: // button when voice is available /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); -// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-11-26 (Catznip-2.4.0f) | Modified: Catznip-2.4.0f changeset/e6f3f304e04e - static bool handleVoiceEnabledToggle(const LLSD& newvalue); -// [/SL:KB] - void showBottomTrayContextMenu(S32 x, S32 y, MASK mask); void showGestureButton(BOOL visible); diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 9c9d57f004..23eb6b45d5 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -8,17 +8,6 @@ top="624" visible="false" width="128"> - - - - Date: Tue, 3 May 2011 10:45:49 +0200 Subject: [PATCH 2/3] Recommit of partial UI-BottomTray patch from Catznip --- indra/newview/app_settings/settings.xml | 11 ++ indra/newview/llbottomtray.cpp | 137 ++++++++++++++---- indra/newview/llbottomtray.h | 4 + .../skins/default/xui/en/menu_bottomtray.xml | 11 ++ 4 files changed, 135 insertions(+), 28 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e167bee700..0f58c3d2a3 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9389,6 +9389,17 @@ Value 1 + ShowSpeakButton + + Comment + Shows/Hides Speak button in the bottom tray. + Persist + 1 + Type + Boolean + Value + 1 + ShowObjectRenderingCost Comment diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 3ff8c705fc..fbe81c1a60 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -382,6 +382,14 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b } } +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-11-26 (Catznip-2.4.0f) | Modified: Catznip-2.4.0f +bool LLBottomTray::handleVoiceEnabledToggle(const LLSD& newvalue) +{ + gSavedSettings.setBOOL("ShowSpeakButton", newvalue.asBoolean()); + return true; +} +// [/SL:KB] + void LLBottomTray::onMouselookModeOut() { mIsInLiteMode = false; @@ -552,6 +560,9 @@ BOOL LLBottomTray::postBuild() // Registering Chat Bar to receive Voice client status change notifications. LLVoiceClient::getInstance()->addObserver(this); +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::handleVoiceEnabledToggle, _2)); +// [/SL:KB] mNearbyChatBar->getChatBox()->setContextMenu(NULL); @@ -675,7 +686,10 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() // Speak button is currently the only draggable button not in mStateProcessedObjectMap, // so if dragged_state is not found in that map, it should be RS_BUTTON_SPEAK. Change this code if any other // exclusions from mStateProcessedObjectMap will become draggable. - EResizeState dragged_state = RS_BUTTON_SPEAK; +// EResizeState dragged_state = RS_BUTTON_SPEAK; +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g + EResizeState dragged_state = RS_NORESIZE; +// [/SL:KB] EResizeState landing_state = RS_NORESIZE; bool landing_state_found = false; // Find states for dragged item and landing tab @@ -700,23 +714,26 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() } else { - if (!landing_state_found) landing_state = RS_BUTTON_SPEAK; +// if (!landing_state_found) landing_state = RS_BUTTON_SPEAK; mButtonsOrder.insert(std::find(mButtonsOrder.begin(), mButtonsOrder.end(), landing_state), dragged_state); } // Synchronize button process order with their order - resize_state_vec_t::const_iterator it1 = mButtonsOrder.begin(); - const resize_state_vec_t::const_iterator it_end1 = mButtonsOrder.end(); - resize_state_vec_t::iterator it2 = mButtonsProcessOrder.begin(); - for (; it1 != it_end1; ++it1) - { - // Skip Speak because it is not in mButtonsProcessOrder(it's the reason why mButtonsOrder was introduced). - // If any other draggable items will be added to bottomtray later, they should also be skipped here. - if (*it1 != RS_BUTTON_SPEAK) - { - *it2 = *it1; - ++it2; - } - } +// resize_state_vec_t::const_iterator it1 = mButtonsOrder.begin(); +// const resize_state_vec_t::const_iterator it_end1 = mButtonsOrder.end(); +// resize_state_vec_t::iterator it2 = mButtonsProcessOrder.begin(); +// for (; it1 != it_end1; ++it1) +// { +// // Skip Speak because it is not in mButtonsProcessOrder(it's the reason why mButtonsOrder was introduced). +// // If any other draggable items will be added to bottomtray later, they should also be skipped here. +// if (*it1 != RS_BUTTON_SPEAK) +// { +// *it2 = *it1; +// ++it2; +// } +// } +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g + mButtonsProcessOrder = mButtonsOrder; +// [/SL:KB] saveButtonsOrder(); } @@ -764,11 +781,14 @@ void LLBottomTray::loadButtonsOrder() std::string str = llformat("%d", i); EResizeState state = (EResizeState)settings_llsd[str].asInteger(); mButtonsOrder.push_back(state); - // RS_BUTTON_SPEAK is skipped, because it shouldn't be in mButtonsProcessOrder (it does not hide or shrink). - if (state != RS_BUTTON_SPEAK) - { +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g mButtonsProcessOrder.push_back(state); - } +// [/SL:KB] +// // RS_BUTTON_SPEAK is skipped, because it shouldn't be in mButtonsProcessOrder (it does not hide or shrink). +// if (state != RS_BUTTON_SPEAK) +// { +// mButtonsProcessOrder.push_back(state); +// } } // There are other panels in layout stack order of which is not saved. Also, panels order of which is saved, @@ -779,7 +799,10 @@ void LLBottomTray::loadButtonsOrder() // placing panels in layout stack according to button order which we loaded in previous for for (resize_state_vec_t::const_reverse_iterator it = mButtonsOrder.rbegin(); it != it_end; ++it, ++i) { - LLPanel* panel_to_move = *it == RS_BUTTON_SPEAK ? mSpeakPanel : mStateProcessedObjectMap[*it]; +// LLPanel* panel_to_move = *it == RS_BUTTON_SPEAK ? mSpeakPanel : mStateProcessedObjectMap[*it]; +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g + LLPanel* panel_to_move = mStateProcessedObjectMap[*it]; +// [/SL:KB] mToolbarStack->movePanel(panel_to_move, NULL, true); // prepend } // Nearbychat is not stored in order settings file, but it must be the first of the panels, so moving it @@ -1353,6 +1376,13 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ } // then shrink Speak button +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + if ( (mSpeakPanel->getVisible()) && (mObjectDefaultWidthMap[RS_BUTTON_SPEAK] > mSpeakPanel->getRect().getWidth()) ) + { + mSpeakBtn->setLabelVisible(false); + } +// [/SL:KB] +/* if (required_width < 0) { @@ -1387,6 +1417,7 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ } } } +*/ } void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& required_width) @@ -1456,11 +1487,18 @@ void LLBottomTray::processExtendButtons(S32& available_width) processExtendButton(*it, available_width); } - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; +// const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); +// static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); +// const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; // then try to extend Speak button +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + if ( (mSpeakPanel->getVisible()) && (mObjectDefaultWidthMap[RS_BUTTON_SPEAK] <= mSpeakPanel->getRect().getWidth()) ) + { + mSpeakBtn->setLabelVisible(true); + } +// [/SL:KB] +/* if (available_width > 0 || available_width_chiclet > 0) { S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; @@ -1489,6 +1527,7 @@ void LLBottomTray::processExtendButtons(S32& available_width) << llendl; } } +*/ } void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width) @@ -1562,6 +1601,9 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const void LLBottomTray::initResizeStateContainers() { // init map with objects should be processed for each type +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild("speak_panel"))); +// [/SL:KB] mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild("gesture_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild("movement_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild("cam_panel"))); @@ -1575,6 +1617,9 @@ void LLBottomTray::initResizeStateContainers() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PLACES, getChild("bottom_sbplaces"))); // init an order of processed buttons +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + mButtonsProcessOrder.push_back(RS_BUTTON_SPEAK); +// [/SL:KB] mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); @@ -1587,8 +1632,11 @@ void LLBottomTray::initResizeStateContainers() mButtonsProcessOrder.push_back(RS_BUTTON_ME); mButtonsProcessOrder.push_back(RS_BUTTON_PLACES); - mButtonsOrder.push_back(RS_BUTTON_SPEAK); - mButtonsOrder.insert(mButtonsOrder.end(), mButtonsProcessOrder.begin(), mButtonsProcessOrder.end()); +// mButtonsOrder.push_back(RS_BUTTON_SPEAK); +// mButtonsOrder.insert(mButtonsOrder.end(), mButtonsProcessOrder.begin(), mButtonsProcessOrder.end()); +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g + mButtonsOrder = mButtonsProcessOrder; +// [/SL:KB] // init default widths @@ -1608,7 +1656,7 @@ void LLBottomTray::initResizeStateContainers() } // ... and add Speak button because it also can be shrunk. - mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); +// mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); } @@ -1616,6 +1664,9 @@ void LLBottomTray::initResizeStateContainers() // because it resets chatbar's width according to resize logic. void LLBottomTray::initButtonsVisibility() { +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("ShowSpeakButton")); +// [/SL:KB] setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton")); setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton")); setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton")); @@ -1631,6 +1682,9 @@ void LLBottomTray::initButtonsVisibility() void LLBottomTray::setButtonsControlsAndListeners() { +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + gSavedSettings.getControl("ShowSpeakButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); +// [/SL:KB] gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); @@ -1671,6 +1725,29 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis } panel->setVisible(visible); + +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + S32 posChatBarEnd = mNearbyChatBar->getRect().mRight; + S32 posBtnStart = -1; std::string strBtnName; + + for (state_object_map_t::iterator it = mStateProcessedObjectMap.begin(); it != mStateProcessedObjectMap.end(); ++it) + { + LLPanel* pBtnPanel = it->second; + if ( (pBtnPanel) && (pBtnPanel->getVisible()) ) + { + S32 dist = pBtnPanel->getRect().mLeft - posChatBarEnd; + if ( (dist > 0) && ((-1 == posBtnStart) || (posBtnStart > dist)) ) + { + posBtnStart = dist; + strBtnName = pBtnPanel->getName(); + } + mToolbarStack->setPanelUserResize(pBtnPanel->getName(), FALSE); + } + } + + if (!strBtnName.empty()) + mToolbarStack->setPanelUserResize(strBtnName, TRUE); +// [/SL:KB] } void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification) @@ -1723,8 +1800,12 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible const S32 chatbar_shrunk_width = mChatBarContainer->getRect().getWidth() - get_panel_min_width(mToolbarStack, mChatBarContainer); - S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel); - S32 sum_of_curr_widths = get_curr_width(mSpeakPanel); +// S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel); +// S32 sum_of_curr_widths = get_curr_width(mSpeakPanel); +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-09-07 (Catznip-2.1.2b) | Added: Catznip-2.1.2b + S32 sum_of_min_widths = 0; + S32 sum_of_curr_widths = 0; +// [/SL:KB] resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 3a9ba8ce66..be52026f77 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -105,6 +105,10 @@ public: // button when voice is available /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); +// [SL:KB] - Patch: UI-BottomTray | Checked: 2010-11-26 (Catznip-2.4.0f) | Modified: Catznip-2.4.0f + static bool handleVoiceEnabledToggle(const LLSD& newvalue); +// [/SL:KB] + void showBottomTrayContextMenu(S32 x, S32 y, MASK mask); void showGestureButton(BOOL visible); diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 23eb6b45d5..9c9d57f004 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -8,6 +8,17 @@ top="624" visible="false" width="128"> + + + + Date: Tue, 3 May 2011 11:13:08 +0200 Subject: [PATCH 3/3] Fixed mixed line-endings on Metaharper files --- .../metaharper/xui/en/panel_my_profile.xml | 632 ++++++------- .../xui/en/panel_navigation_bar.xml | 316 +++---- .../skins/metaharper/xui/en/panel_profile.xml | 858 +++++++++--------- .../metaharper/xui/en/panel_side_tray.xml | 14 +- 4 files changed, 910 insertions(+), 910 deletions(-) diff --git a/indra/newview/skins/metaharper/xui/en/panel_my_profile.xml b/indra/newview/skins/metaharper/xui/en/panel_my_profile.xml index 9f224d5640..2a5330083e 100644 --- a/indra/newview/skins/metaharper/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/metaharper/xui/en/panel_my_profile.xml @@ -1,325 +1,325 @@ - - - - [ACCTTYPE] -[PAYMENTINFO] [AGEVERIFICATION] - - - http://www.secondlife.com/account/billing.php?lang=en - - - http://www.secondlife.com/account/partners.php?lang=en - - - - - - [REG_DATE] ([AGE]) - - - - - - + + + [ACCTTYPE] +[PAYMENTINFO] [AGEVERIFICATION] + + + http://www.secondlife.com/account/billing.php?lang=en + + + http://www.secondlife.com/account/partners.php?lang=en + + + + + + [REG_DATE] ([AGE]) + + + + + + - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. - - + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. + + - + - - Resident. No payment info on file. - Linden. - - + + Resident. No payment info on file. + Linden. + + - - - - + follows="left|top" + font.style="BOLD" + height="15" + layout="topleft" + name="title_partner_text" + text_color="white" + top_pad="0" + value="Partner:" + width="280" /> + + + + - - Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. Aenean viverra tulip moosetop. Slan de heelish marfnik tooplod. Sum sum to whop de wompam booster copm. - - - - - - - - - + Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. Aenean viverra tulip moosetop. Slan de heelish marfnik tooplod. Sum sum to whop de wompam booster copm. + + + + + + + + + - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. - - - - - - - - - - - - - - - - - - - - - - - - + color="Transparent" + follows="top|lleft|right" + height="60" + layout="topleft" + name="navigation_bar" + chrome="true" + width="600"> + + + + + + + + + + + + + + + + + + + + - - - - + top_pad="3" + font="SansSerifSmall" + height="15" + layout="topleft" + left="0" + name="favorite" + image_drag_indication="Accordion_ArrowOpened_Off" + tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!" + width="590"> + + + + diff --git a/indra/newview/skins/metaharper/xui/en/panel_profile.xml b/indra/newview/skins/metaharper/xui/en/panel_profile.xml index b76c995074..530f2cd0ed 100644 --- a/indra/newview/skins/metaharper/xui/en/panel_profile.xml +++ b/indra/newview/skins/metaharper/xui/en/panel_profile.xml @@ -1,197 +1,197 @@ - - - - [ACCTTYPE] -[PAYMENTINFO] [AGEVERIFICATION] - - - http://www.secondlife.com/account/billing.php?lang=en - - - http://www.secondlife.com/account/partners.php?lang=en - - - - - - [REG_DATE] ([AGE]) - - - - - - - - + + + [ACCTTYPE] +[PAYMENTINFO] [AGEVERIFICATION] + + + http://www.secondlife.com/account/billing.php?lang=en + + + http://www.secondlife.com/account/partners.php?lang=en + + + + + + [REG_DATE] ([AGE]) + + + + + + + + - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. + follows="left|top|right" + height="240" + layout="topleft" + left="5" + textbox.max_length="512" + textbox.show_context_menu="true" + name="sl_description_edit" + top_pad="3" + translate="false" + width="280" + expanded_bg_visible="true" + expanded_bg_color="SL-Background_Light"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. - + top_pad="0" + name="title_member_text" + text_color="White" + top_delta="0" + value="Resident Since:" + width="280" /> + - - Resident. No payment info on file. - Linden. - + left="4" + follows="left|top" + font.style="BOLD" + height="15" + layout="topleft" + name="title_acc_status_text" + text_color="White" + top_pad="12" + value="Account Status:" + width="280" + word_wrap="true" /> + + Resident. No payment info on file. + Linden. + - - + left="4" + follows="left|top" + font.style="BOLD" + height="15" + layout="topleft" + name="title_partner_text" + text_color="White" + top_pad="0" + value="Partner:" + width="280" /> + + Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. Aenean viverra tulip moosetop. Slan de heelish marfnik tooplod. Sum sum to whop de wompam booster copm. - - - - - - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. - - - - - - - - - - - - - -