naughty: fix a bug in destroy()
+ hooks.timer.unregister gets notification.die not .timer + remove pointless comments Signed-off-by: koniu <gkusnierz@gmail.com>
This commit is contained in:
parent
d6964c2052
commit
3cc64ab081
|
@ -3,18 +3,6 @@
|
||||||
-- @copyright 2008 koniu
|
-- @copyright 2008 koniu
|
||||||
-- @release @AWESOME_VERSION@
|
-- @release @AWESOME_VERSION@
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
|
||||||
-- Usage:
|
|
||||||
--
|
|
||||||
-- require("naughty")
|
|
||||||
-- naughty.notify({ text = "notification",
|
|
||||||
-- title = "title",
|
|
||||||
-- position = "top_left"|"top_right"|"bottom_left"|"bottom_right",
|
|
||||||
-- timeout = 5,
|
|
||||||
-- icon="/path/to/image",
|
|
||||||
-- fg="#ffggcc",
|
|
||||||
-- bg="#bbggcc",
|
|
||||||
-- screen = 1 })
|
|
||||||
|
|
||||||
-- Package environment
|
-- Package environment
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
@ -151,7 +139,7 @@ end
|
||||||
function destroy(notification)
|
function destroy(notification)
|
||||||
if notification then
|
if notification then
|
||||||
notification.box.screen = nil
|
notification.box.screen = nil
|
||||||
hooks.timer.unregister(notification.timer)
|
hooks.timer.unregister(notification.die)
|
||||||
table.remove(notifications[notification.position], notification.idx)
|
table.remove(notifications[notification.position], notification.idx)
|
||||||
arrange()
|
arrange()
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue