summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/DesktopFile.hs8
-rw-r--r--Utility/FreeDesktop.hs15
2 files changed, 10 insertions, 13 deletions
diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs
index 55a22352a..f3293d128 100644
--- a/Build/DesktopFile.hs
+++ b/Build/DesktopFile.hs
@@ -55,10 +55,10 @@ writeFDODesktop command = do
installMenu command
=<< inDestDir (desktopMenuFilePath "git-annex" datadir)
- installIcon "doc/logo.svg" =<< inDestDir
- =<< iconFilePath "git-annex.svg" "scalable" systemwide
- installIcon "doc/favicon.png" =<< inDestDir
- =<< iconFilePath "git-annex.png" "16x16" systemwide
+ installIcon "doc/logo.svg"
+ =<< inDestDir (iconFilePath "git-annex.svg" "scalable" datadir)
+ installIcon "doc/favicon.png"
+ =<< inDestDir (iconFilePath "git-annex.png" "16x16" datadir)
configdir <- if systemwide then return systemConfigDir else userConfigDir
installAutoStart command
diff --git a/Utility/FreeDesktop.hs b/Utility/FreeDesktop.hs
index 6338948d2..9ed92a77b 100644
--- a/Utility/FreeDesktop.hs
+++ b/Utility/FreeDesktop.hs
@@ -93,16 +93,13 @@ autoStartPath :: String -> FilePath -> FilePath
autoStartPath basename configdir =
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". -}
-iconFilePath :: FilePath -> String -> Bool -> IO FilePath
-iconFilePath file resolution systemwide
- | systemwide = return $ systemDataDir </> "icons" </> subpath
- | otherwise = do
- home <- myHomeDir
- return $ home </> ".icons" </> subpath
- where
- subpath = "hicolor" </> resolution </> "apps" </> file
+iconFilePath :: FilePath -> String -> FilePath -> FilePath
+iconFilePath file resolution datadir = datadir </> "icons" </>
+ "hicolor" </> resolution </> "apps" </> file
desktopfile :: FilePath -> FilePath
desktopfile f = f ++ ".desktop"