docs: ignore awful/widget/init.lua, not common
This commit is contained in:
parent
2930c0ab4a
commit
65ad83ac30
|
@ -47,7 +47,7 @@ file = {
|
||||||
'../lib/awful/startup_notification.lua',
|
'../lib/awful/startup_notification.lua',
|
||||||
|
|
||||||
-- Ignore some parts of the widget library
|
-- Ignore some parts of the widget library
|
||||||
'../lib/awful/widget/common.lua',
|
'../lib/awful/widget/init.lua',
|
||||||
|
|
||||||
-- exclude layout, but we need an extra bit of documentation elsewhere.
|
-- exclude layout, but we need an extra bit of documentation elsewhere.
|
||||||
'../lib/awful/layout/suit/'
|
'../lib/awful/layout/suit/'
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
-- @author Julien Danjou <julien@danjou.info>
|
-- @author Julien Danjou <julien@danjou.info>
|
||||||
-- @copyright 2008-2009 Julien Danjou
|
-- @copyright 2008-2009 Julien Danjou
|
||||||
-- @release @AWESOME_VERSION@
|
-- @release @AWESOME_VERSION@
|
||||||
|
-- @classmod awful.widget.common
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Grab environment we need
|
-- Grab environment we need
|
||||||
|
@ -20,6 +21,10 @@ local textbox = require("wibox.widget.textbox")
|
||||||
--- Common utilities for awful widgets
|
--- Common utilities for awful widgets
|
||||||
local common = {}
|
local common = {}
|
||||||
|
|
||||||
|
--- Common method to create buttons.
|
||||||
|
-- @tab buttons
|
||||||
|
-- @param object
|
||||||
|
-- @treturn table
|
||||||
function common.create_buttons(buttons, object)
|
function common.create_buttons(buttons, object)
|
||||||
if buttons then
|
if buttons then
|
||||||
local btns = {}
|
local btns = {}
|
||||||
|
@ -38,6 +43,14 @@ function common.create_buttons(buttons, object)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Common update method.
|
||||||
|
-- @param w The widget.
|
||||||
|
-- @tab buttons
|
||||||
|
-- @func label Function to generate label parameters from an object.
|
||||||
|
-- The function gets passed an object from `objects`, and
|
||||||
|
-- has to return `text`, `bg`, `bg_image`, `icon`.
|
||||||
|
-- @tab data Current data/cache, indexed by objects.
|
||||||
|
-- @tab objects Objects to be displayed / updated.
|
||||||
function common.list_update(w, buttons, label, data, objects)
|
function common.list_update(w, buttons, label, data, objects)
|
||||||
-- update the widgets, creating them if needed
|
-- update the widgets, creating them if needed
|
||||||
w:reset()
|
w:reset()
|
||||||
|
@ -75,7 +88,7 @@ function common.list_update(w, buttons, label, data, objects)
|
||||||
end
|
end
|
||||||
|
|
||||||
local text, bg, bg_image, icon = label(o)
|
local text, bg, bg_image, icon = label(o)
|
||||||
-- The text might be invalid, so use pcall
|
-- The text might be invalid, so use pcall.
|
||||||
if text == nil or text == "" then
|
if text == nil or text == "" then
|
||||||
m:set_margins(0)
|
m:set_margins(0)
|
||||||
else
|
else
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
-- @author Julien Danjou <julien@danjou.info>
|
-- @author Julien Danjou <julien@danjou.info>
|
||||||
-- @copyright 2008-2009 Julien Danjou
|
-- @copyright 2008-2009 Julien Danjou
|
||||||
-- @release @AWESOME_VERSION@
|
-- @release @AWESOME_VERSION@
|
||||||
-- @module awful.widget
|
-- @classmod awful.widget
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue