Allow to disable taglist icons.
This is used if the user want to use a custom drawing method. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
67710d0008
commit
a484ef076d
|
@ -39,6 +39,7 @@ function taglist.taglist_label(t, args)
|
||||||
local taglist_squares_sel_empty = args.squares_sel_empty or theme.taglist_squares_sel_empty
|
local taglist_squares_sel_empty = args.squares_sel_empty or theme.taglist_squares_sel_empty
|
||||||
local taglist_squares_unsel_empty = args.squares_unsel_empty or theme.taglist_squares_unsel_empty
|
local taglist_squares_unsel_empty = args.squares_unsel_empty or theme.taglist_squares_unsel_empty
|
||||||
local taglist_squares_resize = theme.taglist_squares_resize or args.squares_resize or "true"
|
local taglist_squares_resize = theme.taglist_squares_resize or args.squares_resize or "true"
|
||||||
|
local taglist_disable_icon = args.taglist_disable_icon or theme.taglist_disable_icon or false
|
||||||
local font = args.font or theme.taglist_font or theme.font or ""
|
local font = args.font or theme.taglist_font or theme.font or ""
|
||||||
local text = "<span font_desc='"..font.."'>"
|
local text = "<span font_desc='"..font.."'>"
|
||||||
local sel = capi.client.focus
|
local sel = capi.client.focus
|
||||||
|
@ -101,13 +102,15 @@ function taglist.taglist_label(t, args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
text = text .. "</span>"
|
text = text .. "</span>"
|
||||||
if tag.geticon(t) and type(tag.geticon(t)) == "image" then
|
if not taglist_disable_icon then
|
||||||
icon = tag.geticon(t)
|
if tag.geticon(t) and type(tag.geticon(t)) == "image" then
|
||||||
elseif tag.geticon(t) then
|
icon = tag.geticon(t)
|
||||||
icon = surface.load(tag.geticon(t))
|
elseif tag.geticon(t) then
|
||||||
|
icon = surface.load(tag.geticon(t))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return text, bg_color, bg_image, icon
|
return text, bg_color, bg_image, not taglist_disable_icon and icon or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local function taglist_update(s, w, buttons, filter, data, style, update_function)
|
local function taglist_update(s, w, buttons, filter, data, style, update_function)
|
||||||
|
|
Loading…
Reference in New Issue