awful.util.geticonpath: Correctly localize variables

This function was accidentally setting the global variable "icontypes". Fix this
by adding the needed "local" and also localize some more variables for
consistency.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-05-03 11:15:14 +02:00
parent 92dc63fe02
commit 9fce440078
1 changed files with 4 additions and 4 deletions

View File

@ -184,9 +184,9 @@ end
-- @param size Optional size. If this is specified, subdirectories <size>x<size>
-- of the dirs are searched first
function util.geticonpath(iconname, exts, dirs, size)
exts = exts or { 'png', 'gif' }
dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' }
icontypes = { 'apps', 'actions', 'categories', 'emblems',
local exts = exts or { 'png', 'gif' }
local dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' }
local icontypes = { 'apps', 'actions', 'categories', 'emblems',
'mimetypes', 'status', 'devices', 'extras', 'places', 'stock' }
for _, d in pairs(dirs) do
local icon