diff --git a/lib/wibox/widget/textclock.lua b/lib/wibox/widget/textclock.lua index aec44521..221bed86 100644 --- a/lib/wibox/widget/textclock.lua +++ b/lib/wibox/widget/textclock.lua @@ -33,13 +33,13 @@ function textclock.new(format, timeout) local w = textbox() local t - function w._textclock_update_cb() + function w._private.textclock_update_cb() w:set_markup(DateTime.new_now_local():format(format)) t.timeout = calc_timeout(timeout) t:again() return true -- Continue the timer end - t = timer.weak_start_new(timeout, w._textclock_update_cb) + t = timer.weak_start_new(timeout, w._private.textclock_update_cb) t:emit_signal("timeout") return w end @@ -48,6 +48,10 @@ function textclock.mt:__call(...) return textclock.new(...) end +--@DOC_widget_COMMON@ + +--@DOC_object_COMMON@ + return setmetatable(textclock, textclock.mt) -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80