diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llbottomtray.h | 8 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llnearbychat.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lltoastnotifypanel.h | 4 |
7 files changed, 25 insertions, 23 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index f3ade83d00..29f4311ea4 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -67,7 +67,7 @@ BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask) S32 screenX, screenY; localPointToScreen(x, y, &screenX, &screenY); // pass hover to bottomtray - LLBottomTray::getInstance()->handleHover(screenX, screenY, mask); + LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); return FALSE; } //virtual @@ -76,7 +76,7 @@ BOOL LLBottomtrayButton::handleMouseUp(S32 x, S32 y, MASK mask) S32 screenX, screenY; localPointToScreen(x, y, &screenX, &screenY); // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseUp(this,screenX, screenY, mask); + LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY); LLButton::handleMouseUp(x, y, mask); return FALSE; } @@ -86,7 +86,7 @@ BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask) S32 screenX, screenY; localPointToScreen(x, y, &screenX, &screenY); // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseDown(this,screenX, screenY, mask); + LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY); LLButton::handleMouseDown(x, y, mask); return FALSE; } @@ -561,7 +561,7 @@ BOOL LLBottomTray::postBuild() //Drag-n-drop -void LLBottomTray::onDraggableButtonMouseDown(LLUICtrl* ctrl, S32 x, S32 y, MASK mask) +void LLBottomTray::onDraggableButtonMouseDown(LLUICtrl* ctrl, S32 x, S32 y) { if (ctrl == NULL) return; LLView* parent_view = ctrl->getParent(); @@ -607,7 +607,7 @@ LLPanel* LLBottomTray::findChildPanelByLocalCoords(S32 x, S32 y) return ctrl; } -BOOL LLBottomTray::handleHover(S32 x, S32 y, MASK mask) +void LLBottomTray::onDraggableButtonHover(S32 x, S32 y) { // if mouse down on draggable item was done, check whether we should start DnD if (mCheckForDrag) @@ -634,8 +634,6 @@ BOOL LLBottomTray::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->getWindow()->setCursor(UI_CURSOR_NO); } } - - return TRUE; } bool LLBottomTray::isCursorOverDraggableArea(S32 x, S32 y) @@ -767,7 +765,7 @@ void LLBottomTray::loadButtonsOrder() mToolbarStack->movePanel(mNearbyChatBar, NULL, true); } -void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y, MASK mask) +void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y) { //if mouse up happened over area where drop is possible, change order of buttons if (mLandingTab != NULL && mDraggedItem != NULL && mDragStarted) @@ -1526,7 +1524,7 @@ void LLBottomTray::setButtonsControlsAndListeners() // set control name for Build button. It is not enough to link it with Button.SetFloaterToggle in xml std::string vis_control_name = LLFloaterReg::declareVisibilityControl("build"); // Set the button control value (toggle state) to the floater visibility control (Sets the value as well) - build_btn->setControlVariable(LLUI::sSettingGroups["floater"]->getControl(vis_control_name)); + build_btn->setControlVariable(LLFloater::getControlGroup()->getControl(vis_control_name)); } bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, const LLSD& new_visibility) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 14a29895f5..1197c5a10a 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -131,10 +131,12 @@ public: /** * These three methods handle drag'n'drop, they may be called directly from child buttons. + * handleHover and other virtual handle* couldn't be used here, because we should call LLPanel::handle*, + * but x and y here are often outside of bottomtray. */ - /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); - void onDraggableButtonMouseDown(LLUICtrl* button, S32 x, S32 y, MASK mask); - void onDraggableButtonMouseUp(LLUICtrl* button, S32 x, S32 y, MASK mask); + void onDraggableButtonHover(S32 x, S32 y); + void onDraggableButtonMouseDown(LLUICtrl* button, S32 x, S32 y); + void onDraggableButtonMouseUp(LLUICtrl* button, S32 x, S32 y); private: diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 1f67a659bd..dfb1db523d 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -760,7 +760,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (notification != NULL) { LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel( - notification, chat.mSessionID); + notification, chat.mSessionID, LLRect::null, !use_plain_text_chat_history); //we can't set follows in xml since it broke toasts behavior notify_box->setFollowsLeft(); notify_box->setFollowsRight(); diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 5f71d7100b..28aea7ae3d 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -115,7 +115,7 @@ void LLNearbyChat::applySavedVariables() { if (mRectControl.size() > 1) { - const LLRect& rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl); + const LLRect& rect = LLFloater::getControlGroup()->getRect(mRectControl); if(!rect.isEmpty() && rect.isValid()) { reshape(rect.getWidth(), rect.getHeight()); @@ -124,7 +124,7 @@ void LLNearbyChat::applySavedVariables() } - if(!LLUI::sSettingGroups["floater"]->controlExists(mDocStateControl)) + if(!LLFloater::getControlGroup()->controlExists(mDocStateControl)) { setDocked(true); } @@ -132,7 +132,7 @@ void LLNearbyChat::applySavedVariables() { if (mDocStateControl.size() > 1) { - bool dockState = LLUI::sSettingGroups["floater"]->getBOOL(mDocStateControl); + bool dockState = LLFloater::getControlGroup()->getBOOL(mDocStateControl); setDocked(dockState); } } diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 054de66600..88e37b815f 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -999,9 +999,9 @@ void LLSideTray::detachTabs() std::string floater_ctrl_name = LLFloater::getControlName("side_bar_tab", LLSD(tab->getName())); std::string vis_ctrl_name = LLFloaterReg::getVisibilityControlName(floater_ctrl_name); - if (!LLUI::sSettingGroups["floater"]->controlExists(vis_ctrl_name)) continue; + if (!LLFloater::getControlGroup()->controlExists(vis_ctrl_name)) continue; - bool is_visible = LLUI::sSettingGroups["floater"]->getBOOL(vis_ctrl_name); + bool is_visible = LLFloater::getControlGroup()->getBOOL(vis_ctrl_name); if (!is_visible) continue; llassert(isTabAttached(tab->getName())); diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index ca6efa9d2f..1a1c94674b 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -51,7 +51,7 @@ const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL; LLToastNotifyPanel::button_click_signal_t LLToastNotifyPanel::sButtonClickSignal; -LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification, const LLRect& rect) : +LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification, const LLRect& rect, bool show_images) : LLToastPanel(notification), mTextBox(NULL), mInfoPanel(NULL), @@ -120,6 +120,7 @@ mCloseNotificationOnDestroy(true) mTextBox->setMaxTextLength(MAX_LENGTH); mTextBox->setVisible(TRUE); + mTextBox->setPlainText(!show_images); mTextBox->setValue(notification->getMessage()); // add buttons for a script notification @@ -523,8 +524,9 @@ void LLToastNotifyPanel::disableRespondedOptions(LLNotificationPtr& notification ////////////////////////////////////////////////////////////////////////// -LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */) - : mSessionID(session_id), LLToastNotifyPanel(pNotification, rect) +LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */, + bool show_images /* = true */) + : mSessionID(session_id), LLToastNotifyPanel(pNotification, rect, show_images) { mTextBox->setFollowsAll(); } diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index 9e1eac90b3..57711b3d80 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -60,7 +60,7 @@ public: * @deprecated if you intend to instantiate LLToastNotifyPanel - it's point to * implement right class for desired toast panel. @see LLGenericTipPanel as example. */ - LLToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null); + LLToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null, bool show_images = true); virtual ~LLToastNotifyPanel(); LLPanel * getControlPanel() { return mControlPanel; } @@ -137,7 +137,7 @@ class LLIMToastNotifyPanel : public LLToastNotifyPanel { public: - LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect = LLRect::null); + LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect = LLRect::null, bool show_images = true); ~LLIMToastNotifyPanel(); |