menubar: skip comments in .desktop files
(upstream git commit f2f6eb68214df6369486c55563b957c3572a1c9d)
This commit is contained in:
parent
4623025cf6
commit
2b95e8cbf5
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.84 2014/09/22 09:24:55 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.85 2014/09/29 11:12:54 dcoppa Exp $
|
||||
|
||||
COMMENT= highly configurable framework window manager
|
||||
|
||||
DISTNAME= awesome-3.5.5
|
||||
REVISION= 6
|
||||
REVISION= 7
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
CATEGORIES= x11
|
||||
|
||||
|
@ -1,6 +1,12 @@
|
||||
$OpenBSD: patch-lib_menubar_utils_lua_in,v 1.3 2014/04/15 11:16:04 dcoppa Exp $
|
||||
--- lib/menubar/utils.lua.in.orig Sat Oct 12 18:48:49 2013
|
||||
+++ lib/menubar/utils.lua.in Tue Jan 14 13:26:39 2014
|
||||
$OpenBSD: patch-lib_menubar_utils_lua_in,v 1.4 2014/09/29 11:12:54 dcoppa Exp $
|
||||
|
||||
From f2f6eb68214df6369486c55563b957c3572a1c9d
|
||||
From: Daniel Hahler <git@thequod.de>
|
||||
Date: Thu, 25 Sep 2014 02:47:40 +0200
|
||||
Subject: [PATCH] menubar: skip comments in .desktop files
|
||||
|
||||
--- lib/menubar/utils.lua.in.orig Fri Apr 11 11:07:10 2014
|
||||
+++ lib/menubar/utils.lua.in Mon Sep 29 12:41:40 2014
|
||||
@@ -81,10 +81,10 @@ function utils.lookup_icon(icon_file)
|
||||
local icon_theme_paths = {}
|
||||
local icon_theme = theme.icon_theme
|
||||
@ -25,3 +31,14 @@ $OpenBSD: patch-lib_menubar_utils_lua_in,v 1.3 2014/04/15 11:16:04 dcoppa Exp $
|
||||
|
||||
for i, directory in ipairs(icon_path) do
|
||||
if is_format_supported(icon_file) and awful_util.file_readable(directory .. icon_file) then
|
||||
@@ -129,7 +129,9 @@ function utils.parse(file)
|
||||
-- Parse the .desktop file.
|
||||
-- We are interested in [Desktop Entry] group only.
|
||||
for line in io.lines(file) do
|
||||
- if not desktop_entry and line == "[Desktop Entry]" then
|
||||
+ if line:find("^%s*#") then
|
||||
+ -- Skip comments.
|
||||
+ elseif not desktop_entry and line == "[Desktop Entry]" then
|
||||
desktop_entry = true
|
||||
else
|
||||
if line:sub(1, 1) == "[" and line:sub(-1) == "]" then
|
||||
|
Loading…
x
Reference in New Issue
Block a user