Mercurial > wow > reaction
comparison Options.lua @ 227:741c4f9b251e
Better handling of new profiles
| author | Flick |
|---|---|
| date | Mon, 21 Mar 2011 11:10:23 -0700 |
| parents | 8ba8ab8bf6dd |
| children | 36a29870bf34 |
comparison
equal
deleted
inserted
replaced
| 226:76932cdb3d57 | 227:741c4f9b251e |
|---|---|
| 96 AceConfigReg:NotifyChange(configID) | 96 AceConfigReg:NotifyChange(configID) |
| 97 end ) | 97 end ) |
| 98 end | 98 end |
| 99 | 99 |
| 100 AceConfigDialog:AddToBlizOptions(configID, options.args.profiles.name, configID, "profiles") | 100 AceConfigDialog:AddToBlizOptions(configID, options.args.profiles.name, configID, "profiles") |
| 101 | |
| 102 self.db.RegisterCallback(self,"OnProfileChanged") | |
| 103 self.db.RegisterCallback(self,"OnProfileReset", "OnProfileChanged") | |
| 104 self.db.RegisterCallback(self,"OnProfileCopied","OnProfileChanged") | |
| 105 | 101 |
| 106 SlashCmdList["REACTION"] = function(option) | 102 SlashCmdList["REACTION"] = function(option) |
| 107 option = string.match(option or "", "^%s*(%S+)") | 103 option = string.match(option or "", "^%s*(%S+)") |
| 108 if option == "config" or option == "options" then | 104 if option == "config" or option == "options" then |
| 109 ReAction:ShowOptions() | 105 ReAction:ShowOptions() |
| 151 function ReAction:ShowOptions() | 147 function ReAction:ShowOptions() |
| 152 InterfaceOptionsFrame_OpenToCategory(configID) | 148 InterfaceOptionsFrame_OpenToCategory(configID) |
| 153 end | 149 end |
| 154 | 150 |
| 155 | 151 |
| 156 function ReAction:OnProfileChanged() | |
| 157 self:UpgradeProfile() | |
| 158 self:RebuildAll() | |
| 159 if not self.db.global.skipKeybindWarning then | |
| 160 StaticPopup_Show("REACTION_KB_WARN") | |
| 161 end | |
| 162 end | |
| 163 | |
| 164 | |
| 165 function ReAction:OptionSetConfigMode(info, value) | 152 function ReAction:OptionSetConfigMode(info, value) |
| 166 self:SetConfigMode(value) | 153 self:SetConfigMode(value) |
| 167 end | 154 end |
| 168 | 155 |
| 169 | 156 |
