Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

.

  • Loading branch information...
commit b877935e7990e9057b0493275ae5f1e3a76d778b 1 parent e57185e
@yaroot authored
Showing with 15 additions and 7 deletions.
  1. +15 −7 addonMan.lua
View
22 addonMan.lua
@@ -227,16 +227,24 @@ f:SetScript('OnShow', function()
search:SetAutoFocus(false)
search:SetScript('OnTextChanged', function(self)
local str = self:GetText()
+ wipe(showlist)
if(str == '') then
- wipe(showlist)
- for k, v in ipairs(addons) do
- showlist[k] = v
+ for i, name in ipairs(addons) do
+ showlist[i] = name
+ end
+ elseif(str == 'enabled' or str == 'disabled') then
+ for i, name in ipairs(addons) do
+ local cfg = proxy[name]
+ local enabled = cfg.enabled
+ if(enabled and str == 'enabled') or
+ (not enabled and str == 'disabled') then
+ tinsert(showlist, name)
+ end
end
else
- wipe(showlist)
- for k, v in ipairs(addons) do
- if(v:lower():find(str)) then
- tinsert(showlist, v)
+ for i, name in ipairs(addons) do
+ if(name:lower():find(str)) then
+ tinsert(showlist, name)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.