awful.widget.tasklist: remove otable usage

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

View File

@ -8,8 +8,8 @@
local capi = { screen = screen, local capi = { screen = screen,
image = image, image = image,
client = client } client = client }
local otable = require("otable")
local ipairs = ipairs local ipairs = ipairs
local setmetatable = setmetatable
local table = table local table = table
local hooks = require("awful.hooks") local hooks = require("awful.hooks")
local common = require("awful.widget.common") local common = require("awful.widget.common")
@ -50,7 +50,7 @@ function new(label, buttons)
bg_resize = true, bg_resize = true,
bg_align = "right" bg_align = "right"
} }
local data = otable() local data = setmetatable({}, { __mode = 'k' })
local u = function () tasklist_update(w, buttons, label, data, widgets) end local u = function () tasklist_update(w, buttons, label, data, widgets) end
hooks.arrange.register(u) hooks.arrange.register(u)
hooks.clients.register(u) hooks.clients.register(u)
@ -69,8 +69,6 @@ function new(label, buttons)
end end
end) end)
u() u()
-- Free data on unmanage
hooks.unmanage.register(function (c) data[c] = nil end)
return w return w
end end