Mercurial > wow > ouroloot
diff options.lua @ 102:fe04f5c4114a
- expiring cache callback arg, handle new entries coming in during the
same loop at the previous ones ALL being removed
TODO: rework other "candidate" caches to use this instead
- raider snapshots use string tokens for 'online' field
- document callback args
- CheckBoxSmallLabel preemptively apply proposed fix for ace3 ticket 304
- now that option toggles are not wedged into tight space, revert to
using standard CheckBox widget instead of small-label variant
(go back if ticket 304 is not fixed for release)
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Sat, 04 Aug 2012 22:03:05 +0000 |
parents | f7162a1cadc7 |
children | dc8a23a47b03 |
line wrap: on
line diff
--- a/options.lua Wed Aug 01 06:51:52 2012 +0000 +++ b/options.lua Sat Aug 04 22:03:05 2012 +0000 @@ -69,7 +69,7 @@ local error, assert = addon.error, addon.assert local function mktoggle (opt, label, width, desc, opt_func) - local w = mkbutton("CheckBoxSmallLabel", nil, "", desc) + local w = mkbutton("CheckBox", nil, "", desc) w:SetRelativeWidth(width) w:SetType("checkbox") w:SetLabel(label) @@ -510,7 +510,7 @@ grp:SetRelativeWidth(0.60) grp:SetTitle("Output of debugging messages") - w = AceGUI:Create("CheckBoxSmallLabel") + w = AceGUI:Create("CheckBox") w:SetFullWidth(true) w:SetType("checkbox") w:SetLabel("master toggle") @@ -521,7 +521,7 @@ end) grp:AddChild(w) for d,v in pairs(addon.debug) do - w = AceGUI:Create("CheckBoxSmallLabel") + w = AceGUI:Create("CheckBox") w:SetFullWidth(true) w:SetType("checkbox") w:SetLabel(d) @@ -549,7 +549,7 @@ local simple = AceGUI:Create("SimpleGroup") simple:SetLayout("List") simple:SetRelativeWidth(0.35) - w = AceGUI:Create("CheckBoxSmallLabel") + w = AceGUI:Create("CheckBox") --w:SetRelativeWidth(0.35) w:SetFullWidth(true) w:SetType("checkbox") @@ -620,7 +620,7 @@ addon:Print("Can do nothing; DBM testing mod wasn't loaded.") end end) - w:SetDisabled(addon.bossmod_registered ~= 'DBM') + w:SetDisabled(addon.bossmod_registered ~= 'DBM') -- set by :Activate container:AddChild(w) w = mkbutton("GC", [[full GC cycle]]) @@ -824,13 +824,15 @@ --[[ PLUGIN is the module table itself. (This does not actually have to be a plugin created with :[Constrained]NewModule, as long as it has a - GetName method and other parameters here are used appropriately.) + GetName method and + - TEXT is passed + - if OPTIONS is a table, then OPTIONS.args.name exists PARENT is nil to register in the tree list directly. TEXT is either the text to display in the tree list, or nil to use the moduleName field out of PLUGIN (not :GetName()). OPTIONS is either - I) a function to call directly - II) an aceconfig-style options table + I) an aceconfig-style options table + II) a function to call directly (I) Will augment options.args.name with coloring/sizing, if it exists. (Set options.args.name.name before registering.) Will create it if not @@ -851,7 +853,9 @@ text = text or plugin.moduleName local handler - local pdb = self.db:GetNamespace (plugin.moduleName, --[[silent=]]true) + local pdb = plugin.moduleName and + self.db:GetNamespace (plugin.moduleName, --[[silent=]]true) + if type(options) == 'table' then -- AceConfig-style options table aceconfig_list[code] = true