void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
{
	// Determine the root folder in case specified, and
	// build the views starting with that folder.
	
	std::string start_folder_name(params.start_folder());
	
	const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(start_folder_name);

	LLUUID root_id;

	if ("LIBRARY" == params.start_folder())
	{
		root_id = gInventory.getLibraryRootFolderID();
	}
	else
	{
		root_id = (preferred_type != LLFolderType::FT_NONE)
				? gInventory.findCategoryUUIDForType(preferred_type, false, false) 
				: LLUUID::null;
	}
	
	if ((root_id == LLUUID::null) && !start_folder_name.empty())
	{
		llwarns << "No category found that matches start_folder: " << start_folder_name << llendl;
		root_id = LLUUID::generateNewID();
	}
	
	LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY,
																	LLAssetType::AT_CATEGORY,
																	LLInventoryType::IT_CATEGORY,
																	this,
																	NULL,
																	root_id);
	
	mFolderRoot = createFolderView(new_listener, params.use_label_suffix());
}
void LLPlacesInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
{
	// Determine the root folder in case specified, and
	// build the views starting with that folder.
	const LLFolderType::EType preferred_type = LLViewerFolderType::lookupTypeFromNewCategoryName(params.start_folder);

	LLUUID root_id;

	if ("LIBRARY" == params.start_folder())
	{
		root_id = gInventory.getLibraryRootFolderID();
	}
	else
	{
		root_id = (preferred_type != LLFolderType::FT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
	}

	LLRect folder_rect(0,
		0,
		getRect().getWidth(),
		0);
	LLPlacesFolderView::Params p;
	p.name = getName();
	p.title = getLabel();
	p.rect = folder_rect;
	p.listener =  mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY,
													LLAssetType::AT_CATEGORY,
													LLInventoryType::IT_CATEGORY,
													this,
													NULL,
													root_id);
	p.parent_panel = this;
	p.allow_multiselect = mAllowMultiSelect;
	p.use_ellipses = true;	// truncate inventory item text so remove horizontal scroller
	mFolderRoot = (LLFolderView*)LLUICtrlFactory::create<LLPlacesFolderView>(p);
}