Add optional support for dual-spec profiles using LibDualSpec-1.0.
Johnny C. Lam [03-16-13 - 09:07]
Add optional support for dual-spec profiles using LibDualSpec-1.0.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@787 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/.pkgmeta b/.pkgmeta
index 3bc71e8..df03946 100644
--- a/.pkgmeta
+++ b/.pkgmeta
@@ -9,6 +9,7 @@ externals:
Libs/AceGUI-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
Libs/AceEvent-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
Libs/AceLocale-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
+ Libs/LibDualSpec-1.0: git://git.wowace.com/wow/libdualspec-1-0/mainline.git
Libs/LibStub: svn://svn.wowace.com/wow/ace3/mainline/trunk/LibStub
Libs/LibBabble-CreatureType-3.0: svn://svn.wowace.com/wow/libbabble-creaturetype-3-0/mainline/trunk
Libs/CallbackHandler-1.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/CallbackHandler-1.0
diff --git a/Ovale.toc b/Ovale.toc
index 382dc81..f0c34f6 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -5,13 +5,16 @@
## Notes-frFR: Affiche l'icône du prochain sort à lancer
## Author: Sidoine
## Version: @project-version@
-## OptionalDeps: Ace3, Masque, Recount, Skada, LibBabble-CreatureType-3.0, LibRangeCheck-2.0
+## OptionalDeps: Ace3, Masque, Recount, Skada, LibBabble-CreatureType-3.0, LibDualSpec-1.0, LibRangeCheck-2.0
## SavedVariables: OvaleDB
## SavedVariablesPerCharacter: OvaleDBPC
## X-Category: Combat
## X-Embeds: Ace3
embeds.xml
+#@no-lib-strip@
+libs\LibDualSpec-1.0\LibDualSpec-1.0.lua
+#@end-no-lib-strip@
Locale-frFR.lua
Locale-deDE.lua
diff --git a/OvaleOptions.lua b/OvaleOptions.lua
index e02ce9b..af00c90 100644
--- a/OvaleOptions.lua
+++ b/OvaleOptions.lua
@@ -29,6 +29,7 @@ OvaleOptions.db = nil
--<private-static-properties>
local AceConfig = LibStub("AceConfig-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
+local LibDualSpec = LibStub("LibDualSpec-1.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Ovale")
--GUI option
@@ -540,6 +541,11 @@ function OvaleOptions:OnInitialize()
})
options.args.profile = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
+
+ -- Add dual-spec support
+ LibDualSpec:EnhanceDatabase(self.db, "Ovale")
+ LibDualSpec:EnhanceOptions(options.args.profile, self.db)
+
AceConfig:RegisterOptionsTable("Ovale", options.args.code)
AceConfig:RegisterOptionsTable("Ovale Actions", options.args.actions, "Ovale")
AceConfig:RegisterOptionsTable("Ovale Profile", options.args.profile)