GTK: Refresh treeview after deletion

This commit is contained in:
2015-12-17 16:57:03 +01:00
parent 4227921402
commit 41f47eea1e

View File

@@ -217,12 +217,14 @@ onRow fo mygui myview = do
let fp = getFullPath dz let fp = getFullPath dz
cmsg = "Really delete directory \"" ++ fp ++ "\"?" cmsg = "Really delete directory \"" ++ fp ++ "\"?"
withConfirmationDialog cmsg withConfirmationDialog cmsg
$ withErrorDialog $ deleteDir fp $ withErrorDialog (deleteDir fp
>> refreshTreeView mygui myview Nothing)
dz@(File {}, _) -> do dz@(File {}, _) -> do
let fp = getFullPath dz let fp = getFullPath dz
cmsg = "Really delete file \"" ++ fp ++ "\"?" cmsg = "Really delete file \"" ++ fp ++ "\"?"
withConfirmationDialog cmsg withConfirmationDialog cmsg
$ withErrorDialog $ deleteFile fp $ withErrorDialog (deleteFile fp
>> refreshTreeView mygui myview Nothing)
-- |Go up one directory and visualize it in the treeView. -- |Go up one directory and visualize it in the treeView.