naughty: convert text and title tostring()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Leon Winter 2008-12-11 13:55:25 +01:00 committed by Julien Danjou
parent b4f0e90362
commit 5f8b34b909
1 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ local pairs = pairs
local table = table local table = table
local wibox = wibox local wibox = wibox
local image = image local image = image
local tostring = tostring
local hooks = require("awful.hooks") local hooks = require("awful.hooks")
local string = string local string = string
local widget = widget local widget = widget
@ -262,7 +263,7 @@ function notify(args)
local timeout = args.timeout or (args.preset and args.preset.timeout) or config.presets.normal.timeout local timeout = args.timeout or (args.preset and args.preset.timeout) or config.presets.normal.timeout
local icon = args.icon or (args.preset and args.preset.icon) or config.icon local icon = args.icon or (args.preset and args.preset.icon) or config.icon
local icon_size = args.icon_size or (args.preset and args.preset.icon_size) or config.icon_size local icon_size = args.icon_size or (args.preset and args.preset.icon_size) or config.icon_size
local text = args.text or "" local text = tostring(args.text) or ""
local screen = args.screen or (args.preset and args.preset.screen) or config.presets.normal.screen local screen = args.screen or (args.preset and args.preset.screen) or config.presets.normal.screen
local ontop = args.ontop or config.ontop local ontop = args.ontop or config.ontop
local width = args.width or (args.preset and args.preset.width) or config.presets.normal.width local width = args.width or (args.preset and args.preset.width) or config.presets.normal.width
@ -300,7 +301,7 @@ function notify(args)
notification.idx = #notifications[screen][notification.position] + 1 notification.idx = #notifications[screen][notification.position] + 1
local title = "" local title = ""
if args.title then title = args.title .. "\n" end if args.title then title = tostring(args.title) .. "\n" end
-- hook destroy -- hook destroy
local die = function () destroy(notification) end local die = function () destroy(notification) end