Mercurial > wow > ouroloot
comparison core.lua @ 49:fd3dd12f96ce
Handle text generation modules being LoadOnDemand. lib-st widget to v5 to fix handling multiple live ST instances.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Sun, 29 Jan 2012 03:38:30 +0000 |
| parents | 22db12e97313 |
| children | 973d7396e0bf |
comparison
equal
deleted
inserted
replaced
| 48:22db12e97313 | 49:fd3dd12f96ce |
|---|---|
| 553 button:SetText('"/ouroloot opt"') | 553 button:SetText('"/ouroloot opt"') |
| 554 button:SetPoint("TOPLEFT",20,-20) | 554 button:SetPoint("TOPLEFT",20,-20) |
| 555 _b:SetScript("OnShow",nil) | 555 _b:SetScript("OnShow",nil) |
| 556 end) | 556 end) |
| 557 _G.InterfaceOptions_AddCategory(bliz) | 557 _G.InterfaceOptions_AddCategory(bliz) |
| 558 | |
| 559 self:_scan_LOD_modules() | |
| 558 | 560 |
| 559 if self.debug.flow then self:Print"is in control-flow debug mode." end | 561 if self.debug.flow then self:Print"is in control-flow debug mode." end |
| 560 end | 562 end |
| 561 --function addon:OnDisable() end | 563 --function addon:OnDisable() end |
| 562 | 564 |
| 1101 function addon:log_with_timestamp (msg) | 1103 function addon:log_with_timestamp (msg) |
| 1102 tinsert (_log, date('%m:%d %H:%M:%S ')..msg) | 1104 tinsert (_log, date('%m:%d %H:%M:%S ')..msg) |
| 1103 end | 1105 end |
| 1104 end | 1106 end |
| 1105 | 1107 |
| 1108 -- Check for plugins which haven't already been loaded, and add hooks for | |
| 1109 -- them. Credit to DBM for the approach here. | |
| 1110 function addon:_scan_LOD_modules() | |
| 1111 for i = 1, GetNumAddOns() do | |
| 1112 if GetAddOnMetadata (i, "X-OuroLoot-Plugin") | |
| 1113 and IsAddOnLoadOnDemand(i) | |
| 1114 and not IsAddOnLoaded(i) | |
| 1115 then | |
| 1116 local folder, _, _, enabled, _, reason = GetAddOnInfo(i) | |
| 1117 local tabtitle = GetAddOnMetadata (i, "X-OuroLoot-Plugin") | |
| 1118 self:_gui_add_LOD_tab (tabtitle, folder, i, enabled, reason) | |
| 1119 end | |
| 1120 end | |
| 1121 end | |
| 1122 | |
| 1106 -- Adds indices to traverse the tables in a nice sorted order. | 1123 -- Adds indices to traverse the tables in a nice sorted order. |
| 1107 do | 1124 do |
| 1108 local byindex, temp = {}, {} | 1125 local byindex, temp = {}, {} |
| 1109 local function sort (src, dest) | 1126 local function sort (src, dest) |
| 1110 for k in pairs(src) do | 1127 for k in pairs(src) do |
