diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-07 04:10:57 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-07 04:10:57 +0100 |
commit | 5f41c7a23857cc52ea09b657cf190ff7ef02fdcc (patch) | |
tree | 4557ba2507de1b2d03d8bc18f96a07b6ac6b5e43 /init.lua | |
parent | ee64644ddcec5b6a58a5b5e58477b2eb60588396 (diff) | |
download | vicious-legacy-5f41c7a23857cc52ea09b657cf190ff7ef02fdcc.tar.xz |
init: do not use keyword type for user data
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -93,16 +93,16 @@ local function update(widget, reg, disablecache) local data = {} -- Check for chached output newer than the last update - if widget_cache[reg.type] ~= nil then - local c = widget_cache[reg.type] + if widget_cache[reg.wtype] ~= nil then + local c = widget_cache[reg.wtype] if (c.time == nil or c.time <= t-reg.timer) or disablecache then - c.time, c.data = t, reg.type(reg.format, reg.warg) + c.time, c.data = t, reg.wtype(reg.format, reg.warg) end data = c.data else - data = reg.type(reg.format, reg.warg) + data = reg.wtype(reg.format, reg.warg) end if type(data) == "table" then @@ -179,7 +179,7 @@ function register(widget, wtype, format, timer, warg) local widget = widget -- Set properties - reg.type = wtype + reg.wtype = wtype reg.format = format reg.timer = timer reg.warg = warg @@ -240,9 +240,9 @@ end -- }}} -- {{{ Enable caching of a widget type -function cache(type) - if widget_cache[type] == nil then - widget_cache[type] = {} +function cache(wtype) + if widget_cache[wtype] == nil then + widget_cache[wtype] = {} end end -- }}} |