aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfolderview.cpp')
-rw-r--r--linden/indra/newview/llfolderview.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp
index bd5be8e..36d0b40 100644
--- a/linden/indra/newview/llfolderview.cpp
+++ b/linden/indra/newview/llfolderview.cpp
@@ -2522,6 +2522,7 @@ LLFolderView::LLFolderView( const LLString& name, LLViewerImage* root_folder_ico
2522 mLastScrollItem( NULL ), 2522 mLastScrollItem( NULL ),
2523 mNeedsAutoSelect( FALSE ), 2523 mNeedsAutoSelect( FALSE ),
2524 mAutoSelectOverride(FALSE), 2524 mAutoSelectOverride(FALSE),
2525 mNeedsAutoRename(FALSE),
2525 mDebugFilters(FALSE), 2526 mDebugFilters(FALSE),
2526 mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME), // This gets overridden by a pref immediately 2527 mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME), // This gets overridden by a pref immediately
2527 mFilter(name), 2528 mFilter(name),
@@ -4954,3 +4955,39 @@ LLString LLInventoryFilter::getFilterText()
4954 } 4955 }
4955 return mFilterText; 4956 return mFilterText;
4956} 4957}
4958
4959void LLInventoryFilter::toLLSD(LLSD& data)
4960{
4961 data["filter_types"] = (LLSD::Integer)getFilterTypes();
4962 data["min_date"] = (LLSD::Integer)getMinDate();
4963 data["max_date"] = (LLSD::Integer)getMaxDate();
4964 data["hours_ago"] = (LLSD::Integer)getHoursAgo();
4965 data["show_folder_state"] = (LLSD::Integer)getShowFolderState();
4966 data["permissions"] = (LLSD::Integer)getFilterPermissions();
4967 data["substring"] = (LLSD::String)getFilterSubString();
4968 data["sort_order"] = (LLSD::Integer)getSortOrder();
4969}
4970
4971void LLInventoryFilter::fromLLSD(LLSD& data)
4972{
4973 if(data.has("filter_types"))
4974 setFilterTypes((U32)data["filter_types"].asInteger());
4975
4976 if(data.has("min_date") && data.has("max_date"))
4977 setDateRange((U32)data["min_date"].asInteger(), (U32)data["max_date"].asInteger());
4978
4979 if(data.has("hours_ago"))
4980 setHoursAgo((U32)data["hours_ago"].asInteger());
4981
4982 if(data.has("show_folder_state"))
4983 setShowFolderState((EFolderShow)data["show_folder_state"].asInteger());
4984
4985 if(data.has("permissions"))
4986 setFilterPermissions((PermissionMask)data["permissions"].asInteger());
4987
4988 if(data.has("substring"))
4989 setFilterSubString(LLString(data["substring"].asString()));
4990
4991 if(data.has("sort_order"))
4992 setSortOrder((U32)data["sort_order"].asInteger());
4993}