diff options
author | Eli Linden <eli@lindenlab.com> | 2010-03-09 11:11:44 -0800 |
---|---|---|
committer | Eli Linden <eli@lindenlab.com> | 2010-03-09 11:11:44 -0800 |
commit | bc5c41d710997dee9ffa83ce81639fe833684fee (patch) | |
tree | e3ec6c3a0dabd71d25ae0341f9178bd3b6996cdd /indra | |
parent | 5877ddc62331e4cd268e7305f21b548c50ae389c (diff) | |
parent | b21e89395ae168c86b7315e7bfc0eff0e17122f9 (diff) |
Merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llaudio/llaudioengine.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llgrouplist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpopupview.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llscriptfloater.cpp | 7 | ||||
-rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 15 | ||||
-rw-r--r-- | indra/newview/lltoastnotifypanel.h | 12 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_script.xml | 6 |
9 files changed, 36 insertions, 20 deletions
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index ed06c85e1a..b92ccd1d77 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -592,7 +592,7 @@ LLAudioBuffer * LLAudioEngine::getFreeBuffer() if (buffer_id >= 0) { - llinfos << "Taking over unused buffer " << buffer_id << llendl; + lldebugs << "Taking over unused buffer " << buffer_id << llendl; //llinfos << "Flushing unused buffer!" << llendl; mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL; delete mBuffers[buffer_id]; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index f08d8decfe..f686eccf37 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -494,11 +494,12 @@ bool LLWearableHoldingPattern::pollFetchCompletion() bool completed = isFetchCompleted(); bool timed_out = isTimedOut(); bool done = completed || timed_out; - - llinfos << "polling, done status: " << completed << " timed out " << timed_out << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl; if (done) { + llinfos << "polling, done status: " << completed << " timed out " << timed_out + << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl; + mFired = true; if (timed_out) diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index bcfb516b81..8a056f836f 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -127,7 +127,7 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); LLMenuGL* context_menu = (LLMenuGL*)mContextMenuHandle.get(); - if (context_menu) + if (context_menu && size() > 0) { context_menu->buildDrawLabels(); context_menu->updateParent(LLMenuGL::sMenuContainer); diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 1668a91eed..d8ad59c90c 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -220,10 +220,6 @@ void LLPopupView::removePopup(LLView* popup) { if (popup) { - if (gFocusMgr.childHasKeyboardFocus(popup)) - { - gFocusMgr.setKeyboardFocus(NULL); - } popup_list_t::iterator iter = std::find(mPopups.begin(), mPopups.end(), popup->getHandle()); if(iter != mPopups.end()) { diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index eb71cc52c8..f35cb3516a 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -154,14 +154,17 @@ void LLScriptFloater::createForm(const LLUUID& notification_id) } // create new form - mScriptForm = new LLToastNotifyPanel(notification); + LLRect toast_rect = getRect(); + // LLToastNotifyPanel will fit own content in vertical direction, + // but it needs an initial rect to properly calculate its width + // Use an initial rect of the script floater to make the floater window more configurable. + mScriptForm = new LLToastNotifyPanel(notification, toast_rect); addChild(mScriptForm); // position form on floater mScriptForm->setOrigin(0, 0); // make floater size fit form size - LLRect toast_rect = getRect(); LLRect panel_rect = mScriptForm->getRect(); toast_rect.setLeftTopAndSize(toast_rect.mLeft, toast_rect.mTop, panel_rect.getWidth(), panel_rect.getHeight() + getHeaderHeight()); setShape(toast_rect); diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index c47c017143..e6d13a7613 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -53,7 +53,7 @@ S32 BUTTON_WIDTH = 90; const LLFontGL* LLToastNotifyPanel::sFont = NULL; const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL; -LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification) : +LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification, const LLRect& rect) : LLToastPanel(notification), mTextBox(NULL), mInfoPanel(NULL), @@ -63,6 +63,10 @@ mNumButtons(0), mAddedDefaultBtn(false) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_notification.xml"); + if(rect != LLRect::null) + { + this->setShape(rect); + } mInfoPanel = getChild<LLPanel>("info_panel"); mControlPanel = getChild<LLPanel>("control_panel"); BUTTON_WIDTH = gSavedSettings.getS32("ToastButtonWidth"); @@ -159,7 +163,12 @@ mAddedDefaultBtn(false) * for a scriptdialog toast h_pad can be < 2*HPAD if we have a lot of buttons. * In last case set default h_pad to avoid heaping of buttons */ - h_pad = 2*HPAD; + S32 button_per_row = button_panel_width / BUTTON_WIDTH; + h_pad = (button_panel_width % BUTTON_WIDTH) / (button_per_row - 1);// -1 because we do not need space after last button in a row + if(h_pad < 2*HPAD) // still not enough space between buttons ? + { + h_pad = 2*HPAD; + } } if (mIsScriptDialog) { @@ -224,7 +233,7 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_opt p.click_callback.function(boost::bind(&LLToastNotifyPanel::onClickButton, userdata)); p.rect.width = BUTTON_WIDTH; p.auto_resize = false; - p.follows.flags(FOLLOWS_RIGHT | FOLLOWS_LEFT | FOLLOWS_BOTTOM); + p.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); if (mIsCaution) { p.image_color(LLUIColorTable::instance().getColor("ButtonCautionImageColor")); diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index e791eea469..152975e7de 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -53,7 +53,15 @@ class LLNotificationForm; class LLToastNotifyPanel: public LLToastPanel { public: - LLToastNotifyPanel(LLNotificationPtr&); + /** + * Constructor for LLToastNotifyPanel. + * + * @param pNotification a shared pointer to LLNotification + * @param rect an initial rectangle of the toast panel. + * If it is null then a loaded from xml rectangle will be used. + * @see LLNotification + */ + LLToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null); virtual ~LLToastNotifyPanel(); LLPanel * getControlPanel() { return mControlPanel; } @@ -77,7 +85,7 @@ private: /* * It lays out buttons of the notification in mControlPanel. * Buttons will be placed from BOTTOM to TOP. - * @param h_pad horizontal space between buttons. It is depent on number of buttons. + * @param h_pad horizontal space between buttons. It is depend on number of buttons. * @param buttons vector of button to be added. */ void updateButtonsLayout(const std::vector<index_button_pair_t>& buttons, S32 h_pad); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 01d437f9eb..b21758d3b3 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1417,9 +1417,8 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) if (!mForceToSaveRawImage) { mNeedsAux = FALSE; - } destroyRawImage(); - + } return res; } diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml index 663899d4b3..12ade86b5f 100644 --- a/indra/newview/skins/default/xui/en/floater_script.xml +++ b/indra/newview/skins/default/xui/en/floater_script.xml @@ -3,7 +3,7 @@ legacy_header_height="18" background_visible="true" follows="left|top|right|bottom" - height="369" + height="250" layout="topleft" left="0" name="script_floater" @@ -11,8 +11,8 @@ can_dock="true" can_minimize="true" visible="false" - width="520" + width="350" can_resize="false" min_width="350" - min_height="369"> + min_height="200"> </floater> |