Julian Ospald
4e75a84439
LIB: remove more occurences of FilePath
2016-04-03 03:57:11 +02:00
Julian Ospald
4da3c92e5e
LIB/GTK: cleanup compiler warnings
2016-03-31 16:19:31 +02:00
Julian Ospald
65595fa9c5
LIB/GTK: refactor HSFM.FileSystem.Error to use Path type
2016-03-31 15:49:35 +02:00
Julian Ospald
51abfb1dce
GTK: fix spelling
2016-03-31 02:44:44 +02:00
Julian Ospald
2d447a05da
GTK: improve error handling in refreshView'
...
This could theoretically lead to infinite recursion, but only
in case "/" is inaccessible or something. In which case the user
has really bigger problems.
2016-03-31 02:44:10 +02:00
Julian Ospald
91b2dc9e4b
LIB: improve documentation in readWith
2016-03-31 02:29:32 +02:00
Julian Ospald
a2e6ced69a
GTK: improve error handling on invalid paths
...
Fixes #28
2016-03-31 02:29:16 +02:00
Julian Ospald
dd013b7d7b
Fix Copyright
2016-03-31 00:28:23 +02:00
Julian Ospald
5e232e3d4a
LIB/GTK: use fullPathS
2016-03-31 00:25:03 +02:00
Julian Ospald
74a48b2668
Restructure module layout
2016-03-30 20:16:34 +02:00
Julian Ospald
efd2535ef9
LIB: cleanup ViewPatterns/PatternSynonyms
2016-03-30 19:38:06 +02:00
Julian Ospald
4b68bf759b
LIB: cleanup
2016-03-30 19:18:14 +02:00
Julian Ospald
5b1c595703
LIB: move maybeD to MyPrelude
2016-03-30 19:16:33 +02:00
Julian Ospald
f301e2e519
LIB/GTK: use our hpath lib for path type
2016-03-30 02:50:32 +02:00
Julian Ospald
09d8910eae
GTK: try to fix icon crap
...
Not sure if this is right, though.
2016-03-30 02:47:05 +02:00
Julian Ospald
ee676d0a83
GTK: fix callbacks for IconView
2015-12-30 18:01:36 +01:00
Julian Ospald
b266b78e14
GTK: add IconView and refactor the modules
2015-12-30 17:53:16 +01:00
Julian Ospald
2bc406f65e
LIB: fix file type indicators
...
It seems that PF.regularFileMode matches across symlinks and sockets
too, so we just examine the constructors instead.
Fixes #25
2015-12-30 02:32:48 +01:00
Julian Ospald
048bf8a328
LIB: don't do anything for FileLike (CharDev etc) yet
2015-12-30 02:16:39 +01:00
Julian Ospald
ed32961155
GTK: add rubberbanding
2015-12-30 02:16:21 +01:00
Julian Ospald
c6efdedf2d
GTK: fix relative dirs to work outside of project basedir
...
Fixes #23
2015-12-29 00:48:54 +01:00
Julian Ospald
ccc2f6f331
GTK: clear the Statusbar before pushing to it
...
Since we only show the most recent operationBuffer we only want
one item on the stack.
2015-12-28 03:20:29 +01:00
Julian Ospald
c28eb1976a
GTK: re-throw non-catched errors in withCopyModeDialog
2015-12-28 03:18:22 +01:00
Julian Ospald
e44997cd9d
LIB/GTK: generalize DirCopyMode to CopyMode and improve user confirmation
2015-12-28 03:04:02 +01:00
Julian Ospald
eae68cc0ea
GTK: make the statusBar show the operation buffer
2015-12-28 02:02:06 +01:00
Julian Ospald
36768519a3
LIB: formatting, add TODO
2015-12-28 01:49:18 +01:00
Julian Ospald
ec6aa8fab1
LIB: fix copyFile'
2015-12-28 01:48:53 +01:00
Julian Ospald
8ffbd44ce4
LIB: preserve permissions in copyDir
2015-12-27 20:39:40 +01:00
Julian Ospald
f2fb4e0be0
LIB: improve safety by ignoring invalid file names for file operations
2015-12-27 20:17:14 +01:00
Julian Ospald
9445574097
LIB: improve documentation on pattern synonyms
2015-12-27 20:03:38 +01:00
Julian Ospald
a81ef6a38c
LIB: make deleteDirRecursive a little bit more safer
2015-12-27 20:00:28 +01:00
Julian Ospald
5d44243689
LIB: remove obsolete bifunctor stuff
2015-12-27 19:50:24 +01:00
Julian Ospald
6651fbcbce
LIB: fix packModTime error
2015-12-27 19:50:09 +01:00
Julian Ospald
7986ce0d4e
GTK: fix row activation callback
2015-12-27 19:27:13 +01:00
Julian Ospald
54af33f3a7
LIB/GTK: remove the rest of the directory package
2015-12-27 19:26:58 +01:00
Julian Ospald
aba62f03f2
GTK: implement selecting multiple rows (and operations on them)
...
Not all operations yet support it and will throw an InvalidOperation
error in that case.
2015-12-27 18:17:33 +01:00
Julian Ospald
5afc25d2d1
LIB: improve error handling
...
* close all directory streams in case of IOErrors
* raise error on invalid input types in File operations
* properly catch eXDEV in moveFile instead of all errors
2015-12-27 16:25:24 +01:00
Julian Ospald
27673b0751
LIB: make moveFile portable
2015-12-26 23:21:02 +01:00
Julian Ospald
35e6f5df82
GTK: validate arguments to main program
2015-12-26 22:48:20 +01:00
Julian Ospald
400a0242d6
LIB/GTK: refactor ViewPatterns/PatternSynonyms
2015-12-26 22:00:08 +01:00
Julian Ospald
83816ef1a6
LIB: fix isBrokenSymlink
2015-12-26 21:59:17 +01:00
Julian Ospald
fa3e5b3ff9
LIB: simplify file moving
2015-12-26 21:18:42 +01:00
Julian Ospald
2ee0d33f44
GTK: add symlink icons
2015-12-26 21:11:23 +01:00
Julian Ospald
3bd201f1b6
LIB: add more useful pattern synonyms
2015-12-26 20:28:00 +01:00
Julian Ospald
464e65d574
GTK: add inotify based file/dir watcher
...
This automatically updates the treeView if the folder/file changes.
2015-12-26 20:27:29 +01:00
Julian Ospald
0ec4aaac54
LIB/GTK: reduce usage of System.Directory (directory package)
2015-12-26 16:02:25 +01:00
Julian Ospald
edb51ad1f6
LIB: add createDir
2015-12-26 15:58:41 +01:00
Julian Ospald
d727566e86
LIB: don't allow empty FileName argument in createFile/renameFile
2015-12-26 03:07:36 +01:00
Julian Ospald
3639dec1d3
LIB/GTK: fix file renaming (previously called move)
2015-12-26 03:04:28 +01:00
Julian Ospald
5455ba1066
GTK: remove redundant bracket
2015-12-25 23:26:47 +01:00
Julian Ospald
61b2313320
GTK: add refresh button
2015-12-25 23:24:43 +01:00
Julian Ospald
3edd3c8a19
GTK: rename fileChooserDialog and add title parameter
2015-12-25 23:17:22 +01:00
Julian Ospald
71a2cb90be
LIB/GTK: add move menuitem and implement creating new files
2015-12-25 22:51:45 +01:00
Julian Ospald
c98db302ba
LIB: normalize instead of canonicalizePath'
...
We shouldn't follow symlinks in our internal paths, because that makes
us lose information. However, we normalize where we could have passed
user input, so we don't end up with ill-formed anchors/names.
2015-12-25 15:18:05 +01:00
Julian Ospald
b9e4b96c4a
Add GPL-2 license headers
2015-12-24 18:25:05 +01:00
Julian Ospald
bd448644d2
GTK: use Cabal to construct the about dialog information
2015-12-24 18:18:50 +01:00
Julian Ospald
5c8907143a
LIB: add symlink helpers
2015-12-24 17:45:04 +01:00
Julian Ospald
f64f2a975c
GTK: add about dialog
2015-12-24 17:44:55 +01:00
Julian Ospald
b657756e37
GTK: set default application icon
2015-12-24 17:44:42 +01:00
Julian Ospald
e639405d7f
GTK: implement right-click menu
2015-12-24 15:36:21 +01:00
Julian Ospald
d184b82648
GTK: fix show/hide hidden files
2015-12-24 14:45:30 +01:00
Julian Ospald
e160f340ec
GTK: make file/edit menus useful
2015-12-24 14:41:06 +01:00
Julian Ospald
2ca7df5696
LIB: style formatting
2015-12-24 05:53:11 +01:00
Julian Ospald
9efe2e5f60
GUI: improve error handling in urlGoTo
2015-12-24 05:52:46 +01:00
Julian Ospald
47aee871be
LIB/GTK: improve our ViewPatterns/PatternSynonyms + refactor
2015-12-24 03:11:17 +01:00
Julian Ospald
5f183bef3f
LIB/GTK: use new data structure with explicit SymLink constructor
...
This still needs a lot of work to function consistently, but it's better
than the old approach.
2015-12-23 22:50:04 +01:00
Julian Ospald
06b96eecea
GTK: restructure modules a bit
2015-12-23 16:14:38 +01:00
Julian Ospald
1aeb92d657
LIB: fix documentation in IO.File
2015-12-23 16:10:08 +01:00
Julian Ospald
f55572542f
GTK: minor cleanup
2015-12-23 16:09:51 +01:00
Julian Ospald
4d2a4fd1fc
GTK: implement file move callbacks
2015-12-23 16:09:37 +01:00
Julian Ospald
09821f8fc2
LIB: implement file moving operations
2015-12-23 16:08:39 +01:00
Julian Ospald
6b89dd8564
LIB: make pattern IsSymL more lazy
2015-12-22 19:50:24 +01:00
Julian Ospald
9288be7ff7
GTK: readd copy mode dialog
2015-12-22 19:50:07 +01:00
Julian Ospald
aa1401d874
LIB: remove debug print
2015-12-22 19:49:47 +01:00
Julian Ospald
eba0c95f8c
LIB: simplify symlink pattern matching via ViewPatterns/PatternSynonyms
2015-12-22 19:40:29 +01:00
Julian Ospald
0b41fee237
GTK: improve error dialog system
2015-12-22 17:56:37 +01:00
Julian Ospald
6a9d408925
GTK: remove debug prints
2015-12-22 17:50:31 +01:00
Julian Ospald
2ba9620fdc
LIB: update documentation
2015-12-22 14:17:46 +01:00
Julian Ospald
2486d83260
LIB/GTK: use AnchoredFile in IO.File
...
What's the point of having it anyway if we don't?
2015-12-22 14:15:48 +01:00
Julian Ospald
06151a3a08
LIB: minor improvement to copyDir
2015-12-21 18:54:37 +01:00
Julian Ospald
da32ccf619
LIB: improve documentation
2015-12-21 18:39:30 +01:00
Julian Ospald
773cb100b4
LIB: make recreateSymlink more robust
2015-12-21 18:36:45 +01:00
Julian Ospald
433cb164a6
LIB: improve symlink handling
2015-12-21 18:32:53 +01:00
Julian Ospald
988350967a
LIB: wrap canonicalizePath so it doesn't follow the last symlink component
...
canonicalizePath tries to remove as many symlink components as possible,
but this is not what we want for a lot of operations like copying
files. So instead we preserve the last path component if it's a symlink
and canonicalize it's parent filepath.
2015-12-21 17:15:31 +01:00
Julian Ospald
89157bc0d9
LIB: fix IOError in copyFile
...
The destination file does not exist yet so we cannot canonicalize
it's full path, only part of it.
2015-12-21 05:50:19 +01:00
Julian Ospald
0867c8b2e3
LIB/GTK: add '.' and '..' files, remove fsState and improve safety
...
We use canonicalizePaths where we need well-formed paths and cannot
rely on the input being sane.
2015-12-21 05:41:12 +01:00
Julian Ospald
fe6145d5be
LIB/GTK: change DirTree again
...
we now have:
* AnchoredFile -- for representing a file with context
* File -- for representing a file only
Both representations mean "file" in the broader sense, including
directories.
2015-12-21 00:41:02 +01:00
Julian Ospald
5bfea0db10
GUI: clean up copyFinal
...
Don't show CopyModeChooserDialog for file copy operations.
2015-12-20 05:32:11 +01:00
Julian Ospald
3ba647d172
LIB/GTK: rewrite to use more atomic operations/data structures
...
This is a little bit less fancy, but avoids lazy IO. It depends a
little bit more on FilePath, but that also allows for a more general
interface.
2015-12-20 00:30:52 +01:00
Julian Ospald
aa5d29c41d
LIB: speed up copyDir
...
Instead of using zipLazy (which does more IO than we need)
we just construct the newDest zipper from the information we
already have. This should be sufficient.
2015-12-18 17:33:39 +01:00
Julian Ospald
ff40102fbe
GUI: allow deletion of non-empty directories
2015-12-18 17:15:53 +01:00
Julian Ospald
9fbe43e7d5
LIB: don't allow same source and dest in copyDir
2015-12-18 17:00:44 +01:00
Julian Ospald
58665d7b29
LIB/GTK: enhance FileOperation type so we can have partial functions
...
This also add a copy mode dialog to the copy operations.
2015-12-18 16:55:46 +01:00
Julian Ospald
a4849cf044
LIB: improve haddock comments
2015-12-18 15:50:33 +01:00
Julian Ospald
51fffabe22
LIB: restructure copyDir
2015-12-18 15:42:24 +01:00
Julian Ospald
0f1c8dafe8
LIB: use whenM/unlessM
2015-12-18 15:37:14 +01:00
Julian Ospald
ffe8037160
LIB: add copy modes
...
TODO: integrate these more nicely with runFileOp
2015-12-18 15:28:56 +01:00
Julian Ospald
34c6223c25
LIB: fix throwDirDoesExist exception type
2015-12-18 15:28:04 +01:00
Julian Ospald
e67d68ab15
LIB: improve performance of copyDir
2015-12-18 14:21:57 +01:00
Julian Ospald
074ee45961
GTK: allow to start gui with specific directory
2015-12-18 14:11:26 +01:00
Julian Ospald
7c84dce09f
LIB: improve formatting style
2015-12-18 04:24:47 +01:00
Julian Ospald
94095ec28b
GUI: minor cleanup
2015-12-18 04:22:21 +01:00
Julian Ospald
d4a5460128
LIB: implement copyDir and minor refactor
...
We also had to lock the FileOperation type to DTInfoZipper so
we can examine symlinks and other stuff, without re-reading
all the information.
2015-12-18 04:22:13 +01:00
Julian Ospald
0781cbf9d5
LIB: remove obsolete code in Zipper
2015-12-18 04:15:55 +01:00
Julian Ospald
f2a8f21bf3
LIB: update TODO comments
2015-12-17 23:11:18 +01:00
Julian Ospald
87ad7d02f0
LIB/GTK: refactor File API and add copyFile
2015-12-17 23:08:02 +01:00
Julian Ospald
d5c6eef49e
GTK: Refactor onRow
...
We name it withRow now and move the specific functions out of it.
2015-12-17 19:41:45 +01:00
Julian Ospald
8d9a6d7fb0
GTK: rename setBindings to setCallbacks
2015-12-17 17:48:35 +01:00
Julian Ospald
826ec65a68
LIB/GTK: use System.FilePath instead of System.FilePath.Posix
2015-12-17 17:46:55 +01:00
Julian Ospald
585a9fcc38
GTK: refactor 'onRow' and split out 'getSelectedRow'
2015-12-17 17:46:24 +01:00
Julian Ospald
82a4269cf7
GTK: remove redundant imports
2015-12-17 17:10:43 +01:00
Julian Ospald
78b6d5e52b
GTK: fix some callbacks to listen on the treeView instead of rootWin
2015-12-17 17:10:03 +01:00
Julian Ospald
41f47eea1e
GTK: Refresh treeview after deletion
2015-12-17 17:02:25 +01:00
Julian Ospald
4227921402
GTK: refactor updateTreeView
...
Move it to 'constructTreeView' and use 'refreshTreeView' instead
for updating the TreeView.
2015-12-17 17:02:25 +01:00
Julian Ospald
725744514b
GTK: add delete file/dir
2015-12-17 17:02:20 +01:00
Julian Ospald
25f620ad75
LIB: add delete file/dir
2015-12-17 16:25:37 +01:00
Julian Ospald
0f1301622b
GTK: add statusBar
...
No text yet. Probably needs to be reflected in mygui or myview state.
2015-12-17 14:47:30 +01:00
Julian Ospald
d13cdac9e0
Initial commit
2015-12-17 04:42:22 +01:00