Mercurial > wow > mailopener
comparison Core.lua @ 135:9998d4ff8152
A C stack overflow when clicking the mail opener options in the interface -> addons tab should no longer occur.
| author | Zerotorescue |
|---|---|
| date | Fri, 12 Nov 2010 17:57:05 +0100 |
| parents | 27d81641c1e7 |
| children | debff5ad3de4 |
comparison
equal
deleted
inserted
replaced
| 134:77cd26a69d4f | 135:9998d4ff8152 |
|---|---|
| 144 | 144 |
| 145 -- Now create our own options frame | 145 -- Now create our own options frame |
| 146 local frame = CreateFrame("Frame", nil, UIParent); | 146 local frame = CreateFrame("Frame", nil, UIParent); |
| 147 frame:Hide(); | 147 frame:Hide(); |
| 148 frame.name = "Mail Opener"; | 148 frame.name = "Mail Opener"; |
| 149 frame.fresh = true; | |
| 149 frame:HookScript("OnShow", function(self) | 150 frame:HookScript("OnShow", function(self) |
| 150 -- Enable the config module | 151 if self.fresh then |
| 151 MailOpener:EnableConfigModule(); | 152 self.fresh = nil; |
| 152 | 153 |
| 153 -- Load the options and add it to the blizzard interface list | 154 -- Enable the config module |
| 154 MailOpenerConfig:Load(); | 155 MailOpener:EnableConfigModule(); |
| 155 | 156 |
| 156 -- Refresh the frame to instantly show the right options | 157 -- Load the options and add it to the blizzard interface list |
| 157 InterfaceOptionsFrame_OpenToCategory(self.name) | 158 MailOpenerConfig:Load(); |
| 159 | |
| 160 -- Refresh the frame to instantly show the right options | |
| 161 InterfaceOptionsFrame_OpenToCategory(self.name); | |
| 162 end | |
| 158 end); | 163 end); |
| 159 -- And add it to the interface options | 164 -- And add it to the interface options |
| 160 InterfaceOptions_AddCategory(frame); | 165 InterfaceOptions_AddCategory(frame); |
| 161 | 166 |
| 162 | 167 |
