comparison Modules/Config.lua @ 140:42d8e16e8483

Fixed MailOpener tab being added to the Blizzard config twice.
author Zerotorescue
date Sat, 29 Jan 2011 22:30:14 +0100
parents b21c39ea338c
children
comparison
equal deleted inserted replaced
139:debff5ad3de4 140:42d8e16e8483
172 -- Register options table 172 -- Register options table
173 LibStub("AceConfig-3.0"):RegisterOptionsTable("Mail Opener", options); 173 LibStub("AceConfig-3.0"):RegisterOptionsTable("Mail Opener", options);
174 -- Set a nice default size 174 -- Set a nice default size
175 AceConfigDialog:SetDefaultSize("Mail Opener", 950, 600); 175 AceConfigDialog:SetDefaultSize("Mail Opener", 950, 600);
176 176
177 -- In case the addon is loaded from another condition, always call the remove interface options 177 -- Remove our old config tab
178 if AddonLoader and AddonLoader.RemoveInterfaceOptions then 178 for k, f in ipairs(INTERFACEOPTIONS_ADDONCATEGORIES) do
179 AddonLoader:RemoveInterfaceOptions("Mail Opener"); 179 if f == "Mail Opener" or f.name == "Mail Opener" then
180 tremove(INTERFACEOPTIONS_ADDONCATEGORIES, k);
181 break;
182 end
180 end 183 end
181 184
182 -- Add to the blizzard addons options thing 185 -- Add to the blizzard addons options thing
183 AceConfigDialog:AddToBlizOptions("Mail Opener"); 186 AceConfigDialog:AddToBlizOptions("Mail Opener");
184 end 187 end