install to ~/.local/icons, not ~/icons

Apparently the Icon Theme Specification no longer matches reality,
as implemented by XFCE and xdg-icon-resource.
This commit is contained in:
Joey Hess 2013-07-09 20:16:07 -04:00
parent 19b8bcbe30
commit 80b390560e
2 changed files with 10 additions and 13 deletions

View file

@ -55,10 +55,10 @@ writeFDODesktop command = do
installMenu command installMenu command
=<< inDestDir (desktopMenuFilePath "git-annex" datadir) =<< inDestDir (desktopMenuFilePath "git-annex" datadir)
installIcon "doc/logo.svg" =<< inDestDir installIcon "doc/logo.svg"
=<< iconFilePath "git-annex.svg" "scalable" systemwide =<< inDestDir (iconFilePath "git-annex.svg" "scalable" datadir)
installIcon "doc/favicon.png" =<< inDestDir installIcon "doc/favicon.png"
=<< iconFilePath "git-annex.png" "16x16" systemwide =<< inDestDir (iconFilePath "git-annex.png" "16x16" datadir)
configdir <- if systemwide then return systemConfigDir else userConfigDir configdir <- if systemwide then return systemConfigDir else userConfigDir
installAutoStart command installAutoStart command

View file

@ -93,16 +93,13 @@ autoStartPath :: String -> FilePath -> FilePath
autoStartPath basename configdir = autoStartPath basename configdir =
configdir </> "autostart" </> desktopfile basename configdir </> "autostart" </> desktopfile basename
{- Path to use for an icon file. {- Path to use for an icon file, in either the systemDataDir
- or the userDatadir.
-
- The resolution is something like "48x48" or "scalable". -} - The resolution is something like "48x48" or "scalable". -}
iconFilePath :: FilePath -> String -> Bool -> IO FilePath iconFilePath :: FilePath -> String -> FilePath -> FilePath
iconFilePath file resolution systemwide iconFilePath file resolution datadir = datadir </> "icons" </>
| systemwide = return $ systemDataDir </> "icons" </> subpath "hicolor" </> resolution </> "apps" </> file
| otherwise = do
home <- myHomeDir
return $ home </> ".icons" </> subpath
where
subpath = "hicolor" </> resolution </> "apps" </> file
desktopfile :: FilePath -> FilePath desktopfile :: FilePath -> FilePath
desktopfile f = f ++ ".desktop" desktopfile f = f ++ ".desktop"