diff options
32 files changed, 316 insertions, 164 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 219c2ee254..f28fca35c5 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -52,6 +52,7 @@ #include "llrender.h" #include "lluictrlfactory.h" #include "llhelp.h" +#include "lldockablefloater.h" static LLDefaultChildRegistry::Register<LLButton> r("button"); @@ -1057,6 +1058,20 @@ void LLButton::setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname) } // static +void LLButton::setDockableFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname) +{ + LLButton* button = dynamic_cast<LLButton*>(ctrl); + if (!button) + return; + // Get the visibility control name for the floater + std::string vis_control_name = LLFloaterReg::declareVisibilityControl(sdname.asString()); + // Set the button control value (toggle state) to the floater visibility control (Sets the value as well) + button->setControlVariable(LLUI::sSettingGroups["floater"]->getControl(vis_control_name)); + // Set the clicked callback to toggle the floater + button->setClickedCallback(boost::bind(&LLDockableFloater::toggleInstance, sdname)); +} + +// static void LLButton::showHelp(LLUICtrl* ctrl, const LLSD& sdname) { // search back through the button's parents for a panel diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 73ba457d34..7ca520b935 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -232,6 +232,7 @@ public: static void onHeldDown(void *userdata); // to be called by gIdleCallbacks static void toggleFloaterAndSetToggleState(LLUICtrl* ctrl, const LLSD& sdname); static void setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname); + static void setDockableFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname); static void showHelp(LLUICtrl* ctrl, const LLSD& sdname); void setForcePressedState(BOOL b) { mForcePressedState = b; } diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index c512ef25be..228d0e701f 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -33,24 +33,36 @@ #include "linden_common.h" #include "lldockablefloater.h" +#include "llfloaterreg.h" //static LLHandle<LLFloater> LLDockableFloater::sInstanceHandle; +//static +void LLDockableFloater::init(LLDockableFloater* thiz) +{ + thiz->setDocked(thiz->mDockControl.get() != NULL + && thiz->mDockControl.get()->isDockVisible()); + thiz->resetInstance(); + + // all dockable floaters should have close, dock and minimize buttons + thiz->setCanClose(TRUE); + thiz->setCanDock(true); + thiz->setCanMinimize(TRUE); +} + LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, const LLSD& key, const Params& params) : LLFloater(key, params), mDockControl(dockControl), mUniqueDocking(true) { - setDocked(mDockControl.get() != NULL && mDockControl.get()->isDockVisible()); - resetInstance(); + init(this); } LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking, const LLSD& key, const Params& params) : LLFloater(key, params), mDockControl(dockControl), mUniqueDocking(uniqueDocking) { - setDocked(mDockControl.get() != NULL && mDockControl.get()->isDockVisible()); - resetInstance(); + init(this); } LLDockableFloater::~LLDockableFloater() @@ -64,6 +76,33 @@ BOOL LLDockableFloater::postBuild() return LLView::postBuild(); } +//static +void LLDockableFloater::toggleInstance(const LLSD& sdname) +{ + LLSD key; + std::string name = sdname.asString(); + + LLDockableFloater* instance = + dynamic_cast<LLDockableFloater*> (LLFloaterReg::findInstance(name)); + // if floater closed or docked + if (instance == NULL || instance != NULL && instance->isDocked()) + { + LLFloaterReg::toggleInstance(name, key); + // restore button toggle state + if (instance != NULL) + { + instance->storeVisibilityControl(); + } + } + // if floater undocked + else if (instance != NULL) + { + instance->setMinimized(FALSE); + instance->setVisible(TRUE); + instance->setFocus(TRUE); + } +} + void LLDockableFloater::resetInstance() { if (mUniqueDocking && sInstanceHandle.get() != this) @@ -91,6 +130,17 @@ void LLDockableFloater::setVisible(BOOL visible) LLFloater::setVisible(visible); } +void LLDockableFloater::setMinimized(BOOL minimize) +{ + if(minimize && isDocked()) + { + setVisible(FALSE); + } + setCanDock(!minimize); + + LLFloater::setMinimized(minimize); +} + void LLDockableFloater::onDockHidden() { setCanDock(FALSE); diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 7d91d007ee..499ce9ae8d 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -44,6 +44,8 @@ class LLDockableFloater : public LLFloater { static const U32 UNDOCK_LEAP_HEIGHT = 12; + + static void init(LLDockableFloater* thiz); public: LOG_CLASS(LLDockableFloater); LLDockableFloater(LLDockControl* dockControl, const LLSD& key, @@ -54,6 +56,8 @@ public: static LLHandle<LLFloater> getInstanceHandle() { return sInstanceHandle; } + static void toggleInstance(const LLSD& sdname); + /** * If descendant class overrides postBuild() in order to perform specific * construction then it must still invoke its superclass' implementation. @@ -68,6 +72,12 @@ public: */ /*virtual*/ void setVisible(BOOL visible); + /** + * If descendant class overrides setMinimized() then it must still invoke its + * superclass' implementation. + */ + /*virtual*/ void setMinimized(BOOL minimize); + virtual void onDockHidden(); virtual void onDockShown(); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 51e2b5dea4..8d2783db20 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -926,6 +926,9 @@ void LLFloater::setMinimized(BOOL minimize) if (minimize) { + // minimized flag should be turned on before release focus + mMinimized = TRUE; + mExpandedRect = getRect(); // If the floater has been dragged while minimized in the @@ -987,8 +990,6 @@ void LLFloater::setMinimized(BOOL minimize) } } - mMinimized = TRUE; - // Reshape *after* setting mMinimized reshape( minimized_width, floater_header_size, TRUE); } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 123e59ae6a..e85bee7775 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -415,6 +415,9 @@ void LLTextBase::drawCursor() return; } + if (!mTextRect.contains(cursor_rect)) + return; + // Draw the cursor // (Flash the cursor every half second starting a fixed time after the last keystroke) F32 elapsed = mCursorBlinkTimer.getElapsedTimeF32(); diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index c89e5944fa..9a90ee267e 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1556,6 +1556,9 @@ void LLUI::initClass(const settings_map_t& settings, // Button initialization callback for toggle buttons LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2)); + // Button initialization callback for toggle buttons on dockale floaters + LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.SetDockableFloaterToggle", boost::bind(&LLButton::setDockableFloaterToggle, _1, _2)); + // Display the help topic for the current context LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.ShowHelp", boost::bind(&LLButton::showHelp, _1, _2)); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 87c31c600e..b9e5664ff7 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -136,7 +136,6 @@ set(viewer_SOURCE_FILES llfeaturemanager.cpp llfilepicker.cpp llfirstuse.cpp - llfirsttimetipmanager.cpp llflexibleobject.cpp llfloaterabout.cpp llfloateractivespeakers.cpp @@ -161,7 +160,6 @@ set(viewer_SOURCE_FILES llfloaterdaycycle.cpp llfloaterdirectory.cpp llfloaterenvsettings.cpp - llfloaterfirsttimetip.cpp llfloaterfriends.cpp llfloaterfonttest.cpp llfloatergesture.cpp @@ -325,7 +323,6 @@ set(viewer_SOURCE_FILES llpanelmedia.cpp llpanelmediahud.cpp llpanelmeprofile.cpp - llpanelmovetip.cpp llpanelmediasettingsgeneral.cpp llpanelmediasettingssecurity.cpp llpanelmediasettingspermissions.cpp @@ -607,7 +604,6 @@ set(viewer_HEADER_FILES llfeaturemanager.h llfilepicker.h llfirstuse.h - llfirsttimetipmanager.h llflexibleobject.h llfloaterabout.h llfloateractivespeakers.h @@ -632,7 +628,6 @@ set(viewer_HEADER_FILES llfloaterdaycycle.h llfloaterdirectory.h llfloaterenvsettings.h - llfloaterfirsttimetip.h llfloaterfonttest.h llfloaterfriends.h llfloatergesture.h @@ -792,7 +787,6 @@ set(viewer_HEADER_FILES llpanelmedia.h llpanelmediahud.h llpanelmeprofile.h - llpanelmovetip.h llpanelmediasettingsgeneral.h llpanelmediasettingssecurity.h llpanelmediasettingspermissions.h diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index b06b4855ad..007c6b2c4c 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -201,7 +201,7 @@ public: fb->handleHover(x, y, mask); } - return LLMenuItemCallGL::handleHover(x, y, mask); + return TRUE; } void initFavoritesBarPointer(LLFavoritesBarCtrl* fb) { this->fb = fb; } @@ -217,6 +217,35 @@ private: }; /** + * This class was introduced just for fixing the following issue: + * EXT-836 Nav bar: Favorites overflow menu passes left-mouse click through. + * We must explicitly handle drag and drop event by returning TRUE + * because otherwise LLToolDragAndDrop will initiate drag and drop operation + * with the world. + */ +class LLFavoriteLandmarkToggleableMenu : public LLToggleableMenu +{ +public: + virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg) + { + *accept = ACCEPT_NO; + return TRUE; + } + +protected: + LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p): + LLToggleableMenu(p) + { + } + + friend class LLUICtrlFactory; +}; + +/** * This class is needed to update an item being copied to the favorites folder * with a sort field value (required to save favorites bar's tabs order). * See method handleNewFavoriteDragAndDrop for more details on how this class is used. @@ -788,7 +817,7 @@ void LLFavoritesBarCtrl::showDropDownMenu() menu_p.max_scrollable_items = 10; menu_p.preferred_width = DROP_DOWN_MENU_WIDTH; - LLToggleableMenu* menu = LLUICtrlFactory::create<LLToggleableMenu>(menu_p); + LLToggleableMenu* menu = LLUICtrlFactory::create<LLFavoriteLandmarkToggleableMenu>(menu_p); mPopupMenuHandle = menu->getHandle(); } diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 0511ec1063..db20b11efd 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -39,7 +39,6 @@ // Viewer includes #include "lljoystickbutton.h" -#include "llfirsttimetipmanager.h" #include "llviewercontrol.h" #include "llbottomtray.h" #include "llagent.h" @@ -54,10 +53,6 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f; #define CONTROLS "controls" -void show_tip(LLFirstTimeTipsManager::EFirstTimeTipType tipType, LLView* anchorView) -{ - LLFirstTimeTipsManager::showTipsFor(tipType, anchorView, LLFirstTimeTipsManager::TPA_POS_RIGHT_ALIGN_TOP); -} // // Member functions // @@ -88,7 +83,6 @@ void LLFloaterCamera::update() { ECameraControlMode mode = determineMode(); if (mode != mCurrMode) setMode(mode); - show_tip(mMode2TipType[mode], this); } @@ -129,12 +123,11 @@ void LLFloaterCamera::onOpen(const LLSD& key) anchor_panel, this, getDockTongue(), LLDockControl::TOP)); - show_tip(mMode2TipType[mCurrMode], this); } LLFloaterCamera::LLFloaterCamera(const LLSD& val) -: LLDockableFloater(NULL, false, val), +: LLDockableFloater(NULL, val), mCurrMode(CAMERA_CTRL_MODE_ORBIT), mPrevMode(CAMERA_CTRL_MODE_ORBIT) { @@ -149,8 +142,6 @@ BOOL LLFloaterCamera::postBuild() mZoom = getChild<LLJoystickCameraZoom>("zoom"); mTrack = getChild<LLJoystickCameraTrack>(PAN); - initMode2TipTypeMap(); - assignButton2Mode(CAMERA_CTRL_MODE_ORBIT, "orbit_btn"); assignButton2Mode(CAMERA_CTRL_MODE_PAN, "pan_btn"); assignButton2Mode(CAMERA_CTRL_MODE_FREE_CAMERA, "freecamera_btn"); @@ -236,7 +227,6 @@ void LLFloaterCamera::onClickBtn(ECameraControlMode mode) switchMode(mode); - show_tip(mMode2TipType[mode], this); } void LLFloaterCamera::assignButton2Mode(ECameraControlMode mode, const std::string& button_name) @@ -247,15 +237,6 @@ void LLFloaterCamera::assignButton2Mode(ECameraControlMode mode, const std::stri mMode2Button[mode] = button; } -void LLFloaterCamera::initMode2TipTypeMap() -{ - mMode2TipType[CAMERA_CTRL_MODE_ORBIT] = LLFirstTimeTipsManager::FTT_CAMERA_ORBIT_MODE; - mMode2TipType[CAMERA_CTRL_MODE_PAN] = LLFirstTimeTipsManager::FTT_CAMERA_PAN_MODE; - mMode2TipType[CAMERA_CTRL_MODE_FREE_CAMERA] = LLFirstTimeTipsManager::FTT_CAMERA_FREE_MODE; - mMode2TipType[CAMERA_CTRL_MODE_AVATAR_VIEW] = LLFirstTimeTipsManager::FTT_AVATAR_FREE_MODE; -} - - void LLFloaterCamera::updateState() { //updating buttons @@ -305,7 +286,7 @@ void LLFloaterCamera::updateState() //-------------LLFloaterCameraPresets------------------------ LLFloaterCameraPresets::LLFloaterCameraPresets(const LLSD& key): -LLDockableFloater(NULL, false, key) +LLDockableFloater(NULL, key) {} BOOL LLFloaterCameraPresets::postBuild() @@ -330,17 +311,14 @@ void LLFloaterCameraPresets::onClickCameraPresets(LLUICtrl* ctrl, const LLSD& pa if ("rear_view" == name) { - LLFirstTimeTipsManager::showTipsFor(LLFirstTimeTipsManager::FTT_CAMERA_PRESET_REAR, ctrl); gAgent.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); } else if ("group_view" == name) { - LLFirstTimeTipsManager::showTipsFor(LLFirstTimeTipsManager::FTT_CAMERA_PRESET_GROUP); gAgent.switchCameraPreset(CAMERA_PRESET_GROUP_VIEW); } else if ("front_view" == name) { - LLFirstTimeTipsManager::showTipsFor(LLFirstTimeTipsManager::FTT_CAMERA_PRESET_FRONT); gAgent.switchCameraPreset(CAMERA_PRESET_FRONT_VIEW); } diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index 020cae7e82..69df861a20 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -35,8 +35,6 @@ #include "lldockablefloater.h" -#include "llfirsttimetipmanager.h" - class LLJoystickCameraRotate; class LLJoystickCameraZoom; class LLJoystickCameraTrack; @@ -105,13 +103,11 @@ private: void onClickBtn(ECameraControlMode mode); void assignButton2Mode(ECameraControlMode mode, const std::string& button_name); - void initMode2TipTypeMap(); - + ECameraControlMode mPrevMode; ECameraControlMode mCurrMode; std::map<ECameraControlMode, LLButton*> mMode2Button; - std::map<ECameraControlMode, LLFirstTimeTipsManager::EFirstTimeTipType> mMode2TipType; }; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 3e449e2c82..680106c7bb 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -40,9 +40,11 @@ #include "llbottomtray.h" #include "llchannelmanager.h" #include "llchiclet.h" +#include "llfloaterchat.h" #include "llfloaterreg.h" #include "llimview.h" #include "lllineeditor.h" +#include "lllogchat.h" #include "llpanelimcontrolpanel.h" #include "llscreenchannel.h" #include "lltrans.h" @@ -90,16 +92,6 @@ void LLIMFloater::onClose(bool app_quitting) gIMMgr->removeSession(mSessionID); } -void LLIMFloater::setMinimized(BOOL minimize) -{ - if(!isDocked()) - { - setVisible(!minimize); - } - - LLFloater::setMinimized(minimize); -} - /* static */ void LLIMFloater::newIMCallback(const LLSD& data){ @@ -203,6 +195,12 @@ BOOL LLIMFloater::postBuild() setTitle(LLIMModel::instance().getName(mSessionID)); setDocked(true); + if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) + { + LLLogChat::loadHistory(getTitle(), &chatFromLogFile, (void *)this); + } + + return LLDockableFloater::postBuild(); } @@ -316,13 +314,19 @@ void LLIMFloater::setVisible(BOOL visible) bool LLIMFloater::toggle(const LLUUID& session_id) { LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); - if (floater && floater->getVisible()) + if (floater && floater->getVisible() && floater->isDocked()) { // clicking on chiclet to close floater just hides it to maintain existing // scroll/text entry state floater->setVisible(false); return false; } + else if(floater && !floater->isDocked()) + { + floater->setVisible(TRUE); + floater->setFocus(TRUE); + return true; + } else { // ensure the list of messages is updated when floater is made visible @@ -419,3 +423,37 @@ void LLIMFloater::setTyping(BOOL typing) { } +void LLIMFloater::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata) +{ + if (!userdata) return; + + LLIMFloater* self = (LLIMFloater*) userdata; + std::string message = line; + S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions"); + switch (type) + { + case LLLogChat::LOG_EMPTY: + // add warning log enabled message + if (im_log_option!=LOG_CHAT) + { + message = LLTrans::getString("IM_logging_string"); + } + break; + case LLLogChat::LOG_END: + // add log end message + if (im_log_option!=LOG_CHAT) + { + message = LLTrans::getString("IM_logging_string"); + } + break; + case LLLogChat::LOG_LINE: + // just add normal lines from file + break; + default: + // nothing + break; + } + + self->mHistoryEditor->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor"))); + self->mHistoryEditor->blockUndo(); +} diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index f85a941be3..5276013568 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -34,6 +34,7 @@ #define LL_IMFLOATER_H #include "lldockablefloater.h" +#include "lllogchat.h" class LLLineEditor; class LLPanelChatControlPanel; @@ -59,7 +60,6 @@ public: /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 - /*virtual*/ void setMinimized(BOOL minimize); // Make IM conversion visible and update the message history static LLIMFloater* show(const LLUUID& session_id); @@ -91,7 +91,10 @@ private: static void* createPanelGroupControl(void* userdata); // gets a rect that bounds possible positions for the LLIMFloater on a screen (EXT-1111) void getAllowedRect(LLRect& rect); - + + static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata); + + LLPanelChatControlPanel* mControlPanel; LLUUID mSessionID; S32 mLastMessageIndex; diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index d8f00ec370..1bbcc3f98e 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -44,9 +44,7 @@ #include "llvoavatarself.h" // to check gAgent.getAvatarObject()->isSitting() #include "llbottomtray.h" #include "llbutton.h" -#include "llfirsttimetipmanager.h" #include "llfloaterreg.h" -#include "llfloaterfirsttimetip.h" #include "lljoystickbutton.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" @@ -54,6 +52,7 @@ #include "llselectmgr.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" +#include "lltooltip.h" // // Constants @@ -71,7 +70,7 @@ const std::string BOTTOM_TRAY_BUTTON_NAME = "movement_btn"; // protected LLFloaterMove::LLFloaterMove(const LLSD& key) -: LLDockableFloater(NULL, false, key), +: LLDockableFloater(NULL, key), mForwardButton(NULL), mBackwardButton(NULL), mTurnLeftButton(NULL), @@ -305,7 +304,6 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) showModeButtons(!bHideModeButtons); - showQuickTips(mode); } void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) @@ -464,6 +462,11 @@ void LLFloaterMove::enableInstance(BOOL bEnable) if (instance) { instance->setEnabled(bEnable); + + if (gAgent.getFlying()) + { + instance->showModeButtons(FALSE); + } } } @@ -487,8 +490,6 @@ void LLFloaterMove::onOpen(const LLSD& key) anchor_panel, this, getDockTongue(), LLDockControl::TOP)); - showQuickTips(mCurrentMode); - sUpdateFlyingStatus(); } @@ -500,20 +501,6 @@ void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/) updateHeight(show_mode_buttons); } -void LLFloaterMove::showQuickTips(const EMovementMode mode) -{ - LLFirstTimeTipsManager::EFirstTimeTipType tipType = LLFirstTimeTipsManager::FTT_MOVE_WALK; - switch (mode) - { - case MM_FLY: tipType = LLFirstTimeTipsManager::FTT_MOVE_FLY; break; - case MM_RUN: tipType = LLFirstTimeTipsManager::FTT_MOVE_RUN; break; - case MM_WALK: tipType = LLFirstTimeTipsManager::FTT_MOVE_WALK; break; - default: llwarns << "Quick Tip type was not detected, FTT_MOVE_WALK will be used" << llendl; - } - - LLFirstTimeTipsManager::showTipsFor(tipType, this, LLFirstTimeTipsManager::TPA_POS_LEFT_ALIGN_TOP); -} - void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode) { llassert_always(mModeControlButtonMap.end() != mModeControlButtonMap.find(mode)); @@ -610,6 +597,22 @@ void LLPanelStandStopFlying::setVisible(BOOL visible) LLPanel::setVisible(visible); } +BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask) +{ + LLToolTipMgr::instance().unblockToolTips(); + + if (mStandButton->getVisible()) + { + LLToolTipMgr::instance().show(mStandButton->getToolTip()); + } + else if (mStopFlyingButton->getVisible()) + { + LLToolTipMgr::instance().show(mStopFlyingButton->getToolTip()); + } + + return TRUE; +} + ////////////////////////////////////////////////////////////////////////// // Private Section ////////////////////////////////////////////////////////////////////////// @@ -635,7 +638,10 @@ void LLPanelStandStopFlying::onStandButtonClick() gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); setFocus(FALSE); // EXT-482 - setVisible(FALSE); + + BOOL fly = gAgent.getFlying(); + mStopFlyingButton->setVisible(fly); + setVisible(fly); } void LLPanelStandStopFlying::onStopFlyingButtonClick() diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 584c7c494c..cbed36f10d 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -142,6 +142,7 @@ public: // *HACK: due to hard enough to have this control aligned with "Move" button while resizing // let update its position in each frame /*virtual*/ void draw(){updatePosition(); LLPanel::draw();} + /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); protected: diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 1d8789fde0..c2e1019f43 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -201,35 +201,8 @@ BOOL LLNearbyChatBar::postBuild() mChatBox->setMaxTextLength(1023); mChatBox->setEnableLineHistory(TRUE); - // TODO: Initialization of the output monitor's params should be done via xml - const S32 MONITOR_RIGHT_PAD = 2; - - LLRect monitor_rect = LLRect(0, 18, 18, 0); - LLRect chatbox_rect = mChatBox->getRect(); - - S32 monitor_height = monitor_rect.getHeight(); - monitor_rect.mLeft = chatbox_rect.getWidth() - monitor_rect.getWidth() - MONITOR_RIGHT_PAD; - monitor_rect.mRight = chatbox_rect.getWidth() - MONITOR_RIGHT_PAD; - monitor_rect.mBottom = (chatbox_rect.getHeight() / 2) - (monitor_height / 2); - monitor_rect.mTop = monitor_rect.mBottom + monitor_height; - - LLOutputMonitorCtrl::Params monitor_params = LLOutputMonitorCtrl::Params(); - monitor_params.name = "output_monitor"; - monitor_params.draw_border(false); - monitor_params.rect(monitor_rect); - monitor_params.auto_update(true); - monitor_params.speaker_id(gAgentID); - - LLView::Follows follows = LLView::Follows(); - follows.flags = FOLLOWS_RIGHT; - monitor_params.follows = follows; - mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_params); - mChatBox->addChild(mOutputMonitor); - - // never show "muted" because you can't mute yourself - mOutputMonitor->setIsMuted(false); + mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator"); mOutputMonitor->setVisible(FALSE); - mTalkBtn = getChild<LLTalkButton>("talk"); // Speak button should be initially disabled because @@ -254,6 +227,12 @@ bool LLNearbyChatBar::instanceExists() return LLBottomTray::instanceExists() && LLBottomTray::getInstance()->getNearbyChatBar() != NULL; } +void LLNearbyChatBar::draw() +{ + displaySpeakingIndicator(); + LLPanel::draw(); +} + std::string LLNearbyChatBar::getCurrentChat() { return mChatBox ? mChatBox->getText() : LLStringUtil::null; @@ -470,6 +449,36 @@ void LLNearbyChatBar::onChatBoxCommit() gAgent.stopTyping(); } +void LLNearbyChatBar::displaySpeakingIndicator() +{ + LLSpeakerMgr::speaker_list_t speaker_list; + LLUUID id; + + id.setNull(); + mSpeakerMgr.update(TRUE); + mSpeakerMgr.getSpeakerList(&speaker_list, FALSE); + + for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) + { + LLPointer<LLSpeaker> s = *i; + if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING) + { + id = s->mID; + break; + } + } + + if (!id.isNull()) + { + mOutputMonitor->setVisible(TRUE); + mOutputMonitor->setSpeakerId(id); + } + else + { + mOutputMonitor->setVisible(FALSE); + } +} + void LLNearbyChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) { sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate); @@ -622,7 +631,6 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe void LLNearbyChatBar::setPTTState(bool state) { mTalkBtn->setSpeakBtnToggleState(state); - mOutputMonitor->setVisible(state); } void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 1b71ad69f2..d6827315f2 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -40,6 +40,7 @@ #include "llchiclet.h" #include "llvoiceclient.h" #include "lloutputmonitorctrl.h" +#include "llfloateractivespeakers.h" class LLGestureComboBox : public LLComboBox @@ -84,6 +85,8 @@ public: LLLineEditor* getChatBox() { return mChatBox; } + virtual void draw(); + std::string getCurrentChat(); virtual BOOL handleKeyHere( KEY key, MASK mask ); @@ -110,12 +113,15 @@ protected: static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); EChatType processChatTypeTriggers(EChatType type, std::string &str); + void displaySpeakingIndicator(); + // Which non-zero channel did we last chat on? static S32 sLastSpecialChatChannel; LLLineEditor* mChatBox; LLTalkButton* mTalkBtn; LLOutputMonitorCtrl* mOutputMonitor; + LLActiveSpeakerMgr mSpeakerMgr; }; #endif diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index d9cdf2e04f..8bac9937f0 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -222,7 +222,7 @@ void LLOutputMonitorCtrl::draw() void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) { - if (speaker_id.isNull()) return; + if (speaker_id.isNull() || speaker_id == mSpeakerId) return; mSpeakerId = speaker_id; diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index acad897fa4..e2281743c9 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -211,9 +211,19 @@ void LLPanelGroup::reposButton(const std::string& name) button->setRect(btn_rect); } -void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent ) +void LLPanelGroup::reposButtons() { - LLPanel::reshape(width, height, called_from_parent ); + LLButton* button_refresh = findChild<LLButton>("btn_refresh"); + LLButton* button_cancel = findChild<LLButton>("btn_cancel"); + + if(button_refresh && button_cancel && button_refresh->getVisible() && button_cancel->getVisible()) + { + LLRect btn_refresh_rect = button_refresh->getRect(); + LLRect btn_cancel_rect = button_cancel->getRect(); + btn_refresh_rect.setLeftTopAndSize( btn_cancel_rect.mLeft + btn_cancel_rect.getWidth() + 2, + btn_refresh_rect.getHeight() + 2, btn_refresh_rect.getWidth(), btn_refresh_rect.getHeight()); + button_refresh->setRect(btn_refresh_rect); + } reposButton("btn_apply"); reposButton("btn_create"); @@ -221,6 +231,13 @@ void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent ) reposButton("btn_cancel"); } +void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent ) +{ + LLPanel::reshape(width, height, called_from_parent ); + + reposButtons(); +} + void LLPanelGroup::onBackBtnClick() { LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent()); @@ -411,7 +428,6 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) getChild<LLUICtrl>("group_name")->setVisible(false); getChild<LLUICtrl>("group_name_editor")->setVisible(true); - } else { @@ -431,6 +447,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) getChild<LLUICtrl>("group_name")->setVisible(true); getChild<LLUICtrl>("group_name_editor")->setVisible(false); } + + reposButtons(); } bool LLPanelGroup::apply(LLPanelGroupTab* tab) diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index f2118a7244..628e2389b6 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -104,6 +104,7 @@ protected: static bool joinDlgCB(const LLSD& notification, const LLSD& response); void reposButton(const std::string& name); + void reposButtons(); protected: diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index c5a92f52d0..67a0528a06 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -112,9 +112,12 @@ BOOL LLSysWellWindow::postBuild() void LLSysWellWindow::setMinimized(BOOL minimize) { // we don't show empty Message Well window - setVisible(!minimize && !isWindowEmpty()); + if (!minimize) + { + setVisible(!isWindowEmpty()); + } - LLFloater::setMinimized(minimize); + LLDockableFloater::setMinimized(minimize); } //--------------------------------------------------------------------------------- @@ -264,7 +267,7 @@ void LLSysWellWindow::toggleWindow() getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1))); } - if(!getVisible()) + if(!getVisible() || isMinimized()) { if(isWindowEmpty()) { @@ -273,7 +276,7 @@ void LLSysWellWindow::toggleWindow() setVisible(TRUE); } - else + else if (isDocked()) { setVisible(FALSE); } diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index 0bb5a727e0..a588153ca2 100644 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -100,6 +100,7 @@ void LLTeleportHistoryStorage::onTeleportHistoryChange() void LLTeleportHistoryStorage::purgeItems() { mItems.clear(); + mHistoryChangedSignal(); } void LLTeleportHistoryStorage::addItem(const std::string title, const LLVector3d& global_pos) diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index fe1492d937..c2cd63900b 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -66,6 +66,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mReplyBtn->setVisible(FALSE); S32 btn_height = mReplyBtn->getRect().getHeight(); LLRect msg_rect = mMessage->getRect(); + mMessage->reshape(msg_rect.getWidth(), msg_rect.getHeight() + btn_height); msg_rect.setLeftTopAndSize(msg_rect.mLeft, msg_rect.mTop, msg_rect.getWidth(), msg_rect.getHeight() + btn_height); mMessage->setRect(msg_rect); } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 8c46949d70..e88217fae6 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -58,7 +58,6 @@ #include "llfloaterchatterbox.h" #include "llfloaterdaycycle.h" #include "llfloaterdirectory.h" -#include "llfloaterfirsttimetip.h" #include "llfloaterenvsettings.h" #include "llfloaterfonttest.h" #include "llfloatergesture.h" @@ -154,7 +153,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>); LLFloaterReg::add("contacts", "floater_my_friends.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMyFriends>); - LLFloaterReg::add("first_time_tip", "floater_first_time_tip.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFirstTimeTip>); LLFloaterReg::add("env_day_cycle", "floater_day_cycle_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDayCycle>); LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>); LLFloaterReg::add("env_settings", "floater_env_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvSettings>); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a81d26cb7b..b4e0d88e79 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -82,7 +82,6 @@ #include "llface.h" #include "llfilepicker.h" #include "llfirstuse.h" -#include "llfirsttimetipmanager.h" #include "llfloater.h" #include "llfloaterabout.h" #include "llfloaterbuycurrency.h" @@ -7603,24 +7602,6 @@ class LLWorldDayCycle : public view_listener_t } }; -/// Show First Time Tips calbacks -class LLHelpCheckShowFirstTimeTip : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - return LLFirstTimeTipsManager::tipsEnabled(); - } -}; - -class LLHelpShowFirstTimeTip : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFirstTimeTipsManager::enabledTip(!userdata.asBoolean()); - return true; - } -}; - void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) { static LLMenuGL* show_navbar_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_hide_navbar.xml", @@ -7738,9 +7719,6 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess"); view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle"); - view_listener_t::addMenu(new LLHelpCheckShowFirstTimeTip(), "Help.CheckShowFirstTimeTip"); - view_listener_t::addMenu(new LLHelpShowFirstTimeTip(), "Help.ShowQuickTips"); - // Tools menu view_listener_t::addMenu(new LLToolsSelectTool(), "Tools.SelectTool"); view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index c4a2654403..86c75a3946 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater can_dock="true" - can_minimize="false" - can_close="false" + can_minimize="true" + can_close="true" center_horiz="true" follows="top" height="110" diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 2790a12a36..f82e01dd1f 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater can_dock="true" - can_close="false" - can_minimize="false" + can_close="true" + can_minimize="true" center_horiz="true" follows="bottom" height="110" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ec528d53ed..aec6f3e654 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1004,15 +1004,6 @@ function="Floater.Show" parameter="hud" /> </menu_item_call> - <!-- <menu_item_check - label="Show Quick Tips" - layout="topleft" - name="Show Quick Tips"> - <menu_item_check.on_check - function="Help.CheckShowFirstTimeTip" /> - <menu_item_check.on_click - function="Help.ShowQuickTips" /> - </menu_item_check>--> <menu_item_separator layout="topleft" /> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 72869a3197..b4847368b2 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -83,7 +83,7 @@ top="6" width="70"> <button.init_callback - function="Button.SetFloaterToggle" + function="Button.SetDockableFloaterToggle" parameter="moveview" /> </button> </layout_panel> @@ -121,7 +121,7 @@ name="camera_btn" width="70"> <button.init_callback - function="Button.SetFloaterToggle" + function="Button.SetDockableFloaterToggle" parameter="camera" /> </button> <button @@ -136,7 +136,7 @@ image_selected="toggle_button_selected" image_unselected="toggle_button_off"> <button.init_callback - function="Button.SetFloaterToggle" + function="Button.SetDockableFloaterToggle" parameter="camera_presets" /> </button> diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml index 713c3a41a2..78f53562cd 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_item.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml @@ -16,7 +16,7 @@ /> <text width="130" top="25" left="40" height="20" follows="left|right|top" - font="SansSerifBigBold" text_color="white" word_wrap="true" + font="SansSerifBigBold" text_color="white" word_wrap="false" use_ellipses="true" mouse_opaque="true" name="sender_name" > Jerry Knight </text> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 4088d96ebf..d914583352 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -21,15 +21,28 @@ tool_tip="Press Enter to say, Ctrl-Enter to shout." top="3" width="250" /> + <output_monitor + auto_update="true" + follows="right" + draw_border="false" + halign="left" + height="16" + layout="topleft" + left_pad="-24" + mouse_opaque="true" + name="chat_zone_indicator" + top="4" + visible="true" + width="20" /> <button - follows="right" - width="45" - top="3" - layout="topleft" - left_pad="5" - label="Log" - height="20"> - <button.commit_callback function="Floater.Toggle" parameter="nearby_chat"/> + follows="right" + width="45" + top="3" + layout="topleft" + left_pad="5" + label="Log" + height="20"> + <button.commit_callback function="Floater.Toggle" parameter="nearby_chat"/> </button> <chiclet_talk follows="right" diff --git a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml index df5ea24c73..3ff0b3062a 100644 --- a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml +++ b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml @@ -1,6 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <accordion_tab + header_bg_color="0.68 0.68 0.68 1" + header_txt_color="0.68 0.68 0.68 1" header_collapse_img="Accordion_ArrowClosed_Off" header_collapse_img_pressed="Accordion_ArrowClosed_Press" header_expand_img="Accordion_ArrowOpened_Off" - header_expand_img_pressed="Accordion_ArrowOpened_Press" /> + header_expand_img_pressed="Accordion_ArrowOpened_Press" + header_image="Accordion_Off.png" + header_image_over="Accordion_Over" + header_image_pressed="Accordion_Press" + /> |