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:
parent
92dc63fe02
commit
9fce440078
|
@ -184,10 +184,10 @@ end
|
||||||
-- @param size Optional size. If this is specified, subdirectories <size>x<size>
|
-- @param size Optional size. If this is specified, subdirectories <size>x<size>
|
||||||
-- of the dirs are searched first
|
-- of the dirs are searched first
|
||||||
function util.geticonpath(iconname, exts, dirs, size)
|
function util.geticonpath(iconname, exts, dirs, size)
|
||||||
exts = exts or { 'png', 'gif' }
|
local exts = exts or { 'png', 'gif' }
|
||||||
dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' }
|
local dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' }
|
||||||
icontypes = { 'apps', 'actions', 'categories', 'emblems',
|
local icontypes = { 'apps', 'actions', 'categories', 'emblems',
|
||||||
'mimetypes', 'status', 'devices', 'extras', 'places', 'stock' }
|
'mimetypes', 'status', 'devices', 'extras', 'places', 'stock' }
|
||||||
for _, d in pairs(dirs) do
|
for _, d in pairs(dirs) do
|
||||||
local icon
|
local icon
|
||||||
for _, e in pairs(exts) do
|
for _, e in pairs(exts) do
|
||||||
|
|
Loading…
Reference in New Issue