From 74ba84b29937ac4869167732dda0f5924ddac136 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage-Vallee Date: Mon, 30 Dec 2019 22:45:43 -0800 Subject: [PATCH] doc: Make use of the @classsignal tag. It wasn't doing anything until now. --- docs/config.ld | 17 ++++++++++------- docs/ldoc.ltp | 4 ++-- lib/awful/client.lua | 4 ++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/config.ld b/docs/config.ld index 8e1c9f0b3..e9266e6e0 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -514,11 +514,12 @@ local named_args = { -- Sections which are hidden by default, but visible when clicked. local summarize = { - emits = {index = 1, title = "signals" }, - propemits = {index = 2, title = "signals" }, - usebeautiful = {index = 3, title = "theme variables"}, - propbeautiful = {index = 4, title = "theme variables"}, - request = {index = 5, title = "permissions" }, + emits = {index = 1, title = "signals" , count = true }, + propemits = {index = 2, title = "signals" , count = true }, + usebeautiful = {index = 3, title = "theme variables" , count = true }, + propbeautiful = {index = 4, title = "theme variables" , count = true }, + request = {index = 5, title = "permissions" , count = true }, + classsignal = {index = 6, title = "Class level only", count = false}, } local delimiter_for_tag = { @@ -545,7 +546,7 @@ local function generate_summary(item) local tgs = {} 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 for tag, value in pairs(item.tags) do @@ -554,15 +555,17 @@ local function generate_summary(item) end end - local ret = {} + local ret, has_show_more = {}, false for k, v in ipairs(tgs) do if v.count > 0 then ret[#ret+1] = v + has_show_more = v.showcount or has_show_more end end item.extra_summary = #ret > 0 and ret or nil + item.has_show_more = has_show_more end -- We have custom types, sub-types and different rendering. diff --git a/docs/ldoc.ltp b/docs/ldoc.ltp index 7cab17878..477af6763 100644 --- a/docs/ldoc.ltp +++ b/docs/ldoc.ltp @@ -225,7 +225,7 @@ # end # if item.extra_summary then # for _, col in ldoc.ipairs(item.extra_summary) do - · $(col.count.." "..col.title) + · $((col.showcount and col.count.." " or "")..col.title) # end -- summary col # end -- summary @@ -324,7 +324,7 @@ # end -- if usage -# if item.extra_summary then +# if item.has_show_more then
diff --git a/lib/awful/client.lua b/lib/awful/client.lua index 1bf8a6593..32715baf3 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -1654,6 +1654,7 @@ end) -- @signal request::titlebars -- @tparam[opt=nil] string content The context (like "rules") -- @tparam[opt=nil] table hints Some hints. +-- @classsignal --- The client marked signal. -- @deprecatedsignal marked @@ -1674,6 +1675,9 @@ end) -- * **floating**: When the floating or maximization state changes. -- -- @signal request::border +-- @tparam string context The context. +-- @tparam table hints The hints. +-- @classsignal -- @see awful.permissions.update_border -- Add clients during startup to focus history.