awful: avoid concat of nil

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-21 14:57:31 +02:00
parent 1dab8894a7
commit c3a1e36be1
1 changed files with 16 additions and 5 deletions

View File

@ -1450,18 +1450,29 @@ function titlebar.update(c)
c.titlebar.fg = titlebar.data[c].fg_focus
c.titlebar.bg = titlebar.data[c].bg_focus
if close then
close.text = theme.titlebar_close_button_focus or
"<bg image=\"" .. theme.titlebar_close_button_img_focus .. "\" resize=\"true\"/>" or
if theme.titlebar_close_button_focus then
close.text = theme.titlebar_close_button_focus
elseif theme.titlebar_close_button_img_focus then
close.text =
"<bg image=\"" .. theme.titlebar_close_button_img_focus .. "\" resize=\"true\"/>"
else
close.text =
"<bg image=\"@AWESOME_ICON_PATH@/titlebar/closer.png\" resize=\"true\"/>"
end
end
else
c.titlebar.fg = titlebar.data[c].fg
c.titlebar.bg = titlebar.data[c].bg
if close then
close.text = theme.titlebar_close_button_normal or
"<bg image=\"" .. theme.titlebar_close_button_img_normal .. "\" resize=\"true\"/>" or
if theme.titlebar_close_button_normal then
close.text = theme.titlebar_close_button_normal
elseif theme.titlebar_close_button_img_normal then
close.text =
"<bg image=\"" .. theme.titlebar_close_button_img_normal .. "\" resize=\"true\"/>"
else
close.text =
"<bg image=\"@AWESOME_ICON_PATH@/titlebar/close.png\" resize=\"true\"/>"
end
end
end
end