awful.widget: Add a `create_callback` to the common list.

This is like its template equivalent, but "private" to the list
widget.
This commit is contained in:
Emmanuel Lepage Vallee 2019-03-06 18:30:20 -05:00
parent db2d4b92df
commit e79a5c5988
1 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,10 @@ function common.list_update(w, buttons, label, data, objects, args)
cache.create_callback(cache.primary, o, i, objects) cache.create_callback(cache.primary, o, i, objects)
end end
if args and args.create_callback then
args.create_callback(cache.primary, o, i, objects)
end
data[o] = cache data[o] = cache
elseif cache.update_callback then elseif cache.update_callback then
cache.update_callback(cache.primary, o, i, objects) cache.update_callback(cache.primary, o, i, objects)