This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.

View the commit online.

commit e5a2f7406deb9c1ae76467a539ce2e32ebb315b0
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Mon Jun 24 12:29:53 2024 +0200

    e_gen_menu: Search XDG_DATA_HOME and XDG_DATA_DIRS too
---
 scripts/e_gen_menu | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/scripts/e_gen_menu b/scripts/e_gen_menu
index e0f8b0b5..a392d443 100755
--- a/scripts/e_gen_menu
+++ b/scripts/e_gen_menu
@@ -38,11 +38,11 @@ def D3(str):
         print(str)
 
 
-def getenv(env):
+def getenv(env, dflt=''):
     if env in os.environ:
         return os.environ[env]
     else:
-        return ''
+        return dflt
 
 
 def FileExt(file):
@@ -365,20 +365,24 @@ for opt, val in opts:
 Prefixes  = ['/usr/local', '/usr', '/opt']
 Prefixes += ['/opt/kde', '/opt/kde3', getenv('KDEDIR')]
 Prefixes += ['/opt/gnome']                    # SUSE
-Prefixes += [getenv('HOME') + '/.local']
+Prefixes = MkDirList(Prefixes, ['/share'])
+XdgHome = getenv('XDG_DATA_HOME', getenv('HOME') + '/.local/share')
+Prefixes += [XdgHome]
+XdgDirs = getenv('XDG_DATA_DIRS')
+Prefixes += XdgDirs.split(':')
 D(f'Prefixes = "{Prefixes}"')
 Prefixes = RemoveDuplicates(Prefixes)
 D(f'Prefixes = "{Prefixes}"')
 
-SufDirs = ['/share/applications', '/share/applications/kde', '/share/applications/kde4']
+SufDirs = ['/applications', '/applications/kde', '/applications/kde4']
 
 # Where to look for GNOME/KDE stuff
 AppDirs = MkDirList(Prefixes, SufDirs)
 
 D(f'AppDirs  = "{AppDirs}"')
 
-IconDirs  = MkDirList(Prefixes, ['/share/pixmaps', '/share/icons'])
-IconDirs2 = MkDirList(Prefixes, ['/share/icons'])
+IconDirs  = MkDirList(Prefixes, ['/pixmaps', '/icons'])
+IconDirs2 = MkDirList(Prefixes, ['/icons'])
 Themes    = ['default.kde', 'gnome', 'hicolor', 'mate', 'Adwaita']
 #Themes   += ['HighContrast']
 IconDirs2 = MkDirList(IconDirs2, Themes, sep='/')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to