- build the config on demand (might break stuff, srsly)

- add options for configuring the modifier switching
This commit is contained in:
Hendrik Leppkes
2008-04-08 10:31:40 +00:00
parent 7bed8cdf21
commit b6adf401f6
6 changed files with 221 additions and 127 deletions
+8 -3
View File
@@ -20,7 +20,6 @@ local defaults = { profile = Bartender4:Merge({
function MicroMenuMod:OnInitialize()
self.db = Bartender4.db:RegisterNamespace("MicroMenu", defaults)
self:SetEnabledState(self.db.profile.enabled)
self:SetupOptions()
end
local noopFunc = function() end
@@ -53,7 +52,7 @@ function MicroMenuMod:OnEnable()
self.bar:ApplyConfig(self.db.profile)
end
self.bar.disabled = nil
self:SetupOptions()
self:ToggleOptions()
end
function MicroMenuMod:OnDisable()
@@ -61,7 +60,7 @@ function MicroMenuMod:OnDisable()
self.bar.disabled = true
self.bar:UnregisterAllEvents()
self.bar:Hide()
self:SetupOptions()
self:ToggleOptions()
end
function MicroMenuMod:ApplyConfig()
@@ -105,6 +104,12 @@ function MicroMenuMod:SetupOptions()
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
end
function MicroMenuMod:ToggleOptions()
if self.options then
self.options.args = self:IsEnabled() and self.optionobject.table or self.disabledoptions
end
end
function MicroMenuBar:ApplyConfig(config)
Bar.ApplyConfig(self, config)
self:PerformLayout()