Fix all and any white-space errors

This commit is contained in:
Hendrik Leppkes
2009-02-20 23:08:35 +01:00
parent fc31c9d48d
commit 2ed2263968
27 changed files with 296 additions and 297 deletions
+13 -13
View File
@@ -18,28 +18,28 @@ do
enabled = "Enabled",
grid = "Grid",
}
-- retrieves a valid bar object from the modules actionbars table
function getBar(id)
local bar = module.actionbars[tonumber(id)]
assert(bar, ("Invalid bar id in options table. (%s)"):format(id))
return bar
end
-- calls a function on the bar
function callFunc(bar, type, option, ...)
local func = type .. (optionMap[option] or option)
assert(bar[func], ("Invalid get/set function %s in bar %s."):format(func, bar.id))
return bar[func](bar, ...)
end
-- universal function to get a option
function optGetter(info)
local bar = getBar(info[2])
local option = info[#info]
return callFunc(bar, "Get", option)
end
-- universal function to set a option
function optSetter(info, ...)
local bar = getBar(info[2])
@@ -58,7 +58,7 @@ end
function module:GetOptionsObject()
if not self.baroptions then
local obj = ButtonBar.GetOptionObject(self)
local cat_general = {
enabled ={
order = 4,
@@ -87,7 +87,7 @@ function module:GetOptionsObject()
},
}
obj:AddElementGroup("general", cat_general)
local states = {
type = "group",
name = L["State Configuration"],
@@ -95,20 +95,20 @@ function module:GetOptionsObject()
args = self:GetStateOptionsTable(),
}
obj:NewCategory("state", states)
self.baroptions = obj
end
return self.baroptions
end
function module:CreateBarOption(id, options)
if not self.options then return end
if not options then
options = self:GetOptionsTable()
if not options then
options = self:GetOptionsTable()
end
id = tostring(id)
if not self.options[id] then
self.options[id] = {
@@ -120,7 +120,7 @@ function module:CreateBarOption(id, options)
}
end
self.options[id].args = options
-- register options in the BT GUI
Bartender4:RegisterBarOptions(id, self.options[id])
end
+16 -16
View File
@@ -6,7 +6,7 @@ local module = Bartender4:GetModule("ActionBars")
local optGetter, optSetter
do
local getBar, optionMap, callFunc
optionMap = {
stance = "StanceStateOption",
enabled = "StateOption",
@@ -25,21 +25,21 @@ do
assert(bar, "Invalid bar id in options table.")
return bar
end
-- calls a function on the bar
function callFunc(bar, type, option, ...)
local func = type .. (optionMap[option] or option)
assert(bar[func], "Invalid get/set function."..func)
return bar[func](bar, ...)
end
-- universal function to get a option
function optGetter(info)
local bar = getBar(info[2])
local option = info.arg or info[#info]
return callFunc(bar, "Get", option, info[#info])
end
-- universal function to set a option
function optSetter(info, ...)
local bar = getBar(info[2])
@@ -51,18 +51,18 @@ end
local hasStances
local validStanceTable = {
[0] = L["Don't Page"],
local validStanceTable = {
[0] = L["Don't Page"],
(L["Page %2d"]):format(1),
(L["Page %2d"]):format(2),
(L["Page %2d"]):format(3),
(L["Page %2d"]):format(4),
(L["Page %2d"]):format(5),
(L["Page %2d"]):format(6),
(L["Page %2d"]):format(7),
(L["Page %2d"]):format(2),
(L["Page %2d"]):format(3),
(L["Page %2d"]):format(4),
(L["Page %2d"]):format(5),
(L["Page %2d"]):format(6),
(L["Page %2d"]):format(7),
(L["Page %2d"]):format(8),
(L["Page %2d"]):format(9),
(L["Page %2d"]):format(10)
(L["Page %2d"]):format(9),
(L["Page %2d"]):format(10)
}
@@ -255,7 +255,7 @@ function module:GetStateOptionsTable()
multiline = true,
},
}
do
local defstancemap = Bartender4.StanceMap[playerclass]
if defstancemap then
@@ -266,6 +266,6 @@ function module:GetStateOptionsTable()
end
end
end
return options
end
+3 -3
View File
@@ -19,7 +19,7 @@ function BagBarMod:SetupOptions()
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
local onebag = {
type = "toggle",
order = 80,
@@ -29,7 +29,7 @@ function BagBarMod:SetupOptions()
set = function(info, state) self.db.profile.onebag = state; self.bar:FeedButtons(); self.bar:UpdateButtonLayout() end,
}
self.optionobject:AddElement("general", "onebag", onebag)
local keyring = {
type = "toggle",
order = 80,
@@ -39,7 +39,7 @@ function BagBarMod:SetupOptions()
set = function(info, state) self.db.profile.keyring = state; self.bar:FeedButtons(); self.bar:UpdateButtonLayout() end,
}
self.optionobject:AddElement("general", "keyring", keyring)
self.disabledoptions = {
general = {
type = "group",
+11 -11
View File
@@ -20,62 +20,62 @@ do
fadeoutdelay = "FadeOutDelay",
clickthrough = "ClickThrough",
}
-- retrieves a valid bar object from the barregistry table
function getBar(id)
local bar = barregistry[tostring(id)]
assert(bar, ("Invalid bar id in options table. (%s)"):format(id))
return bar
end
-- calls a function on the bar
function callFunc(bar, type, option, ...)
local func = type .. (optionMap[option] or option)
assert(bar[func], ("Invalid get/set function %s in bar %s."):format(func, bar.id))
return bar[func](bar, ...)
end
-- universal function to get a option
function optGetter(info)
local bar = getBar(info[2])
local option = info[#info]
return callFunc(bar, "Get", option)
end
-- universal function to set a option
function optSetter(info, ...)
local bar = getBar(info[2])
local option = info[#info]
return callFunc(bar, "Set", option, ...)
end
function visibilityGetter(info, ...)
local bar = getBar(info[2])
local option = info[#info]
return bar:GetVisibilityOption(option, ...)
end
function visibilitySetter(info, ...)
local bar = getBar(info[2])
local option = info[#info]
bar:SetVisibilityOption(option, ...)
end
function customEnabled(info)
local bar = getBar(info[2])
return bar:GetVisibilityOption("custom")
end
function customDisabled(info)
local bar = getBar(info[2])
return not bar:GetVisibilityOption("custom")
end
function customCopy(info)
local bar = getBar(info[2])
bar:CopyCustomConditionals()
end
function clickThroughVis(info)
local bar = getBar(info[2])
return (not bar.ClickThroughSupport)
@@ -86,7 +86,7 @@ local _, class = UnitClass("player")
local function getStanceTable()
local num = GetNumShapeshiftForms()
local tbl = {}
for i = 1, num do
tbl[i] = select(2, GetShapeshiftFormInfo(i))
+4 -4
View File
@@ -20,28 +20,28 @@ do
macrotext = "HideMacroText",
hotkey = "HideHotkey",
}
-- retrieves a valid bar object from the barregistry table
function getBar(id)
local bar = barregistry[tostring(id)]
assert(bar, ("Invalid bar id in options table. (%s)"):format(id))
return bar
end
-- calls a function on the bar
function callFunc(bar, type, option, ...)
local func = type .. (optionMap[option] or option)
assert(bar[func], ("Invalid get/set function %s in bar %s."):format(func, bar.id))
return bar[func](bar, ...)
end
-- universal function to get a option
function optGetter(info)
local bar = getBar(info[2])
local option = info[#info]
return callFunc(bar, "Get", option)
end
-- universal function to set a option
function optSetter(info, ...)
local bar = getBar(info[2])
+1 -1
View File
@@ -19,7 +19,7 @@ function MicroMenuMod:SetupOptions()
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
self.disabledoptions = {
general = {
type = "group",
+12 -12
View File
@@ -7,7 +7,7 @@ do
function getFunc(info)
return (info.arg and Bartender4.db.profile[info.arg] or Bartender4.db.profile[info[#info]])
end
function setFunc(info, value)
local key = info.arg or info[#info]
Bartender4.db.profile[key] = value
@@ -147,7 +147,7 @@ local function getOptions()
get = function()
return Bartender4.db.profile.outofrange
end,
set = function(info, value)
set = function(info, value)
Bartender4.db.profile.outofrange = value
Bartender4.Bar:ForAll("ApplyConfig")
end,
@@ -220,12 +220,12 @@ local function getOptions()
end
function Bartender4:ChatCommand(input)
if InCombatLockdown() then
if InCombatLockdown() then
self:Print(L["Cannot access options during combat."])
return
end
if not input or input:trim() == "" then
LibStub("AceConfigDialog-3.0"):Open("Bartender4")
LibStub("AceConfigDialog-3.0"):Open("Bartender4")
else
LibStub("AceConfigCmd-3.0").HandleCommand(Bartender4, "bt", "Bartender4", input)
end
@@ -234,14 +234,14 @@ end
function Bartender4:SetupOptions()
LibStub("AceConfig-3.0"):RegisterOptionsTable("Bartender4", getOptions)
AceConfigDialog:SetDefaultSize("Bartender4", 680,525)
local optFunc = function()
local optFunc = function()
if InCombatLockdown() then return end
AceConfigDialog:Open("Bartender4")
--[[
AceConfigDialog:Open("Bartender4")
--[[
local status = AceConfigDialog:GetStatusTable("Bartender4")
if not status.groups then status.groups = {} end
if not status.groups.groups then status.groups.groups = {} end
status.groups.groups["actionbars"] = true
if not status.groups then status.groups = {} end
if not status.groups.groups then status.groups.groups = {} end
status.groups.groups["actionbars"] = true
]]
end
self:RegisterChatCommand( "bar", "ChatCommand")
@@ -280,7 +280,7 @@ function optionParent:AddElement(category, element, data, ...)
end
lvl = lvl.args[key]
end
lvl.args[element] = data
end
@@ -298,6 +298,6 @@ function Bartender4:NewOptionObject(otbl)
for k, v in pairs(optionParent) do
tbl[k] = v
end
return tbl
end
+4 -4
View File
@@ -8,9 +8,9 @@ local ButtonBar = Bartender4.ButtonBar.prototype
function PetBarMod:SetupOptions()
if not self.options then
self.optionobject = ButtonBar:GetOptionObject()
self.optionobject.table.general.args.rows.max = 10
local enabled = {
type = "toggle",
order = 1,
@@ -21,7 +21,7 @@ function PetBarMod:SetupOptions()
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
self.disabledoptions = {
general = {
type = "group",
@@ -33,7 +33,7 @@ function PetBarMod:SetupOptions()
}
}
}
self.options = {
order = 30,
type = "group",
+2 -2
View File
@@ -17,7 +17,7 @@ function RepBarMod:SetupOptions()
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
self.disabledoptions = {
general = {
type = "group",
@@ -56,7 +56,7 @@ function XPBarMod:SetupOptions()
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
self.disabledoptions = {
general = {
type = "group",
+2 -2
View File
@@ -20,7 +20,7 @@ function StanceBarMod:SetupOptions()
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
self.disabledoptions = {
general = {
type = "group",
@@ -32,7 +32,7 @@ function StanceBarMod:SetupOptions()
}
}
}
self.options = {
order = 30,
type = "group",
+1 -1
View File
@@ -19,7 +19,7 @@ function VehicleBarMod:SetupOptions()
handler = self,
}
self.optionobject:AddElement("general", "enabled", enabled)
self.disabledoptions = {
general = {
type = "group",