diff --git a/docs/03-declarative-layout.md b/docs/03-declarative-layout.md index 19b8479e..d52efa78 100644 --- a/docs/03-declarative-layout.md +++ b/docs/03-declarative-layout.md @@ -429,20 +429,20 @@ Code: Whenever it can, Awesome tries to be asynchronous. This can take various form depending on the situation. For example, the `connect_signal` method allows to execute code when an event arrives. `awful.screen.connect_for_each_screen` also -allow to instantiate various elements when a new screen is added. In the later +allows to instantiate various elements when a new screen is added. In the later case, it is why some widgets are added as properties to other objects instead of being global variables like in previous versions of Awesome. -However, there is a case where this isn't enough an another abstract widget has +However, there is a case where this isn't enough and another abstract widget has to be used. This concept is called the `widget_template` and is an optional property of many widgets such as the `awful.widget.taglist`, -`awful.widget.tasklist` and `naughty.widget.box`. These templates are **table** -using the exact same syntax as the declarative widgets, but without the -`wibox.widget` prefix in front of the curly braces. These template represents -future widgets that will be created by their parent widget. This is necessary -for three reasons: +`awful.widget.tasklist` and `naughty.layout.box`. These templates are a +**table** using the exact same syntax as the declarative widgets, but without +the `wibox.widget` prefix in front of the curly braces. These templates +represents future widgets that will be created by their parent widget. This is +necessary for three reasons: - * The widget must create many instances of the template at different point in + * The widget must create many instances of the template at different points in time. * The widget data is only partially available and other fields must be set at a later time (by the parent widget). diff --git a/lib/naughty/notification.lua b/lib/naughty/notification.lua index 2e0b34cd..f363a288 100644 --- a/lib/naughty/notification.lua +++ b/lib/naughty/notification.lua @@ -516,6 +516,10 @@ local function create(args) private[k] = v end + -- notif.actions should not be nil to allow cheching if there is actions + -- using the shorthand `if #notif.actions > 0 then` + private.actions = private.actions or {} + -- It's an automatic property n.is_expired = false