2.7

git [09-19-18 - 14:31]
2.7
Filename
FurCControlBridge.lua
FurCFilter.lua
FurCGui.lua
FurnitureCatalogue.txt
libs/LibCustomMenu/libs/LibVotansAddonList/lang/de.lua
libs/LibCustomMenu/libs/LibVotansAddonList/lang/fr.lua
locale/fr.lua
startup.lua
diff --git a/FurCControlBridge.lua b/FurCControlBridge.lua
index 114a2b7..d7e5eef 100644
--- a/FurCControlBridge.lua
+++ b/FurCControlBridge.lua
@@ -31,7 +31,7 @@ function FurC.SaveFrameInfo(calledFrom)
 	settings.width	= FurCGui:GetWidth()
 	settings.height	= FurCGui:GetHeight()

-	FurC.UpdateInventoryScroll()
+  FurC.UpdateInventoryScroll()

 end

@@ -49,8 +49,8 @@ function FurC.ChangeTemplateFromButton(value)
 	local otherControl = FurCGui_Header_Bar1_TemplateTiny

 	if value then
-		otherControl = FurCGui_Header_Bar1_TemplateLarge
-		control = FurCGui_Header_Bar1_TemplateTiny
+		otherControl  = FurCGui_Header_Bar1_TemplateLarge
+		control       = FurCGui_Header_Bar1_TemplateTiny
 	end
 	control:SetHidden(true)
 	otherControl:SetHidden(false)
@@ -116,7 +116,6 @@ function FurC.GuiOnScroll(control, delta)
 	if delta == 0 then return end

 	local slider = FurCGui_ListHolder_Slider
---	slider.locked = true
 	-- negative delta means scrolling down

 	local value = (FurCGui_ListHolder.dataOffset - delta)
@@ -128,7 +127,6 @@ function FurC.GuiOnScroll(control, delta)

 	FurC.UpdateInventoryScroll()

-
 	slider:SetValue(FurCGui_ListHolder.dataOffset)

 	FurC.GuiLineOnMouseEnter(moc())
diff --git a/FurCFilter.lua b/FurCFilter.lua
index 45000af..9aa265f 100644
--- a/FurCFilter.lua
+++ b/FurCFilter.lua
@@ -1,20 +1,20 @@
 local p 						= FurC.DebugOut -- debug function calling zo_strformat with up to 10 args

-local searchString 				= ""
-local dropdownChoiceVersion		= 1
-local dropdownTextVersion		= "All"
-local ddSource					= 1
-local dropdownTextSource		= "All"
-local dropdownChoiceCharacter	= 1
-local ddTextCharacter			= "Accountwide"
-local qualityFilter 			= {}
-local craftingTypeFilter 		= {}
-
-local hideBooks 				= false
-local hideRumours				= false
-local hideCrownStore			= false
-local mergeLuxuryAndSales		= false
-local filterAllOnTextSearch		= false
+local searchString              = ""
+local dropdownChoiceVersion     = 1
+local dropdownTextVersion		    = "All"
+local ddSource					        = 1
+local dropdownTextSource        = "All"
+local dropdownChoiceCharacter	  = 1
+local ddTextCharacter           = "Accountwide"
+local qualityFilter             = {}
+local craftingTypeFilter        = {}
+
+local hideBooks 				        = false
+local hideRumours				        = false
+local hideCrownStore            = false
+local mergeLuxuryAndSales       = false
+local filterAllOnTextSearch     = false

 local sourceIndices

@@ -27,50 +27,49 @@ function FurC.RefreshFilters(filterUseDefaults, skipRefresh)
 	filterTask:Cancel()
 	filterTask:Call(FurC.SetFilter)
 	if skipRefresh then return end
-	filterTask:Then(FurC.RefreshContainer)
+	filterTask:Then(FurC.UpdateGui)
 end

 function FurC.SetFilter()

-	p("FurC.SetFilter(<<1>>)", tostring(useDefaults))
+--	p("FurC.SetFilter(<<1>>)")

-    ClearTooltip(InformationTooltip)
-	sourceIndices 					= FurC.SourceIndices
+  ClearTooltip(InformationTooltip)
 	searchString 					= FurC.GetSearchFilter()

 	if useDefaults then
-		dropdownChoiceVersion		= tonumber(FurC.GetDefaultDropdownChoice("Version"))
-		ddSource					= FurC.GetDefaultDropdownChoice("Source")
-		dropdownChoiceCharacter 	= FurC.GetDefaultDropdownChoice("Character")
+		dropdownChoiceVersion      = tonumber(FurC.GetDefaultDropdownChoice("Version"))
+		ddSource                   = FurC.GetDefaultDropdownChoice("Source")
+		dropdownChoiceCharacter    = FurC.GetDefaultDropdownChoice("Character")
 	else
-		dropdownChoiceVersion		= tonumber(FurC.GetDropdownChoice("Version"))
-		ddSource					= FurC.GetDropdownChoice("Source")
-		dropdownChoiceCharacter 	= FurC.GetDropdownChoice("Character")
+		dropdownChoiceVersion      = tonumber(FurC.GetDropdownChoice("Version"))
+		ddSource                   = FurC.GetDropdownChoice("Source")
+		dropdownChoiceCharacter 	 = FurC.GetDropdownChoice("Character")
 	end

 	-- we need to hold the text here, in case it's not "All"
-	ddTextCharacter				= FurC.GetDropdownChoiceTextual("Character")
+	ddTextCharacter				       = FurC.GetDropdownChoiceTextual("Character")

-	qualityFilter 				= FurC.GetFilterQuality()
-	craftingTypeFilter			= FurC.GetFilterCraftingType()
-	hideBooks					= FurC.GetHideBooks()
-	mergeLuxuryAndSales 		= FurC.GetMergeLuxuryAndSales()
+	qualityFilter                = FurC.GetFilterQuality()
+	craftingTypeFilter			     = FurC.GetFilterCraftingType()
+	hideBooks					           = FurC.GetHideBooks()
+	mergeLuxuryAndSales 		     = FurC.GetMergeLuxuryAndSales()

 	-- p("Version: <<1>>, Source: <<2>>, Character: <<3>>, qualityFilter: <<4>>, ",
 	-- dropdownChoiceVersion, ddSource, dropdownChoiceCharacter, qualityFilter)


-    -- ignore filtered items when there's a text search?
+  -- ignore filtered items when there's a text search?
 	-- TODO this is broken
-	showBooksOnTextSearch, showRumoursOnTextSearch, showCrownStoreOnTextSearch = false, false, false
+	showRumoursOnTextSearch, showCrownStoreOnTextSearch = false, false

 	if #searchString > 0 and FurC.GetFilterAllOnText() then
-		showBooksOnTextSearch		= not FurC.GetFilterAllOnTextNoBooks()
-		showRumoursOnTextSearch		= not FurC.GetFilterAllOnTextNoRumour() and FurC.GetHideRumourRecipes() and ddSource ~= FURC_RUMOUR
-		showCrownStoreOnTextSearch 	= not FurC.GetFilterAllOnTextNoCrown() and FurC.GetHideCrownStoreItems() and ddSource ~= FURC_CROWN
+		hideBooks                   = not FurC.GetFilterAllOnTextNoBooks()
+		showRumoursOnTextSearch     = not FurC.GetFilterAllOnTextNoRumour() and FurC.GetHideRumourRecipes() and ddSource ~= FURC_RUMOUR
+		showCrownStoreOnTextSearch  = not FurC.GetFilterAllOnTextNoCrown() and FurC.GetHideCrownStoreItems() and ddSource ~= FURC_CROWN
 	end

-	p("showRumours: <<1>>, showCrownStore: <<2>>", tostring(showRumoursOnTextSearch), tostring(showCrownStoreOnTextSearch))
+--	p("showRumours: <<1>>, showCrownStore: <<2>>", tostring(showRumoursOnTextSearch), tostring(showCrownStoreOnTextSearch))

 end

@@ -104,26 +103,24 @@ local validSourcesForOther = {
 local function matchSourceDropdown()

 	-- "All", don't care
-	if FURC_NONE					== ddSource then
-		return true
-    end
-    if recipeArray.origin == FURC_CRAFTING then
-        if ddSource == FURC_CRAFTING then return true end
-        local matchingDropdownSource = (isRecipeArrayKnown(recipeArray) and FURC_CRAFTING_KNOWN) or FURC_CRAFTING_UNKNOWN
-        return matchingDropdownSource == ddSource
-    end
-	if FURC_FAVE 					    == ddSource then
-		return recipeArray.favorite
-    end
+	if FURC_NONE					== ddSource then return true end
+  if FURC_FAVE              == ddSource then
+    return recipeArray.favorite
+  end
+  if recipeArray.origin == FURC_CRAFTING then
+      if ddSource == FURC_CRAFTING then return true end
+      local matchingDropdownSource = (isRecipeArrayKnown(recipeArray) and FURC_CRAFTING_KNOWN) or FURC_CRAFTING_UNKNOWN
+      return matchingDropdownSource == ddSource
+  end
 	if FURC_VENDOR 					    == ddSource then
 		return (recipeArray.origin 		== FURC_VENDOR or (mergeLuxuryAndSales and recipeArray.origin == FURC_LUXURY))
-    end
+  end
 	if FURC_WRIT_VENDOR 			    == ddSource then
 		return recipeArray.origin 		== FURC_ROLIS
-    end
+  end
 	if FURC_OTHER					    == ddSource then
 		return validSourcesForOther[recipeArray.origin]
-    end
+  end

 	-- we're checking character knowledge
 	return recipeArray.origin  == ddSource
@@ -136,10 +133,10 @@ end

 local function matchSearchString()
 	if #searchString == 0 then return true end
-    local caseSensitive = nil ~= string.match(searchString, "%u")
-    local itemName = GetItemLinkName(itemLink)
-    local matchme = (caseSensitive and itemName) or string.lower(itemName)
-    return string.match(matchme, searchString)
+  local caseSensitive = nil ~= string.match(searchString, "%u")
+  local itemName = GetItemLinkName(itemLink)
+  local matchme = (caseSensitive and itemName) or string.lower(itemName)
+  return string.match(matchme, searchString)
 end

 local function matchCraftingTypeFilter()
@@ -153,12 +150,12 @@ end

 local function shouldBeHidden()
 	if recipeArray.origin == FURC_RUMOUR then
-		return not (showRumours or ddSource == FURC_RUMOUR)
+		return not (showRumoursOnTextSearch   or ddSource == FURC_RUMOUR)
 	end
 	if recipeArray.origin == FURC_CROWN then
-		return not (showCrownStore or ddSource == FURC_CROWN)
+		return not (showCrownStoreOnTextSearch or ddSource == FURC_CROWN)
 	end
-	if (not hideBooks) or showBooksOnTextSearch then return false end
+	if not hideBooks then return false end
 	local versionData = FurC.Books[recipeArray.version]
 	if nil == versionData then return end
 	return nil ~= versionData[itemId]
@@ -173,20 +170,21 @@ function FurC.MatchFilter(currentItemId, currentRecipeArray)
 	-- hide rumour, crown store items and books?
 	if shouldBeHidden(itemId, recipeArray) then return false end

+  if not matchSearchString() then
+    return false
+  end
+
 	itemType, sItemType = GetItemLinkItemType(itemLink)
     if 0 == itemType and 0 == sItemType then
         p("invalid item type for <<1>> (<<2>>)", currentItemId, FurC.GetItemLink(currentItemId))
         return false
     end

-
-
 	if not matchDropdownFilter() then return false end


-    if not matchSearchString() 												    then return false end
-	if not (FurC.settings.filterCraftingTypeAll or matchCraftingTypeFilter())	then return false end
-	if not (FurC.settings.filterQualityAll 		or matchQualityFilter())		then return false end
+	if not (FurC.settings.filterCraftingTypeAll or matchCraftingTypeFilter())	 then return false end
+	if not (FurC.settings.filterQualityAll 		or matchQualityFilter())		     then return false end

 	return true
 end
diff --git a/FurCGui.lua b/FurCGui.lua
index 58890e3..7568ca0 100644
--- a/FurCGui.lua
+++ b/FurCGui.lua
@@ -1,12 +1,11 @@
-FurC.SlotTemplate			= "FurC_SlotTemplate"
-FurC.KnowledgeFilter 		= "All (Accountwide)"
-FurC.SearchString 			= ""
-FurC.ScrollSortUp 			= true
-local task 					= LibStub("LibAsync"):Create("FurnitureCatalogue_updateLineVisibility")
-local otherTask 			= LibStub("LibAsync"):Create("FurnitureCatalogue_ToggleGui")
-local async 				= LibStub("LibAsync"):Create("FurnitureCatalogue_forLoop")
-local FURC_S_FILTERDEFAULT 	= GetString(SI_FURC_TEXTBOX_FILTER_DEFAULT)
-local cachedDefaults
+FurC.SlotTemplate     = "FurC_SlotTemplate"
+FurC.KnowledgeFilter  = "All (Accountwide)"
+FurC.SearchString     = ""
+FurC.ScrollSortUp     = true
+local checkWasUpdated = false
+local task            = LibStub("LibAsync"):Create("FurnitureCatalogue_updateLineVisibility")
+local otherTask       = LibStub("LibAsync"):Create("FurnitureCatalogue_ToggleGui")
+

 local p 		= FurC.DebugOut -- debug function calling zo_strformat with up to 10 args
 local sortTable = FurC.SortTable
@@ -26,68 +25,65 @@ function FurC.CalculateMaxLines()
 	return FurCGui_ListHolder.maxLines
 end

-local function fillLine(curLine, curData, lineIndex)
-	if nil == curLine or nil == curData then return end
-
-	local dataLines = FurCGui_ListHolder.dataLines
-	local maxLines = FurCGui_ListHolder.maxLines
-
-	local hidden = lineIndex > #dataLines or lineIndex > maxLines
-	curLine:SetHidden(hidden)
-	if nil == curData or curLine:IsHidden() then
-		curLine.itemLink = ""
-		curLine.itemId 	 = 0
-		curLine.icon:SetTexture(nil)
-		curLine.icon:SetAlpha(0)
-		curLine.text:SetText("")
-		curLine.mats:SetText("")
-	else
-		curLine.itemLink 	= curData.itemLink
-		curLine.itemId 	 	= curData.itemId
-		curLine.icon:SetTexture(GetItemLinkIcon(curData.itemLink))
-		curLine.icon:SetAlpha(1)
-		local text 			=  curData.itemLink:gsub("H1", "H0")
-		curLine.text:SetText(((curData.favorite and "* ") or "").. text)
-		local mats = FurC.GetItemDescription(curData.itemId, curData)
-		curLine.mats:SetText(mats)
+local function updateLineVisibility()
+
+
+	local function fillLine(curLine, curData, lineIndex)
+		if nil == curLine then return end
+
+		local dataLines = FurCGui_ListHolder.dataLines
+		local maxLines = FurCGui_ListHolder.maxLines
+
+		local hidden = lineIndex > #dataLines or lineIndex > maxLines
+		curLine:SetHidden(hidden)
+		if nil == curData or curLine:IsHidden() then
+			curLine.itemLink = ""
+			curLine.itemId 	 = 0
+			curLine.icon:SetTexture(nil)
+			curLine.icon:SetAlpha(0)
+			curLine.text:SetText("")
+			curLine.mats:SetText("")
+		else
+			curLine.itemLink 	= curData.itemLink
+			curLine.itemId 	 	= curData.itemId
+			curLine.icon:SetTexture(GetItemLinkIcon(curData.itemLink))
+			curLine.icon:SetAlpha(1)
+			local text 			=  curData.itemLink:gsub("H1", "H0")
+			curLine.text:SetText(((curData.favorite and "* ") or "").. text)
+			local mats = FurC.GetItemDescription(curData.itemId, curData)
+			curLine.mats:SetText(mats)
+		end
 	end
-end

-local function refreshLineContainer()
-	p("refreshLineContainer")
-	local maxLines 	= FurC.CalculateMaxLines()
-	local dataLines = FurCGui_ListHolder.dataLines
+	local isEmpty = #FurCGui_ListHolder.dataLines == 0

-	local offset =	FurCGui_ListHolder_Slider:GetValue()
-	if offset > #dataLines then offset = 0 end
-	FurCGui_ListHolder_Slider:SetValue(offset)
+	FurCGui_ListHolder:SetHidden(	isEmpty)
+	FurCGui_Empty:SetHidden(		not	isEmpty)

-	local curLine, curData
+	if isEmpty then return end

-	for i=1, FurCGui_ListHolder:GetNumChildren() do
-		curLine = FurCGui_ListHolder.lines[i]
-		curData = FurCGui_ListHolder.dataLines[offset + i]
-		fillLine(curLine, curData, i)
-	end
-	FurCGui_ListHolder_Slider:SetMinMax(0, #dataLines)
-end
+	FurC.CalculateMaxLines()

-function FurC.UpdateLineVisibility()
-	if FurCGui:IsHidden() then return end
-
-	p("FurC.UpdateLineVisibility()")
-
+	task:Call(function()
+		local maxLines = FurCGui_ListHolder.maxLines
+		local dataLines = FurCGui_ListHolder.dataLines

-	local isEmpty = #FurCGui_ListHolder.dataLines == 0
+		local offset =	FurCGui_ListHolder_Slider:GetValue()
+		if offset > #dataLines then offset = 0 end
+		FurCGui_ListHolder_Slider:SetValue(offset)

-	FurCGui_ListHolder:SetHidden(	isEmpty)
-	FurCGui_Empty:SetHidden(		not	isEmpty)
+		local curLine, curData

-	if isEmpty then return end
-
-	refreshLineContainer()
+		for i=1, FurCGui_ListHolder:GetNumChildren() do
+			curLine = FurCGui_ListHolder.lines[i]
+			curData = FurCGui_ListHolder.dataLines[offset + i]
+			fillLine(curLine, curData, i)
+		end
+		FurCGui_ListHolder_Slider:SetMinMax(0, #dataLines)
+
+	end)
 end
-local updateLineVisibility = FurC.UpdateLineVisibility
+FurC.UpdateLineVisibility =	updateLineVisibility

 function FurC.IsLoading(isBuffering)

@@ -132,44 +128,32 @@ local function updateScrollDataLinesData()
 	end)

 end
-
-
-
+local FURC_S_FILTERDEFAULT = GetString(SI_FURC_TEXTBOX_FILTER_DEFAULT)
+local cachedDefaults
 local function startLoading()
     FurC.IsLoading(true)
-    FurC.RefreshFilters(cachedDefaults, true)
+    local text = FurC_SearchBox:GetText()
+    FurC_SearchBoxText:SetText((#text == 0 and FURC_S_FILTERDEFAULT) or "")
+    FurC.LastFilter = useDefaults
+    FurC.RefreshFilters(useDefaults, true)
 end
 local function stopLoading()
     FurC.IsLoading(false)
-    FurC.UpdateLineVisibility()
+    updateLineVisibility()
 end
 local function stopLoadingWithDelay()
     zo_callLater(stopLoading, 500)
 end

-
-function FurC.RefreshContainer()
-	cachedDefaults = false
-	otherTask:Cancel()
-	otherTask:Call(startLoading)
-	:Then(updateScrollDataLinesData)
-	:Then(stopLoadingWithDelay)
-end
-
--- will do a full UI refresh
-function FurC.UpdateGui(useDefaults, skipRefresh)
-
+function FurC.UpdateGui(useDefaults)
 	if FurCGui:IsHidden() then return end
-	p("FurC.UpdateGui(<<1>>)", tostring(useDefaults))
-    cachedDefaults = useDefaults
-	otherTask:Cancel()
+  cachedDefaults = useDefaults
 	otherTask:Call(startLoading)
 	:Then(updateScrollDataLinesData)
 	:Then(stopLoadingWithDelay)
 end

 function FurC.UpdateInventoryScroll()
-	p("FurC.UpdateInventoryScroll()")
 	local index = 0
 	FurCGui_ListHolder.dataOffset = FurCGui_ListHolder.dataOffset or 0
 	FurCGui_ListHolder.dataOffset = math.max(FurCGui_ListHolder.dataOffset, 0)
@@ -180,6 +164,7 @@ function FurC.UpdateInventoryScroll()
 	if total > 0 then
 		FurCGui_ListHolder_Slider:SetMinMax(0, total)
 	end
+
 	updateLineVisibility()
 end

@@ -463,31 +448,20 @@ local function createGui()
 	createInventoryDropdown("Character")
 	FurC.ChangeTemplateFromButton(FurC.GetTinyUi())
 	FurC.SetFontSize(FurC.GetFontSize())
-	FurC.LoadFrameInfo(true)
-	-- FurC.InitFilters()
-end
+	FurC.LoadFrameInfo()

-local function showGui()
-	FurC.UpdateGui(FurC.GetResetDropdownChoice())
 end

 function FurnitureCatalogue_Toggle()
-
-	p("\n")
-	p("\n")
 	SCENE_MANAGER:ToggleTopLevel(FurCGui)
-	if FurCGui:IsHidden() then
-		FurC.FilterTask:Cancel()
-		return
-	end
+	if FurCGui:IsHidden() then return end
 	FurCGui_Empty:SetHidden(true)
-	zo_callLater(showGui, 500)
+	zo_callLater(function() FurC.UpdateGui(FurC.GetResetDropdownChoice()) end, 500)
 end


 function FurC.InitGui()

-	p("FurC.InitGui()")
 	local control = FurCGui
 	local settings = FurC.settings["gui"]
 	FurC.GuiElements = {}
@@ -507,7 +481,5 @@ function FurC.InitGui()
 	FurC_Label:GetNamedChild("_2"):SetText(GetString(SI_FURC_LABEL_ENTRIES))

 	SCENE_MANAGER:RegisterTopLevel(FurCGui, false)
-
-	FurC.RefreshFilters(true, true)
 end

diff --git a/FurnitureCatalogue.txt b/FurnitureCatalogue.txt
index 9ef5a6b..02d3752 100644
--- a/FurnitureCatalogue.txt
+++ b/FurnitureCatalogue.txt
@@ -1,6 +1,6 @@
 ## Title: FurnitureCatalogue
 ## Author: manavortex
-## Version: 2.66
+## Version: 2.7
 ## APIVersion: 100024 100025
 ## SavedVariables: FurnitureCatalogue_Settings
 ## OptionalDependsOn: pChat
diff --git a/libs/LibCustomMenu/libs/LibVotansAddonList/lang/de.lua b/libs/LibCustomMenu/libs/LibVotansAddonList/lang/de.lua
index f14d69d..f2c0e4e 100644
--- a/libs/LibCustomMenu/libs/LibVotansAddonList/lang/de.lua
+++ b/libs/LibCustomMenu/libs/LibVotansAddonList/lang/de.lua
@@ -1,4 +1,4 @@
-SafeAddString(SI_VOTANS_ADDONLIST_LIBS, "Bibliotheken")
+SafeAddString(SI_VOTANS_ADDONLIST_LIBS, "Bibliotheken")
 SafeAddString(SI_VOTANS_ADDONLIST_LIB, "Bibliothek")
 SafeAddString(SI_VOTANS_ADDONLIST_OUTDATED, "Kompatibilität mit der aktuellen Spielversion unbekannt.\nBitte informieren Sie sich, ob eine aktualisierte Version verfügbar ist oder Probleme bekannt sind.")
 SafeAddString(SI_ADDON_MANAGER_LOAD_OUT_OF_DATE_ADDONS, "Erweiterungen anderer Spielversionen zulassen", 1)
diff --git a/libs/LibCustomMenu/libs/LibVotansAddonList/lang/fr.lua b/libs/LibCustomMenu/libs/LibVotansAddonList/lang/fr.lua
index 4ee8e76..e73650d 100644
--- a/libs/LibCustomMenu/libs/LibVotansAddonList/lang/fr.lua
+++ b/libs/LibCustomMenu/libs/LibVotansAddonList/lang/fr.lua
@@ -1,4 +1,4 @@
-SafeAddString(SI_VOTANS_ADDONLIST_LIBS, "Bibliothèques")
+SafeAddString(SI_VOTANS_ADDONLIST_LIBS, "Bibliothèques")
 SafeAddString(SI_VOTANS_ADDONLIST_LIB, "Bibliothèque")
 SafeAddString(SI_VOTANS_ADDONLIST_OUTDATED, "Compatibilité avec la version actuelle du jeu inconnue.\nVeuillez vérifier si une nouvelle version est disponible ou s'il existe des problèmes connus.")
 SafeAddString(SI_ADDON_MANAGER_LOAD_OUT_OF_DATE_ADDONS, "Autoriser extensions d'autres versions de client", 1)
\ No newline at end of file
diff --git a/locale/fr.lua b/locale/fr.lua
index 43e2f5d..d8dd22f 100644
--- a/locale/fr.lua
+++ b/locale/fr.lua
@@ -1,4 +1,4 @@
-local filterDisabled = "disables this filter"
+local filterDisabled = "disables this filter"
 local strings = {

 	FURC_AV_RAZ									= "Razoufa",
diff --git a/startup.lua b/startup.lua
index 77dc2e1..64f18cd 100644
--- a/startup.lua
+++ b/startup.lua
@@ -1,144 +1,143 @@
-FurnitureCatalogue 					= {}
-FurnitureCatalogue.name				= "FurnitureCatalogue"
-FurnitureCatalogue.author			= "manavortex"
-FurnitureCatalogue.version          = 2.66
+FurnitureCatalogue                = {}
+FurnitureCatalogue.name           = "FurnitureCatalogue"
+FurnitureCatalogue.author			    = "manavortex"
+FurnitureCatalogue.version        = 2.7
 FurnitureCatalogue.CharacterName	= nil
-FurnitureCatalogue.settings			= {}
+FurnitureCatalogue.settings			  = {}

-FurC 								= FurnitureCatalogue
+FurC 								     = FurnitureCatalogue

-FurC.AchievementVendors				= {}
-FurC.LuxuryFurnisher				= {}
-FurC.Recipes						= {}
-FurC.Rolis							= {}
-FurC.Faustina						= {}
+FurC.AchievementVendors   = {}
+FurC.LuxuryFurnisher      = {}
+FurC.Recipes              = {}
+FurC.Rolis                = {}
+FurC.Faustina             = {}
 FurC.RolisRecipes					= {}
-FurC.FaustinaRecipes				= {}
-FurC.Books							= {}
+FurC.FaustinaRecipes      = {}
+FurC.Books                = {}
 FurC.EventItems						= {}
-FurC.PVP							= {}
-FurC.MiscItemSources                = {}
+FurC.PVP                  = {}
+FurC.MiscItemSources      = {}

 -- for search so it doesn't lag
 FurC.FilterTask =  LibStub("LibAsync"):Create("FurnitureCatalogue_FilterOnTextSearch")

 -- versioning
-FURC_HOMESTEAD						= 2
-FURC_MORROWIND						= 3
-FURC_REACH							= 4
-FURC_CLOCKWORK						= 5
-FURC_DRAGONS						= 6
-FURC_ALTMER						    = 7
-FURC_WEREWOLF					    = 8
-FURC_SLAVES						    = 9
+FURC_HOMESTEAD    = 2
+FURC_MORROWIND    = 3
+FURC_REACH        = 4
+FURC_CLOCKWORK    = 5
+FURC_DRAGONS      = 6
+FURC_ALTMER       = 7
+FURC_WEREWOLF     = 8
+FURC_SLAVES       = 9

 FurC.Const                          = {
     vendorColor     = "d68957",
     goldColor 	    = "e5da40",
-    apColor 	    = "25C31E",
-    tvColor		    = "5EA4FF",
-    voucherColor	= "82BCFF",
+    apColor         = "25C31E",
+    tvColor         = "5EA4FF",
+    voucherColor    = "82BCFF",
 }

 local defaults 						= {

-	hideMats						= true,
-	dontScanTradingHouse 			= false,
-	enableDebug 					= false,
+	hideMats						   = true,
+	dontScanTradingHouse   = false,
+	enableDebug            = false,

-	data 				            = {},
-	filterCraftingType 				= {},
-	filterQuality 					= {},
+	data                   = {},
+	filterCraftingType     = {},
+	filterQuality          = {},

-	resetDropdownChoice				= false,
-	useTinyUi						= false,
-	useInventoryIcons				= true,
-	fontSize						= 18,
+	resetDropdownChoice    = false,
+	useTinyUi              = true,
+	useInventoryIcons      = true,
+	fontSize               = 18,

 	gui								= {
 		lastX						= 100,
 		lastY						= 100,
 		width						= 650,
-		height 						= 550,
+		height          = 550,
 	},

-	dropdownDefaults				= {
+	dropdownDefaults		= {
 		Source						= 1,
 		Character					= 1,
 		Version						= 1,
 	},

-	accountCharacters				= {},
+	accountCharacters		= {},

 	version 						= 2.0,

 	-- tooltips
-	disableTooltips					= false,
-	coloredTooltips 				= true,
-	hideKnowledge					= false,
+	disableTooltips			= false,
+	coloredTooltips 		= true,
+	hideKnowledge				= false,

 	hideBooks						= true,
-	hideDoubtfuls					= true,
-	hideCrownstore					= true,
-	hideRumourEntry					= false,
-	hideCrownStoreEntry				= false,
-	wipeDatabase					= false,
-	startupSilently					= true,
+	hideDoubtfuls				= true,
+	hideCrownstore			= true,
+	hideRumourEntry			= false,
+	wipeDatabase				= false,
+	startupSilently			= true,

 }

-FURC_NONE				= 1
-FURC_FAVE 				= FURC_NONE +1
-FURC_CRAFTING			= FURC_FAVE +1
+FURC_NONE             = 1
+FURC_FAVE             = FURC_NONE +1
+FURC_CRAFTING         = FURC_FAVE +1
 FURC_CRAFTING_KNOWN		= FURC_CRAFTING +1
 FURC_CRAFTING_UNKNOWN	= FURC_CRAFTING_KNOWN +1
-FURC_VENDOR 			= FURC_CRAFTING_UNKNOWN +1
-FURC_PVP 				= FURC_VENDOR +1
-FURC_CROWN 				= FURC_PVP +1
-FURC_RUMOUR 			= FURC_CROWN +1
-FURC_LUXURY 			= FURC_RUMOUR +1
-FURC_OTHER 				= FURC_LUXURY +1
-FURC_ROLIS 			    = FURC_OTHER +1
-FURC_DROP 				= FURC_ROLIS +1
-FURC_WRIT_VENDOR 		= FURC_DROP +1
-FURC_JUSTICE 			= FURC_WRIT_VENDOR +1
-FURC_FISHING 			= FURC_JUSTICE +1
-FURC_GUILDSTORE 		= FURC_FISHING +1
+FURC_VENDOR           = FURC_CRAFTING_UNKNOWN +1
+FURC_PVP              = FURC_VENDOR +1
+FURC_CROWN            = FURC_PVP +1
+FURC_RUMOUR           = FURC_CROWN +1
+FURC_LUXURY           = FURC_RUMOUR +1
+FURC_OTHER            = FURC_LUXURY +1
+FURC_ROLIS            = FURC_OTHER +1
+FURC_DROP             = FURC_ROLIS +1
+FURC_WRIT_VENDOR      = FURC_DROP +1
+FURC_JUSTICE          = FURC_WRIT_VENDOR +1
+FURC_FISHING          = FURC_JUSTICE +1
+FURC_GUILDSTORE       = FURC_FISHING +1
 FURC_FESTIVAL_DROP 		= FURC_GUILDSTORE +1
 FURC_EMPTY_STRING 		= ""

 local sourceIndicesKeys = {}
 local function getSourceIndicesKeys()
-	sourceIndicesKeys[FURC_NONE] 						= "off"
-	sourceIndicesKeys[FURC_FAVE] 						= "favorites"
-	sourceIndicesKeys[FURC_CRAFTING] 					= "craft_all"
-	sourceIndicesKeys[FURC_CRAFTING_KNOWN] 				= "craft_known"
-	sourceIndicesKeys[FURC_CRAFTING_UNKNOWN] 			= "craft_unknown"
-	sourceIndicesKeys[FURC_VENDOR] 						= "purch_gold"
-	sourceIndicesKeys[FURC_PVP] 						= "purch_ap"
-	sourceIndicesKeys[FURC_CROWN] 					    = "crownstore"
-    sourceIndicesKeys[FURC_RUMOUR] 					    = "rumour"
-    sourceIndicesKeys[FURC_LUXURY] 					    = "luxury"
-	sourceIndicesKeys[FURC_OTHER] 						= "other"
-	sourceIndicesKeys[FURC_WRIT_VENDOR] 				= "writ_vendor"
+	sourceIndicesKeys[FURC_NONE]             = "off"
+	sourceIndicesKeys[FURC_FAVE]             = "favorites"
+	sourceIndicesKeys[FURC_CRAFTING]         = "craft_all"
+	sourceIndicesKeys[FURC_CRAFTING_KNOWN]   = "craft_known"
+	sourceIndicesKeys[FURC_CRAFTING_UNKNOWN] = "craft_unknown"
+	sourceIndicesKeys[FURC_VENDOR]           = "purch_gold"
+	sourceIndicesKeys[FURC_PVP]              = "purch_ap"
+	sourceIndicesKeys[FURC_CROWN]            = "crownstore"
+  sourceIndicesKeys[FURC_RUMOUR]           = "rumour"
+  sourceIndicesKeys[FURC_LUXURY] 					 = "luxury"
+	sourceIndicesKeys[FURC_OTHER]            = "other"
+	sourceIndicesKeys[FURC_WRIT_VENDOR]      = "writ_vendor"
 	return sourceIndicesKeys
 end
 FurC.GetSourceIndicesKeys = getSourceIndicesKeys

 local choicesSource = {}
 local function getChoicesSource()
-	choicesSource[FURC_NONE]						= GetString(SI_FURC_NONE)
-	choicesSource[FURC_FAVE] 						= GetString(SI_FURC_FAVE)
-	choicesSource[FURC_CRAFTING] 					= GetString(SI_FURC_CRAFTING)
-	choicesSource[FURC_CRAFTING_KNOWN] 				= GetString(SI_FURC_CRAFTING_KNOWN)
-	choicesSource[FURC_CRAFTING_UNKNOWN] 			= GetString(SI_FURC_CRAFTING_UNKNOWN)
-	choicesSource[FURC_VENDOR] 						= GetString(SI_FURC_VENDOR)
-	choicesSource[FURC_PVP] 						= GetString(SI_FURC_PVP)
-	choicesSource[FURC_WRIT_VENDOR] 				= GetString(SI_FURC_STRING_WRIT_VENDOR)
-	choicesSource[FURC_CROWN] 					    = GetString(SI_FURC_CROWN)
-	choicesSource[FURC_RUMOUR] 					    = GetString(SI_FURC_RUMOUR)
-    choicesSource[FURC_LUXURY] 					    = GetString(SI_FURC_LUXURY)
-	choicesSource[FURC_OTHER] 				        = GetString(SI_FURC_OTHER)
+	choicesSource[FURC_NONE]             = GetString(SI_FURC_NONE)
+	choicesSource[FURC_FAVE]             = GetString(SI_FURC_FAVE)
+	choicesSource[FURC_CRAFTING]         = GetString(SI_FURC_CRAFTING)
+	choicesSource[FURC_CRAFTING_KNOWN]   = GetString(SI_FURC_CRAFTING_KNOWN)
+	choicesSource[FURC_CRAFTING_UNKNOWN] = GetString(SI_FURC_CRAFTING_UNKNOWN)
+	choicesSource[FURC_VENDOR]           = GetString(SI_FURC_VENDOR)
+	choicesSource[FURC_PVP]              = GetString(SI_FURC_PVP)
+	choicesSource[FURC_WRIT_VENDOR]      = GetString(SI_FURC_STRING_WRIT_VENDOR)
+	choicesSource[FURC_CROWN]            = GetString(SI_FURC_CROWN)
+	choicesSource[FURC_RUMOUR]           = GetString(SI_FURC_RUMOUR)
+  choicesSource[FURC_LUXURY]           = GetString(SI_FURC_LUXURY)
+	choicesSource[FURC_OTHER]            = GetString(SI_FURC_OTHER)

 	return choicesSource
 end
@@ -146,18 +145,18 @@ FurC.GetChoicesSource = getChoicesSource

 local tooltipsSource = {}
 local function getTooltipsSource()
-	tooltipsSource[FURC_NONE]						= GetString(SI_FURC_NONE_TT)
-	tooltipsSource[FURC_FAVE] 						= GetString(SI_FURC_FAVE_TT)
-	tooltipsSource[FURC_CRAFTING] 					= GetString(SI_FURC_CRAFTING_TT)
-	tooltipsSource[FURC_CRAFTING_KNOWN] 			= GetString(SI_FURC_CRAFTING_KNOWN_TT)
-	tooltipsSource[FURC_CRAFTING_UNKNOWN] 			= GetString(SI_FURC_CRAFTING_UNKNOWN_TT)
-	tooltipsSource[FURC_VENDOR] 					= GetString(SI_FURC_VENDOR_TT)
-	tooltipsSource[FURC_PVP] 						= GetString(SI_FURC_PVP_TT)
-    tooltipsSource[FURC_CROWN] 					    = GetString(SI_FURC_CROWN_TT)
-	tooltipsSource[FURC_WRIT_VENDOR] 				= GetString(SI_FURC_STRING_WRIT_VENDOR_TT)
-    tooltipsSource[FURC_RUMOUR] 				    = GetString(SI_FURC_RUMOUR_TT)
-    tooltipsSource[FURC_LUXURY] 				    = GetString(SI_FURC_LUXURY_TT)
-	tooltipsSource[FURC_OTHER] 				        = GetString(SI_FURC_OTHER_TT)
+	tooltipsSource[FURC_NONE]              = GetString(SI_FURC_NONE_TT)
+	tooltipsSource[FURC_FAVE]              = GetString(SI_FURC_FAVE_TT)
+	tooltipsSource[FURC_CRAFTING]          = GetString(SI_FURC_CRAFTING_TT)
+	tooltipsSource[FURC_CRAFTING_KNOWN]    = GetString(SI_FURC_CRAFTING_KNOWN_TT)
+	tooltipsSource[FURC_CRAFTING_UNKNOWN]  = GetString(SI_FURC_CRAFTING_UNKNOWN_TT)
+	tooltipsSource[FURC_VENDOR]            = GetString(SI_FURC_VENDOR_TT)
+	tooltipsSource[FURC_PVP]               = GetString(SI_FURC_PVP_TT)
+  tooltipsSource[FURC_CROWN]             = GetString(SI_FURC_CROWN_TT)
+	tooltipsSource[FURC_WRIT_VENDOR] 			 = GetString(SI_FURC_STRING_WRIT_VENDOR_TT)
+  tooltipsSource[FURC_RUMOUR] 				   = GetString(SI_FURC_RUMOUR_TT)
+  tooltipsSource[FURC_LUXURY] 				   = GetString(SI_FURC_LUXURY_TT)
+	tooltipsSource[FURC_OTHER] 				     = GetString(SI_FURC_OTHER_TT)

 return tooltipsSource
 end
@@ -165,10 +164,10 @@ end
 FurnitureCatalogue.DropdownData = {

 	ChoicesVersion	= {
-		[1] 				= GetString(SI_FURC_FILTER_VERSION_OFF),
+		[1] 				      = GetString(SI_FURC_FILTER_VERSION_OFF),
 		[FURC_HOMESTEAD] 	= GetString(SI_FURC_FILTER_VERSION_HS	),
 		[FURC_MORROWIND] 	= GetString(SI_FURC_FILTER_VERSION_M	),
-		[FURC_REACH] 		= GetString(SI_FURC_FILTER_VERSION_R	),
+		[FURC_REACH] 		  = GetString(SI_FURC_FILTER_VERSION_R	),
 		[FURC_CLOCKWORK] 	= GetString(SI_FURC_FILTER_VERSION_CC	),
 		[FURC_DRAGONS] 		= GetString(SI_FURC_FILTER_VERSION_DRAGON),
 		[FURC_ALTMER] 		= GetString(SI_FURC_FILTER_VERSION_ALTMER),
@@ -176,12 +175,12 @@ FurnitureCatalogue.DropdownData = {
 		[FURC_SLAVES] 		= GetString(SI_FURC_FILTER_VERSION_SLAVES),
 	},
 	TooltipsVersion	= {
-		[1] 				=  GetString(SI_FURC_FILTER_VERSION_OFF_TT),
-		[FURC_HOMESTEAD] 	=  GetString(SI_FURC_FILTER_VERSION_HS_TT),
-		[FURC_MORROWIND] 	=  GetString(SI_FURC_FILTER_VERSION_M_TT),
-		[FURC_REACH] 		=  GetString(SI_FURC_FILTER_VERSION_R_TT),
-		[FURC_CLOCKWORK] 	=  GetString(SI_FURC_FILTER_VERSION_CC_TT),
-		[FURC_DRAGONS] 		=  GetString(SI_FURC_FILTER_VERSION_DRAGON_TT),
+		[1] 				      = GetString(SI_FURC_FILTER_VERSION_OFF_TT),
+		[FURC_HOMESTEAD] 	= GetString(SI_FURC_FILTER_VERSION_HS_TT),
+		[FURC_MORROWIND] 	= GetString(SI_FURC_FILTER_VERSION_M_TT),
+		[FURC_REACH] 		  = GetString(SI_FURC_FILTER_VERSION_R_TT),
+		[FURC_CLOCKWORK] 	= GetString(SI_FURC_FILTER_VERSION_CC_TT),
+		[FURC_DRAGONS] 		= GetString(SI_FURC_FILTER_VERSION_DRAGON_TT),
 		[FURC_ALTMER] 		= GetString(SI_FURC_FILTER_VERSION_ALTMER_TT),
 		[FURC_WEREWOLF] 	= GetString(SI_FURC_FILTER_VERSION_WEREWOLF_TT),
 		[FURC_SLAVES] 		= GetString(SI_FURC_FILTER_VERSION_SLAVES_TT),