This commit is contained in:
Joerg T. (Mic92) 2010-10-10 09:15:23 +02:00
commit 30d0a7d260
1 changed files with 6 additions and 3 deletions

View File

@ -76,6 +76,8 @@ local function update(widget, reg, disablecache)
widget:add_value(tonumber(data) and tonumber(data)/100)
elseif widget.set_value ~= nil then
widget:set_value(tonumber(data) and tonumber(data)/100)
elseif widget.set_markup ~= nil then
widget:set_markup(data)
else
widget.text = data
end
@ -118,6 +120,7 @@ local function regregister(reg)
timers[reg.update] = {
timer = capi.timer({ timeout = reg.timer })
}
local tm = timers[reg.update].timer
if tm.connect_signal then
tm:connect_signal("timeout", reg.update)
@ -125,10 +128,10 @@ local function regregister(reg)
tm:add_signal("timeout", reg.update)
end
tm:start()
end
-- Initial update
reg.update()
-- Initial update
tm:emit_signal("timeout")
end
reg.running = true
end
end