Julian Ospald
5c57551438
GTK: restructure Callbacks.hs to make it more readable
2016-04-20 01:25:40 +02:00
Julian Ospald
3c6aca04b4
GTK: fix history when clicking on HOME button
2016-04-20 00:48:34 +02:00
Julian Ospald
9d572c8a6e
GTK: remove obsolete void usage
2016-04-20 00:39:53 +02:00
Julian Ospald
680a75f5be
GTK: implement rudimentary history support wrt #21
...
5 items back and forth only. Implemented via a simple
TVar ([], []). Might be improved in the future.
2016-04-20 00:38:22 +02:00
Julian Ospald
a61b409486
GTK: implement fileinfo dialog wrt #32
2016-04-19 21:05:29 +02:00
Julian Ospald
9b43814846
GTK: clear move buffer after move
...
Doesn't make sense to keep it since the buffer
will probably point to a non-existing file afterwards.
2016-04-18 01:02:18 +02:00
Julian Ospald
8b8c9a669f
GTK: implement file drag and drop
...
Still doesn't work on multiple rows.
Also see #14
2016-04-18 00:51:45 +02:00
Julian Ospald
1d2bf37a44
GTK: implement creating new directories
...
And moving it with creating new files to a submenuitem.
2016-04-17 03:12:34 +02:00
Julian Ospald
e98fb577ed
GTK: implement home and up buttons wrt #40
2016-04-17 01:01:04 +02:00
Julian Ospald
e2c83b3c31
LIB/GTK: remove obsolete fullPath/fullPathS and refactor for prettiness
2016-04-16 21:50:15 +02:00
Julian Ospald
593a59787f
LIB: use posix-path traversal functions for getDirsFiles
...
This should also speed up reading.
2016-04-16 19:39:03 +02:00
Julian Ospald
bd707fc193
LIB: fix readFile, rm obsolete comment
2016-04-16 19:24:36 +02:00
Julian Ospald
0fca64594d
LIB/GTK: use more recent library versions
2016-04-16 19:14:08 +02:00
Julian Ospald
bb6c1b3cda
LIB/GTK: refactor File base type
...
We have now ditched AnchoredFile and just use File with Path Abs
in the path field.
This is useful since we now:
* don't allow "." or ".." as filenames anymore
* normalise paths in our path parsers and reject paths with ".."
This also allows us to know that filepaths are always valid. In addition
the 'basename' function from hpath may throw an exception if run
on the root dir "/". This exception is basically uncatched currently,
which is fine, because it's not a selectable directory.
2016-04-15 14:23:41 +02:00
Julian Ospald
3d15a66350
LIB: don't use show on String
2016-04-11 02:24:23 +02:00
Julian Ospald
2ae574688b
LIB: fix spelling error
2016-04-11 02:05:58 +02:00
Julian Ospald
c2f3da6180
LIB/GTK: improve exceptions/error handling
2016-04-11 01:59:18 +02:00
Julian Ospald
3f303b4cd4
LIB: minor cleanup
2016-04-10 22:04:07 +02:00
Julian Ospald
b7ee2ccd3d
LIB: move 'hiddenFile' to hpath package
2016-04-10 22:03:30 +02:00
Julian Ospald
bddf29671a
LIB: improve documentation
2016-04-10 19:25:22 +02:00
Julian Ospald
59d4051d84
LIB: small cleanup, rm obsolete functions, fix some TODOs
2016-04-10 19:16:06 +02:00
Julian Ospald
fb8d1d2e3a
LIB: give the buffer size in fallbackCopy a name
2016-04-10 18:58:06 +02:00
Julian Ospald
48edf7d47b
LIB: make interaction with FileOperation more safe
...
We now don't safe an AnchoredFile anymore, but a Path and
construct the AnchoredFile just before the operation is carried out.
This means the copy and move buffers cannot contain stale references
to files that don't exist anymore.
2016-04-10 18:52:51 +02:00
Julian Ospald
bd022956f5
LIB: improve unsafeCopyFile doc
2016-04-10 04:09:29 +02:00
Julian Ospald
5bcbbcc69c
LIB: overhaul file operations and improve overall performance
...
This introduces a lot of changes and uses a more solid
file copy operation.
2016-04-10 03:58:20 +02:00
Julian Ospald
1be8984162
GTK: fixup withCopyModeDialog
...
By adding a more specialized showRenameDialog function
and also cleaning up the responses/return values for
showCopyModeDialog.
2016-04-09 17:38:38 +02:00
Julian Ospald
44a90574e8
LIB/GTK: add convenient renaming capabilities on file copy/move
2016-04-09 17:25:14 +02:00
Julian Ospald
0e226d61ec
GTK: fix right-click when multiple files are selected
...
If the right click happens on an item that is already selected,
don't pass on the signal so the selection which may span across
multiple files is kept.
Otherwise, pass on the signal which means the item under the cursor
will be selected.
This currently misbehaves (as in: doesn't work) with IconView
properly.
2016-04-09 16:26:12 +02:00
Julian Ospald
478ffa0e98
LIB/GTK: implement copy/move/delete for multiple files
2016-04-09 15:15:58 +02:00
Julian Ospald
418365db0f
LIB: fix readFileContents
...
We incorrectly added +1 to the filesize.
2016-04-09 15:15:57 +02:00
hasufell
5bce5dd6ff
LIB: simplify error handling
...
'bracket' already handles this.
2016-04-08 03:00:37 +02:00
hasufell
7f086911e1
LIB: improve documentation
2016-04-08 02:43:39 +02:00
Julian Ospald
844abcdc86
LIB: more general type for rethrowErrnoAs
2016-04-08 02:09:59 +02:00
hasufell
17407860f4
LIB: improve exception handling
2016-04-06 04:27:02 +02:00
Julian Ospald
038b0d0377
LIB: various cleanups
2016-04-06 03:10:07 +02:00
Julian Ospald
bad817d32d
LIB/GTK: use ByteString instead of String for
2016-04-05 00:56:36 +02:00
Julian Ospald
695f921c2e
LIB: rm obsolete overwriteFile
2016-04-03 22:54:17 +02:00
Julian Ospald
0d92ebb8c8
LIB: add destination dir name argument to copyDir
2016-04-03 22:52:18 +02:00
Julian Ospald
0a71c3c044
LIB: refactor copyFile
2016-04-03 22:36:29 +02:00
Julian Ospald
fa7cab69c6
LIB: fix copyFile'
...
Previously, BS.writeFile would fail if the created file
was not writable, obviously. Now we use the file-descriptor
to write the content.
2016-04-03 18:19:02 +02:00
Julian Ospald
bfcc2f39e5
LIB: fix throwSameFile in case fp2 doesn't exist yet
2016-04-03 18:16:38 +02:00
Julian Ospald
2609338f6e
LIB: fix throwSameFile in copyDir
2016-04-03 17:13:45 +02:00
Julian Ospald
b66e12cc9e
LIB: fix documentation in throwDestinationInSource
2016-04-03 16:56:42 +02:00
Julian Ospald
ba4fbc200c
LIB: fix throwDestinationInSource
...
We now examine device+file IDs, so this check works reliably
with mountpoints too.
2016-04-03 16:20:58 +02:00
Julian Ospald
2777d2d2e8
LIB: fix bug in copyDir
2016-04-03 14:37:01 +02:00
Julian Ospald
9b03b36f2f
LIB: add throwCantOpenDirectory calls to file operations
2016-04-03 14:36:56 +02:00
Julian Ospald
8c95aa312a
LIB: fix bug in throwDestinationInSource
...
We should only run canoncializePath on dirname, otherwise
realPath will likely fail.
2016-04-03 14:33:39 +02:00
Julian Ospald
d8fc529bf1
LIB: add canOpenDirectory and throwCantOpenDirectory
2016-04-03 14:32:10 +02:00
Julian Ospald
b6342068f2
GTK: cleanup refreshView a bit
...
This moves some of the parsing logic where it belong, into Gtk.hs
and fixes the type to be proper 'Path Abs'.
2016-04-03 04:13:08 +02:00
Julian Ospald
0781fc690d
LIB/GTK: improve documentation
2016-04-03 03:57:35 +02:00
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