diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-08-09 12:06:09 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-08-09 12:06:09 -0700 |
commit | 9488baada3c0aec7cfa4256708fdda82861cd502 (patch) | |
tree | 1f71293b54161733269a6f340574ec4960623d0f /indra/llui | |
parent | de08d74dc6da594c20aed3673114cbc0ef6d3305 (diff) | |
parent | 1869a399beb2cb3fa52d21f9c288f4c3b6ab4deb (diff) |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-beta.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderview.cpp | 46 | ||||
-rw-r--r-- | indra/llui/llnotifications.cpp | 4 | ||||
-rw-r--r-- | indra/llui/llnotificationtemplate.h | 2 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 16 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.h | 1 |
5 files changed, 46 insertions, 23 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 1a8ab63388..f57790aff6 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -277,7 +277,7 @@ BOOL LLFolderView::canFocusChildren() const void LLFolderView::addFolder( LLFolderViewFolder* folder) { LLFolderViewFolder::addFolder(folder); - + // TODO RN: enforce sort order of My Inventory followed by Library //mFolders.remove(folder); //if (((LLFolderViewModelItemInventory*)folder->getViewModelItem())->getUUID() == gInventory.getLibraryRootFolderID()) @@ -311,7 +311,7 @@ void LLFolderView::openTopLevelFolders() // *width should be 0 // conform show folder state works S32 LLFolderView::arrange( S32* unused_width, S32* unused_height ) -{ + { mMinWidth = 0; S32 target_height; @@ -340,7 +340,7 @@ void LLFolderView::filter( LLFolderViewFilter& filter ) filter.setFilterCount(llclamp(LLUI::sSettingGroups["config"]->getS32("FilterItemsPerFrame"), 1, 5000)); getViewModelItem()->filter(filter); -} + } void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) { @@ -350,7 +350,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) LLView::reshape(width, height, called_from_parent); scroll_rect = mScrollContainer->getContentWindowRect(); } - width = llmax(mMinWidth, scroll_rect.getWidth()); + width = llmax(mMinWidth, scroll_rect.getWidth()); height = llmax(llround(mCurHeight), scroll_rect.getHeight()); // Restrict width within scroll container's width @@ -510,11 +510,11 @@ void LLFolderView::sanitizeSelection() // modify with parent open and filters states LLFolderViewFolder* parent_folder = item->getParentFolder(); // Move up through parent folders and see what's visible - while(parent_folder) - { + while(parent_folder) + { visible = visible && parent_folder->isOpen() && parent_folder->getViewModelItem()->potentiallyVisible(); - parent_folder = parent_folder->getParentFolder(); - } + parent_folder = parent_folder->getParentFolder(); + } // deselect item if any ancestor is closed or didn't pass filter requirements. if (!visible) @@ -829,7 +829,7 @@ void LLFolderView::openSelectedItems( void ) // multi_propertiesp->openFloater(LLSD()); // } //} -} + } void LLFolderView::propertiesSelectedItems( void ) { @@ -858,7 +858,7 @@ void LLFolderView::propertiesSelectedItems( void ) // multi_propertiesp->openFloater(LLSD()); // } //} -} + } void LLFolderView::autoOpenItem( LLFolderViewFolder* item ) @@ -1170,7 +1170,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) mSearchString.clear(); if (mScrollContainer) { - mScrollContainer->pageUp(30); + mScrollContainer->pageUp(30); } handled = TRUE; break; @@ -1179,7 +1179,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) mSearchString.clear(); if (mScrollContainer) { - mScrollContainer->pageDown(30); + mScrollContainer->pageDown(30); } handled = TRUE; break; @@ -1188,7 +1188,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) mSearchString.clear(); if (mScrollContainer) { - mScrollContainer->goToTop(); + mScrollContainer->goToTop(); } handled = TRUE; break; @@ -1197,7 +1197,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) mSearchString.clear(); if (mScrollContainer) { - mScrollContainer->goToBottom(); + mScrollContainer->goToBottom(); } break; @@ -1604,8 +1604,8 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // by the folder which is the hierarchy root. if (!handled) { - handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - } + handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } return handled; } @@ -2036,10 +2036,10 @@ void LLFolderView::onRenamerLost() S32 LLFolderView::getItemHeight() { if(!hasVisibleChildren()) - { +{ //We need to display status textbox, let's reserve some place for it return llmax(0, mStatusTextBox->getTextPixelHeight()); - } +} return 0; } @@ -2048,16 +2048,16 @@ LLFolderViewItem* LLFolderView::getNextUnselectedItem() LLFolderViewItem* last_item = *mSelectedItems.rbegin(); LLFolderViewItem* new_selection = last_item->getNextOpenNode(FALSE); while(new_selection && new_selection->isSelected()) - { +{ new_selection = new_selection->getNextOpenNode(FALSE); - } +} if (!new_selection) - { +{ new_selection = last_item->getPreviousOpenNode(FALSE); while (new_selection && (new_selection->isInSelection())) - { + { new_selection = new_selection->getPreviousOpenNode(FALSE); - } } +} return new_selection; } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index ed59c607a7..fdd45bd76f 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1501,6 +1501,10 @@ bool LLNotifications::loadTemplates() { replaceFormText(notification.form_ref.form, "$canceltext", notification.form_ref.form_template.cancel_text); } + if(notification.form_ref.form_template.help_text.isProvided()) + { + replaceFormText(notification.form_ref.form, "$helptext", notification.form_ref.form_template.help_text); + } if(notification.form_ref.form_template.ignore_text.isProvided()) { replaceFormText(notification.form_ref.form, "$ignoretext", notification.form_ref.form_template.ignore_text); diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index c9e9d0f32a..9434efe1b9 100644 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -135,6 +135,7 @@ struct LLNotificationTemplate Optional<std::string> yes_text, no_text, cancel_text, + help_text, ignore_text; TemplateRef() @@ -142,6 +143,7 @@ struct LLNotificationTemplate yes_text("yestext"), no_text("notext"), cancel_text("canceltext"), + help_text("helptext"), ignore_text("ignoretext") {} }; diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index b3e1b63db5..802914e25b 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -389,6 +389,22 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const return ret; } +S32 LLScrollListCtrl::getNumSelected() const +{ + S32 numSelected = 0; + + for(item_list::const_iterator iter = mItemList.begin(); iter != mItemList.end(); ++iter) + { + LLScrollListItem* item = *iter; + if (item->getSelected()) + { + ++numSelected; + } + } + + return numSelected; +} + S32 LLScrollListCtrl::getFirstSelectedIndex() const { S32 CurSelectedIndex = 0; diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index ae8aea9245..44d9635838 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -257,6 +257,7 @@ public: LLScrollListItem* getFirstSelected() const; virtual S32 getFirstSelectedIndex() const; std::vector<LLScrollListItem*> getAllSelected() const; + S32 getNumSelected() const; LLScrollListItem* getLastSelectedItem() const { return mLastSelected; } // iterate over all items |