diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-13 22:46:45 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-13 22:46:45 +0100 |
commit | 9a82d4113a8271b7dfc7506f2b07379e3ede89a8 (patch) | |
tree | 551894f0cc359fa8170d3f407947a5aed0e5db17 /init.lua | |
parent | 3ac4fcf15056ef392494569a58305e6bd1664d3b (diff) | |
download | vicious-legacy-9a82d4113a8271b7dfc7506f2b07379e3ede89a8.tar.xz |
init: never pass string to awful.widget widgets
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -115,9 +115,9 @@ local function update(widget, reg, disablecache) end if widget.add_value ~= nil then - widget:add_value(data and tonumber(data) / 100) + widget:add_value(tonumber(data) and tonumber(data)/100) elseif widget.set_value ~= nil then - widget:set_value(data and tonumber(data) / 100) + widget:set_value(tonumber(data) and tonumber(data)/100) else widget.text = data end @@ -251,9 +251,9 @@ end -- }}} -- {{{ Force update of widgets -function force(widgets) - if type(widgets) == "table" then - for _, w in pairs(widgets) do +function force(wtable) + if type(wtable) == "table" then + for _, w in pairs(wtable) do update(w, nil, true) end end |