s/timer/timeout, return cur
This commit is contained in:
parent
f25866f4e5
commit
9301e186ef
8
init.lua
8
init.lua
|
@ -353,13 +353,15 @@ end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Change the timer of a registered widget.
|
-- {{{ Change the timer of a registered widget.
|
||||||
function vicious.change_timer(reg, timer_)
|
function vicious.change_timer(reg, timeout)
|
||||||
if not reg then return end
|
if not reg then return end
|
||||||
if timer_ ~= reg.timer then
|
local cur = reg.timeout
|
||||||
|
if timeout ~= cur then
|
||||||
vicious.unregister(nil, true, reg)
|
vicious.unregister(nil, true, reg)
|
||||||
reg.timer = timer_
|
reg.timeout = timeout
|
||||||
regregister(reg)
|
regregister(reg)
|
||||||
end
|
end
|
||||||
|
return cur
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue