doc: Make use of the @classsignal tag.

It wasn't doing anything until now.
This commit is contained in:
Emmanuel Lepage-Vallee 2019-12-30 22:45:43 -08:00 committed by Emmanuel Lepage Vallee
parent 575b0f12dc
commit 74ba84b299
3 changed files with 16 additions and 9 deletions

View File

@ -514,11 +514,12 @@ local named_args = {
-- Sections which are hidden by default, but visible when clicked. -- Sections which are hidden by default, but visible when clicked.
local summarize = { local summarize = {
emits = {index = 1, title = "signals" }, emits = {index = 1, title = "signals" , count = true },
propemits = {index = 2, title = "signals" }, propemits = {index = 2, title = "signals" , count = true },
usebeautiful = {index = 3, title = "theme variables"}, usebeautiful = {index = 3, title = "theme variables" , count = true },
propbeautiful = {index = 4, title = "theme variables"}, propbeautiful = {index = 4, title = "theme variables" , count = true },
request = {index = 5, title = "permissions" }, request = {index = 5, title = "permissions" , count = true },
classsignal = {index = 6, title = "Class level only", count = false},
} }
local delimiter_for_tag = { local delimiter_for_tag = {
@ -545,7 +546,7 @@ local function generate_summary(item)
local tgs = {} local tgs = {}
for k, v in pairs(summarize) do for k, v in pairs(summarize) do
tgs[v.index] = {title=v.title, count=0} tgs[v.index] = {title=v.title, count=0, showcount=v.count}
end end
for tag, value in pairs(item.tags) do for tag, value in pairs(item.tags) do
@ -554,15 +555,17 @@ local function generate_summary(item)
end end
end end
local ret = {} local ret, has_show_more = {}, false
for k, v in ipairs(tgs) do for k, v in ipairs(tgs) do
if v.count > 0 then if v.count > 0 then
ret[#ret+1] = v ret[#ret+1] = v
has_show_more = v.showcount or has_show_more
end end
end end
item.extra_summary = #ret > 0 and ret or nil item.extra_summary = #ret > 0 and ret or nil
item.has_show_more = has_show_more
end end
-- We have custom types, sub-types and different rendering. -- We have custom types, sub-types and different rendering.

View File

@ -225,7 +225,7 @@
# end # end
# if item.extra_summary then # if item.extra_summary then
# for _, col in ldoc.ipairs(item.extra_summary) do # for _, col in ldoc.ipairs(item.extra_summary) do
&middot $(col.count.." "..col.title) &middot $((col.showcount and col.count.." " or "")..col.title)
# end -- summary col # end -- summary col
# end -- summary # end -- summary
</span> </span>
@ -324,7 +324,7 @@
</ul> </ul>
# end -- if usage # end -- if usage
# if item.extra_summary then # if item.has_show_more then
<br /> <br />
<center id=button$(item.uid)> <center id=button$(item.uid)>
<a class="show_more_button" onclick="show_extra('$(item.uid)')"> <a class="show_more_button" onclick="show_extra('$(item.uid)')">

View File

@ -1654,6 +1654,7 @@ end)
-- @signal request::titlebars -- @signal request::titlebars
-- @tparam[opt=nil] string content The context (like "rules") -- @tparam[opt=nil] string content The context (like "rules")
-- @tparam[opt=nil] table hints Some hints. -- @tparam[opt=nil] table hints Some hints.
-- @classsignal
--- The client marked signal. --- The client marked signal.
-- @deprecatedsignal marked -- @deprecatedsignal marked
@ -1674,6 +1675,9 @@ end)
-- * **floating**: When the floating or maximization state changes. -- * **floating**: When the floating or maximization state changes.
-- --
-- @signal request::border -- @signal request::border
-- @tparam string context The context.
-- @tparam table hints The hints.
-- @classsignal
-- @see awful.permissions.update_border -- @see awful.permissions.update_border
-- Add clients during startup to focus history. -- Add clients during startup to focus history.