diff options
author | Merov Linden <merov@lindenlab.com> | 2012-12-17 19:29:35 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-12-17 19:29:35 -0800 |
commit | 3d137bae5c5435dde305323179d8d3d6c9720bad (patch) | |
tree | 959fe5ab17e21ab6d4455da7f7173270f8d01732 /indra/llui | |
parent | 6fe7144104cd8b5bd9c7d215f76afdeafe13b7ee (diff) | |
parent | f8b51f40289255ce38f65830f5bb0f29def3b757 (diff) |
Merge with viewer-chui
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderview.h | 16 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 12 | ||||
-rw-r--r-- | indra/llui/llurlentry.cpp | 2 |
3 files changed, 25 insertions, 5 deletions
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 525efe425a..d4a1434c73 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -341,16 +341,28 @@ public: virtual void doItem(LLFolderViewItem* item) = 0; }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLSelectFirstFilteredItem +// +// This will select the first *item* found in the hierarchy. If no item can be +// selected, the first matching folder will. +// Since doFolder() is done first but we prioritize item selection, we let the +// first filtered folder set the selection and raise a folder flag. +// The selection might be overridden by the first filtered item in doItem() +// which checks an item flag. Since doFolder() checks the item flag too, the first +// item will still be selected if items were to be done first and folders second. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLSelectFirstFilteredItem : public LLFolderViewFunctor { public: - LLSelectFirstFilteredItem() : mItemSelected(FALSE) {} + LLSelectFirstFilteredItem() : mItemSelected(FALSE), mFolderSelected(FALSE) {} virtual ~LLSelectFirstFilteredItem() {} virtual void doFolder(LLFolderViewFolder* folder); virtual void doItem(LLFolderViewItem* item); - BOOL wasItemSelected() { return mItemSelected; } + BOOL wasItemSelected() { return mItemSelected || mFolderSelected; } protected: BOOL mItemSelected; + BOOL mFolderSelected; }; class LLOpenFilteredFolders : public LLFolderViewFunctor diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 26aadd056f..8b9fb47d5c 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -580,6 +580,15 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r addColumn(col_params); } + S32 num_cols = item->getNumColumns(); + S32 i = 0; + for (LLScrollListCell* cell = item->getColumn(i); i < num_cols; cell = item->getColumn(++i)) + { + if (i >= (S32)mColumnsIndexed.size()) break; + + cell->setWidth(mColumnsIndexed[i]->getWidth()); + } + updateLineHeightInsert(item); updateLayout(); @@ -1832,8 +1841,7 @@ void LLScrollListCtrl::copyNameToClipboard(std::string id, bool is_group) { LLAvatarName av_name; LLAvatarNameCache::get(LLUUID(id), &av_name); - // Note: Will return an empty string if the avatar name was not cached for that id. Fine in that case. - name = av_name.getUserName(); + name = av_name.getAccountName(); } LLUrlAction::copyURLToClipboard(name); } diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 71db238c94..1758218b7d 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -619,7 +619,7 @@ LLUrlEntryAgentUserName::LLUrlEntryAgentUserName() std::string LLUrlEntryAgentUserName::getName(const LLAvatarName& avatar_name) { - return avatar_name.getUserName(); + return avatar_name.getAccountName(); } // |