awful.widget.taglist: remove otable usage

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-11 14:14:50 +02:00
parent 4db50647fe
commit 2dfbd6ea2c
1 changed files with 2 additions and 6 deletions

View File

@ -9,8 +9,8 @@ local capi = { widget = widget,
screen = screen,
image = image,
client = client }
local otable = require("otable")
local type = type
local setmetatable = setmetatable
local pairs = pairs
local ipairs = ipairs
local hooks = require("awful.hooks")
@ -48,7 +48,7 @@ function new(screen, label, buttons)
["right"] = 0},
["bg_resize"] = true
}
local data = otable()
local data = setmetatable({}, { __mode = 'k' })
local u = function (s)
if s == screen then
taglist_update(s, w, label, buttons, data, widgets)
@ -65,10 +65,6 @@ function new(screen, label, buttons)
u(c.screen)
end
end)
-- Free data on tag removal
hooks.tags.register(function (s, tag, action)
if action == "remove" then data[tag] = nil end
end)
u(screen)
return w
end