summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorNicolas Schodet2017-09-07 14:03:06 +0200
committerNicolas Schodet2017-09-07 14:03:06 +0200
commit2a958b324624ef16f5edb424b9ca75a8eec20c52 (patch)
treec4508c2b3791270b97dfe71a8e03295ecf51be2e /widgets
parent79b48db4ef04c464898208df7639123f61b35781 (diff)
widget/cal: port to 4.0
Diffstat (limited to 'widgets')
-rw-r--r--widgets/cal.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/widgets/cal.lua b/widgets/cal.lua
index 24c9755..10dc982 100644
--- a/widgets/cal.lua
+++ b/widgets/cal.lua
@@ -88,14 +88,12 @@ function register(mywidget, custom_current_day_format)
function tooltip:update()
local month, year = os.date('%m'), os.date('%Y')
state = {month, year}
- tooltip:set_text(string.format('<span font_desc="monospace">%s</span>', displayMonth(month, year, 2)))
+ tooltip:set_markup(displayMonth(month, year, 2))
end
tooltip:update()
end
tooltip:add_to_object(mywidget)
- mywidget:add_signal("mouse::enter",tooltip.update)
-
mywidget:buttons(awful.util.table.join(
awful.button({ }, 1, function()
switchMonth(-1)
@@ -125,6 +123,6 @@ end
function switchMonth(delta)
state[1] = state[1] + (delta or 1)
- local text = string.format('<span font_desc="monospace">%s</span>', displayMonth(state[1], state[2], 2))
- tooltip:set_text(text)
+ local text = displayMonth(state[1], state[2], 2)
+ tooltip:set_markup(text)
end