diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llconsole.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llconsole.h | 3 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 5 | ||||
-rw-r--r--[-rwxr-xr-x] | indra/llui/llfolderviewitem.cpp | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | indra/llui/llfolderviewitem.h | 0 | ||||
-rw-r--r-- | indra/llui/llkeywords.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 3 | ||||
-rw-r--r-- | indra/llui/lllayoutstack.h | 3 | ||||
-rw-r--r-- | indra/llui/llnotifications.cpp | 4 | ||||
-rw-r--r-- | indra/llui/llnotifications.h | 7 | ||||
-rw-r--r-- | indra/llui/llscrolllistcolumn.cpp | 3 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 14 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.h | 2 | ||||
-rw-r--r-- | indra/llui/lltextbase.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lltoolbar.cpp | 4 |
15 files changed, 30 insertions, 24 deletions
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 161496b1f5..fdfaf284de 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -243,8 +243,6 @@ void LLConsole::draw() void LLConsole::Paragraph::makeParagraphColorSegments (const LLColor4 &color) { LLSD paragraph_color_segments; - LLColor4 lcolor=color; - paragraph_color_segments[0]["text"] =wstring_to_utf8str(mParagraphText); LLSD color_sd = color.getValue(); paragraph_color_segments[0]["color"]=color_sd; diff --git a/indra/llui/llconsole.h b/indra/llui/llconsole.h index f32f1dd74c..b264aeb7eb 100644 --- a/indra/llui/llconsole.h +++ b/indra/llui/llconsole.h @@ -34,9 +34,10 @@ class LLSD; -class LLConsole : public LLFixedBuffer, public LLUICtrl, public LLInstanceTracker<LLConsole> +class LLConsole : public LLFixedBuffer, public LLUICtrl, public INSTANCE_TRACKER(LLConsole) { public: + typedef enum e_font_size { MONOSPACE = -1, diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 4dba1e645f..f28ceb0ce4 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -112,15 +112,18 @@ struct LLCoordFloater : LLCoord<LL_COORD_FLOATER> bool operator!=(const LLCoordFloater& other) const { return !(*this == other); } void setFloater(LLFloater& floater); + + }; -class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater> +class LLFloater : public LLPanel, public INSTANCE_TRACKER(LLFloater) { friend class LLFloaterView; friend class LLFloaterReg; friend class LLMultiFloater; public: + struct KeyCompare { // static bool compare(const LLSD& a, const LLSD& b); diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index fdb4108afb..fdb4108afb 100755..100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index ca31931e19..ca31931e19 100755..100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index c1cd04186b..537cc82302 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -368,7 +368,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW const llwchar* base = wtext.c_str(); const llwchar* cur = base; const llwchar* line = NULL; - + (void)line; while( *cur ) { if( *cur == '\n' || cur == base ) diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index e642883991..5b5f9c3de8 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -477,7 +477,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp) { LLResizeBar::Side side = (mOrientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; LLRect resize_bar_rect = getRect(); - + (void)resize_bar_rect; LLResizeBar::Params resize_params; resize_params.name("resize"); resize_params.resizing_view(lp); @@ -865,3 +865,4 @@ void LLLayoutStack::updateResizeBarLimits() previous_visible_panelp = visible_panelp; } } + diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 02c664f1a0..a8b5466242 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -35,9 +35,10 @@ class LLLayoutPanel; -class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack> +class LLLayoutStack : public LLView, public INSTANCE_TRACKER(LLLayoutStack) { public: + typedef enum e_layout_orientation { HORIZONTAL, diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 1789f003b9..8bafbd53d8 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1121,7 +1121,7 @@ bool LLNotificationChannelBase::updateItem(const LLSD& payload, LLNotificationPt LLNotificationChannel::LLNotificationChannel(const Params& p) : LLNotificationChannelBase(p.filter()), - LLInstanceTracker<LLNotificationChannel, std::string>(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()), + LLInstanceTracker<LLNotificationChannel, InstanceTrackType_LLNotificationContext, std::string>(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()), mName(p.name.isProvided() ? p.name : LLUUID::generateNewID().asString()) { BOOST_FOREACH(const std::string& source, p.sources) @@ -1135,7 +1135,7 @@ LLNotificationChannel::LLNotificationChannel(const std::string& name, const std::string& parent, LLNotificationFilter filter) : LLNotificationChannelBase(filter), - LLInstanceTracker<LLNotificationChannel, std::string>(name), + LLInstanceTracker<LLNotificationChannel, InstanceTrackType_LLNotificationContext, std::string>(name), mName(name) { // bind to notification broadcast diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 87573c2a56..2561125aa5 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -135,10 +135,11 @@ typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegi // context data that can be looked up via a notification's payload by the display logic // derive from this class to implement specific contexts -class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID> +class LLNotificationContext : public INSTANCE_TRACKER_KEYED(LLNotificationContext, LLUUID) { public: - LLNotificationContext() : LLInstanceTracker<LLNotificationContext, LLUUID>(LLUUID::generateNewID()) + + LLNotificationContext() : INSTANCE_TRACKER_KEYED(LLNotificationContext, LLUUID)(LLUUID::generateNewID()) { } @@ -814,7 +815,7 @@ typedef boost::intrusive_ptr<LLNotificationChannel> LLNotificationChannelPtr; class LLNotificationChannel : boost::noncopyable, public LLNotificationChannelBase, - public LLInstanceTracker<LLNotificationChannel, std::string> + public LLInstanceTracker<LLNotificationChannel, InstanceTrackType_LLNotificationContext, std::string> { LOG_CLASS(LLNotificationChannel); diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index af124d9826..cc9ff7a487 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -236,7 +236,8 @@ void LLScrollColumnHeader::handleReshape(const LLRect& new_rect, bool by_user) // tell scroll list to layout columns again // do immediate update to get proper feedback to resize handle // which needs to know how far the resize actually went - mColumn->mParentCtrl->updateColumns(); + const bool force_update = true; + mColumn->mParentCtrl->updateColumns(force_update); } } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 8b9fb47d5c..1a9f5874a1 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -615,7 +615,6 @@ S32 LLScrollListCtrl::calcMaxContentWidth() if (mColumnWidthsDirty) { - mColumnWidthsDirty = false; // update max content width for this column, by looking at all items column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0; item_list::iterator iter; @@ -629,6 +628,7 @@ S32 LLScrollListCtrl::calcMaxContentWidth() } max_item_width += column->mMaxContentWidth; } + mColumnWidthsDirty = false; return max_item_width; } @@ -643,7 +643,7 @@ bool LLScrollListCtrl::updateColumnWidths() if (!column) continue; // update column width - S32 new_width = column->getWidth(); + S32 new_width = 0; if (column->mRelWidth >= 0) { new_width = (S32)llround(column->mRelWidth*mItemListRect.getWidth()); @@ -652,6 +652,10 @@ bool LLScrollListCtrl::updateColumnWidths() { new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding) / mNumDynamicWidthColumns; } + else + { + new_width = column->getWidth(); + } if (column->getWidth() != new_width) { @@ -693,9 +697,9 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp) } -void LLScrollListCtrl::updateColumns() +void LLScrollListCtrl::updateColumns(bool force_update) { - if (!mColumnsDirty) + if (!mColumnsDirty && !force_update) return; mColumnsDirty = false; @@ -749,7 +753,7 @@ void LLScrollListCtrl::updateColumns() } // propagate column widths to individual cells - if (columns_changed_width) + if (columns_changed_width || force_update) { item_list::iterator iter; for (iter = mItemList.begin(); iter != mItemList.end(); iter++) diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 38450b6313..0b629a76f7 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -342,7 +342,7 @@ public: static void onClickColumn(void *userdata); - virtual void updateColumns(); + virtual void updateColumns(bool force_update = false); S32 calcMaxContentWidth(); bool updateColumnWidths(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index c4ec1edc73..357d0f9d07 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -359,7 +359,6 @@ void LLTextBase::drawSelectionBackground() S32 selection_left = llmin( mSelectionStart, mSelectionEnd ); S32 selection_right = llmax( mSelectionStart, mSelectionEnd ); - LLRect selection_rect = mVisibleTextRect; // Skip through the lines we aren't drawing. LLRect content_display_rect = getVisibleDocumentRect(); @@ -2339,7 +2338,6 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, { // Figure out which line we're nearest to. LLRect doc_rect = mDocumentView->getRect(); - S32 doc_y = local_y - doc_rect.mBottom; // binary search for line that starts before local_y diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index b9256dd890..eb6b2fc56a 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -653,7 +653,6 @@ void LLToolBar::updateLayoutAsNeeded() S32 max_row_length = 0; S32 max_length; - S32 max_total_girth; S32 cur_start; S32 cur_row ; S32 row_pad_start; @@ -664,7 +663,6 @@ void LLToolBar::updateLayoutAsNeeded() if (orientation == LLLayoutStack::HORIZONTAL) { max_length = getRect().getWidth() - mPadLeft - mPadRight; - max_total_girth = getRect().getHeight() - mPadTop - mPadBottom; row_pad_start = mPadLeft; row_pad_end = mPadRight; cur_row = mPadTop; @@ -673,7 +671,6 @@ void LLToolBar::updateLayoutAsNeeded() else // VERTICAL { max_length = getRect().getHeight() - mPadTop - mPadBottom; - max_total_girth = getRect().getWidth() - mPadLeft - mPadRight; row_pad_start = mPadTop; row_pad_end = mPadBottom; cur_row = mPadLeft; @@ -842,6 +839,7 @@ void LLToolBar::draw() { LLRect caret_rect = caret->getRect(); LLRect toolbar_rect = getRect(); + (void)toolbar_rect; if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL) { caret->setRect(LLRect(mDragx-caret_rect.getWidth()/2+1, |