maksbotan    14/04/18 17:41:39

  Added:                awesome-3.5.5-util.lua-xdg-icons-fix.patch
  Log:
  Bump to 3.5.5, bug #507604. Add upstream patch to fix xdg icons search.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
F8DBDADE)

Revision  Changes    Path
1.1                  
x11-wm/awesome/files/awesome-3.5.5-util.lua-xdg-icons-fix.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/awesome/files/awesome-3.5.5-util.lua-xdg-icons-fix.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/awesome/files/awesome-3.5.5-util.lua-xdg-icons-fix.patch?rev=1.1&content-type=text/plain

Index: awesome-3.5.5-util.lua-xdg-icons-fix.patch
===================================================================
From: Uli Schlachter <[email protected]>
Date: Sat, 12 Apr 2014 14:15:11 +0000 (+0200)
Subject: Merge git://github.com/Teknocrat/awesome
X-Git-Url: 
http://git.naquadah.org/?p=awesome.git;a=commitdiff_plain;h=d76d3e0b6a00b8b289b3801ba197e0dae732a92d;hp=1090719d677c86e90a1394a34f0effb418728493

Merge git://github.com/Teknocrat/awesome
---

diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in
index 1d35f2f..123c4a6 100644
--- a/lib/awful/util.lua.in
+++ b/lib/awful/util.lua.in
@@ -185,21 +185,24 @@ end
 --             of the dirs are searched first
 function util.geticonpath(iconname, exts, dirs, size)
     exts = exts or { 'png', 'gif' }
-    dirs = dirs or { '/usr/share/pixmaps/' }
+    dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' }
+    icontypes = { 'apps', 'actions',  'categories',  'emblems',
+    'mimetypes',  'status', 'devices', 'extras', 'places', 'stock' }
     for _, d in pairs(dirs) do
+        local icon
         for _, e in pairs(exts) do
-            local icon
-            if size then
-                icon = string.format("%s%ux%u/%s.%s",
-                       d, size, size, iconname, e)
-                if util.file_readable(icon) then
-                    return icon
-                end
-            end
             icon = d .. iconname .. '.' .. e
             if util.file_readable(icon) then
                 return icon
             end
+            if size then
+                for _, t in pairs(icontypes) do
+                    icon = string.format("%s%ux%u/%s/%s.%s", d, size, size, t, 
iconname, e)
+                    if util.file_readable(icon) then
+                        return icon
+                    end
+                end
+            end
         end
     end
 end




Reply via email to