Menubar utils fix the wm_name matching once more.

The previous attempt at making the utils.wm_name variable useful for
accessing some entries was silly. This is because a typical ShowOnlyIn
string would look as: 'Unity;Gnome;KDE;' and the matching currently is
done for the whole string, where as we need to match only a part of it.

This small (hackish) commit fixes that, or do we wanna parse this line
of a .desktop file properly?

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Ignas Anikevicius (gns_ank) 2013-01-10 02:22:46 +02:00 committed by Uli Schlachter
parent 6608b0aa1c
commit 9631ada0d2
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ function utils.parse(file)
-- Only show the program if there is no OnlyShowIn attribute -- Only show the program if there is no OnlyShowIn attribute
-- or if it's equal to utils.wm_name -- or if it's equal to utils.wm_name
if program.OnlyShowIn ~= nil and program.OnlyShowIn ~= utils.wm_name then if program.OnlyShowIn ~= nil and not program.OnlyShowIn:match(utils.wm_name) then
program.show = false program.show = false
end end