From f8a9c59d5086ef3e8573973a336fac9a280aca3c Mon Sep 17 00:00:00 2001 From: Jordan Christiansen Date: Mon, 25 Nov 2019 15:35:41 -0600 Subject: [PATCH] Improve textclock property docs (#2926) * Add format docs to the constructor. * Add timezone docs to the property. * Give the argument to set_refresh a name other than "How". * Fix bug in constructor argument "format" rendering. --- lib/wibox/widget/textclock.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/wibox/widget/textclock.lua b/lib/wibox/widget/textclock.lua index 0865c173..7d44f2e4 100644 --- a/lib/wibox/widget/textclock.lua +++ b/lib/wibox/widget/textclock.lua @@ -44,6 +44,8 @@ function textclock:get_format() end --- Set the clock's timezone +-- e.g. "Z" for UTC, "±hh:mm" or "Europe/Amsterdam". See +-- [GTimeZone](https://developer.gnome.org/glib/stable/glib-GTimeZone.html#g-time-zone-new). -- @property timezone -- @tparam string timezone @@ -59,7 +61,7 @@ end --- Set the clock's refresh rate -- @property refresh --- @tparam number How often the clock is updated, in seconds +-- @tparam number refresh How often the clock is updated, in seconds function textclock:set_refresh(refresh) self._private.refresh = refresh or self._private.refresh @@ -84,11 +86,9 @@ end --- Create a textclock widget. It draws the time it is in a textbox. -- --- @tparam[opt=" %a %b %d, %H:%M "] string format The time format. +-- @tparam[opt=" %a %b %d, %H:%M "] string format The time [format](#format). -- @tparam[opt=60] number refresh How often to update the time (in seconds). --- @tparam[opt=local timezone] string timezone The timezone to use, --- e.g. "Z" for UTC, "±hh:mm" or "Europe/Amsterdam". See --- https://developer.gnome.org/glib/stable/glib-GTimeZone.html#g-time-zone-new. +-- @tparam[opt=local timezone] string timezone The [timezone](#timezone) to use. -- @treturn table A textbox widget. -- @constructorfct wibox.widget.textclock local function new(format, refresh, tzid)