From 0913c9d26b2f65fe41e89e3b57a5cecbdfd8cc13 Mon Sep 17 00:00:00 2001 From: pompachomp Date: Tue, 30 Mar 2010 01:26:11 -0400 Subject: [PATCH] Disabled "View Exclusion List", "Include Excluded", "Display Exclusions" if there aren't any --- Config.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Config.lua b/Config.lua index 8fce4dd..c7ba3e1 100644 --- a/Config.lua +++ b/Config.lua @@ -77,6 +77,12 @@ local function fullOptions() addon:Print(i .. ": " .. GetSpellInfo(i)) end end, + disabled = function(info) + for spell_id in pairs(addon.db.profile.exclusionlist) do + return false + end + return true + end, }, clearexclusionlist = { order = 15, @@ -138,6 +144,12 @@ local function fullOptions() desc = L["EXCLUDECOUNT_DESC"], get = function() return addon.db.profile.includeexcluded end, set = function() addon.db.profile.includeexcluded = not addon.db.profile.includeexcluded end, + disabled = function(info) + for spell_id in pairs(addon.db.profile.exclusionlist) do + return false + end + return true + end, }, ignoreexclusionlist = { order = 24, @@ -152,6 +164,12 @@ local function fullOptions() addon:Scan() end end, + disabled = function(info) + for spell_id in pairs(addon.db.profile.exclusionlist) do + return false + end + return true + end, }, spacer2 = { order = 39, -- 1.7.9.5