Quantcast

5.1.3

Steven Jackson [10-26-14 - 22:31]
5.1.3
Filename
Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua
Interface/AddOns/SVUI/packages/aura/SVAura.lua
Interface/AddOns/SVUI/packages/chat/SVChat.lua
Interface/AddOns/SVUI/packages/plates/SVPlate.lua
Interface/AddOns/SVUI/packages/unit/frames.lua
Interface/AddOns/SVUI/system/core.lua
Interface/AddOns/SVUI/system/docks.lua
Interface/AddOns/SVUI/xml/framework.xml
Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua
index af90859..271b215 100644
--- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua
+++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua
@@ -723,6 +723,10 @@ end
 function lib:LoadQueuedPlugins()
     if PLUGINS then
         for schema,files in pairs(PLUGINS) do
+            if(not PROFILE_SV.SAFEDATA[schema]) then
+                PROFILE_SV.SAFEDATA[schema] = {["enable"] = true}
+            end
+
             local obj = _G[schema]
             local enabled = PROFILE_SV.SAFEDATA[schema].enable
             if(obj and enabled and (not obj.initialized)) then
@@ -768,14 +772,13 @@ function lib:NewPlugin(addonName, addonObject, pfile, gfile, cfile)
     local header    = GetAddOnMetadata(addonName, HeaderFromMeta)
     local schema    = GetAddOnMetadata(addonName, SchemaFromMeta)
     local lod       = IsAddOnLoadOnDemand(addonName)
-
-    PROFILE_SV.SAFEDATA[schema] = PROFILE_SV.SAFEDATA[schema] or {["enable"] = true}
-
     local addonmeta = {}
-    local oldmeta = getmetatable(addonObject)
+    local oldmeta   = getmetatable(addonObject)
+
     if oldmeta then
         for k, v in pairs(oldmeta) do addonmeta[k] = v end
     end
+
     addonmeta.__tostring = rootstring
     setmetatable( addonObject, addonmeta )

@@ -837,7 +840,6 @@ end

 local function NewLoadOnDemand(addonName, schema, header)
     LoadOnDemand[schema] = addonName;
-    PROFILE_SV.SAFEDATA[schema] = PROFILE_SV.SAFEDATA[schema] or {["enable"] = false}
     CoreObject.Options.args.plugins.args.pluginOptions.args[schema] = {
         type = "group",
         name = header,
@@ -884,8 +886,8 @@ local Library_OnEvent = function(self, event, arg, ...)
         end
     elseif(event == "ADDON_LOADED") then
         if(arg == CoreName) then
-            if(not CoreObject.___loaded and CoreObject.Load) then
-                CoreObject:Load()
+            if(not CoreObject.___loaded and CoreObject.PreLoad) then
+                CoreObject:PreLoad()
                 CoreObject.___loaded = true
                 self:UnregisterEvent("ADDON_LOADED")
             end
@@ -1121,9 +1123,10 @@ function lib:Initialize()

     --PROFILE SAVED VARIABLES
     if not _G[PROFILE_FILENAME] then _G[PROFILE_FILENAME] = {} end
+
     PROFILE_SV = _G[PROFILE_FILENAME]
-    PROFILE_SV.SAFEDATA = PROFILE_SV.SAFEDATA or {dualSpecEnabled = false}

+    if not PROFILE_SV.SAFEDATA then PROFILE_SV.SAFEDATA = {dualSpecEnabled = false} end
     if not PROFILE_SV.SAFEDATA.NEEDSLIVEUPDATE then PROFILE_SV.SAFEDATA.NEEDSLIVEUPDATE = false end

     if(PROFILE_SV.SAFEDATA and PROFILE_SV.SAFEDATA.dualSpecEnabled) then
@@ -1218,7 +1221,13 @@ end
 function lib:Launch()
     if LoadOnDemand then
         for schema,name in pairs(LoadOnDemand) do
+
+            if(not PROFILE_SV.SAFEDATA[schema]) then
+                PROFILE_SV.SAFEDATA[schema] = {["enable"] = false}
+            end
+
             local db = PROFILE_SV.SAFEDATA[schema]
+
             if(db and (db.enable or db.enable ~= false)) then
                 if(not IsAddOnLoaded(name)) then
                     local loaded, reason = LoadAddOn(name)
diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua
index 96216fa..d1d70c1 100644
--- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua
+++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua
@@ -555,10 +555,10 @@ local function CreateAuraHeader(filter)
 end

 function MOD:ReLoad()
+	if(InCombatLockdown()) then return end
 	local maxShown = #AURA_ICONS - 1
 	local CB_HEIGHT = SVUI_MinimapFrame:GetHeight() - 50
 	local CB_WIDTH = (CB_HEIGHT / maxShown) + 4
-	--print("Reload "..CB_WIDTH)
 	SVUI_AurasAnchor:SetSize(CB_WIDTH, CB_HEIGHT)
 	AURA_FADE_TIME = SV.db.SVAura.fadeBy
 	MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs");
diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua
index 8182579..34e4812 100644
--- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua
+++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua
@@ -391,6 +391,7 @@ do
 	end

 	local Tab_OnEnter = function(self)
+		SV.Dock:EnterFade()
 		local chatFrame = _G[("ChatFrame%d"):format(self:GetID())];
 		GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT");
 		GameTooltip:ClearLines();
@@ -407,6 +408,7 @@ do
 	end

 	local Tab_OnLeave = function(self)
+		SV.Dock:ExitFade()
 		if not self.IsOpen then
 			self:SetPanelColor("default")
 		end
diff --git a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua
index 84a7ea3..483ed41 100644
--- a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua
+++ b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua
@@ -769,6 +769,14 @@ do
 	end

 	local function GetPlateReaction(plate)
+		local class, classToken, _
+		if plate.guid ~= nil then
+			class, classToken, _, _, _, _, _ = GetPlayerInfoByGUID(plate.guid)
+			if RAID_CLASS_COLORS[class] then
+				return class
+			end
+		end
+
 		local oldR,oldG,oldB = plate.health:GetStatusBarColor()
 		local r = floor(oldR * 100 + .5) * 0.01;
 		local g = floor(oldG * 100 + .5) * 0.01;
@@ -800,71 +808,74 @@ do
 	local function ColorizeAndScale(plate, frame)
 		local unitType = GetPlateReaction(plate)
 		local scale = 1
-		plate.setting.unitcategory = unitType
-		if SVUI_CLASS_COLORS[unitType] then
-			latestColor = {SVUI_CLASS_COLORS[unitType].r,SVUI_CLASS_COLORS[unitType].g,SVUI_CLASS_COLORS[unitType].b}
-		elseif RAID_CLASS_COLORS[unitType] then
-			latestColor = {RAID_CLASS_COLORS[unitType].r,RAID_CLASS_COLORS[unitType].g,RAID_CLASS_COLORS[unitType].b}
-		elseif unitType == "TAPPED_NPC" then
-			latestColor = NPReactTap
-		elseif unitType == "HOSTILE_NPC" or unitType == "NEUTRAL_NPC" then
-			local threatReaction = GetPlateThreatReaction(plate)
-			if (not NPUseThreat) then
-				if unitType == "NEUTRAL_NPC" then
-					latestColor = NPReactNeutral
-				else
-					latestColor = NPReactEnemy
-				end
-			else
-				if threatReaction == 'FULL_THREAT' then
-					if NPClassRole == 'T' then
-						latestColor = NPGoodThreat
-						scale = NPThreatGS
-					else
-						latestColor = NPBadThreat
-						scale = NPThreatBS
-					end
-				elseif threatReaction == 'GAINING_THREAT' then
-					if NPClassRole == 'T' then
-						latestColor = NPGoodTrans
-					else
-						latestColor = NPBadTrans
-					end
-				elseif threatReaction == 'LOSING_THREAT' then
-					if NPClassRole == 'T' then
-						latestColor = NPBadTrans
-					else
-						latestColor = NPGoodTrans
-					end
-				elseif InCombatLockdown() then
-					if NPClassRole == 'T' then
-						latestColor = NPBadThreat
-						scale = NPThreatBS
-					else
-						latestColor = NPGoodThreat
-						scale = NPThreatGS
-					end
-				else
+
+		if(plate.setting.unitcategory ~= unitType) then
+			plate.setting.unitcategory = unitType
+
+			if RAID_CLASS_COLORS[unitType] then
+				latestColor = {RAID_CLASS_COLORS[unitType].r, RAID_CLASS_COLORS[unitType].g, RAID_CLASS_COLORS[unitType].b}
+			elseif unitType == "TAPPED_NPC" then
+				latestColor = NPReactTap
+			elseif unitType == "HOSTILE_NPC" or unitType == "NEUTRAL_NPC" then
+				local threatReaction = GetPlateThreatReaction(plate)
+				if (not NPUseThreat) then
 					if unitType == "NEUTRAL_NPC" then
 						latestColor = NPReactNeutral
 					else
 						latestColor = NPReactEnemy
+					end
+				else
+					if threatReaction == 'FULL_THREAT' then
+						if NPClassRole == 'T' then
+							latestColor = NPGoodThreat
+							scale = NPThreatGS
+						else
+							latestColor = NPBadThreat
+							scale = NPThreatBS
+						end
+					elseif threatReaction == 'GAINING_THREAT' then
+						if NPClassRole == 'T' then
+							latestColor = NPGoodTrans
+						else
+							latestColor = NPBadTrans
+						end
+					elseif threatReaction == 'LOSING_THREAT' then
+						if NPClassRole == 'T' then
+							latestColor = NPBadTrans
+						else
+							latestColor = NPGoodTrans
+						end
+					elseif InCombatLockdown() then
+						if NPClassRole == 'T' then
+							latestColor = NPBadThreat
+							scale = NPThreatBS
+						else
+							latestColor = NPGoodThreat
+							scale = NPThreatGS
+						end
+					else
+						if unitType == "NEUTRAL_NPC" then
+							latestColor = NPReactNeutral
+						else
+							latestColor = NPReactEnemy
+						end
 					end
 				end
+				plate.ref.reaction = threatReaction
+			elseif unitType == "FRIENDLY_NPC" then
+				latestColor = NPReactNPCGood
+			elseif unitType == "FRIENDLY_PLAYER" then
+				latestColor = NPReactPlayerGood
+			else
+				latestColor = NPReactEnemy
 			end
-			plate.ref.reaction = threatReaction
-		elseif unitType == "FRIENDLY_NPC" then
-			latestColor = NPReactNPCGood
-		elseif unitType == "FRIENDLY_PLAYER" then
-			latestColor = NPReactPlayerGood
-		else
-			latestColor = NPReactEnemy
-		end

-		frame.health:SetStatusBarColor(unpack(latestColor))
-		--frame.health.eliteborder.bottom:SetVertexColor(unpack(latestColor))
-		--frame.health.eliteborder.right:SetVertexColor(unpack(latestColor))
-		--frame.health.eliteborder.left:SetVertexColor(unpack(latestColor))
+			frame.health:SetStatusBarColor(unpack(latestColor))
+			--frame.health.eliteborder.bottom:SetVertexColor(unpack(latestColor))
+			--frame.health.eliteborder.right:SetVertexColor(unpack(latestColor))
+			--frame.health.eliteborder.left:SetVertexColor(unpack(latestColor))
+		end
+
 		if(NPUsePointer and NPPointerMatch and plate.setting.unit == "target") then
 			NPGlow:SetBackdropBorderColor(unpack(latestColor))
 		end
diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua
index dbbcce4..707476b 100644
--- a/Interface/AddOns/SVUI/packages/unit/frames.lua
+++ b/Interface/AddOns/SVUI/packages/unit/frames.lua
@@ -942,7 +942,7 @@ local ArenaPrepHandler = CreateFrame("Frame")
 local ArenaPrepHandler_OnEvent = function(self, event)
     local prepframe
     local _, instanceType = IsInInstance()
-    if(not SV.db.SVUnit.arena or not SV.db.SVUnit.arena.enable or instanceType ~= "arena") then return end
+    if(not SV.db.SVUnit or not SV.db.SVUnit.arena or not SV.db.SVUnit.arena.enable or instanceType ~= "arena") then return end
     if event == "PLAYER_LOGIN" then
         for i = 1, 5 do
             prepframe = _G["SVUI_Arena"..i.."PrepFrame"]
diff --git a/Interface/AddOns/SVUI/system/core.lua b/Interface/AddOns/SVUI/system/core.lua
index cecd728..d94bcf4 100644
--- a/Interface/AddOns/SVUI/system/core.lua
+++ b/Interface/AddOns/SVUI/system/core.lua
@@ -395,7 +395,8 @@ end

 function SVUI:VersionCheck()
     local minimumVersion = 5.0;
-    local installedVersion = SVLib:GetSafeData("install_version");
+    --print(table.dump(self.safedata))
+    local installedVersion = self.safedata.install_version;
     if(installedVersion) then
         if(type(installedVersion) == "string") then
             installedVersion = tonumber(installedVersion)
@@ -506,15 +507,30 @@ function SVUI:ReLoad()
     self:AddonMessage("All user settings reloaded");
 end

-function SVUI:Load()
+function SVUI:PreLoad()
     self.Timers:ClearAllTimers()

+    self:RegisterEvent('PLAYER_REGEN_DISABLED');
+    self:RegisterEvent("PLAYER_ENTERING_WORLD");
+    self:RegisterEvent("UI_SCALE_CHANGED");
+    self:RegisterEvent("PET_BATTLE_CLOSE");
+    self:RegisterEvent("PET_BATTLE_OPENING_START");
+    self:RegisterEvent("ADDON_ACTION_BLOCKED", "TaintHandler");
+    self:RegisterEvent("ADDON_ACTION_FORBIDDEN", "TaintHandler");
+    self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED", "PlayerInfoUpdate");
+    self:RegisterEvent("PLAYER_TALENT_UPDATE", "PlayerInfoUpdate");
+    self:RegisterEvent("CHARACTER_POINTS_CHANGED", "PlayerInfoUpdate");
+    self:RegisterEvent("UNIT_INVENTORY_CHANGED", "PlayerInfoUpdate");
+    self:RegisterEvent("UPDATE_BONUS_ACTIONBAR", "PlayerInfoUpdate");
+end
+
+function SVUI:Initialize()
+    SVLib:Initialize();
+
     local rez = GetCVar("gxResolution");
     local gxHeight = tonumber(match(rez,"%d+x(%d+)"));
     local gxWidth = tonumber(match(rez,"(%d+)x%d+"));

-    SVLib:Initialize()
-
     self.DisplaySettings = SVLib:NewGlobal("Display")
     if(not self.DisplaySettings.screenheight or (self.DisplaySettings.screenheight and type(self.DisplaySettings.screenheight) ~= "number")) then
         self.DisplaySettings.screenheight = gxHeight
@@ -524,33 +540,20 @@ function SVUI:Load()
     end

     self:UI_SCALE_CHANGED()
+
     self:RefreshSystemFonts();
     self:LoadSystemAlerts();
+    self.Timers:Initialize();
+    self.Dock:Initialize();
+    self.Mentalo:Initialize();

-    self:RegisterEvent('PLAYER_REGEN_DISABLED');
-    self:RegisterEvent("PLAYER_ENTERING_WORLD");
-    self:RegisterEvent("UI_SCALE_CHANGED");
-    self:RegisterEvent("PET_BATTLE_CLOSE");
-    self:RegisterEvent("PET_BATTLE_OPENING_START");
-    self:RegisterEvent("ADDON_ACTION_BLOCKED", "TaintHandler");
-    self:RegisterEvent("ADDON_ACTION_FORBIDDEN", "TaintHandler");
-    self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED", "PlayerInfoUpdate");
-    self:RegisterEvent("PLAYER_TALENT_UPDATE", "PlayerInfoUpdate");
-    self:RegisterEvent("CHARACTER_POINTS_CHANGED", "PlayerInfoUpdate");
-    self:RegisterEvent("UNIT_INVENTORY_CHANGED", "PlayerInfoUpdate");
-    self:RegisterEvent("UPDATE_BONUS_ACTIONBAR", "PlayerInfoUpdate");
-
-    self.Timers:Initialize()
-end
+    self.safedata = SVLib:GetSafeData();

-function SVUI:Initialize()
-    self.Dock:Initialize();

     SVLib:Launch();

     self:UI_SCALE_CHANGED("PLAYER_LOGIN")
     self:PlayerInfoUpdate();
-    self.Mentalo:Initialize()
     self:VersionCheck()
     self:RefreshAllSystemMedia();

diff --git a/Interface/AddOns/SVUI/system/docks.lua b/Interface/AddOns/SVUI/system/docks.lua
index b53e326..46d8feb 100644
--- a/Interface/AddOns/SVUI/system/docks.lua
+++ b/Interface/AddOns/SVUI/system/docks.lua
@@ -98,7 +98,14 @@ local Dock = SV:NewSubClass("Dock", L["Docks"]);
 Dock.Docklets = {
 	Windows = {},
 	Buttons = {},
-	Registered = {}
+	Registered = {},
+	Allowed = {
+		["alDamageMeter"] = L["alDamageMeter"],
+		["Skada"] = L["Skada"],
+		["Recount"] = L["Recount"],
+		["TinyDPS"] = L["TinyDPS"],
+		["Omen"] = L["Omen"]
+	}
 };

 Dock.DefaultDocklet = "";
@@ -238,7 +245,7 @@ PRE VARS/FUNCTIONS
 ##########################################################
 ]]--
 local DD_OnClick = function(self)
-	-- DO STUFF
+	self.func()
 	self:GetParent():Hide()
 end

@@ -250,12 +257,137 @@ local DD_OnLeave = function(self)
 	self.hoverTex:Hide()
 end

-local function SetFilterMenu(self)
-	Dock.Dropdown:ClearAllPoints()
-	Dock.Dropdown:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 0, -8)
-	ToggleFrame(Dock.Dropdown)
+local function _locate(parent)
+	local centerX, centerY = parent:GetCenter()
+	local screenWidth = GetScreenWidth()
+	local screenHeight = GetScreenHeight()
+	local result;
+	if not centerX or not centerY then
+		return "CENTER"
+	end
+	local heightTop = screenHeight * 0.75;
+	local heightBottom = screenHeight * 0.25;
+	local widthLeft = screenWidth * 0.25;
+	local widthRight = screenWidth * 0.75;
+	if(((centerX > widthLeft) and (centerX < widthRight)) and (centerY > heightTop)) then
+		result = "TOP"
+	elseif((centerX < widthLeft) and (centerY > heightTop)) then
+		result = "TOPLEFT"
+	elseif((centerX > widthRight) and (centerY > heightTop)) then
+		result = "TOPRIGHT"
+	elseif(((centerX > widthLeft) and (centerX < widthRight)) and centerY < heightBottom) then
+		result = "BOTTOM"
+	elseif((centerX < widthLeft) and (centerY < heightBottom)) then
+		result = "BOTTOMLEFT"
+	elseif((centerX > widthRight) and (centerY < heightBottom)) then
+		result = "BOTTOMRIGHT"
+	elseif((centerX < widthLeft) and (centerY > heightBottom) and (centerY < heightTop)) then
+		result = "LEFT"
+	elseif((centerX > widthRight) and (centerY < heightTop) and (centerY > heightBottom)) then
+		result = "RIGHT"
+	else
+		result = "CENTER"
+	end
+	return result
+end
+
+function Dock:GetLiveDocklets()
+	local test = SV.db.Dock.docklets.DockletMain;
+	local t = {{text = "None", func = function() SV.db.Dock.docklets.DockletMain = "None"; Dock:ReloadAddonDocklets() end}};
+	for n,l in pairs(SV.Dock.Docklets.Allowed) do
+		if IsAddOnLoaded(n) or IsAddOnLoaded(l) then
+			if (not test:find(n)) then
+				if n == "Skada" and _G.Skada then
+					for index,window in pairs(_G.Skada:GetWindows()) do
+						local keyName = window.db.name
+					    local key = "SkadaBarWindow" .. keyName
+					    local name = (keyName == "Skada") and "Skada - Main" or "Skada - " .. keyName;
+					    tinsert(t,{text = name, func = function() SV.db.Dock.docklets.DockletMain = key; Dock:ReloadAddonDocklets() end});
+					end
+				else
+					tinsert(t,{text = n, func = function() SV.db.Dock.docklets.DockletMain = l; Dock:ReloadAddonDocklets() end});
+				end
+			end
+		end
+	end
+	return t;
+end
+
+function Dock:SetFilterMenu(parent)
+	if not self.Dropdown.buttons then
+		self.Dropdown.buttons = {}
+		self.Dropdown:SetFrameStrata("DIALOG")
+		self.Dropdown:SetClampedToScreen(true)
+		tinsert(UISpecialFrames, self.Dropdown:GetName())
+		self.Dropdown:Hide()
+	end
+	local maxPerColumn = 25
+	local cols = 1
+	for i=1, #self.Dropdown.buttons do
+		self.Dropdown.buttons[i]:Hide()
+	end
+
+	local list = self:GetLiveDocklets()
+
+	for i=1, #list do
+		if not self.Dropdown.buttons[i] then
+			self.Dropdown.buttons[i] = CreateFrame("Button", nil, Dock.Dropdown)
+			self.Dropdown.buttons[i].hoverTex = self.Dropdown.buttons[i]:CreateTexture(nil, 'OVERLAY')
+			self.Dropdown.buttons[i].hoverTex:SetAllPoints()
+			self.Dropdown.buttons[i].hoverTex:SetTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]])
+			self.Dropdown.buttons[i].hoverTex:SetBlendMode("ADD")
+			self.Dropdown.buttons[i].hoverTex:Hide()
+			self.Dropdown.buttons[i].text = self.Dropdown.buttons[i]:CreateFontString(nil, 'BORDER')
+			self.Dropdown.buttons[i].text:SetAllPoints()
+			self.Dropdown.buttons[i].text:SetFont(SV.Media.font.roboto,12,"OUTLINE")
+			self.Dropdown.buttons[i].text:SetJustifyH("LEFT")
+			self.Dropdown.buttons[i]:SetScript("OnEnter", DD_OnEnter)
+			self.Dropdown.buttons[i]:SetScript("OnLeave", DD_OnLeave)
+		end
+		self.Dropdown.buttons[i]:Show()
+		self.Dropdown.buttons[i]:SetHeight(16)
+		self.Dropdown.buttons[i]:SetWidth(135)
+		self.Dropdown.buttons[i].text:SetText(list[i].text)
+		self.Dropdown.buttons[i].func = list[i].func
+		self.Dropdown.buttons[i]:SetScript("OnClick", DD_OnClick)
+		if i == 1 then
+			self.Dropdown.buttons[i]:SetPoint("TOPLEFT", self.Dropdown, "TOPLEFT", 10, -10)
+		elseif((i -1) % maxPerColumn == 0) then
+			self.Dropdown.buttons[i]:SetPoint("TOPLEFT", self.Dropdown.buttons[i - maxPerColumn], "TOPRIGHT", 10, 0)
+			cols = cols + 1
+		else
+			self.Dropdown.buttons[i]:SetPoint("TOPLEFT", self.Dropdown.buttons[i - 1], "BOTTOMLEFT")
+		end
+	end
+
+	local maxHeight = (min(maxPerColumn, #list) * 16) + 20
+	local maxWidth = (135 * cols) + (10 * cols)
+	self.Dropdown:SetSize(maxWidth, maxHeight)
+	self.Dropdown:ClearAllPoints()
+	local point = _locate(parent:GetParent())
+	if point:find("BOTTOM") then
+		self.Dropdown:SetPoint("BOTTOMLEFT", parent, "TOPLEFT", 10, 10)
+	else
+		self.Dropdown:SetPoint("TOPLEFT", parent, "BOTTOMLEFT", 10, -10)
+	end
+	ToggleFrame(self.Dropdown)
+end
+
+function Dock:EnterFade()
+	if SV.cache.Docks.IsFaded then
+		self.Left:Show()
+		SV:SecureFadeIn(self.Left, 0.2, self.Left:GetAlpha(), 1)
+		self.Right:Show()
+		SV:SecureFadeIn(self.Right, 0.2, self.Right:GetAlpha(), 1)
+	end
+end
+
+function Dock:ExitFade()
+	if SV.cache.Docks.IsFaded then
+		SV:SecureFadeOut(self.Left, 0.2, self.Left:GetAlpha(), 0, true)
+		SV:SecureFadeOut(self.Right, 0.2, self.Right:GetAlpha(), 0, true)
+	end
 end
--- CycleDocklets

 local Docklet_OnShow = function(self)
 	if(_G[Dock.Right.Window.FrameName]) then
@@ -281,12 +413,7 @@ local DockButtonDeactivate = function(self)
 end

 local DockletButton_OnEnter = function(self, ...)
-	if SV.cache.Docks.IsFaded then
-		Dock.Left:Show()
-		SV:SecureFadeIn(Dock.Left, 0.2, Dock.Left:GetAlpha(), 1)
-		Dock.Right:Show()
-		SV:SecureFadeIn(Dock.Right, 0.2, Dock.Right:GetAlpha(), 1)
-	end
+	Dock:EnterFade()

 	self:SetPanelColor("highlight")
 	self.Icon:SetGradient(unpack(SV.Media.gradient.bizzaro))
@@ -303,10 +430,7 @@ local DockletButton_OnEnter = function(self, ...)
 end

 local DockletButton_OnLeave = function(self, ...)
-	if SV.cache.Docks.IsFaded then
-		SV:SecureFadeOut(Dock.Left, 0.2, Dock.Left:GetAlpha(), 0, true)
-		SV:SecureFadeOut(Dock.Right, 0.2, Dock.Right:GetAlpha(), 0, true)
-	end
+	Dock:ExitFade()

 	if(self:GetAttribute("isActive")) then
 		self:SetPanelColor("green")
@@ -321,8 +445,8 @@ end

 local DockletButton_OnClick = function(self, button)
 	if InCombatLockdown() then return end
-	if button == "RightButton" then
-		SetFilterMenu(self);
+	if(button == "RightButton" and self:GetAttribute("hasDropDown")) then
+		Dock:SetFilterMenu(self);
 	else
 		if self.PostClickFunction then
 			self:PostClickFunction()
@@ -467,14 +591,17 @@ end
 Dock.BarLeft.Initialize = ActivateDockletButton
 Dock.BarRight.Initialize = ActivateDockletButton

-local CreateBasicToolButton = function(self, name, texture, onclick, frameName, isdefault)
+local CreateBasicToolButton = function(self, name, texture, onclick, frameName, isdefault, doNotAdd)
 	local fName = frameName or name;
 	local dockIcon = texture or [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-ADDON]];
 	local size = self.ToolBar:GetHeight();
 	local button = _G[fName .. "DockletButton"] or CreateFrame("Button", ("%sDockletButton"):format(fName), self.ToolBar, "SVUI_DockletButtonTemplate")

-	self:Add(button)
+	if(not doNotAdd) then
+		self:Add(button)
+	end

+	button:RegisterForClicks("AnyUp")
 	button:Size(size,size)
 	button:SetFramedButtonTemplate()
 	button.Icon:SetTexture(dockIcon)
@@ -598,6 +725,7 @@ function Dock:CreateDockPanels()
     self.BarLeft.Button:SetFramedButtonTemplate()
     self.BarLeft.Button.Icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\SVUI-EMBLEM]])
     self.BarLeft.Button:SetAttribute("tipText", L["Toggle Docks"])
+    self.BarLeft.Button:SetAttribute("hasDropDown", true)
     self.BarLeft.Button:RegisterForClicks("AnyUp")
     self.BarLeft.ToolBar:Point("LEFT", self.BarLeft.Button, "RIGHT", spacing, 0)
     self.BarLeft.ToolBar:Height(buttonsize)
@@ -628,6 +756,7 @@ function Dock:CreateDockPanels()
 	self.BarRight.Button:SetFramedButtonTemplate()
 	self.BarRight.Button.Icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-HENCHMAN]])
 	self.BarRight.Button:SetAttribute("tipText", "Call Henchman!")
+	self.BarRight.Button:SetAttribute("hasDropDown", true)
 	self.BarRight.Button:RegisterForClicks("AnyUp")
 	self.BarRight.ToolBar:Point("RIGHT", self.BarRight.Button, "LEFT", -spacing, 0)
 	self.BarRight.ToolBar:Height(buttonsize)
@@ -653,7 +782,8 @@ function Dock:CreateDockPanels()

 	-- [[ ADDON DOCKLET BUTTON ]] --

-	self.AddonButton = self.BarRight:Create("Addon Dock", nil, AddonDockletToggle, "SVUI_DockRightToolBar")
+	self.AddonButton = self.BarRight:Create("Addon Dock", nil, AddonDockletToggle, "SVUI_DockRightToolBar", nil, true)
+	self.AddonButton:SetAttribute("hasDropDown", true)

 	-- [[ TOP LEFT DOCK ]] --

diff --git a/Interface/AddOns/SVUI/xml/framework.xml b/Interface/AddOns/SVUI/xml/framework.xml
index 5c4753c..054d63a 100644
--- a/Interface/AddOns/SVUI/xml/framework.xml
+++ b/Interface/AddOns/SVUI/xml/framework.xml
@@ -6,8 +6,8 @@
         </Anchors>
         <Attributes>
             <Attribute name="tipText" type="string" value="" />
-            <Attribute name="tipExtraText" type="string" value="" />
             <Attribute name="ownerFrame" type="string" value="None" />
+            <Attribute name="hasDropDown" type="boolean" value="false" />
             <Attribute name="isActive" type="boolean" value="false" />
         </Attributes>
         <Layers>
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
index c0c8fbd..d2e7ddb 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
@@ -73,71 +73,63 @@ SV.Options.args.Dock.args["common"] = {
 };

 SV.Options.args.Dock.args["leftDockGroup"] = {
-		order = 3,
-		type = "group",
-		name = L["Left Dock"],
-		guiInline = true,
-		args = {
-			leftDockBackdrop = {
-				order = 1,
-				type = 'toggle',
-				name = L['Left Dock Backdrop'],
-				desc = L['Display a backdrop behind the left-side dock.'],
-				get = function(j)return SV.db.Dock.leftDockBackdrop end,
-				set = function(key,value)
-					MOD:ChangeDBVar(value,key[#key]);
-					MOD:UpdateDockBackdrops()
-				end
-			},
-			dockLeftHeight = {
-				order = 2,
-				type = "range",
-				name = L["Left Dock Height"],
-				desc = L["PANEL_DESC"],
-				min = 150,
-				max = 600,
-				step = 1,
-				width = "full",
-				get = function()return SV.db.Dock.dockLeftHeight;end,
-				set = function(key,value)
-					MOD:ChangeDBVar(value,key[#key]);
-					MOD:Refresh()
-					CHAT:UpdateLocals()
-					CHAT:RefreshChatFrames(true)
-				end,
-			},
-			dockLeftWidth = {
-				order = 3,
-				type = "range",
-				name = L["Left Dock Width"],
-				desc = L["PANEL_DESC"],
-				min = 150,
-				max = 700,
-				step = 1,
-				width = "full",
-				get = function()return SV.db.Dock.dockLeftWidth;end,
-				set = function(key,value)
-					MOD:ChangeDBVar(value,key[#key]);
-					MOD:Refresh()
-					CHAT:UpdateLocals()
-					CHAT:RefreshChatFrames(true)
-				end,
-			},
-		}
-	};
-
-local acceptableDocklets = {
-	["alDamageMeter"] = L["alDamageMeter"],
-	["Skada"] = L["Skada"],
-	["Recount"] = L["Recount"],
-	["TinyDPS"] = L["TinyDPS"],
-	["Omen"] = L["Omen"]
+	order = 3,
+	type = "group",
+	name = L["Left Dock"],
+	guiInline = true,
+	args = {
+		leftDockBackdrop = {
+			order = 1,
+			type = 'toggle',
+			name = L['Left Dock Backdrop'],
+			desc = L['Display a backdrop behind the left-side dock.'],
+			get = function(j)return SV.db.Dock.leftDockBackdrop end,
+			set = function(key,value)
+				MOD:ChangeDBVar(value,key[#key]);
+				MOD:UpdateDockBackdrops()
+			end
+		},
+		dockLeftHeight = {
+			order = 2,
+			type = "range",
+			name = L["Left Dock Height"],
+			desc = L["PANEL_DESC"],
+			min = 150,
+			max = 600,
+			step = 1,
+			width = "full",
+			get = function()return SV.db.Dock.dockLeftHeight;end,
+			set = function(key,value)
+				MOD:ChangeDBVar(value,key[#key]);
+				MOD:Refresh()
+				CHAT:UpdateLocals()
+				CHAT:RefreshChatFrames(true)
+			end,
+		},
+		dockLeftWidth = {
+			order = 3,
+			type = "range",
+			name = L["Left Dock Width"],
+			desc = L["PANEL_DESC"],
+			min = 150,
+			max = 700,
+			step = 1,
+			width = "full",
+			get = function()return SV.db.Dock.dockLeftWidth;end,
+			set = function(key,value)
+				MOD:ChangeDBVar(value,key[#key]);
+				MOD:Refresh()
+				CHAT:UpdateLocals()
+				CHAT:RefreshChatFrames(true)
+			end,
+		},
+	}
 };

 local function GetLiveDockletsA()
 	local test = SV.db.Dock.docklets.DockletExtra;
 	local t = {["None"] = L["None"]};
-	for n,l in pairs(acceptableDocklets) do
+	for n,l in pairs(SV.Dock.Docklets.Allowed) do
 		if IsAddOnLoaded(n) or IsAddOnLoaded(l) then
 			if (test ~= n and test ~= l) then
 				if n == "Skada" and _G.Skada then
@@ -157,7 +149,7 @@ end
 local function GetLiveDockletsB()
 	local test = SV.db.Dock.docklets.DockletMain;
 	local t = {["None"] = L["None"]};
-	for n,l in pairs(acceptableDocklets) do
+	for n,l in pairs(SV.Dock.Docklets.Allowed) do
 		if IsAddOnLoaded(n) or IsAddOnLoaded(l) then
 			if (test ~= n and test ~= l) then
 				if n == "Skada" and _G.Skada then
@@ -187,7 +179,7 @@ SV.Options.args.Dock.args["rightDockGroup"] = {
 			desc = L['Display a backdrop behind the right-side dock.'],
 			get = function(j)return SV.db.Dock.rightDockBackdrop end,
 			set = function(key,value)
-				MOD:ChangeDBVar(value,key[#key]);
+				MOD:ChangeDBVar(value, key[#key]);
 				MOD:UpdateDockBackdrops()
 			end
 		},
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua
index 55531c3..5399f95 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua
@@ -179,7 +179,19 @@ SV.Options.args.SVUnit.args.focustarget = {
 							guiInline = true,
 							name = L["Base Settings"],
 							args = {
-								showAuras = {order = 1, type = "execute", name = L["Show Auras"], func = function()local U = SVUI_FocusTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("focustarget")end},
+								showAuras = {
+									order = 1,
+									type = "execute",
+									name = L["Show Auras"],
+									func = function()
+										if(SVUI_FocusTarget.forceShowAuras == true) then
+											SVUI_FocusTarget.forceShowAuras = nil
+										else
+											SVUI_FocusTarget.forceShowAuras = true
+										end
+										MOD:SetUnitFrame("focustarget")
+									end
+								},
 								spacer1 = {
 									order = 2,
 									type = "description",
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
index b7510d1..fb1a3e4 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
@@ -27,12 +27,6 @@ local Schema = PLUGIN.Schema;
 ARCHEOLOGYFRAME PLUGINR
 ##########################################################
 ]]--
---240 24
-local progressBarHolder = CreateFrame("Frame", "SVUI_ArcheologyProgressBar", nil)
-progressBarHolder:SetSize(240, 24)
-progressBarHolder:SetPoint("BOTTOM", CastingBarFrame, "TOP", 0, 10)
-SV.Mentalo:Add(progressBarHolder, "Archeology Progress Bar")
-
 local function ArchaeologyStyle()
 	if PLUGIN.db.blizzard.enable ~= true or PLUGIN.db.blizzard.archaeology ~= true then return end

@@ -82,6 +76,12 @@ local function ArchaeologyStyle()
 	ArchaeologyFrameArtifactPageIcon:SetParent(ArchaeologyFrameArtifactPageIcon.backdrop)
 	ArchaeologyFrameArtifactPageIcon:SetDrawLayer("OVERLAY")
 	PLUGIN:ApplyCloseButtonStyle(ArchaeologyFrameCloseButton)
+
+	local progressBarHolder = CreateFrame("Frame", "SVUI_ArcheologyProgressBar", nil)
+	progressBarHolder:SetSize(240, 24)
+	progressBarHolder:SetPoint("BOTTOM", CastingBarFrame, "TOP", 0, 10)
+	SV.Mentalo:Add(progressBarHolder, "Archeology Progress Bar")
+
 	ArcheologyDigsiteProgressBar:SetAllPoints(progressBarHolder)
 	progressBarHolder:SetParent(ArcheologyDigsiteProgressBar)
 end