diff options.lua @ 148:113dd7c86222

Update how LoadOnDemand modules are treated for 6.0. Blizzard API change, different return values. Adds finer-grained handling. Users who don't want to see a module at all can disable the module's "addon", and then later restore it from OL's option tab.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Wed, 07 Jan 2015 17:37:43 -0500
parents e1a90e398231
children 42dd3076baaf
line wrap: on
line diff
--- a/options.lua	Tue Dec 30 20:26:41 2014 -0500
+++ b/options.lua	Wed Jan 07 17:37:43 2015 -0500
@@ -175,10 +175,26 @@
 		[[Do not record anything in the History tab for players from other realms.]])
 	container:AddChild(w)
 
-	-- LOD plugins in all cases
-	w = mktoggle('display_disabled_LODs', "Include disabled plugins", stdw,
-		[[Show loadable plugins even if they've been disabled (and offer to enable them if clicked).  Relog to take effect.]])
-	container:AddChild(w)
+	do
+		-- LOD plugins unloadable for reasons other than disabling
+		local w_un = mktoggle('display_unusable_LODs', "Include unusable plugins", stdw,
+			[[Show plugins even if they are flagged for reasons besides simply being disabled.  Relog to take effect.]])
+
+		-- LOD plugins disabled in the addons menu
+		w = mktoggle('display_disabled_LODs', "Include disabled plugins", stdw,
+			[[Show loadable plugins even if they've been disabled (and offer to enable them if clicked).]],
+			function (_w,_,value)
+				opts.display_disabled_LODs = value
+				w_un:SetDisabled(not opts.display_disabled_LODs)
+				addon.loot_clean = nil
+				addon.hist_clean = nil
+				addon:_gui_add_disabled_LOD_tabs()
+			end)
+
+		w_un:SetDisabled(not opts.display_disabled_LODs)
+		container:AddChild(w)
+		container:AddChild(w_un)
+	end
 
 	-- showing the "(from Rebroadcasterdude)" in the notes column
 	w = mktoggle('display_bcast_from', "Show rebroadcasting player", stdw,