summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderview.cpp54
-rw-r--r--indra/llui/llfolderviewitem.cpp22
-rw-r--r--indra/llui/llnotifications.cpp4
-rw-r--r--indra/llui/llnotificationtemplate.h2
-rw-r--r--indra/llui/llscrolllistctrl.cpp21
-rw-r--r--indra/llui/llscrolllistctrl.h2
-rw-r--r--indra/llui/lluictrlfactory.h14
7 files changed, 62 insertions, 57 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index fedb8bc014..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;
}
@@ -1715,11 +1715,17 @@ void LLFolderView::update()
{
mNeedsAutoSelect = TRUE;
}
- getFolderViewModel()->getFilter().clearModified();
// filter to determine visibility before arranging
filter(getFolderViewModel()->getFilter());
+ // Clear the modified setting on the filter only if the filter count is non-zero after running the filter process
+ // Note: if the filter count is zero, then the filter most likely halted before completing the entire set of items
+ if (getFolderViewModel()->getFilter().isModified() && (getFolderViewModel()->getFilter().getFilterCount() > 0))
+ {
+ getFolderViewModel()->getFilter().clearModified();
+ }
+
// automatically show matching items, and select first one if we had a selection
if (mNeedsAutoSelect)
{
@@ -2030,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;
}
@@ -2042,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/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 68b442dd9a..b172359851 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -415,11 +415,6 @@ void LLFolderViewItem::rename(const std::string& new_name)
if( !new_name.empty() )
{
getViewModelItem()->renameItem(new_name);
-
- //if(mParentFolder)
- //{
- // mParentFolder->requestSort();
- //}
}
}
@@ -1492,26 +1487,9 @@ void LLFolderViewFolder::addItem(LLFolderViewItem* item)
item->setRect(LLRect(0, 0, getRect().getWidth(), 0));
item->setVisible(FALSE);
-
-
- // TODO RN - port creation date management to new code location
-#if 0
- // Update the folder creation date if the child is newer than our current date
- setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate()));
-#endif
addChild(item);
getViewModelItem()->addChild(item->getViewModelItem());
- // TODO RN - port creation date management to new code location
-#if 0
- // Traverse parent folders and update creation date and resort, if necessary
- LLFolderViewFolder* parentp = getParentFolder();
- while (parentp)
- {
- // Update the folder creation date if the child is newer than our current date
- parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate()));
- }
-#endif
//TODO RN - make sort bubble up as long as parent Folder doesn't have anything matching sort criteria
//// Traverse parent folders and update creation date and resort, if necessary
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..b3499693dd 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;
@@ -2704,6 +2720,11 @@ BOOL LLScrollListCtrl::hasSortOrder() const
return !mSortColumns.empty();
}
+void LLScrollListCtrl::clearSortOrder()
+{
+ mSortColumns.clear();
+}
+
void LLScrollListCtrl::clearColumns()
{
column_map_t::iterator itor;
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index ae8aea9245..e83794e173 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
@@ -373,6 +374,7 @@ public:
std::string getSortColumnName();
BOOL getSortAscending() { return mSortColumns.empty() ? TRUE : mSortColumns.back().second; }
BOOL hasSortOrder() const;
+ void clearSortOrder();
S32 selectMultiple( uuid_vec_t ids );
// conceptually const, but mutates mItemList
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 9f18be2371..4ce1aeac76 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -31,18 +31,10 @@
#include "llinitparam.h"
#include "llregistry.h"
#include "llxuiparser.h"
+#include "llstl.h"
class LLView;
-// sort functor for typeid maps
-struct LLCompareTypeID
-{
- bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
- {
- return lhs->before(*rhs);
- }
-};
-
// lookup widget constructor funcs by widget name
template <typename DERIVED_TYPE>
class LLChildRegistry : public LLRegistrySingleton<std::string, LLWidgetCreatorFunc, DERIVED_TYPE>
@@ -71,14 +63,14 @@ protected:
// lookup widget name by type
class LLWidgetNameRegistry
-: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry , LLCompareTypeID>
+: public LLRegistrySingleton<const std::type_info*, std::string, LLWidgetNameRegistry>
{};
// lookup function for generating empty param block by widget type
// this is used for schema generation
//typedef const LLInitParam::BaseBlock& (*empty_param_block_func_t)();
//class LLDefaultParamBlockRegistry
-//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry, LLCompareTypeID>
+//: public LLRegistrySingleton<const std::type_info*, empty_param_block_func_t, LLDefaultParamBlockRegistry>
//{};
extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP;