Add undo action to nautilus and konqueror integration.
This commit is contained in:
parent
13260ccc3a
commit
2f83914212
3 changed files with 22 additions and 7 deletions
|
@ -92,18 +92,20 @@ installWrapper file content = do
|
|||
installFileManagerHooks :: FilePath -> IO ()
|
||||
#ifdef linux_HOST_OS
|
||||
installFileManagerHooks program = do
|
||||
let actions = ["get", "drop", "undo"]
|
||||
|
||||
-- Gnome
|
||||
nautilusScriptdir <- (\d -> d </> "nautilus" </> "scripts") <$> userDataDir
|
||||
createDirectoryIfMissing True nautilusScriptdir
|
||||
genNautilusScript nautilusScriptdir "get"
|
||||
genNautilusScript nautilusScriptdir "drop"
|
||||
forM_ actions $
|
||||
genNautilusScript nautilusScriptdir
|
||||
|
||||
-- KDE
|
||||
home <- myHomeDir
|
||||
let kdeServiceMenusdir = home </> ".kde" </> "share" </> "kde4" </> "services" </> "ServiceMenus"
|
||||
createDirectoryIfMissing True kdeServiceMenusdir
|
||||
writeFile (kdeServiceMenusdir </> "git-annex.desktop")
|
||||
(kdeDesktopFile ["get", "drop"])
|
||||
(kdeDesktopFile actions)
|
||||
where
|
||||
genNautilusScript scriptdir action =
|
||||
installscript (scriptdir </> scriptname action) $ unlines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue