Compare commits
No commits in common. "master" and "gh-pages" have entirely different histories.
15
.gitignore
vendored
15
.gitignore
vendored
@ -1,15 +0,0 @@
|
||||
*.hp
|
||||
*.old
|
||||
*.prof
|
||||
*~
|
||||
.cabal-sandbox/
|
||||
.ghc.environment.*
|
||||
.liquid/
|
||||
.stack-work/
|
||||
3rdparty/hpath
|
||||
cabal.sandbox.config
|
||||
dist-newstyle/
|
||||
dist/
|
||||
hscope.out
|
||||
.ghcup
|
||||
/bin/
|
68
.travis.yml
68
.travis.yml
@ -1,68 +0,0 @@
|
||||
# See https://github.com/hvr/multi-ghc-travis for more information
|
||||
|
||||
language: c
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- env: CABALVER=1.24 GHCVER=8.0.1
|
||||
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=2.0 GHCVER=8.2.2
|
||||
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=2.2 GHCVER=8.4.1
|
||||
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.1], sources: [hvr-ghc]}}
|
||||
- env: CABALVER=head GHCVER=head
|
||||
addons: {apt: {packages: [cabal-install-head,ghc-head,libgtk2.0-dev,libgtk-3-dev], sources: [hvr-ghc]}}
|
||||
|
||||
allow_failures:
|
||||
- env: CABALVER=head GHCVER=head
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "qAzj5tgAghFIfO6R/+Hdc5KcFhwXKNXMICNH7VLmqLzmYxk1UEkpi6hgX/f1bP5mLd07D+0IaeGFIUIWQOp+F/Du1NiX3yGbFuTt/Ja4I0K4ooCQc0w9uYLv8epxzp3VEOEI5sVCSpSomFjr7V0jwwTcBbxGUvv1VaGkJwAexRxCHuwU23KD0toECkVDsOMN/Gg2Ue/r2o+MsGx1/B9WMF0g6+zWlnrYfYZXWetl0DwATK5lZTa/21THdMrbuPX0fijGXTywvURDpCd3wIdfx9n7jPO2Gp2rcxPL/WkcIpzI211g4hEiheS+AlVyW39+C4i4MKaNK8YC+/5DRl/YHrFc7n3SZPDh+RMs6r3DS41RyRhQhz8DE0Pg4zfe/WUX4+h72TijCZ1zduh146rofwku/IGtCz5cuel+7cmTPk9ZyENYnH0ZMftkZjor9J/KamcMsN4zfaQBNJuIM3Kg8HVts3ymNIWrJ1LUn41MNt1eBDDvOWxZaHrjLyATRCFYvMr4RE01pqYKnWZ9RFfzVaYjD0QQWPWAXcCtkcAHSR6T0NxAqjLmHBNm+yWYIKG+bK2CvPNYTTNN8n4UvY1SrBpJEnLcRRns3U8nM7SVZ4GMaYzOTWtN1n0zamsl42wV0L/wqpz1SePkRZ34jca3V07XRLQSN2wjj8DyvOZUFR0="
|
||||
|
||||
before_install:
|
||||
- sudo apt-get install -y hscolour
|
||||
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
|
||||
|
||||
install:
|
||||
- cabal --version
|
||||
- travis_retry cabal update
|
||||
- cabal sandbox init
|
||||
- cabal install alex happy
|
||||
- export PATH="$(pwd)/.cabal-sandbox/bin:$PATH"
|
||||
- cabal install gtk2hs-buildtools
|
||||
- cabal install --only-dependencies --enable-tests -j
|
||||
|
||||
script:
|
||||
- cabal configure --enable-tests -v2
|
||||
- cabal build
|
||||
- cabal test
|
||||
- cabal check
|
||||
- cabal sdist
|
||||
# check that the generated source-distribution can be built & installed
|
||||
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
|
||||
cd dist/;
|
||||
cabal sandbox init;
|
||||
if [ -f "$SRC_TGZ" ]; then
|
||||
cabal install alex happy;
|
||||
export PATH="$(pwd)/.cabal-sandbox/bin:$PATH";
|
||||
cabal install gtk2hs-buildtools;
|
||||
cabal install "$SRC_TGZ" --enable-tests;
|
||||
else
|
||||
echo "expected '$SRC_TGZ' not found";
|
||||
exit 1;
|
||||
fi;
|
||||
cd ..
|
||||
- sed -i -e '/hsfm,/d' hsfm.cabal
|
||||
- cabal haddock --executables --internal --hyperlink-source --html-location=https://hackage.haskell.org/package/\$pkg-\$version/docs/
|
||||
|
||||
after_script:
|
||||
- ./update-gh-pages.sh
|
||||
|
||||
notifications:
|
||||
email:
|
||||
- hasufell@posteo.de
|
||||
|
@ -1 +0,0 @@
|
||||
hacking/HACKING.md
|
33
HSFM-FileSystem-FileType.html
Normal file
33
HSFM-FileSystem-FileType.html
Normal file
File diff suppressed because one or more lines are too long
18
HSFM-FileSystem-UtilTypes.html
Normal file
18
HSFM-FileSystem-UtilTypes.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.FileSystem.UtilTypes</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-FileSystem-UtilTypes.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-FileSystem-UtilTypes.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.FileSystem.UtilTypes</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides high-level IO related file operations like
|
||||
copy, delete, move and so on. It only operates on `Path Abs` which
|
||||
guarantees us well-typed paths which are absolute.</p><p>Some functions are just path-safe wrappers around
|
||||
unix functions, others have stricter exception handling
|
||||
and some implement functionality that doesn't have a unix
|
||||
counterpart (like <code>copyDirRecursive</code>).</p><p>Some of these operations are due to their nature not _atomic_, which
|
||||
means they may do multiple syscalls which form one context. Some
|
||||
of them also have to examine the filetypes explicitly before the
|
||||
syscalls, so a reasonable decision can be made. That means
|
||||
the result is undefined if another process changes that context
|
||||
while the non-atomic operation is still happening. However, where
|
||||
possible, as few syscalls as possible are used and the underlying
|
||||
exception handling is kept.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:FileOperation">FileOperation</a><ul class="subs"><li>= <a href="#v:FCopy">FCopy</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Copy">Copy</a></li><li>| <a href="#v:FMove">FMove</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Move">Move</a></li><li>| <a href="#v:FDelete">FDelete</a> [Path Abs]</li><li>| <a href="#v:FOpen">FOpen</a> (Path Abs)</li><li>| <a href="#v:FExecute">FExecute</a> (Path Abs) [<a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a>]</li><li>| <a href="#v:None">None</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Copy">Copy</a><ul class="subs"><li>= <a href="#v:PartialCopy">PartialCopy</a> [Path Abs]</li><li>| <a href="#v:Copy">Copy</a> [Path Abs] (Path Abs)</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Move">Move</a><ul class="subs"><li>= <a href="#v:PartialMove">PartialMove</a> [Path Abs]</li><li>| <a href="#v:Move">Move</a> [Path Abs] (Path Abs)</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:FCollisonMode">FCollisonMode</a><ul class="subs"><li>= <a href="#v:Strict">Strict</a></li><li>| <a href="#v:Overwrite">Overwrite</a></li><li>| <a href="#v:OverwriteAll">OverwriteAll</a></li><li>| <a href="#v:Skip">Skip</a></li><li>| <a href="#v:Rename">Rename</a> (Path Fn)</li></ul></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FileOperation" class="def">FileOperation</a> <a href="src/HSFM-FileSystem-UtilTypes.html#FileOperation" class="link">Source</a></p><div class="doc"><p>Data type describing file operations.
|
||||
Useful to build up a list of operations or delay operations.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:FCopy" class="def">FCopy</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Copy">Copy</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:FMove" class="def">FMove</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Move">Move</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:FDelete" class="def">FDelete</a> [Path Abs]</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:FOpen" class="def">FOpen</a> (Path Abs)</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:FExecute" class="def">FExecute</a> (Path Abs) [<a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a>]</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:None" class="def">None</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Copy" class="def">Copy</a> <a href="src/HSFM-FileSystem-UtilTypes.html#Copy" class="link">Source</a></p><div class="doc"><p>Data type describing partial or complete file copy operation.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PartialCopy" class="def">PartialCopy</a> [Path Abs]</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Copy" class="def">Copy</a> [Path Abs] (Path Abs)</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Move" class="def">Move</a> <a href="src/HSFM-FileSystem-UtilTypes.html#Move" class="link">Source</a></p><div class="doc"><p>Data type describing partial or complete file move operation.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PartialMove" class="def">PartialMove</a> [Path Abs]</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Move" class="def">Move</a> [Path Abs] (Path Abs)</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FCollisonMode" class="def">FCollisonMode</a> <a href="src/HSFM-FileSystem-UtilTypes.html#FCollisonMode" class="link">Source</a></p><div class="doc"><p>Collision modes that describe the behavior in case a file collision
|
||||
happens.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Strict" class="def">Strict</a></td><td class="doc"><p>fail if the target already exists</p></td></tr><tr><td class="src"><a name="v:Overwrite" class="def">Overwrite</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:OverwriteAll" class="def">OverwriteAll</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Skip" class="def">Skip</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Rename" class="def">Rename</a> (Path Fn)</td><td class="doc empty"> </td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
HSFM-GUI-Glib-GlibString.html
Normal file
4
HSFM-GUI-Glib-GlibString.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Glib.GlibString</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Glib-GlibString.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Glib-GlibString.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Glib.GlibString</p></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:c_strlen" class="def">c_strlen</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Foreign-C-String.html#t:CString">CString</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Foreign-C-Types.html#t:CSize">CSize</a> <a href="src/HSFM-GUI-Glib-GlibString.html#c_strlen" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:noNullPtrs" class="def">noNullPtrs</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Foreign-C-String.html#t:CStringLen">CStringLen</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Foreign-C-String.html#t:CStringLen">CStringLen</a> <a href="src/HSFM-GUI-Glib-GlibString.html#noNullPtrs" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
5
HSFM-GUI-Gtk-Callbacks-Utils.html
Normal file
5
HSFM-GUI-Gtk-Callbacks-Utils.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Callbacks.Utils</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-Callbacks-Utils.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Gtk-Callbacks-Utils.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Gtk.Callbacks.Utils</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:doFileOperation">doFileOperation</a> :: <a href="HSFM-FileSystem-UtilTypes.html#t:FileOperation">FileOperation</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:_doFileOperation">_doFileOperation</a> :: [Path b1] -> Path Abs -> (Path b1 -> Path Abs -> CopyMode -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> b) -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:goDir">goDir</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Bool.html#t:Bool">Bool</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:doFileOperation" class="def">doFileOperation</a> :: <a href="HSFM-FileSystem-UtilTypes.html#t:FileOperation">FileOperation</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-GUI-Gtk-Callbacks-Utils.html#doFileOperation" class="link">Source</a></p><div class="doc"><p>Carries out a file operation with the appropriate error handling
|
||||
allowing the user to react to various exceptions with further input.</p></div></div><div class="top"><p class="src"><a name="v:_doFileOperation" class="def">_doFileOperation</a> :: [Path b1] -> Path Abs -> (Path b1 -> Path Abs -> CopyMode -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> b) -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-GUI-Gtk-Callbacks-Utils.html#_doFileOperation" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:goDir" class="def">goDir</a> <a href="src/HSFM-GUI-Gtk-Callbacks-Utils.html#goDir" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>whether to update the history</p></td></tr><tr><td class="src">-> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Helper that is invoked for any directory change operations.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
5
HSFM-GUI-Gtk-Callbacks.html
Normal file
5
HSFM-GUI-Gtk-Callbacks.html
Normal file
File diff suppressed because one or more lines are too long
8
HSFM-GUI-Gtk-Data.html
Normal file
8
HSFM-GUI-Gtk-Data.html
Normal file
File diff suppressed because one or more lines are too long
7
HSFM-GUI-Gtk-Dialogs.html
Normal file
7
HSFM-GUI-Gtk-Dialogs.html
Normal file
File diff suppressed because one or more lines are too long
4
HSFM-GUI-Gtk-Errors.html
Normal file
4
HSFM-GUI-Gtk-Errors.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Errors</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-Errors.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Gtk-Errors.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Gtk.Errors</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Provides error handling for Gtk.</p></div></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GtkException" class="def">GtkException</a> <a href="src/HSFM-GUI-Gtk-Errors.html#GtkException" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:UnknownDialogButton" class="def">UnknownDialogButton</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:GtkException" class="caption collapser" onclick="toggleSection('i:GtkException')">Instances</p><div id="section.i:GtkException" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Text-Show.html#t:Show">Show</a> <a href="HSFM-GUI-Gtk-Errors.html#t:GtkException">GtkException</a></span> <a href="src/HSFM-GUI-Gtk-Errors.html#line-31" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Exception-Base.html#t:Exception">Exception</a> <a href="HSFM-GUI-Gtk-Errors.html#t:GtkException">GtkException</a></span> <a href="src/HSFM-GUI-Gtk-Errors.html#line-33" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
5
HSFM-GUI-Gtk-Icons.html
Normal file
5
HSFM-GUI-Gtk-Icons.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Icons</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-Icons.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Gtk-Icons.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Gtk.Icons</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Module for Gtk icon handling.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:GtkIcon">GtkIcon</a><ul class="subs"><li>= <a href="#v:IFolder">IFolder</a></li><li>| <a href="#v:SymL">SymL</a></li><li>| <a href="#v:IFile">IFile</a></li><li>| <a href="#v:IError">IError</a></li></ul></li><li class="src short"><a href="#v:getIcon">getIcon</a> :: <a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon">GtkIcon</a> -> IconTheme -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> Pixbuf</li><li class="src short"><a href="#v:getSymlinkIcon">getSymlinkIcon</a> :: <a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon">GtkIcon</a> -> IconTheme -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> Pixbuf</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:GtkIcon" class="def">GtkIcon</a> <a href="src/HSFM-GUI-Gtk-Icons.html#GtkIcon" class="link">Source</a></p><div class="doc"><p>Icon type we use in our GUI.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IFolder" class="def">IFolder</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SymL" class="def">SymL</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:IFile" class="def">IFile</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:IError" class="def">IError</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:getIcon" class="def">getIcon</a> <a href="src/HSFM-GUI-Gtk-Icons.html#getIcon" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon">GtkIcon</a></td><td class="doc"><p>icon we want</p></td></tr><tr><td class="src">-> IconTheme</td><td class="doc"><p>which icon theme to get the icon from</p></td></tr><tr><td class="src">-> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>requested icon size</p></td></tr><tr><td class="src">-> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> Pixbuf</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Gets an icon from the default icon theme and falls back to project-icons
|
||||
if not found. The requested icon size is not guaranteed.</p></div></div><div class="top"><p class="src"><a name="v:getSymlinkIcon" class="def">getSymlinkIcon</a> :: <a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon">GtkIcon</a> -> IconTheme -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> Pixbuf <a href="src/HSFM-GUI-Gtk-Icons.html#getSymlinkIcon" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
HSFM-GUI-Gtk-MyGUI.html
Normal file
4
HSFM-GUI-Gtk-MyGUI.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.MyGUI</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-MyGUI.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Gtk-MyGUI.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Gtk.MyGUI</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:createMyGUI">createMyGUI</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:createMyGUI" class="def">createMyGUI</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> <a href="src/HSFM-GUI-Gtk-MyGUI.html#createMyGUI" class="link">Source</a></p><div class="doc"><p>Set up the GUI. This only creates the permanent widgets.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
10
HSFM-GUI-Gtk-MyView.html
Normal file
10
HSFM-GUI-Gtk-MyView.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.MyView</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-MyView.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Gtk-MyView.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Gtk.MyView</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:newTab">newTab</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> Notebook -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a></li><li class="src short"><a href="#v:createMyView">createMyView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> Notebook -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a></li><li class="src short"><a href="#v:switchView">switchView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:destroyView">destroyView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:createIconView">createIconView</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a></li><li class="src short"><a href="#v:createTreeView">createTreeView</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a></li><li class="src short"><a href="#v:refreshView">refreshView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:constructView">constructView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:newTab" class="def">newTab</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> Notebook -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> <a href="src/HSFM-GUI-Gtk-MyView.html#newTab" class="link">Source</a></p><div class="doc"><p>Creates a new tab with its own view and refreshes the view.</p></div></div><div class="top"><p class="src"><a name="v:createMyView" class="def">createMyView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> Notebook -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> <a href="src/HSFM-GUI-Gtk-MyView.html#createMyView" class="link">Source</a></p><div class="doc"><p>Constructs the initial MyView object with a few dummy models.
|
||||
It also initializes the callbacks.</p></div></div><div class="top"><p class="src"><a name="v:switchView" class="def">switchView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-GUI-Gtk-MyView.html#switchView" class="link">Source</a></p><div class="doc"><p>Switch the existing view in <code><a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a></code> with the one that the
|
||||
io action returns.</p></div></div><div class="top"><p class="src"><a name="v:destroyView" class="def">destroyView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a> <a href="src/HSFM-GUI-Gtk-MyView.html#destroyView" class="link">Source</a></p><div class="doc"><p>Destroys the given view by disconnecting the watcher
|
||||
and destroying the active FMView container.</p><p>Everything that needs to be done in order to forget about a
|
||||
view needs to be done here.</p><p>Returns the page in the tab list this view corresponds to.</p></div></div><div class="top"><p class="src"><a name="v:createIconView" class="def">createIconView</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> <a href="src/HSFM-GUI-Gtk-MyView.html#createIconView" class="link">Source</a></p><div class="doc"><p>Createss an IconView.</p></div></div><div class="top"><p class="src"><a name="v:createTreeView" class="def">createTreeView</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="HSFM-GUI-Gtk-Data.html#t:FMView">FMView</a> <a href="src/HSFM-GUI-Gtk-MyView.html#createTreeView" class="link">Source</a></p><div class="doc"><p>Creates a TreeView.</p></div></div><div class="top"><p class="src"><a name="v:refreshView" class="def">refreshView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-GUI-Gtk-MyView.html#refreshView" class="link">Source</a></p><div class="doc"><p>Refreshes the View based on the given directory.</p><p>Throws:</p><ul><li><code><a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO-Error.html#v:userError">userError</a></code> on inappropriate type</li></ul></div></div><div class="top"><p class="src"><a name="v:constructView" class="def">constructView</a> :: <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-GUI-Gtk-MyView.html#constructView" class="link">Source</a></p><div class="doc"><p>Constructs the visible View with the current underlying mutable models,
|
||||
which are retrieved from <code><a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a></code>.</p><p>This sort of merges the components mygui and myview and fires up
|
||||
the actual models.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
9
HSFM-GUI-Gtk-Plugins.html
Normal file
9
HSFM-GUI-Gtk-Plugins.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Plugins</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-GUI-Gtk-Plugins.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-GUI-Gtk-Plugins.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.GUI.Gtk.Plugins</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:insertPos">insertPos</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:myplugins">myplugins</a> :: [(<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> MenuItem, [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Bool.html#t:Bool">Bool</a>, [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ())]</li><li class="src short"><a href="#v:diffItem">diffItem</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> MenuItem</li><li class="src short"><a href="#v:diffFilter">diffFilter</a> :: [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:diffCallback">diffCallback</a> :: [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:insertPos" class="def">insertPos</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a> <a href="src/HSFM-GUI-Gtk-Plugins.html#insertPos" class="link">Source</a></p><div class="doc"><p>Where to start inserting plugins.</p></div></div><div class="top"><p class="src"><a name="v:myplugins" class="def">myplugins</a> :: [(<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> MenuItem, [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Bool.html#t:Bool">Bool</a>, [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ())] <a href="src/HSFM-GUI-Gtk-Plugins.html#myplugins" class="link">Source</a></p><div class="doc"><p>A list of plugins to add to the right-click menu at position
|
||||
<code><a href="HSFM-GUI-Gtk-Plugins.html#v:insertPos">insertPos</a></code>.</p><p>The left part of the triple is a function that returns the menuitem.
|
||||
The middle part of the triple is a filter function that
|
||||
decides whether the item is shown.
|
||||
The right part of the triple is the callback, which is invoked
|
||||
when the menu item is clicked.</p><p>Plugins are added in order of this list.</p></div></div><div class="top"><p class="src"><a name="v:diffItem" class="def">diffItem</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> MenuItem <a href="src/HSFM-GUI-Gtk-Plugins.html#diffItem" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:diffFilter" class="def">diffFilter</a> :: [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Bool.html#t:Bool">Bool</a> <a href="src/HSFM-GUI-Gtk-Plugins.html#diffFilter" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:diffCallback" class="def">diffCallback</a> :: [<a href="HSFM-GUI-Gtk-Data.html#t:Item">Item</a>] -> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">MyGUI</a> -> <a href="HSFM-GUI-Gtk-Data.html#t:MyView">MyView</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-GUI-Gtk-Plugins.html#diffCallback" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
HSFM-GUI-Gtk-Settings.html
Normal file
4
HSFM-GUI-Gtk-Settings.html
Normal file
File diff suppressed because one or more lines are too long
10
HSFM-GUI-Gtk-Utils.html
Normal file
10
HSFM-GUI-Gtk-Utils.html
Normal file
File diff suppressed because one or more lines are too long
6
HSFM-History.html
Normal file
6
HSFM-History.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.History</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-History.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-History.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.History</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:BrowsingHistory">BrowsingHistory</a> = <a href="#v:BrowsingHistory">BrowsingHistory</a> {<ul class="subs"><li><a href="#v:backwardsHistory">backwardsHistory</a> :: [Path Abs]</li><li><a href="#v:currentDir">currentDir</a> :: Path Abs</li><li><a href="#v:forwardHistory">forwardHistory</a> :: [Path Abs]</li><li><a href="#v:maxSize">maxSize</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><a href="#v:historyNewPath">historyNewPath</a> :: Path Abs -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a></li><li class="src short"><a href="#v:historyBack">historyBack</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a></li><li class="src short"><a href="#v:historyForward">historyForward</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BrowsingHistory" class="def">BrowsingHistory</a> <a href="src/HSFM-History.html#BrowsingHistory" class="link">Source</a></p><div class="doc"><p>Browsing history. For <code><a href="HSFM-History.html#v:forwardHistory">forwardHistory</a></code> and <code><a href="HSFM-History.html#v:backwardsHistory">backwardsHistory</a></code>
|
||||
the first item is the most recent one.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:BrowsingHistory" class="def">BrowsingHistory</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:backwardsHistory" class="def">backwardsHistory</a> :: [Path Abs]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:currentDir" class="def">currentDir</a> :: Path Abs</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:forwardHistory" class="def">forwardHistory</a> :: [Path Abs]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:maxSize" class="def">maxSize</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:historyNewPath" class="def">historyNewPath</a> :: Path Abs -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> <a href="src/HSFM-History.html#historyNewPath" class="link">Source</a></p><div class="doc"><p>This is meant to be called after e.g. a new path is entered
|
||||
(not navigated to via the history) and the history needs updating.</p></div></div><div class="top"><p class="src"><a name="v:historyBack" class="def">historyBack</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> <a href="src/HSFM-History.html#historyBack" class="link">Source</a></p><div class="doc"><p>Go back one step in the history.</p></div></div><div class="top"><p class="src"><a name="v:historyForward" class="def">historyForward</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> <a href="src/HSFM-History.html#historyForward" class="link">Source</a></p><div class="doc"><p>Go forward one step in the history.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
7
HSFM-Settings.html
Normal file
7
HSFM-Settings.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.Settings</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-Settings.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-Settings.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.Settings</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:terminalCommand">terminalCommand</a> :: <a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:home">home</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:terminalCommand" class="def">terminalCommand</a> <a href="src/HSFM-Settings.html#terminalCommand" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>current directory of the FM</p></td></tr><tr><td class="src">-> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>The terminal command. This should call <code><a href="https://hackage.haskell.org/package/unix-2.7.1.0/docs/System-Posix-Process-ByteString.html#v:executeFile">executeFile</a></code> in the end
|
||||
with the appropriate arguments.</p></div></div><div class="top"><p class="src"><a name="v:home" class="def">home</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/HSFM-Settings.html#home" class="link">Source</a></p><div class="doc"><p>The home directory. If you want to set it explicitly, you might
|
||||
want to do:</p><pre>home = return "/home/wurst"
|
||||
</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
HSFM-Utils-IO.html
Normal file
4
HSFM-Utils-IO.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.Utils.IO</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-Utils-IO.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-Utils-IO.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.Utils.IO</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Random and general IO utilities.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:writeTVarIO">writeTVarIO</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/GHC-Conc.html#t:TVar">TVar</a> a -> a -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:modifyTVarIO">modifyTVarIO</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/GHC-Conc.html#t:TVar">TVar</a> a -> (a -> a) -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:writeTVarIO" class="def">writeTVarIO</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/GHC-Conc.html#t:TVar">TVar</a> a -> a -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-Utils-IO.html#writeTVarIO" class="link">Source</a></p><div class="doc"><p>Atomically write a TVar.</p></div></div><div class="top"><p class="src"><a name="v:modifyTVarIO" class="def">modifyTVarIO</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/GHC-Conc.html#t:TVar">TVar</a> a -> (a -> a) -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/HSFM-Utils-IO.html#modifyTVarIO" class="link">Source</a></p><div class="doc"><p>Atomically modify a TVar.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
6
HSFM-Utils-MyPrelude.html
Normal file
6
HSFM-Utils-MyPrelude.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.Utils.MyPrelude</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-Utils-MyPrelude.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-Utils-MyPrelude.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.Utils.MyPrelude</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:listIndices">listIndices</a> :: [a] -> [<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a>]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:listIndices" class="def">listIndices</a> :: [a] -> [<a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Int.html#t:Int">Int</a>] <a href="src/HSFM-Utils-MyPrelude.html#listIndices" class="link">Source</a></p><div class="doc"><p>Turns any list into a list of the same length with the values
|
||||
being the indices.
|
||||
E.g.: "abdasd" -> [0,1,2,3,4,5]</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
339
LICENSE
339
LICENSE
@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
4
Main.html
Normal file
4
Main.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Main</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_Main.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Main.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Main</p></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:main" class="def">main</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> () <a href="src/Main.html#main" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
Paths_hsfm.html
Normal file
4
Paths_hsfm.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Paths_hsfm</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();setSynopsis("mini_Paths_hsfm.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Paths_hsfm.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Paths_hsfm</p></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:version" class="def">version</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Version.html#t:Version">Version</a> <a href="src/Paths_hsfm.html#version" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getBinDir" class="def">getBinDir</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getBinDir" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getLibDir" class="def">getLibDir</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getLibDir" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getDynLibDir" class="def">getDynLibDir</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getDynLibDir" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getDataDir" class="def">getDataDir</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getDataDir" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getLibexecDir" class="def">getLibexecDir</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getLibexecDir" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getDataFileName" class="def">getDataFileName</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> -> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getDataFileName" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getSysconfDir" class="def">getSysconfDir</a> :: <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getSysconfDir" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
32
README.md
32
README.md
@ -1,32 +0,0 @@
|
||||
HSFM
|
||||
====
|
||||
|
||||
[![Join the chat at https://gitter.im/hasufell/hsfm](https://badges.gitter.im/hasufell/hsfm.svg)](https://gitter.im/hasufell/hsfm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Build Status](https://api.travis-ci.org/hasufell/hsfm.png?branch=master)](https://travis-ci.org/hasufell/hsfm)
|
||||
|
||||
A Gtk+:3 filemanager written in Haskell.
|
||||
|
||||
Design goals:
|
||||
|
||||
- easy to use
|
||||
- useful library interface to be able to build other user interfaces
|
||||
- type safety, runtime safety, strictness
|
||||
- simple add-on interface
|
||||
|
||||
Screenshots
|
||||
-----------
|
||||
|
||||
![hsfm](https://cloud.githubusercontent.com/assets/1241845/20034565/6c3ae80e-a3c2-11e6-882c-9fe0ff202045.png "hsfm-gtk")
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
```
|
||||
./install.sh
|
||||
```
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
See [HACKING.md](hacking/HACKING.md).
|
@ -1,10 +0,0 @@
|
||||
with-compiler: ghc-8.6.5
|
||||
|
||||
packages: .
|
||||
|
||||
optimization: 2
|
||||
|
||||
package *
|
||||
optimization: 2
|
||||
|
||||
index-state: 2020-01-24T20:23:40Z
|
@ -1,80 +0,0 @@
|
||||
constraints: any.Cabal ==2.4.0.1,
|
||||
any.IfElse ==0.85,
|
||||
any.abstract-deque ==0.3,
|
||||
abstract-deque -usecas,
|
||||
any.alex ==3.2.5,
|
||||
alex +small_base,
|
||||
any.array ==0.5.3.0,
|
||||
any.atomic-primops ==0.8.3,
|
||||
atomic-primops -debug,
|
||||
any.base ==4.12.0.0,
|
||||
any.base-orphans ==0.8.1,
|
||||
any.binary ==0.8.6.0,
|
||||
any.bytestring ==0.10.8.2,
|
||||
any.cairo ==0.13.8.0,
|
||||
cairo +cairo_pdf +cairo_ps +cairo_svg,
|
||||
any.containers ==0.6.0.1,
|
||||
any.deepseq ==1.4.4.0,
|
||||
any.directory ==1.3.3.0,
|
||||
any.exceptions ==0.10.4,
|
||||
exceptions +transformers-0-4,
|
||||
any.filepath ==1.4.2.1,
|
||||
any.ghc-boot-th ==8.6.5,
|
||||
any.ghc-prim ==0.5.3,
|
||||
any.gio ==0.13.8.0,
|
||||
any.glib ==0.13.8.0,
|
||||
glib +closure_signals,
|
||||
any.gtk2hs-buildtools ==0.13.8.0,
|
||||
gtk2hs-buildtools +closuresignals,
|
||||
any.gtk3 ==0.15.4,
|
||||
gtk3 -build-demos +fmode-binary +have-gio,
|
||||
any.happy ==1.19.12,
|
||||
happy +small_base,
|
||||
any.hashable ==1.3.0.0,
|
||||
hashable -examples +integer-gmp +sse2 -sse41,
|
||||
any.hashtables ==1.2.3.4,
|
||||
hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks,
|
||||
any.heaps ==0.3.6.1,
|
||||
any.hinotify-bytestring ==0.3.8.1,
|
||||
any.hpath ==0.11.0,
|
||||
any.hpath-filepath ==0.10.3,
|
||||
any.hpath-io ==0.12.0,
|
||||
any.hsc2hs ==0.68.6,
|
||||
hsc2hs -in-ghc-tree,
|
||||
any.integer-gmp ==1.0.2.0,
|
||||
any.lockfree-queue ==0.2.3.1,
|
||||
any.monad-control ==1.0.2.3,
|
||||
any.monad-loops ==0.4.3,
|
||||
monad-loops +base4,
|
||||
any.mtl ==2.2.2,
|
||||
any.network ==3.1.1.1,
|
||||
any.old-locale ==1.0.0.7,
|
||||
any.pango ==0.13.8.0,
|
||||
pango +new-exception,
|
||||
any.parsec ==3.1.13.0,
|
||||
any.pretty ==1.1.3.6,
|
||||
any.primitive ==0.7.0.0,
|
||||
any.process ==1.6.5.0,
|
||||
any.random ==1.1,
|
||||
any.rts ==1.0,
|
||||
any.safe ==0.3.18,
|
||||
any.safe-exceptions ==0.1.7.0,
|
||||
any.simple-sendfile ==0.2.30,
|
||||
simple-sendfile +allow-bsd,
|
||||
any.stm ==2.5.0.0,
|
||||
any.streamly ==0.7.0,
|
||||
streamly -benchmark -debug -dev -examples -examples-sdl -has-llvm -inspection -no-charts -no-fusion -streamk,
|
||||
any.template-haskell ==2.14.0.0,
|
||||
any.text ==1.2.3.1,
|
||||
any.time ==1.8.0.2,
|
||||
any.transformers ==0.5.6.2,
|
||||
any.transformers-base ==0.4.5.2,
|
||||
transformers-base +orphaninstances,
|
||||
any.transformers-compat ==0.6.5,
|
||||
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
|
||||
any.unix ==2.7.2.2,
|
||||
any.unix-bytestring ==0.3.7.3,
|
||||
any.utf8-string ==1.0.1.1,
|
||||
any.vector ==0.12.0.3,
|
||||
vector +boundschecks -internalchecks -unsafechecks -wall,
|
||||
any.word8 ==0.1.3
|
@ -1,922 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<object class="GtkGrid" id="fpropGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">2</property>
|
||||
<property name="column_spacing">2</property>
|
||||
<property name="row_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">File Name:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropFnEntry">
|
||||
<property name="width_request">350</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">Location:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">Total Size:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropLocEntry">
|
||||
<property name="width_request">350</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropTsEntry">
|
||||
<property name="width_request">350</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">Accessed:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">Modified:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropModEntry">
|
||||
<property name="width_request">350</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropAcEntry">
|
||||
<property name="width_request">350</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">7</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">File Type:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropFTEntry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropPermEntry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">Link Destination:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="label" translatable="yes">Permissions:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="fpropLDEntry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="editable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-edit</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-open</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-cancel</property>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="rootWin">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkMenuBar" id="menubar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menubarFile">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_File</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separatormenuitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="menubarFileQuit">
|
||||
<property name="label">gtk-quit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menubarView">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">View</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menubarHelp">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="menubarHelpAbout">
|
||||
<property name="label">gtk-about</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkPaned">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="scrollable">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
<property name="shrink">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="scrollable">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
<property name="shrink">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="leftNbBtn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">2</property>
|
||||
<property name="margin_right">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="statusBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">10</property>
|
||||
<property name="margin_right">10</property>
|
||||
<property name="margin_start">10</property>
|
||||
<property name="margin_end">10</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="clearStatusBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="image">image3</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">2</property>
|
||||
<property name="margin_right">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="rightNbBtn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_top">5</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="always_show_image">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkImage" id="image4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-zoom-in</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-zoom-out</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-directory</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-zoom-fit</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image9">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">utilities-terminal</property>
|
||||
</object>
|
||||
<object class="GtkMenu" id="rcMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileOpen">
|
||||
<property name="label">gtk-open</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileExecute">
|
||||
<property name="label">gtk-execute</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileNew">
|
||||
<property name="label">gtk-new</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileNewRegFile">
|
||||
<property name="label">gtk-file</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileNewDir">
|
||||
<property name="label" translatable="yes">directory</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image6</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separatormenuitem4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileNewTab">
|
||||
<property name="label" translatable="yes">Tab</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image8</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileNewTerm">
|
||||
<property name="label" translatable="yes">Terminal</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image9</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separatormenuitem2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileCut">
|
||||
<property name="label">gtk-cut</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileCopy">
|
||||
<property name="label">gtk-copy</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileRename">
|
||||
<property name="label">Rename</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFilePaste">
|
||||
<property name="label">gtk-paste</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileDelete">
|
||||
<property name="label">gtk-delete</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileProperty">
|
||||
<property name="label">gtk-properties</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separatormenuitem3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileView">
|
||||
<property name="label">View</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image7</property>
|
||||
<property name="use_stock">False</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileIconView">
|
||||
<property name="label">icon view</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image4</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="rcFileTreeView">
|
||||
<property name="label" translatable="yes">tree view</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="image">image5</property>
|
||||
<property name="use_stock">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkImage" id="leftNbIcon">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-yes</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="rightNbIcon">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-yes</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="viewBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="backViewB">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageGoBack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-go-back</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">2</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="upViewB">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageGoUp">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-go-up</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">2</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="forwardViewB">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageGoForward">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-go-forward</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">2</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="refreshViewB">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageRefresh">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="homeViewB">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageHome">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-home</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="urlBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="input_purpose">url</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="mainScroll">
|
||||
<property name="width_request">300</property>
|
||||
<property name="height_request">500</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB |
4
doc-index-95.html
Normal file
4
doc-index-95.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - _)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - _</p><table><tr><td class="src">_doFileOperation</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:_doFileOperation">HSFM.GUI.Gtk.Callbacks.Utils</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-A.html
Normal file
4
doc-index-A.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - A)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - A</p><table><tr><td class="src">accessTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:accessTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">accessTimeHiRes</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:accessTimeHiRes">HSFM.FileSystem.FileType</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-All.html
Normal file
4
doc-index-All.html
Normal file
File diff suppressed because one or more lines are too long
4
doc-index-B.html
Normal file
4
doc-index-B.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - B)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - B</p><table><tr><td class="src">backViewB</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:backViewB">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">backwardsHistory</td><td class="module"><a href="HSFM-History.html#v:backwardsHistory">HSFM.History</a></td></tr><tr><td class="src">BlockDev</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:BlockDev">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">BrokenSymlink</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:BrokenSymlink">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">brokenSymlink</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:brokenSymlink">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">BrowsingHistory</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-History.html#t:BrowsingHistory">HSFM.History</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-History.html#v:BrowsingHistory">HSFM.History</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-C.html
Normal file
4
doc-index-C.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - C)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - C</p><table><tr><td class="src">CharDev</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:CharDev">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">clearStatusBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:clearStatusBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">closeTab</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:closeTab">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">CloseTabKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:CloseTabKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">CloseTabModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:CloseTabModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">comparingConstr</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:comparingConstr">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">constructView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:constructView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">Copy</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#t:Copy">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:Copy">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">copyInit</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:copyInit">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">CopyKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:CopyKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">CopyModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:CopyModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">createIconView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createIconView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">createMyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-MyGUI.html#v:createMyGUI">HSFM.GUI.Gtk.MyGUI</a></td></tr><tr><td class="src">createMyView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createMyView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">createTreeView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createTreeView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">currentDir</td><td class="module"><a href="HSFM-History.html#v:currentDir">HSFM.History</a></td></tr><tr><td class="src">cwd</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:cwd">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">c_strlen</td><td class="module"><a href="HSFM-GUI-Glib-GlibString.html#v:c_strlen">HSFM.GUI.Glib.GlibString</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-D.html
Normal file
4
doc-index-D.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - D)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - D</p><table><tr><td class="src">del</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:del">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">DeleteKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:DeleteKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">DeleteModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:DeleteModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">destroyView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:destroyView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">deviceID</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:deviceID">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">diffCallback</td><td class="module"><a href="HSFM-GUI-Gtk-Plugins.html#v:diffCallback">HSFM.GUI.Gtk.Plugins</a></td></tr><tr><td class="src">diffFilter</td><td class="module"><a href="HSFM-GUI-Gtk-Plugins.html#v:diffFilter">HSFM.GUI.Gtk.Plugins</a></td></tr><tr><td class="src">diffItem</td><td class="module"><a href="HSFM-GUI-Gtk-Plugins.html#v:diffItem">HSFM.GUI.Gtk.Plugins</a></td></tr><tr><td class="src">Dir</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:Dir">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">DirList</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:DirList">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">DirOrSym</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:DirOrSym">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">DirSym</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:DirSym">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">dirSym</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:dirSym">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">doFileOperation</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:doFileOperation">HSFM.GUI.Gtk.Callbacks.Utils</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-E.html
Normal file
4
doc-index-E.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - E)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - E</p><table><tr><td class="src">epochToString</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:epochToString">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">execute</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:execute">HSFM.GUI.Gtk.Callbacks</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-F.html
Normal file
4
doc-index-F.html
Normal file
File diff suppressed because one or more lines are too long
4
doc-index-G.html
Normal file
4
doc-index-G.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - G)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - G</p><table><tr><td class="src">getBinDir</td><td class="module"><a href="Paths_hsfm.html#v:getBinDir">Paths_hsfm</a></td></tr><tr><td class="src">getContents</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getContents">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getCurrentDir</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getCurrentDir">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getDataDir</td><td class="module"><a href="Paths_hsfm.html#v:getDataDir">Paths_hsfm</a></td></tr><tr><td class="src">getDataFileName</td><td class="module"><a href="Paths_hsfm.html#v:getDataFileName">Paths_hsfm</a></td></tr><tr><td class="src">getDynLibDir</td><td class="module"><a href="Paths_hsfm.html#v:getDynLibDir">Paths_hsfm</a></td></tr><tr><td class="src">getFileInfo</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFileInfo">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getFirstItem</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getFirstItem">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getFPasStr</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFPasStr">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:getIcon">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">getLibDir</td><td class="module"><a href="Paths_hsfm.html#v:getLibDir">Paths_hsfm</a></td></tr><tr><td class="src">getLibexecDir</td><td class="module"><a href="Paths_hsfm.html#v:getLibexecDir">Paths_hsfm</a></td></tr><tr><td class="src">getSelectedItems</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedItems">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getSelectedTreePaths</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedTreePaths">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getSymlinkIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:getSymlinkIcon">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">getSysconfDir</td><td class="module"><a href="Paths_hsfm.html#v:getSysconfDir">Paths_hsfm</a></td></tr><tr><td class="src">goDir</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:goDir">HSFM.GUI.Gtk.Callbacks.Utils</a></td></tr><tr><td class="src">goHistoryBack</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryBack">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goHistoryForward</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryForward">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goHome</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHome">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goUp</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:goUp">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">goUp'</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:goUp-39-">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">GtkException</td><td class="module"><a href="HSFM-GUI-Gtk-Errors.html#t:GtkException">HSFM.GUI.Gtk.Errors</a></td></tr><tr><td class="src">GtkIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon">HSFM.GUI.Gtk.Icons</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-H.html
Normal file
4
doc-index-H.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - H)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - H</p><table><tr><td class="src">history</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:history">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">historyBack</td><td class="module"><a href="HSFM-History.html#v:historyBack">HSFM.History</a></td></tr><tr><td class="src">HistoryBackKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:HistoryBackKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">HistoryBackModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:HistoryBackModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">historyForward</td><td class="module"><a href="HSFM-History.html#v:historyForward">HSFM.History</a></td></tr><tr><td class="src">HistoryForwardKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:HistoryForwardKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">HistoryForwardModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:HistoryForwardModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">historyNewPath</td><td class="module"><a href="HSFM-History.html#v:historyNewPath">HSFM.History</a></td></tr><tr><td class="src">home</td><td class="module"><a href="HSFM-Settings.html#v:home">HSFM.Settings</a></td></tr><tr><td class="src">homeViewB</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:homeViewB">HSFM.GUI.Gtk.Data</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-I.html
Normal file
4
doc-index-I.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - I)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - I</p><table><tr><td class="src">iconSize</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:iconSize">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">IError</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:IError">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">IFile</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:IFile">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">IFolder</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:IFolder">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">inotify</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:inotify">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">insertPos</td><td class="module"><a href="HSFM-GUI-Gtk-Plugins.html#v:insertPos">HSFM.GUI.Gtk.Plugins</a></td></tr><tr><td class="src">isBlockC</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isBlockC">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">isBrokenSymlink</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isBrokenSymlink">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">isCharC</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isCharC">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">isDirC</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isDirC">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">isFileC</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isFileC">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">isLazy</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:isLazy">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">isNamedC</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isNamedC">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">isSocketC</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isSocketC">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">isSymC</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:isSymC">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">Item</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:Item">HSFM.GUI.Gtk.Data</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-L.html
Normal file
4
doc-index-L.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - L)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - L</p><table><tr><td class="src">leftNbBtn</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:leftNbBtn">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">leftNbIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:leftNbIcon">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">linkCount</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:linkCount">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">listIndices</td><td class="module"><a href="HSFM-Utils-MyPrelude.html#v:listIndices">HSFM.Utils.MyPrelude</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-M.html
Normal file
4
doc-index-M.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - M)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - M</p><table><tr><td class="src">main</td><td class="module"><a href="Main.html#v:main">Main</a></td></tr><tr><td class="src">maxSize</td><td class="module"><a href="HSFM-History.html#v:maxSize">HSFM.History</a></td></tr><tr><td class="src">MenuBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MenuBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubarFileQuit</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubarFileQuit">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubarHelpAbout</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubarHelpAbout">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkFilePropertyGrid</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkFilePropertyGrid">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkFMSettings</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkFMSettings">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">mkHistoryMenuB</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:mkHistoryMenuB">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">mkHistoryMenuF</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:mkHistoryMenuF">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">MkMenuBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMenuBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMyGUI">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMyView</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMyView">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkRightClickMenu</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkRightClickMenu">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">modificationTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:modificationTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">modificationTimeHiRes</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:modificationTimeHiRes">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">modifyTVarIO</td><td class="module"><a href="HSFM-Utils-IO.html#v:modifyTVarIO">HSFM.Utils.IO</a></td></tr><tr><td class="src">Move</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#t:Move">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:Move">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">moveInit</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:moveInit">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">MoveKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:MoveKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">MoveModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:MoveModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">MyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">myplugins</td><td class="module"><a href="HSFM-GUI-Gtk-Plugins.html#v:myplugins">HSFM.GUI.Gtk.Plugins</a></td></tr><tr><td class="src">MyView</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MyView">HSFM.GUI.Gtk.Data</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-N.html
Normal file
4
doc-index-N.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - N)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - N</p><table><tr><td class="src">NamedPipe</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:NamedPipe">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">newDir</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newDir">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">newFile</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newFile">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">newTab</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:newTab">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">newTab'</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newTab-39-">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">NewTabKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:NewTabKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">NewTabModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:NewTabModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">None</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:None">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">noNullPtrs</td><td class="module"><a href="HSFM-GUI-Glib-GlibString.html#v:noNullPtrs">HSFM.GUI.Glib.GlibString</a></td></tr><tr><td class="src">notebook</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:notebook">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">notebook1</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:notebook1">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">notebook2</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:notebook2">HSFM.GUI.Gtk.Data</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-O.html
Normal file
4
doc-index-O.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - O)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - O</p><table><tr><td class="src">opeInNewTab</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:opeInNewTab">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">open</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:open">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">OpenKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:OpenKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">OpenModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:OpenModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">openTerminalHere</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:openTerminalHere">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">OpenTerminalKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:OpenTerminalKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">OpenTerminalModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:OpenTerminalModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">operationBuffer</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:operationBuffer">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">operationFinal</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:operationFinal">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">Overwrite</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:Overwrite">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">OverwriteAll</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:OverwriteAll">HSFM.FileSystem.UtilTypes</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-P.html
Normal file
4
doc-index-P.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - P)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - P</p><table><tr><td class="src">packAccessTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:packAccessTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">packFileType</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:packFileType">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">packLinkDestination</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:packLinkDestination">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">packModTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:packModTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">packPermissions</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:packPermissions">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">PartialCopy</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:PartialCopy">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">PartialMove</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:PartialMove">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">PasteKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:PasteKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">PasteModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:PasteModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">path</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:path">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">popStatusbar</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:popStatusbar">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">pushStatusBar</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:pushStatusBar">HSFM.GUI.Gtk.Utils</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-Q.html
Normal file
4
doc-index-Q.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - Q)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - Q</p><table><tr><td class="src">QuitKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:QuitKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">QuitModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:QuitModifier">HSFM.GUI.Gtk.Settings</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-R.html
Normal file
4
doc-index-R.html
Normal file
File diff suppressed because one or more lines are too long
4
doc-index-S.html
Normal file
4
doc-index-S.html
Normal file
File diff suppressed because one or more lines are too long
4
doc-index-T.html
Normal file
4
doc-index-T.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - T)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - T</p><table><tr><td class="src">terminalCommand</td><td class="module"><a href="HSFM-Settings.html#v:terminalCommand">HSFM.Settings</a></td></tr><tr><td class="src">textInputDialog</td><td class="module"><a href="HSFM-GUI-Gtk-Dialogs.html#v:textInputDialog">HSFM.GUI.Gtk.Dialogs</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-U.html
Normal file
4
doc-index-U.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - U)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - U</p><table><tr><td class="src">UnknownDialogButton</td><td class="module"><a href="HSFM-GUI-Gtk-Errors.html#v:UnknownDialogButton">HSFM.GUI.Gtk.Errors</a></td></tr><tr><td class="src">upDir</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:upDir">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">UpDirKey</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:UpDirKey">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">UpDirModifier</td><td class="module"><a href="HSFM-GUI-Gtk-Settings.html#v:UpDirModifier">HSFM.GUI.Gtk.Settings</a></td></tr><tr><td class="src">upViewB</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:upViewB">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">urlBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:urlBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">urlGoTo</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:urlGoTo">HSFM.GUI.Gtk.Callbacks</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-V.html
Normal file
4
doc-index-V.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - V)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - V</p><table><tr><td class="src">version</td><td class="module"><a href="Paths_hsfm.html#v:version">Paths_hsfm</a></td></tr><tr><td class="src">view</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:view">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">viewBox</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:viewBox">HSFM.GUI.Gtk.Data</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index-W.html
Normal file
4
doc-index-W.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index - W)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - W</p><table><tr><td class="src">withConfirmationDialog</td><td class="module"><a href="HSFM-GUI-Gtk-Dialogs.html#v:withConfirmationDialog">HSFM.GUI.Gtk.Dialogs</a></td></tr><tr><td class="src">withErrorDialog</td><td class="module"><a href="HSFM-GUI-Gtk-Dialogs.html#v:withErrorDialog">HSFM.GUI.Gtk.Dialogs</a></td></tr><tr><td class="src">withItems</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:withItems">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">writeTVarIO</td><td class="module"><a href="HSFM-Utils-IO.html#v:writeTVarIO">HSFM.Utils.IO</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
4
doc-index.html
Normal file
4
doc-index.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk (Index)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
30
frames.html
Normal file
30
frames.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title></title>
|
||||
<script src="haddock-util.js" type="text/javascript"></script>
|
||||
<script type="text/javascript"><!--
|
||||
/*
|
||||
|
||||
The synopsis frame needs to be updated using javascript, so we hide
|
||||
it by default and only show it if javascript is enabled.
|
||||
|
||||
TODO: provide some means to disable it.
|
||||
*/
|
||||
function load() {
|
||||
var d = document.getElementById("inner-fs");
|
||||
d.rows = "50%,50%";
|
||||
postReframe();
|
||||
}
|
||||
--></script>
|
||||
</head>
|
||||
<frameset id="outer-fs" cols="25%,75%" onload="load()">
|
||||
<frameset id="inner-fs" rows="100%,0%">
|
||||
<frame src="index-frames.html" name="modules" />
|
||||
<frame src="" name="synopsis" />
|
||||
</frameset>
|
||||
<frame src="index.html" name="main" />
|
||||
</frameset>
|
||||
</html>
|
@ -1,105 +0,0 @@
|
||||
# HACKING
|
||||
|
||||
Check out the [issue tracker](https://github.com/hasufell/hsfm/issues)
|
||||
if you don't know yet what you want to hack on.
|
||||
|
||||
## Coding style
|
||||
|
||||
- match the sorroundings
|
||||
- no overcomplicated pointfree style
|
||||
- normal indenting 2 whitespaces
|
||||
- just make things pretty and readable
|
||||
- you can use the provided [hsimport.hs](hsimport.hs)
|
||||
|
||||
## Documentation
|
||||
|
||||
__Everything__ must be documented. :)
|
||||
Don't assume people know what you mean. Type signatures are not sufficient
|
||||
documentation.
|
||||
|
||||
## Hacking Overview
|
||||
|
||||
Only a GTK GUI is currently implemented, the entry point being
|
||||
[HSFM.GUI.Gtk](./../src/HSFM/GUI/Gtk.hs). From there it flows down
|
||||
to creating a [MyGUI object](./../src/HSFM/GUI/Gtk/Data.hs#L51) in
|
||||
[HSFM.GUI.Gtk.MyGUI](./../src/HSFM/GUI/Gtk/MyGUI.hs), which is sort of
|
||||
a global object for the whole window. Inside this object are
|
||||
theoretically multiple [MyView objects](./../src/HSFM/GUI/Gtk/Data.hs#L101)
|
||||
allowed which represent the actual view on the filesystem and related
|
||||
widgets, which are constructed in
|
||||
[HSFM.GUI.Gtk.MyView](./../src/HSFM/GUI/Gtk/MyView.hs). Both MyGUI and MyView
|
||||
are more or less accessible throughout the whole GTK callstack, expclicitly
|
||||
passed as parameters.
|
||||
|
||||
For adding new GTK widgets with functionality you mostly have to touch the
|
||||
following files:
|
||||
* [builder.xml](./../data/Gtk/builder.xml): this defines the main GUI widgets which are static, use the [glade editor](http://glade.gnome.org) to add stuff
|
||||
* [HSFM.GUI.Gtk.Data](./../src/HSFM/GUI/Gtk/Data.hs): add the widget to e.g. the MyGUI type so we can access it throughout the GTK call stack
|
||||
* [HSFM.GUI.Gtk.MyGUI](./../src/HSFM/GUI/Gtk/MyGUI.hs): add initializers for the GUI buttons to be fetched from the GTK builder.xml file
|
||||
* [HSFM.GUI.Gtk.Callbacks](./../src/HSFM/GUI/Gtk/Callbacks.hs): define the callbacks and the actual functionality here
|
||||
|
||||
## Concepts
|
||||
|
||||
### Path safety
|
||||
|
||||
Paths are usually represented in haskell libraries as `type FilePath = String`.
|
||||
This is bad, because of a number of reasons:
|
||||
* encoding issues, since the low-level representation of filepaths is in fact an array of C chars
|
||||
* weak typing... we could pass arbitrary invalid/malicious filepaths or other random strings
|
||||
* no information about any property at type level (e.g. is it an absolute path?)
|
||||
* no filepath constructors that do sanity checks and proper parsing
|
||||
* no guarantee whether the filepath is normalised or not or even valid
|
||||
|
||||
Because of that, the solution is:
|
||||
* use `ByteString` under the hood
|
||||
* wrap it inside `Path t` where `t` can be either `Abs` (for absolute), `Rel` (for relative) or `Fn` (for filename)
|
||||
* construct filepaths via smart constructors only that reject certain paths (like `.` or `..`) and normalise the path
|
||||
|
||||
This leads to the following benefits:
|
||||
* we have guarantees about whether a path is absolute or not, which is important for runtime safety in general, predictable behavior and thread safety
|
||||
* we don't mess with the filepath representation we get from low-level posix functions, so encoding issues are pretty much out
|
||||
* we can reason about filepaths and rely on them to be valid (don't confuse that with "they exist")
|
||||
* filepath functions like `(</>)` are now predictable and safe in contrast to the version from the `filepath` package
|
||||
|
||||
The [hpath](https://hackage.haskell.org/package/hpath) library does exactly that for us.
|
||||
|
||||
The only problem with this approach is that most libraries are still String
|
||||
based. Some provide dedicated `Foo.ByteString` modules though, but it
|
||||
might be necessary to fork libraries.
|
||||
We also need to keep track of the [Abstract FilePath proposal](https://ghc.haskell.org/trac/ghc/wiki/Proposal/AbstractFilePath).
|
||||
|
||||
Almost all paths in HSFM are only allowed to be absolute (`Path Abs`), unless
|
||||
they are filenames (`Path Fn`) and processed for GUI purposes. This is as
|
||||
already mentioned for the purpose of runtime safety, predictability and
|
||||
thread safety.
|
||||
|
||||
### File IO safety
|
||||
|
||||
This is a pretty difficult problem. One thing to ensure safety on IO level
|
||||
is simply the strong haskell type system, since we push everything
|
||||
into our `File a` type and can then pattern match easily against the different
|
||||
types of files.
|
||||
|
||||
The only problem with this approach is that we are examining a file at point
|
||||
`a` in time, safe the information and then use that information further down
|
||||
the call stack at point `b` in time, when the file information in memory
|
||||
could already be out of date. There are two approaches to make this less
|
||||
sucky:
|
||||
* use the hinotify library on GUI level to refresh the view (and the File representation in memory) whenever the contents of a directory changes
|
||||
* when we stuff something into the copy buffer, it is not saved as type `File a`, but as `Path Abs`... when the operation is finalized then the file at the given path is read and the copy/move/whatnot function carried out immediately
|
||||
|
||||
In addition, we don't use the `directory` package, which is dangerous
|
||||
and broken. Instead, we use the [HPath.IO](https://hackage.haskell.org/package/hpath/docs/HPath-IO.html).
|
||||
|
||||
### Exception handling
|
||||
|
||||
Exceptions are good. We don't want to wrap everything in Maybe/Either types
|
||||
unless we want to handle failure immediately. Otherwise we need to make
|
||||
sure that at least at some point IOExceptions are caught and visualized
|
||||
to the user. This is often done via e.g. `withErrorDialog` which catches
|
||||
`IOException` and [HPathIOException](https://hackage.haskell.org/package/hpath/docs/HPath-IO-Errors.html#t:HPathIOException).
|
||||
|
||||
It's also important to clean up stuff like filedescriptors via
|
||||
functions like `bracket` directly in our low-level code in case
|
||||
something goes wrong.
|
||||
|
@ -1,53 +0,0 @@
|
||||
import Data.List
|
||||
import qualified Language.Haskell.Exts as HS
|
||||
import HsImport
|
||||
|
||||
main :: IO ()
|
||||
main = hsimport $ defaultConfig { prettyPrint = prettyPrint
|
||||
, findImportPos = findImportPos }
|
||||
where
|
||||
prettyPrint :: HS.ImportDecl -> String
|
||||
prettyPrint (HS.ImportDecl sloc modname qual _ _ mpkg mas mspec) =
|
||||
"import " ++ (ifStr qual "qualified ") ++
|
||||
(maybe "" (\pkg -> " \"" ++ pkg ++ "\" ") mpkg) ++
|
||||
getMN modname ++ (maybe "" (\name -> " as " ++ getMN name) $ mas) ++
|
||||
specprint mspec
|
||||
|
||||
specprint :: Maybe (Bool, [HS.ImportSpec]) -> String
|
||||
specprint Nothing = ""
|
||||
specprint (Just (False, xs))
|
||||
= "\n (\n" ++ printImportSpecs xs ++ " )"
|
||||
specprint (Just (True, xs))
|
||||
= "\n hiding (\n" ++ printImportSpecs xs ++ " )"
|
||||
|
||||
printImportSpecs :: [HS.ImportSpec] -> String
|
||||
printImportSpecs ins
|
||||
= let (x:xs) = sort ins
|
||||
in " " ++ printSpec x ++ "\n" ++ go xs
|
||||
where
|
||||
go [] = ""
|
||||
go [x'] = " , " ++ printSpec x' ++ "\n"
|
||||
go (x':xs') = " , " ++ printSpec x' ++ "\n" ++ go xs'
|
||||
printSpec :: HS.ImportSpec -> String
|
||||
printSpec = HS.prettyPrint
|
||||
|
||||
|
||||
findImportPos :: HS.ImportDecl -> [HS.ImportDecl] -> Maybe ImportPos
|
||||
findImportPos _ [] = Nothing
|
||||
findImportPos newImport currentImports = Just findPos
|
||||
where
|
||||
lastPos = After . last $ currentImports
|
||||
findPos = let xs = takeWhile (\x -> (getMN $ HS.importModule x)
|
||||
<
|
||||
(getMN $ HS.importModule newImport)
|
||||
)
|
||||
. sort
|
||||
$ currentImports
|
||||
in if null xs then lastPos else After . last $ xs
|
||||
|
||||
ifStr :: Bool -> String -> String
|
||||
ifStr True str = str
|
||||
ifStr False _ = ""
|
||||
|
||||
getMN :: HS.ModuleName -> String
|
||||
getMN (HS.ModuleName name) = name
|
344
haddock-util.js
Normal file
344
haddock-util.js
Normal file
@ -0,0 +1,344 @@
|
||||
// Haddock JavaScript utilities
|
||||
|
||||
var rspace = /\s\s+/g,
|
||||
rtrim = /^\s+|\s+$/g;
|
||||
|
||||
function spaced(s) { return (" " + s + " ").replace(rspace, " "); }
|
||||
function trim(s) { return s.replace(rtrim, ""); }
|
||||
|
||||
function hasClass(elem, value) {
|
||||
var className = spaced(elem.className || "");
|
||||
return className.indexOf( " " + value + " " ) >= 0;
|
||||
}
|
||||
|
||||
function addClass(elem, value) {
|
||||
var className = spaced(elem.className || "");
|
||||
if ( className.indexOf( " " + value + " " ) < 0 ) {
|
||||
elem.className = trim(className + " " + value);
|
||||
}
|
||||
}
|
||||
|
||||
function removeClass(elem, value) {
|
||||
var className = spaced(elem.className || "");
|
||||
className = className.replace(" " + value + " ", " ");
|
||||
elem.className = trim(className);
|
||||
}
|
||||
|
||||
function toggleClass(elem, valueOn, valueOff, bool) {
|
||||
if (bool == null) { bool = ! hasClass(elem, valueOn); }
|
||||
if (bool) {
|
||||
removeClass(elem, valueOff);
|
||||
addClass(elem, valueOn);
|
||||
}
|
||||
else {
|
||||
removeClass(elem, valueOn);
|
||||
addClass(elem, valueOff);
|
||||
}
|
||||
return bool;
|
||||
}
|
||||
|
||||
|
||||
function makeClassToggle(valueOn, valueOff)
|
||||
{
|
||||
return function(elem, bool) {
|
||||
return toggleClass(elem, valueOn, valueOff, bool);
|
||||
}
|
||||
}
|
||||
|
||||
toggleShow = makeClassToggle("show", "hide");
|
||||
toggleCollapser = makeClassToggle("collapser", "expander");
|
||||
|
||||
function toggleSection(id)
|
||||
{
|
||||
var b = toggleShow(document.getElementById("section." + id));
|
||||
toggleCollapser(document.getElementById("control." + id), b);
|
||||
rememberCollapsed(id, b);
|
||||
return b;
|
||||
}
|
||||
|
||||
var collapsed = {};
|
||||
function rememberCollapsed(id, b)
|
||||
{
|
||||
if(b)
|
||||
delete collapsed[id]
|
||||
else
|
||||
collapsed[id] = null;
|
||||
|
||||
var sections = [];
|
||||
for(var i in collapsed)
|
||||
{
|
||||
if(collapsed.hasOwnProperty(i))
|
||||
sections.push(i);
|
||||
}
|
||||
// cookie specific to this page; don't use setCookie which sets path=/
|
||||
document.cookie = "collapsed=" + escape(sections.join('+'));
|
||||
}
|
||||
|
||||
function restoreCollapsed()
|
||||
{
|
||||
var cookie = getCookie("collapsed");
|
||||
if(!cookie)
|
||||
return;
|
||||
|
||||
var ids = cookie.split('+');
|
||||
for(var i in ids)
|
||||
{
|
||||
if(document.getElementById("section." + ids[i]))
|
||||
toggleSection(ids[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function setCookie(name, value) {
|
||||
document.cookie = name + "=" + escape(value) + ";path=/;";
|
||||
}
|
||||
|
||||
function clearCookie(name) {
|
||||
document.cookie = name + "=;path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;";
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;i < ca.length;i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) {
|
||||
return unescape(c.substring(nameEQ.length,c.length));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var max_results = 75; // 50 is not enough to search for map in the base libraries
|
||||
var shown_range = null;
|
||||
var last_search = null;
|
||||
|
||||
function quick_search()
|
||||
{
|
||||
perform_search(false);
|
||||
}
|
||||
|
||||
function full_search()
|
||||
{
|
||||
perform_search(true);
|
||||
}
|
||||
|
||||
|
||||
function perform_search(full)
|
||||
{
|
||||
var text = document.getElementById("searchbox").value.toLowerCase();
|
||||
if (text == last_search && !full) return;
|
||||
last_search = text;
|
||||
|
||||
var table = document.getElementById("indexlist");
|
||||
var status = document.getElementById("searchmsg");
|
||||
var children = table.firstChild.childNodes;
|
||||
|
||||
// first figure out the first node with the prefix
|
||||
var first = bisect(-1);
|
||||
var last = (first == -1 ? -1 : bisect(1));
|
||||
|
||||
if (first == -1)
|
||||
{
|
||||
table.className = "";
|
||||
status.innerHTML = "No results found, displaying all";
|
||||
}
|
||||
else if (first == 0 && last == children.length - 1)
|
||||
{
|
||||
table.className = "";
|
||||
status.innerHTML = "";
|
||||
}
|
||||
else if (last - first >= max_results && !full)
|
||||
{
|
||||
table.className = "";
|
||||
status.innerHTML = "More than " + max_results + ", press Search to display";
|
||||
}
|
||||
else
|
||||
{
|
||||
// decide what you need to clear/show
|
||||
if (shown_range)
|
||||
setclass(shown_range[0], shown_range[1], "indexrow");
|
||||
setclass(first, last, "indexshow");
|
||||
shown_range = [first, last];
|
||||
table.className = "indexsearch";
|
||||
status.innerHTML = "";
|
||||
}
|
||||
|
||||
|
||||
function setclass(first, last, status)
|
||||
{
|
||||
for (var i = first; i <= last; i++)
|
||||
{
|
||||
children[i].className = status;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// do a binary search, treating 0 as ...
|
||||
// return either -1 (no 0's found) or location of most far match
|
||||
function bisect(dir)
|
||||
{
|
||||
var first = 0, finish = children.length - 1;
|
||||
var mid, success = false;
|
||||
|
||||
while (finish - first > 3)
|
||||
{
|
||||
mid = Math.floor((finish + first) / 2);
|
||||
|
||||
var i = checkitem(mid);
|
||||
if (i == 0) i = dir;
|
||||
if (i == -1)
|
||||
finish = mid;
|
||||
else
|
||||
first = mid;
|
||||
}
|
||||
var a = (dir == 1 ? first : finish);
|
||||
var b = (dir == 1 ? finish : first);
|
||||
for (var i = b; i != a - dir; i -= dir)
|
||||
{
|
||||
if (checkitem(i) == 0) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// from an index, decide what the result is
|
||||
// 0 = match, -1 is lower, 1 is higher
|
||||
function checkitem(i)
|
||||
{
|
||||
var s = getitem(i).toLowerCase().substr(0, text.length);
|
||||
if (s == text) return 0;
|
||||
else return (s > text ? -1 : 1);
|
||||
}
|
||||
|
||||
|
||||
// from an index, get its string
|
||||
// this abstracts over alternates
|
||||
function getitem(i)
|
||||
{
|
||||
for ( ; i >= 0; i--)
|
||||
{
|
||||
var s = children[i].firstChild.firstChild.data;
|
||||
if (s.indexOf(' ') == -1)
|
||||
return s;
|
||||
}
|
||||
return ""; // should never be reached
|
||||
}
|
||||
}
|
||||
|
||||
function setSynopsis(filename) {
|
||||
if (parent.window.synopsis) {
|
||||
if (parent.window.synopsis.location.replace) {
|
||||
// In Firefox this avoids adding the change to the history.
|
||||
parent.window.synopsis.location.replace(filename);
|
||||
} else {
|
||||
parent.window.synopsis.location = filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addMenuItem(html) {
|
||||
var menu = document.getElementById("page-menu");
|
||||
if (menu) {
|
||||
var btn = menu.firstChild.cloneNode(false);
|
||||
btn.innerHTML = html;
|
||||
menu.appendChild(btn);
|
||||
}
|
||||
}
|
||||
|
||||
function adjustForFrames() {
|
||||
var bodyCls;
|
||||
|
||||
if (parent.location.href == window.location.href) {
|
||||
// not in frames, so add Frames button
|
||||
addMenuItem("<a href='#' onclick='reframe();return true;'>Frames</a>");
|
||||
bodyCls = "no-frame";
|
||||
}
|
||||
else {
|
||||
bodyCls = "in-frame";
|
||||
}
|
||||
addClass(document.body, bodyCls);
|
||||
}
|
||||
|
||||
function reframe() {
|
||||
setCookie("haddock-reframe", document.URL);
|
||||
window.location = "frames.html";
|
||||
}
|
||||
|
||||
function postReframe() {
|
||||
var s = getCookie("haddock-reframe");
|
||||
if (s) {
|
||||
parent.window.main.location = s;
|
||||
clearCookie("haddock-reframe");
|
||||
}
|
||||
}
|
||||
|
||||
function styles() {
|
||||
var i, a, es = document.getElementsByTagName("link"), rs = [];
|
||||
for (i = 0; a = es[i]; i++) {
|
||||
if(a.rel.indexOf("style") != -1 && a.title) {
|
||||
rs.push(a);
|
||||
}
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
function addStyleMenu() {
|
||||
var as = styles();
|
||||
var i, a, btns = "";
|
||||
for(i=0; a = as[i]; i++) {
|
||||
btns += "<li><a href='#' onclick=\"setActiveStyleSheet('"
|
||||
+ a.title + "'); return false;\">"
|
||||
+ a.title + "</a></li>"
|
||||
}
|
||||
if (as.length > 1) {
|
||||
var h = "<div id='style-menu-holder'>"
|
||||
+ "<a href='#' onclick='styleMenu(); return false;'>Style ▾</a>"
|
||||
+ "<ul id='style-menu' class='hide'>" + btns + "</ul>"
|
||||
+ "</div>";
|
||||
addMenuItem(h);
|
||||
}
|
||||
}
|
||||
|
||||
function setActiveStyleSheet(title) {
|
||||
var as = styles();
|
||||
var i, a, found;
|
||||
for(i=0; a = as[i]; i++) {
|
||||
a.disabled = true;
|
||||
// need to do this always, some browsers are edge triggered
|
||||
if(a.title == title) {
|
||||
found = a;
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
found.disabled = false;
|
||||
setCookie("haddock-style", title);
|
||||
}
|
||||
else {
|
||||
as[0].disabled = false;
|
||||
clearCookie("haddock-style");
|
||||
}
|
||||
styleMenu(false);
|
||||
}
|
||||
|
||||
function resetStyle() {
|
||||
var s = getCookie("haddock-style");
|
||||
if (s) setActiveStyleSheet(s);
|
||||
}
|
||||
|
||||
|
||||
function styleMenu(show) {
|
||||
var m = document.getElementById('style-menu');
|
||||
if (m) toggleShow(m, show);
|
||||
}
|
||||
|
||||
|
||||
function pageLoad() {
|
||||
addStyleMenu();
|
||||
adjustForFrames();
|
||||
resetStyle();
|
||||
restoreCollapsed();
|
||||
}
|
||||
|
117
hsfm.cabal
117
hsfm.cabal
@ -1,117 +0,0 @@
|
||||
name: hsfm
|
||||
version: 0.0.0.1
|
||||
synopsis: Haskell FileManager
|
||||
description: FileManager written in haskell
|
||||
license: GPL-2
|
||||
license-file: LICENSE
|
||||
author: Julian Ospald
|
||||
maintainer: hasufell@hasufell.de
|
||||
copyright: Copyright: (c) 2016 Julian Ospald
|
||||
homepage: https://github.com/hasufell/hsfm
|
||||
category: Desktop
|
||||
build-type: Simple
|
||||
cabal-version: >=1.22
|
||||
|
||||
data-files:
|
||||
LICENSE
|
||||
data/Gtk/builder.xml
|
||||
data/Gtk/icons/error.png
|
||||
data/Gtk/icons/gtk-directory.png
|
||||
data/Gtk/icons/gtk-file.png
|
||||
data/Gtk/icons/hsfm.png
|
||||
hsfm.cabal
|
||||
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
HSFM.FileSystem.FileType
|
||||
HSFM.FileSystem.UtilTypes
|
||||
HSFM.History
|
||||
HSFM.Settings
|
||||
HSFM.Utils.IO
|
||||
HSFM.Utils.MyPrelude
|
||||
|
||||
build-depends:
|
||||
IfElse,
|
||||
base >= 4.8 && < 5,
|
||||
bytestring,
|
||||
filepath >= 1.3.0.0,
|
||||
hinotify-bytestring,
|
||||
hpath >= 0.11.0 ,
|
||||
hpath-filepath >= 0.10.3,
|
||||
hpath-io >= 0.12.0,
|
||||
safe,
|
||||
stm,
|
||||
time >= 1.4.2,
|
||||
unix,
|
||||
utf8-string
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
Default-Extensions: RecordWildCards
|
||||
PatternSynonyms
|
||||
FlexibleInstances
|
||||
ViewPatterns
|
||||
ghc-options:
|
||||
-Wall
|
||||
|
||||
executable hsfm-gtk
|
||||
main-is: HSFM/GUI/Gtk.hs
|
||||
other-modules:
|
||||
Paths_hsfm
|
||||
HSFM.FileSystem.FileType
|
||||
HSFM.FileSystem.UtilTypes
|
||||
HSFM.GUI.Glib.GlibString
|
||||
HSFM.GUI.Gtk.Callbacks
|
||||
HSFM.GUI.Gtk.Callbacks.Utils
|
||||
HSFM.GUI.Gtk.Data
|
||||
HSFM.GUI.Gtk.Dialogs
|
||||
HSFM.GUI.Gtk.Errors
|
||||
HSFM.GUI.Gtk.Icons
|
||||
HSFM.GUI.Gtk.MyGUI
|
||||
HSFM.GUI.Gtk.MyView
|
||||
HSFM.GUI.Gtk.Plugins
|
||||
HSFM.GUI.Gtk.Settings
|
||||
HSFM.GUI.Gtk.Utils
|
||||
HSFM.History
|
||||
HSFM.Settings
|
||||
HSFM.Utils.IO
|
||||
HSFM.Utils.MyPrelude
|
||||
|
||||
build-depends:
|
||||
Cabal >= 1.22.0.0,
|
||||
IfElse,
|
||||
base >= 4.8 && < 5,
|
||||
bytestring,
|
||||
filepath >= 1.3.0.0,
|
||||
glib >= 0.13,
|
||||
gtk3 >= 0.14.1,
|
||||
hinotify-bytestring,
|
||||
hpath >= 0.11.0 ,
|
||||
hpath-filepath >= 0.10.3,
|
||||
hpath-io >= 0.12.0,
|
||||
hsfm,
|
||||
monad-loops,
|
||||
old-locale >= 1,
|
||||
process,
|
||||
safe,
|
||||
simple-sendfile,
|
||||
stm,
|
||||
time >= 1.4.2,
|
||||
transformers,
|
||||
unix,
|
||||
unix-bytestring,
|
||||
utf8-string,
|
||||
word8
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
Default-Extensions: RecordWildCards
|
||||
PatternSynonyms
|
||||
FlexibleInstances
|
||||
ViewPatterns
|
||||
ghc-options:
|
||||
-Wall
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/hasufell/hsfm
|
||||
|
BIN
hsfm.haddock
Normal file
BIN
hsfm.haddock
Normal file
Binary file not shown.
BIN
hslogo-16.png
Normal file
BIN
hslogo-16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
4
index-frames.html
Normal file
4
index-frames.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-list"><p class="caption">Modules</p><ul><li class="module"><a href="HSFM-FileSystem-FileType.html" target="main">HSFM.FileSystem.FileType</a></li><li class="module"><a href="HSFM-FileSystem-UtilTypes.html" target="main">HSFM.FileSystem.UtilTypes</a></li><li class="module"><a href="HSFM-GUI-Glib-GlibString.html" target="main">HSFM.GUI.Glib.GlibString</a></li><li class="module"><a href="HSFM-GUI-Gtk-Callbacks.html" target="main">HSFM.GUI.Gtk.Callbacks</a></li><li class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html" target="main">HSFM.GUI.Gtk.Callbacks.Utils</a></li><li class="module"><a href="HSFM-GUI-Gtk-Data.html" target="main">HSFM.GUI.Gtk.Data</a></li><li class="module"><a href="HSFM-GUI-Gtk-Dialogs.html" target="main">HSFM.GUI.Gtk.Dialogs</a></li><li class="module"><a href="HSFM-GUI-Gtk-Errors.html" target="main">HSFM.GUI.Gtk.Errors</a></li><li class="module"><a href="HSFM-GUI-Gtk-Icons.html" target="main">HSFM.GUI.Gtk.Icons</a></li><li class="module"><a href="HSFM-GUI-Gtk-MyGUI.html" target="main">HSFM.GUI.Gtk.MyGUI</a></li><li class="module"><a href="HSFM-GUI-Gtk-MyView.html" target="main">HSFM.GUI.Gtk.MyView</a></li><li class="module"><a href="HSFM-GUI-Gtk-Plugins.html" target="main">HSFM.GUI.Gtk.Plugins</a></li><li class="module"><a href="HSFM-GUI-Gtk-Settings.html" target="main">HSFM.GUI.Gtk.Settings</a></li><li class="module"><a href="HSFM-GUI-Gtk-Utils.html" target="main">HSFM.GUI.Gtk.Utils</a></li><li class="module"><a href="HSFM-History.html" target="main">HSFM.History</a></li><li class="module"><a href="HSFM-Settings.html" target="main">HSFM.Settings</a></li><li class="module"><a href="HSFM-Utils-IO.html" target="main">HSFM.Utils.IO</a></li><li class="module"><a href="HSFM-Utils-MyPrelude.html" target="main">HSFM.Utils.MyPrelude</a></li><li class="module"><a href="Main.html" target="main">Main</a></li><li class="module"><a href="Paths_hsfm.html" target="main">Paths_hsfm</a></li></ul></div></body></html>
|
4
index.html
Normal file
4
index.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>hsfm-gtk</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="description"><h1>hsfm-gtk</h1><div class="doc"><p>FileManager written in haskell</p></div></div><div id="module-list"><p class="caption">Modules</p><ul><li><span id="control.n.1" class="module collapser" onclick="toggleSection('n.1')">HSFM</span><ul id="section.n.1" class="show"><li><span id="control.n.1.1" class="module collapser" onclick="toggleSection('n.1.1')">FileSystem</span><ul id="section.n.1.1" class="show"><li><span class="module"><a href="HSFM-FileSystem-FileType.html">HSFM.FileSystem.FileType</a></span></li><li><span class="module"><a href="HSFM-FileSystem-UtilTypes.html">HSFM.FileSystem.UtilTypes</a></span></li></ul></li><li><span id="control.n.1.2" class="module collapser" onclick="toggleSection('n.1.2')">GUI</span><ul id="section.n.1.2" class="show"><li><span id="control.n.1.2.1" class="module collapser" onclick="toggleSection('n.1.2.1')">Glib</span><ul id="section.n.1.2.1" class="show"><li><span class="module"><a href="HSFM-GUI-Glib-GlibString.html">HSFM.GUI.Glib.GlibString</a></span></li></ul></li><li><span id="control.n.1.2.2" class="module collapser" onclick="toggleSection('n.1.2.2')">Gtk</span><ul id="section.n.1.2.2" class="show"><li><span class="module"><span id="control.n.1.2.2.1" class="collapser" onclick="toggleSection('n.1.2.2.1')"> </span><a href="HSFM-GUI-Gtk-Callbacks.html">HSFM.GUI.Gtk.Callbacks</a></span><ul id="section.n.1.2.2.1" class="show"><li><span class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html">HSFM.GUI.Gtk.Callbacks.Utils</a></span></li></ul></li><li><span class="module"><a href="HSFM-GUI-Gtk-Data.html">HSFM.GUI.Gtk.Data</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Dialogs.html">HSFM.GUI.Gtk.Dialogs</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Errors.html">HSFM.GUI.Gtk.Errors</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Icons.html">HSFM.GUI.Gtk.Icons</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-MyGUI.html">HSFM.GUI.Gtk.MyGUI</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-MyView.html">HSFM.GUI.Gtk.MyView</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Plugins.html">HSFM.GUI.Gtk.Plugins</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Settings.html">HSFM.GUI.Gtk.Settings</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Utils.html">HSFM.GUI.Gtk.Utils</a></span></li></ul></li></ul></li><li><span class="module"><a href="HSFM-History.html">HSFM.History</a></span></li><li><span class="module"><a href="HSFM-Settings.html">HSFM.Settings</a></span></li><li><span id="control.n.1.5" class="module collapser" onclick="toggleSection('n.1.5')">Utils</span><ul id="section.n.1.5" class="show"><li><span class="module"><a href="HSFM-Utils-IO.html">HSFM.Utils.IO</a></span></li><li><span class="module"><a href="HSFM-Utils-MyPrelude.html">HSFM.Utils.MyPrelude</a></span></li></ul></li></ul></li><li><span class="module"><a href="Main.html">Main</a></span></li><li><span class="module"><a href="Paths_hsfm.html">Paths_hsfm</a></span></li></ul></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|
42
install.sh
42
install.sh
@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR="$(CDPATH="" cd -- "$(dirname -- "$0")" && pwd -P)"
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
|
||||
# install ghcup
|
||||
if ! [ -e "${SCRIPT_DIR}"/.ghcup/bin/ghcup ] ; then
|
||||
mkdir -p "${SCRIPT_DIR}"/.ghcup/bin
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://gitlab.haskell.org/haskell/ghcup/raw/master/ghcup > "${SCRIPT_DIR}"/.ghcup/bin/ghcup
|
||||
chmod +x "${SCRIPT_DIR}"/.ghcup/bin/ghcup
|
||||
fi
|
||||
|
||||
# set up environment
|
||||
export PATH="${SCRIPT_DIR}/.ghcup/bin:$PATH"
|
||||
export GHCUP_INSTALL_BASE_PREFIX="${SCRIPT_DIR}"
|
||||
|
||||
# get ghc version from cabal.project
|
||||
ghc_ver=$(grep with-compiler cabal.project | awk '{print $2}' | sed 's/ghc-//')
|
||||
|
||||
# install ghc
|
||||
if ! ghcup list -t ghc -c installed -r | grep -q "${ghc_ver}" ; then
|
||||
ghcup install "${ghc_ver}"
|
||||
fi
|
||||
|
||||
# install cabal-install
|
||||
if [ -z "$(ghcup list -t cabal-install -c installed -r)" ] ; then
|
||||
ghcup install-cabal
|
||||
fi
|
||||
|
||||
[ -e "${SCRIPT_DIR}"/bin ] || mkdir "${SCRIPT_DIR}"/bin
|
||||
|
||||
# install binary
|
||||
cabal v2-install \
|
||||
--installdir="${SCRIPT_DIR}"/bin \
|
||||
--install-method=copy \
|
||||
--overwrite-policy=always
|
||||
|
||||
echo "Binary installed in: ${SCRIPT_DIR}/bin"
|
||||
|
4
mini_HSFM-FileSystem-FileType.html
Normal file
4
mini_HSFM-FileSystem-FileType.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.FileSystem.FileType</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.FileSystem.FileType</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-FileSystem-FileType.html#t:File" target="main">File</a> a</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-FileSystem-FileType.html#t:FileInfo" target="main">FileInfo</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:sfileLike" target="main">sfileLike</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:fileLike" target="main">fileLike</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:sdir" target="main">sdir</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:brokenSymlink" target="main">brokenSymlink</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:fileLikeSym" target="main">fileLikeSym</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:dirSym" target="main">dirSym</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:readFile" target="main">readFile</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:readDirectoryContents" target="main">readDirectoryContents</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:getContents" target="main">getContents</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:goUp" target="main">goUp</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:goUp-39-" target="main">goUp'</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:comparingConstr" target="main">comparingConstr</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isFileC" target="main">isFileC</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isDirC" target="main">isDirC</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isSymC" target="main">isSymC</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isBlockC" target="main">isBlockC</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isCharC" target="main">isCharC</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isNamedC" target="main">isNamedC</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isSocketC" target="main">isSocketC</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:getFileInfo" target="main">getFileInfo</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:isBrokenSymlink" target="main">isBrokenSymlink</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:packModTime" target="main">packModTime</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:packAccessTime" target="main">packAccessTime</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:epochToString" target="main">epochToString</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:packPermissions" target="main">packPermissions</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:packFileType" target="main">packFileType</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:packLinkDestination" target="main">packLinkDestination</a></p></div><div class="top"><p class="src"><a href="HSFM-FileSystem-FileType.html#v:getFPasStr" target="main">getFPasStr</a></p></div></div></body></html>
|
4
mini_HSFM-FileSystem-UtilTypes.html
Normal file
4
mini_HSFM-FileSystem-UtilTypes.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.FileSystem.UtilTypes</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.FileSystem.UtilTypes</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-FileSystem-UtilTypes.html#t:FileOperation" target="main">FileOperation</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-FileSystem-UtilTypes.html#t:Copy" target="main">Copy</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-FileSystem-UtilTypes.html#t:Move" target="main">Move</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-FileSystem-UtilTypes.html#t:FCollisonMode" target="main">FCollisonMode</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Glib-GlibString.html
Normal file
4
mini_HSFM-GUI-Glib-GlibString.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Glib.GlibString</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Glib.GlibString</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Glib-GlibString.html#v:noNullPtrs" target="main">noNullPtrs</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Callbacks-Utils.html
Normal file
4
mini_HSFM-GUI-Gtk-Callbacks-Utils.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Callbacks.Utils</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Callbacks.Utils</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:doFileOperation" target="main">doFileOperation</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:_doFileOperation" target="main">_doFileOperation</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:goDir" target="main">goDir</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Callbacks.html
Normal file
4
mini_HSFM-GUI-Gtk-Callbacks.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Callbacks</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Callbacks</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:setGUICallbacks" target="main">setGUICallbacks</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:setViewCallbacks" target="main">setViewCallbacks</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:openTerminalHere" target="main">openTerminalHere</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:closeTab" target="main">closeTab</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newTab-39-" target="main">newTab'</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:opeInNewTab" target="main">opeInNewTab</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:del" target="main">del</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:moveInit" target="main">moveInit</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:copyInit" target="main">copyInit</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:operationFinal" target="main">operationFinal</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newFile" target="main">newFile</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newDir" target="main">newDir</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:renameF" target="main">renameF</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:urlGoTo" target="main">urlGoTo</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHome" target="main">goHome</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:execute" target="main">execute</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:open" target="main">open</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:upDir" target="main">upDir</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryBack" target="main">goHistoryBack</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryForward" target="main">goHistoryForward</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:mkHistoryMenuB" target="main">mkHistoryMenuB</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:mkHistoryMenuF" target="main">mkHistoryMenuF</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:showPopup" target="main">showPopup</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Data.html
Normal file
4
mini_HSFM-GUI-Gtk-Data.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Data</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Data</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Data.html#t:MyGUI" target="main">MyGUI</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Data.html#t:MyView" target="main">MyView</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Data.html#t:MenuBar" target="main">MenuBar</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Data.html#t:RightClickMenu" target="main">RightClickMenu</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Data.html#t:FilePropertyGrid" target="main">FilePropertyGrid</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Data.html#t:FMSettings" target="main">FMSettings</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Data.html#t:FMView" target="main">FMView</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a href="HSFM-GUI-Gtk-Data.html#t:Item" target="main">Item</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Data.html#v:fmViewToContainer" target="main">fmViewToContainer</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Dialogs.html
Normal file
4
mini_HSFM-GUI-Gtk-Dialogs.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Dialogs</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Dialogs</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:showErrorDialog" target="main">showErrorDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:showConfirmationDialog" target="main">showConfirmationDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:fileCollisionDialog" target="main">fileCollisionDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:renameDialog" target="main">renameDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:showAboutDialog" target="main">showAboutDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:withConfirmationDialog" target="main">withConfirmationDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:withErrorDialog" target="main">withErrorDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:textInputDialog" target="main">textInputDialog</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Dialogs.html#v:showFilePropertyDialog" target="main">showFilePropertyDialog</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Errors.html
Normal file
4
mini_HSFM-GUI-Gtk-Errors.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Errors</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Errors</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Errors.html#t:GtkException" target="main">GtkException</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Icons.html
Normal file
4
mini_HSFM-GUI-Gtk-Icons.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Icons</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Icons</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon" target="main">GtkIcon</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Icons.html#v:getIcon" target="main">getIcon</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Icons.html#v:getSymlinkIcon" target="main">getSymlinkIcon</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-MyGUI.html
Normal file
4
mini_HSFM-GUI-Gtk-MyGUI.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.MyGUI</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.MyGUI</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyGUI.html#v:createMyGUI" target="main">createMyGUI</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-MyView.html
Normal file
4
mini_HSFM-GUI-Gtk-MyView.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.MyView</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.MyView</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:newTab" target="main">newTab</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:createMyView" target="main">createMyView</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:switchView" target="main">switchView</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:destroyView" target="main">destroyView</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:createIconView" target="main">createIconView</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:createTreeView" target="main">createTreeView</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:refreshView" target="main">refreshView</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-MyView.html#v:constructView" target="main">constructView</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Plugins.html
Normal file
4
mini_HSFM-GUI-Gtk-Plugins.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Plugins</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Plugins</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Plugins.html#v:insertPos" target="main">insertPos</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Plugins.html#v:myplugins" target="main">myplugins</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Plugins.html#v:diffItem" target="main">diffItem</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Plugins.html#v:diffFilter" target="main">diffFilter</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Plugins.html#v:diffCallback" target="main">diffCallback</a></p></div></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Settings.html
Normal file
4
mini_HSFM-GUI-Gtk-Settings.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Settings</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Settings</p></div><div id="interface"></div></body></html>
|
4
mini_HSFM-GUI-Gtk-Utils.html
Normal file
4
mini_HSFM-GUI-Gtk-Utils.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.GUI.Gtk.Utils</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Utils</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedTreePaths" target="main">getSelectedTreePaths</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedItems" target="main">getSelectedItems</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:withItems" target="main">withItems</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:fileListStore" target="main">fileListStore</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getFirstItem" target="main">getFirstItem</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getCurrentDir" target="main">getCurrentDir</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:pushStatusBar" target="main">pushStatusBar</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:popStatusbar" target="main">popStatusbar</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:rawPathToIter" target="main">rawPathToIter</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:rawPathToItem" target="main">rawPathToItem</a></p></div></div></body></html>
|
4
mini_HSFM-History.html
Normal file
4
mini_HSFM-History.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.History</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.History</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-History.html#t:BrowsingHistory" target="main">BrowsingHistory</a></p></div><div class="top"><p class="src"><a href="HSFM-History.html#v:historyNewPath" target="main">historyNewPath</a></p></div><div class="top"><p class="src"><a href="HSFM-History.html#v:historyBack" target="main">historyBack</a></p></div><div class="top"><p class="src"><a href="HSFM-History.html#v:historyForward" target="main">historyForward</a></p></div></div></body></html>
|
4
mini_HSFM-Settings.html
Normal file
4
mini_HSFM-Settings.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.Settings</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.Settings</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-Settings.html#v:terminalCommand" target="main">terminalCommand</a></p></div><div class="top"><p class="src"><a href="HSFM-Settings.html#v:home" target="main">home</a></p></div></div></body></html>
|
4
mini_HSFM-Utils-IO.html
Normal file
4
mini_HSFM-Utils-IO.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.Utils.IO</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.Utils.IO</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-Utils-IO.html#v:writeTVarIO" target="main">writeTVarIO</a></p></div><div class="top"><p class="src"><a href="HSFM-Utils-IO.html#v:modifyTVarIO" target="main">modifyTVarIO</a></p></div></div></body></html>
|
4
mini_HSFM-Utils-MyPrelude.html
Normal file
4
mini_HSFM-Utils-MyPrelude.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.Utils.MyPrelude</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.Utils.MyPrelude</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-Utils-MyPrelude.html#v:listIndices" target="main">listIndices</a></p></div></div></body></html>
|
4
mini_Main.html
Normal file
4
mini_Main.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Main</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">Main</p></div><div id="interface"><div class="top"><p class="src"><a href="Main.html#v:main" target="main">main</a></p></div></div></body></html>
|
4
mini_Paths_hsfm.html
Normal file
4
mini_Paths_hsfm.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Paths_hsfm</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
|
||||
window.onload = function () {pageLoad();};
|
||||
//]]>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">Paths_hsfm</p></div><div id="interface"><div class="top"><p class="src"><a href="Paths_hsfm.html#v:version" target="main">version</a></p></div><div class="top"><p class="src"><a href="Paths_hsfm.html#v:getBinDir" target="main">getBinDir</a></p></div><div class="top"><p class="src"><a href="Paths_hsfm.html#v:getLibDir" target="main">getLibDir</a></p></div><div class="top"><p class="src"><a href="Paths_hsfm.html#v:getDynLibDir" target="main">getDynLibDir</a></p></div><div class="top"><p class="src"><a href="Paths_hsfm.html#v:getDataDir" target="main">getDataDir</a></p></div><div class="top"><p class="src"><a href="Paths_hsfm.html#v:getLibexecDir" target="main">getLibexecDir</a></p></div><div class="top"><p class="src"><a href="Paths_hsfm.html#v:getDataFileName" target="main">getDataFileName</a></p></div><div class="top"><p class="src"><a href="Paths_hsfm.html#v:getSysconfDir" target="main">getSysconfDir</a></p></div></div></body></html>
|
600
ocean.css
Normal file
600
ocean.css
Normal file
@ -0,0 +1,600 @@
|
||||
/* @group Fundamentals */
|
||||
|
||||
* { margin: 0; padding: 0 }
|
||||
|
||||
/* Is this portable? */
|
||||
html {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: white;
|
||||
color: black;
|
||||
text-align: left;
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
margin: 0.8em 0 0.8em 2em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin: 0.8em 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
a { text-decoration: none; }
|
||||
a[href]:link { color: rgb(196,69,29); }
|
||||
a[href]:visited { color: rgb(171,105,84); }
|
||||
a[href]:hover { text-decoration:underline; }
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Fonts & Sizes */
|
||||
|
||||
/* Basic technique & IE workarounds from YUI 3
|
||||
For reasons, see:
|
||||
http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts.css
|
||||
*/
|
||||
|
||||
body {
|
||||
font:13px/1.4 sans-serif;
|
||||
*font-size:small; /* for IE */
|
||||
*font:x-small; /* for IE in quirks mode */
|
||||
}
|
||||
|
||||
h1 { font-size: 146.5%; /* 19pt */ }
|
||||
h2 { font-size: 131%; /* 17pt */ }
|
||||
h3 { font-size: 116%; /* 15pt */ }
|
||||
h4 { font-size: 100%; /* 13pt */ }
|
||||
h5 { font-size: 100%; /* 13pt */ }
|
||||
|
||||
select, input, button, textarea {
|
||||
font:99% sans-serif;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size:inherit;
|
||||
font:100%;
|
||||
}
|
||||
|
||||
pre, code, kbd, samp, tt, .src {
|
||||
font-family:monospace;
|
||||
*font-size:108%;
|
||||
line-height: 124%;
|
||||
}
|
||||
|
||||
.links, .link {
|
||||
font-size: 85%; /* 11pt */
|
||||
}
|
||||
|
||||
#module-header .caption {
|
||||
font-size: 182%; /* 24pt */
|
||||
}
|
||||
|
||||
.info {
|
||||
font-size: 85%; /* 11pt */
|
||||
}
|
||||
|
||||
#table-of-contents, #synopsis {
|
||||
/* font-size: 85%; /* 11pt */
|
||||
}
|
||||
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Common */
|
||||
|
||||
.caption, h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: bold;
|
||||
color: rgb(78,98,114);
|
||||
margin: 0.8em 0 0.4em;
|
||||
}
|
||||
|
||||
* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6 {
|
||||
margin-top: inherit;
|
||||
}
|
||||
|
||||
ul.links {
|
||||
list-style: none;
|
||||
text-align: left;
|
||||
float: right;
|
||||
display: inline-table;
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
|
||||
ul.links li {
|
||||
display: inline;
|
||||
border-left: 1px solid #d5d5d5;
|
||||
white-space: nowrap;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.links li a {
|
||||
padding: 0.2em 0.5em;
|
||||
}
|
||||
|
||||
.hide { display: none; }
|
||||
.show { display: inherit; }
|
||||
.clear { clear: both; }
|
||||
|
||||
.collapser {
|
||||
background-image: url(minus.gif);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.expander {
|
||||
background-image: url(plus.gif);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
p.caption.collapser,
|
||||
p.caption.expander {
|
||||
background-position: 0 0.4em;
|
||||
}
|
||||
.collapser, .expander {
|
||||
padding-left: 14px;
|
||||
margin-left: -14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 0.25em;
|
||||
margin: 0.8em 0;
|
||||
background: rgb(229,237,244);
|
||||
overflow: auto;
|
||||
border-bottom: 0.25em solid white;
|
||||
/* white border adds some space below the box to compensate
|
||||
for visual extra space that paragraphs have between baseline
|
||||
and the bounding box */
|
||||
}
|
||||
|
||||
.src {
|
||||
background: #f0f0f0;
|
||||
padding: 0.2em 0.5em;
|
||||
}
|
||||
|
||||
.keyword { font-weight: normal; }
|
||||
.def { font-weight: bold; }
|
||||
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Page Structure */
|
||||
|
||||
#content {
|
||||
margin: 0 auto;
|
||||
padding: 0 2em 6em;
|
||||
}
|
||||
|
||||
#package-header {
|
||||
background: rgb(41,56,69);
|
||||
border-top: 5px solid rgb(78,98,114);
|
||||
color: #ddd;
|
||||
padding: 0.2em;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#package-header .caption {
|
||||
background: url(hslogo-16.png) no-repeat 0em;
|
||||
color: white;
|
||||
margin: 0 2em;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
#package-header a:link, #package-header a:visited { color: white; }
|
||||
#package-header a:hover { background: rgb(78,98,114); }
|
||||
|
||||
#module-header .caption {
|
||||
color: rgb(78,98,114);
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
table.info {
|
||||
float: right;
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid #ddd;
|
||||
color: rgb(78,98,114);
|
||||
background-color: #fff;
|
||||
max-width: 40%;
|
||||
border-spacing: 0;
|
||||
position: relative;
|
||||
top: -0.5em;
|
||||
margin: 0 0 0 2em;
|
||||
}
|
||||
|
||||
.info th {
|
||||
padding: 0 1em 0 0;
|
||||
}
|
||||
|
||||
div#style-menu-holder {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#style-menu {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
overflow: visible;
|
||||
background: #374c5e;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
right: 0;
|
||||
padding: 0;
|
||||
top: 1.25em;
|
||||
}
|
||||
|
||||
#style-menu li {
|
||||
display: list-item;
|
||||
border-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #000;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#style-menu li + li {
|
||||
border-top: 1px solid #919191;
|
||||
}
|
||||
|
||||
#style-menu a {
|
||||
width: 6em;
|
||||
padding: 3px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#footer {
|
||||
background: #ddd;
|
||||
border-top: 1px solid #aaa;
|
||||
padding: 0.5em 0;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 3em;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Front Matter */
|
||||
|
||||
#table-of-contents {
|
||||
float: right;
|
||||
clear: right;
|
||||
background: #faf9dc;
|
||||
border: 1px solid #d8d7ad;
|
||||
padding: 0.5em 1em;
|
||||
max-width: 20em;
|
||||
margin: 0.5em 0 1em 1em;
|
||||
}
|
||||
|
||||
#table-of-contents .caption {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#table-of-contents ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#table-of-contents ul ul {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
#description .caption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#synopsis {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.no-frame #synopsis {
|
||||
display: block;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
height: 80%;
|
||||
top: 10%;
|
||||
padding: 0;
|
||||
max-width: 75%;
|
||||
}
|
||||
|
||||
#synopsis .caption {
|
||||
float: left;
|
||||
width: 29px;
|
||||
color: rgba(255,255,255,0);
|
||||
height: 110px;
|
||||
margin: 0;
|
||||
font-size: 1px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#synopsis p.caption.collapser {
|
||||
background: url(synopsis.png) no-repeat -64px -8px;
|
||||
}
|
||||
|
||||
#synopsis p.caption.expander {
|
||||
background: url(synopsis.png) no-repeat 0px -8px;
|
||||
}
|
||||
|
||||
#synopsis ul {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 0.5em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#synopsis ul ul {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#synopsis ul,
|
||||
#synopsis ul li.src {
|
||||
background-color: #faf9dc;
|
||||
white-space: nowrap;
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Main Content */
|
||||
|
||||
#interface div.top { margin: 2em 0; }
|
||||
#interface h1 + div.top,
|
||||
#interface h2 + div.top,
|
||||
#interface h3 + div.top,
|
||||
#interface h4 + div.top,
|
||||
#interface h5 + div.top {
|
||||
margin-top: 1em;
|
||||
}
|
||||
#interface p.src .link {
|
||||
float: right;
|
||||
color: #919191;
|
||||
border-left: 1px solid #919191;
|
||||
background: #f0f0f0;
|
||||
padding: 0 0.5em 0.2em;
|
||||
margin: 0 -0.5em 0 0.5em;
|
||||
}
|
||||
|
||||
#interface td.src .link {
|
||||
float: right;
|
||||
color: #919191;
|
||||
border-left: 1px solid #919191;
|
||||
background: #f0f0f0;
|
||||
padding: 0 0.5em 0.2em;
|
||||
margin: 0 -0.5em 0 0.5em;
|
||||
}
|
||||
|
||||
#interface span.fixity {
|
||||
color: #919191;
|
||||
border-left: 1px solid #919191;
|
||||
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||
margin: 0 -1em 0 1em;
|
||||
}
|
||||
|
||||
#interface span.rightedge {
|
||||
border-left: 1px solid #919191;
|
||||
padding: 0.2em 0 0.2em 0;
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
|
||||
#interface table { border-spacing: 2px; }
|
||||
#interface td {
|
||||
vertical-align: top;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
#interface td.src {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#interface td.doc p {
|
||||
margin: 0;
|
||||
}
|
||||
#interface td.doc p + p {
|
||||
margin-top: 0.8em;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
content: " ";
|
||||
display: block;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.subs dl {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.subs dt {
|
||||
float: left;
|
||||
clear: left;
|
||||
display: block;
|
||||
margin: 1px 0;
|
||||
}
|
||||
|
||||
.subs dd {
|
||||
float: right;
|
||||
width: 90%;
|
||||
display: block;
|
||||
padding-left: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.subs dd.empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.subs dd p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Render short-style data instances */
|
||||
.inst ul {
|
||||
height: 100%;
|
||||
padding: 0.5em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.inst, .inst li {
|
||||
list-style: none;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
/* Workaround for bug in Firefox (issue #384) */
|
||||
.inst-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.top p.src {
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.subs, .doc {
|
||||
/* use this selector for one level of indent */
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.warning {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.arguments {
|
||||
margin-top: -0.4em;
|
||||
}
|
||||
.arguments .caption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fields { padding-left: 1em; }
|
||||
|
||||
.fields .caption { display: none; }
|
||||
|
||||
.fields p { margin: 0 0; }
|
||||
|
||||
/* this seems bulky to me
|
||||
.methods, .constructors {
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
*/
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Auxillary Pages */
|
||||
|
||||
|
||||
.extension-list {
|
||||
list-style-type: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#mini {
|
||||
margin: 0 auto;
|
||||
padding: 0 1em 1em;
|
||||
}
|
||||
|
||||
#mini > * {
|
||||
font-size: 93%; /* 12pt */
|
||||
}
|
||||
|
||||
#mini #module-list .caption,
|
||||
#mini #module-header .caption {
|
||||
font-size: 125%; /* 15pt */
|
||||
}
|
||||
|
||||
#mini #interface h1,
|
||||
#mini #interface h2,
|
||||
#mini #interface h3,
|
||||
#mini #interface h4 {
|
||||
font-size: 109%; /* 13pt */
|
||||
margin: 1em 0 0;
|
||||
}
|
||||
|
||||
#mini #interface .top,
|
||||
#mini #interface .src {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#mini #module-list ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#alphabet ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0.5em 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#alphabet li {
|
||||
display: inline;
|
||||
margin: 0 0.25em;
|
||||
}
|
||||
|
||||
#alphabet a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#index .caption,
|
||||
#module-list .caption { font-size: 131%; /* 17pt */ }
|
||||
|
||||
#index table {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
#index .src {
|
||||
font-weight: bold;
|
||||
}
|
||||
#index .alt {
|
||||
font-size: 77%; /* 10pt */
|
||||
font-style: italic;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
#index td + td {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
#module-list ul {
|
||||
list-style: none;
|
||||
margin: 0 0 0 2em;
|
||||
}
|
||||
|
||||
#module-list li {
|
||||
clear: right;
|
||||
}
|
||||
|
||||
#module-list span.collapser,
|
||||
#module-list span.expander {
|
||||
background-position: 0 0.3em;
|
||||
}
|
||||
|
||||
#module-list .package {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* @end */
|
91
src/HSFM-GUI-Glib-GlibString.html
Normal file
91
src/HSFM-GUI-Glib-GlibString.html
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Glib/GlibString.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# LANGUAGE OverloadedStrings #-}</span>
|
||||
<a name="line-20"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-21"></a>
|
||||
<a name="line-22"></a>
|
||||
<a name="line-23"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>GlibString</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a>
|
||||
<a name="line-26"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>BS</span>
|
||||
<a name="line-27"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span>
|
||||
<a name="line-28"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-29"></a> <span class='hs-varid'>toString</span>
|
||||
<a name="line-30"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-31"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Word8</span>
|
||||
<a name="line-32"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-33"></a> <span class='hs-sel'>_percent</span>
|
||||
<a name="line-34"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-35"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>C</span><span class='hs-varop'>.</span><span class='hs-conid'>String</span>
|
||||
<a name="line-36"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-37"></a> <span class='hs-conid'>CStringLen</span>
|
||||
<a name="line-38"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>CString</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-40"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>C</span><span class='hs-varop'>.</span><span class='hs-conid'>Types</span>
|
||||
<a name="line-41"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-42"></a> <span class='hs-conid'>CSize</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-44"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Marshal</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-45"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-46"></a> <span class='hs-varid'>maybePeek</span>
|
||||
<a name="line-47"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-48"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span>
|
||||
<a name="line-49"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-50"></a> <span class='hs-varid'>nullPtr</span>
|
||||
<a name="line-51"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>plusPtr</span>
|
||||
<a name="line-52"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-53"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>UTFString</span>
|
||||
<a name="line-54"></a>
|
||||
<a name="line-55"></a>
|
||||
<a name="line-56"></a>
|
||||
<a name="line-57"></a><a name="instance%20GlibString%20BS.ByteString"></a><span class='hs-comment'>-- TODO: move this to its own module</span>
|
||||
<a name="line-58"></a><a name="instance%20GlibString%20BS.ByteString"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>GlibString</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-59"></a> <span class='hs-varid'>withUTFString</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>useAsCString</span>
|
||||
<a name="line-60"></a> <span class='hs-varid'>withUTFStringLen</span> <span class='hs-varid'>s</span> <span class='hs-varid'>f</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>useAsCStringLen</span> <span class='hs-varid'>s</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span> <span class='hs-varop'>.</span> <span class='hs-varid'>noNullPtrs</span><span class='hs-layout'>)</span>
|
||||
<a name="line-61"></a> <span class='hs-varid'>peekUTFString</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-62"></a> <span class='hs-varid'>len</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>c_strlen</span> <span class='hs-varid'>s</span>
|
||||
<a name="line-63"></a> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>packCStringLen</span> <span class='hs-layout'>(</span><span class='hs-varid'>s</span><span class='hs-layout'>,</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varid'>len</span><span class='hs-layout'>)</span>
|
||||
<a name="line-64"></a> <span class='hs-varid'>maybePeekUTFString</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>maybePeek</span> <span class='hs-varid'>peekUTFString</span>
|
||||
<a name="line-65"></a> <span class='hs-varid'>peekUTFStringLen</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>packCStringLen</span>
|
||||
<a name="line-66"></a> <span class='hs-varid'>newUTFString</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>newUTFString</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toString</span>
|
||||
<a name="line-67"></a> <span class='hs-varid'>newUTFStringLen</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>newUTFStringLen</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toString</span>
|
||||
<a name="line-68"></a> <span class='hs-varid'>genUTFOfs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>genUTFOfs</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toString</span>
|
||||
<a name="line-69"></a> <span class='hs-varid'>stringLength</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>length</span>
|
||||
<a name="line-70"></a> <span class='hs-varid'>unPrintf</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>intercalate</span> <span class='hs-str'>"%%"</span> <span class='hs-layout'>(</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>split</span> <span class='hs-sel'>_percent</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span>
|
||||
<a name="line-71"></a>
|
||||
<a name="line-72"></a>
|
||||
<a name="line-73"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>unsafe</span> <span class='hs-str'>"string.h strlen"</span> <span class='hs-varid'>c_strlen</span>
|
||||
<a name="line-74"></a> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>CString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>CSize</span>
|
||||
<a name="line-75"></a>
|
||||
<a name="line-76"></a>
|
||||
<a name="line-77"></a><a name="noNullPtrs"></a><span class='hs-definition'>noNullPtrs</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>CStringLen</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CStringLen</span>
|
||||
<a name="line-78"></a><span class='hs-definition'>noNullPtrs</span> <span class='hs-layout'>(</span><span class='hs-varid'>p</span><span class='hs-layout'>,</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>p</span> <span class='hs-varop'>==</span> <span class='hs-varid'>nullPtr</span> <span class='hs-keyglyph'>=</span> <span class='hs-layout'>(</span><span class='hs-varid'>plusPtr</span> <span class='hs-varid'>p</span> <span class='hs-num'>1</span><span class='hs-layout'>,</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-79"></a><span class='hs-definition'>noNullPtrs</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>s</span>
|
||||
<a name="line-80"></a>
|
||||
</pre></body>
|
||||
</html>
|
141
src/HSFM-GUI-Gtk-Callbacks-Utils.html
Normal file
141
src/HSFM-GUI-Gtk-Callbacks-Utils.html
Normal file
@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/Callbacks/Utils.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# LANGUAGE OverloadedStrings #-}</span>
|
||||
<a name="line-20"></a><span class='hs-comment'>{-# LANGUAGE ScopedTypeVariables #-}</span>
|
||||
<a name="line-21"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-22"></a>
|
||||
<a name="line-23"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Callbacks</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a>
|
||||
<a name="line-26"></a>
|
||||
<a name="line-27"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
|
||||
<a name="line-28"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-29"></a> <span class='hs-varid'>forM_</span>
|
||||
<a name="line-30"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>when</span>
|
||||
<a name="line-31"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Foldable</span>
|
||||
<a name="line-33"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-34"></a> <span class='hs-varid'>for_</span>
|
||||
<a name="line-35"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Maybe</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-38"></a> <span class='hs-varid'>fromJust</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-40"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>GHC</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span>
|
||||
<a name="line-41"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-42"></a> <span class='hs-conid'>IOErrorType</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-44"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-45"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HPath</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>P</span>
|
||||
<a name="line-46"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-47"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
|
||||
<a name="line-48"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-49"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>UT</span>
|
||||
<a name="line-50"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-51"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span>
|
||||
<a name="line-52"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>MyView</span>
|
||||
<a name="line-53"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-54"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-55"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>MVar</span>
|
||||
<a name="line-56"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-57"></a> <span class='hs-varid'>putMVar</span>
|
||||
<a name="line-58"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>tryTakeMVar</span>
|
||||
<a name="line-59"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-60"></a>
|
||||
<a name="line-61"></a>
|
||||
<a name="line-62"></a>
|
||||
<a name="line-63"></a>
|
||||
<a name="line-64"></a><a name="doFileOperation"></a><span class='hs-comment'>-- |Carries out a file operation with the appropriate error handling</span>
|
||||
<a name="line-65"></a><span class='hs-comment'>-- allowing the user to react to various exceptions with further input.</span>
|
||||
<a name="line-66"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>FileOperation</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-67"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>FCopy</span> <span class='hs-layout'>(</span><span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>Copy</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-68"></a> <span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>p1</span> <span class='hs-varid'>p2</span> <span class='hs-varid'>cm</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>easyCopy</span> <span class='hs-varid'>p1</span> <span class='hs-varid'>p2</span> <span class='hs-varid'>cm</span> <span class='hs-conid'>FailEarly</span><span class='hs-layout'>)</span>
|
||||
<a name="line-69"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>FCopy</span> <span class='hs-varop'>$</span> <span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>Copy</span> <span class='hs-varid'>fs'</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span>
|
||||
<a name="line-70"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>FMove</span> <span class='hs-layout'>(</span><span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>Move</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-71"></a> <span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>moveFile</span>
|
||||
<a name="line-72"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>FMove</span> <span class='hs-varop'>$</span> <span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>Move</span> <span class='hs-varid'>fs'</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span>
|
||||
<a name="line-73"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-74"></a>
|
||||
<a name="line-75"></a>
|
||||
<a name="line-76"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-77"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span>
|
||||
<a name="line-78"></a> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>CopyMode</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>b</span><span class='hs-layout'>)</span>
|
||||
<a name="line-79"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-80"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-81"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-conid'>[]</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-82"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-conop'>:</span><span class='hs-varid'>fs</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>mc</span> <span class='hs-varid'>rest</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-83"></a> <span class='hs-varid'>toname</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varid'>f</span>
|
||||
<a name="line-84"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>topath</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>toname</span>
|
||||
<a name="line-85"></a> <span class='hs-varid'>reactOnError</span> <span class='hs-layout'>(</span><span class='hs-varid'>mc</span> <span class='hs-varid'>f</span> <span class='hs-varid'>topath</span> <span class='hs-conid'>Strict</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span><span class='hs-layout'>)</span>
|
||||
<a name="line-86"></a> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>AlreadyExists</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-87"></a> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>FileDoesExist</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span><span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span>
|
||||
<a name="line-88"></a> <span class='hs-layout'>,</span><span class='hs-layout'>(</span><span class='hs-conid'>DirDoesExist</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span>
|
||||
<a name="line-89"></a> <span class='hs-layout'>,</span><span class='hs-layout'>(</span><span class='hs-conid'>SameFile</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>renameDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-90"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-91"></a> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>diag</span> <span class='hs-varid'>topath</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-92"></a> <span class='hs-varid'>mcm</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>diag</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>topath</span>
|
||||
<a name="line-93"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>mcm</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>cm</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>case</span> <span class='hs-varid'>cm</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-94"></a> <span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>Overwrite</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>mc</span> <span class='hs-varid'>f</span> <span class='hs-varid'>topath</span> <span class='hs-conid'>Overwrite</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-95"></a> <span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>OverwriteAll</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>forM_</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-conop'>:</span><span class='hs-varid'>fs</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-96"></a> <span class='hs-varid'>toname'</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-97"></a> <span class='hs-varid'>mc</span> <span class='hs-varid'>x</span> <span class='hs-layout'>(</span><span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>toname'</span><span class='hs-layout'>)</span> <span class='hs-conid'>Overwrite</span>
|
||||
<a name="line-98"></a> <span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>Skip</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-99"></a> <span class='hs-conid'>UT</span><span class='hs-varop'>.</span><span class='hs-conid'>Rename</span> <span class='hs-varid'>newn</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>mc</span> <span class='hs-varid'>f</span> <span class='hs-layout'>(</span><span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>newn</span><span class='hs-layout'>)</span> <span class='hs-conid'>Strict</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-100"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-101"></a>
|
||||
<a name="line-102"></a>
|
||||
<a name="line-103"></a><a name="goDir"></a><span class='hs-comment'>-- |Helper that is invoked for any directory change operations.</span>
|
||||
<a name="line-104"></a><span class='hs-definition'>goDir</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Bool</span> <span class='hs-comment'>-- ^ whether to update the history</span>
|
||||
<a name="line-105"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-106"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-107"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span>
|
||||
<a name="line-108"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-109"></a><span class='hs-definition'>goDir</span> <span class='hs-varid'>bhis</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-110"></a> <span class='hs-varid'>when</span> <span class='hs-varid'>bhis</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-111"></a> <span class='hs-varid'>mhs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-112"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mhs</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>hs</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-113"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>nhs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>historyNewPath</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-varid'>hs</span>
|
||||
<a name="line-114"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-115"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-116"></a>
|
||||
<a name="line-117"></a> <span class='hs-comment'>-- set notebook tab label</span>
|
||||
<a name="line-118"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookGetCurrentPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-119"></a> <span class='hs-varid'>child</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookGetNthPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-120"></a>
|
||||
<a name="line-121"></a> <span class='hs-comment'>-- get the label</span>
|
||||
<a name="line-122"></a> <span class='hs-varid'>ebox</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToEventBox</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span><span class='hs-layout'>)</span>
|
||||
<a name="line-123"></a> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookGetTabLabel</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>child</span>
|
||||
<a name="line-124"></a> <span class='hs-varid'>label</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToLabel</span> <span class='hs-varop'>.</span> <span class='hs-varid'>head</span><span class='hs-layout'>)</span> <span class='hs-varop'><$></span> <span class='hs-varid'>containerGetChildren</span> <span class='hs-varid'>ebox</span>
|
||||
<a name="line-125"></a>
|
||||
<a name="line-126"></a> <span class='hs-comment'>-- set the label</span>
|
||||
<a name="line-127"></a> <span class='hs-varid'>labelSetText</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-128"></a> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-129"></a> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-130"></a>
|
||||
</pre></body>
|
||||
</html>
|
740
src/HSFM-GUI-Gtk-Callbacks.html
Normal file
740
src/HSFM-GUI-Gtk-Callbacks.html
Normal file
@ -0,0 +1,740 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/Callbacks.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# LANGUAGE OverloadedStrings #-}</span>
|
||||
<a name="line-20"></a><span class='hs-comment'>{-# LANGUAGE TupleSections #-}</span>
|
||||
<a name="line-21"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-22"></a>
|
||||
<a name="line-23"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Callbacks</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a>
|
||||
<a name="line-26"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>STM</span>
|
||||
<a name="line-27"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-28"></a> <span class='hs-varid'>readTVarIO</span>
|
||||
<a name="line-29"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-30"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span>
|
||||
<a name="line-31"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-32"></a> <span class='hs-varid'>throwIO</span>
|
||||
<a name="line-33"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-34"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
|
||||
<a name="line-35"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-36"></a> <span class='hs-varid'>forM</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>forM_</span>
|
||||
<a name="line-38"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>join</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>void</span>
|
||||
<a name="line-40"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>when</span>
|
||||
<a name="line-41"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-42"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Class</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-44"></a> <span class='hs-varid'>liftIO</span>
|
||||
<a name="line-45"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-46"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span><span class='hs-varop'>.</span><span class='hs-conid'>Loops</span>
|
||||
<a name="line-47"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-48"></a> <span class='hs-varid'>iterateUntil</span>
|
||||
<a name="line-49"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-50"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span>
|
||||
<a name="line-51"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-52"></a> <span class='hs-conid'>ByteString</span>
|
||||
<a name="line-53"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-54"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span>
|
||||
<a name="line-55"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-56"></a> <span class='hs-varid'>fromString</span>
|
||||
<a name="line-57"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>toString</span>
|
||||
<a name="line-58"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-59"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Foldable</span>
|
||||
<a name="line-60"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-61"></a> <span class='hs-varid'>for_</span>
|
||||
<a name="line-62"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-63"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-64"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HPath</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>P</span>
|
||||
<a name="line-65"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span>
|
||||
<a name="line-66"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-67"></a> <span class='hs-varid'>fromAbs</span>
|
||||
<a name="line-68"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Abs</span>
|
||||
<a name="line-69"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Path</span>
|
||||
<a name="line-70"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-71"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-72"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
|
||||
<a name="line-73"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-74"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-75"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-76"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Callbacks</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-77"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-78"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span>
|
||||
<a name="line-79"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>MyView</span>
|
||||
<a name="line-80"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Plugins</span>
|
||||
<a name="line-81"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Settings</span>
|
||||
<a name="line-82"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-83"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-84"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Settings</span>
|
||||
<a name="line-85"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-86"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-87"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>UTFString</span>
|
||||
<a name="line-88"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-89"></a> <span class='hs-varid'>glibToString</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-91"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Process</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>SPP</span>
|
||||
<a name="line-92"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Types</span>
|
||||
<a name="line-93"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-94"></a> <span class='hs-conid'>ProcessID</span>
|
||||
<a name="line-95"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-96"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>MVar</span>
|
||||
<a name="line-97"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-98"></a> <span class='hs-varid'>putMVar</span>
|
||||
<a name="line-99"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>readMVar</span>
|
||||
<a name="line-100"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>takeMVar</span>
|
||||
<a name="line-101"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-102"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
|
||||
<a name="line-103"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-104"></a> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-105"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-106"></a>
|
||||
<a name="line-107"></a>
|
||||
<a name="line-108"></a>
|
||||
<a name="line-109"></a>
|
||||
<a name="line-110"></a> <span class='hs-comment'>-----------------</span>
|
||||
<a name="line-111"></a> <span class='hs-comment'>--[ Callbacks ]--</span>
|
||||
<a name="line-112"></a> <span class='hs-comment'>-----------------</span>
|
||||
<a name="line-113"></a>
|
||||
<a name="line-114"></a>
|
||||
<a name="line-115"></a>
|
||||
<a name="line-116"></a>
|
||||
<a name="line-117"></a><span class='hs-comment'>---- MAIN CALLBACK ENTRYPOINT ----</span>
|
||||
<a name="line-118"></a>
|
||||
<a name="line-119"></a>
|
||||
<a name="line-120"></a><a name="setGUICallbacks"></a><span class='hs-comment'>-- |Set callbacks for the whole gui, on hotkeys, events and stuff.</span>
|
||||
<a name="line-121"></a><span class='hs-definition'>setGUICallbacks</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-122"></a><span class='hs-definition'>setGUICallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-123"></a>
|
||||
<a name="line-124"></a> <span class='hs-comment'>-- notebook toggle buttons</span>
|
||||
<a name="line-125"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>leftNbBtn</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>toggled</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-126"></a> <span class='hs-varid'>isPressed</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>toggleButtonGetActive</span> <span class='hs-varop'>$</span> <span class='hs-varid'>leftNbBtn</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-127"></a> <span class='hs-keyword'>if</span> <span class='hs-varid'>isPressed</span> <span class='hs-keyword'>then</span> <span class='hs-varid'>widgetShow</span> <span class='hs-varop'>$</span> <span class='hs-varid'>notebook1</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-128"></a> <span class='hs-keyword'>else</span> <span class='hs-varid'>widgetHide</span> <span class='hs-varop'>$</span> <span class='hs-varid'>notebook1</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-129"></a>
|
||||
<a name="line-130"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rightNbBtn</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>toggled</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-131"></a> <span class='hs-varid'>isPressed</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>toggleButtonGetActive</span> <span class='hs-varop'>$</span> <span class='hs-varid'>rightNbBtn</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-132"></a> <span class='hs-keyword'>if</span> <span class='hs-varid'>isPressed</span> <span class='hs-keyword'>then</span> <span class='hs-varid'>widgetShow</span> <span class='hs-varop'>$</span> <span class='hs-varid'>notebook2</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-133"></a> <span class='hs-keyword'>else</span> <span class='hs-varid'>widgetHide</span> <span class='hs-varop'>$</span> <span class='hs-varid'>notebook2</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-134"></a>
|
||||
<a name="line-135"></a> <span class='hs-comment'>-- statusbar</span>
|
||||
<a name="line-136"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>clearStatusBar</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-137"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-138"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>operationBuffer</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-conid'>None</span>
|
||||
<a name="line-139"></a>
|
||||
<a name="line-140"></a> <span class='hs-comment'>-- menubar-file</span>
|
||||
<a name="line-141"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>menubarFileQuit</span> <span class='hs-varop'>.</span> <span class='hs-varid'>menubar</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-142"></a> <span class='hs-varid'>mainQuit</span>
|
||||
<a name="line-143"></a>
|
||||
<a name="line-144"></a> <span class='hs-comment'>-- menubar-help</span>
|
||||
<a name="line-145"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>menubarHelpAbout</span> <span class='hs-varop'>.</span> <span class='hs-varid'>menubar</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-146"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varid'>showAboutDialog</span>
|
||||
<a name="line-147"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-148"></a>
|
||||
<a name="line-149"></a> <span class='hs-comment'>-- key events</span>
|
||||
<a name="line-150"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rootWin</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-151"></a> <span class='hs-conid'>QuitModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-152"></a> <span class='hs-conid'>QuitKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-153"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varid'>mainQuit</span>
|
||||
<a name="line-154"></a>
|
||||
<a name="line-155"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-156"></a>
|
||||
<a name="line-157"></a>
|
||||
<a name="line-158"></a><a name="setViewCallbacks"></a><span class='hs-comment'>-- |Set callbacks specific to a given view, on hotkeys, events and stuff.</span>
|
||||
<a name="line-159"></a><span class='hs-definition'>setViewCallbacks</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-160"></a><span class='hs-definition'>setViewCallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-161"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-162"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-163"></a> <span class='hs-varid'>fmv</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-164"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>rowActivated</span>
|
||||
<a name="line-165"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span><span class='hs-layout'>)</span>
|
||||
<a name="line-166"></a>
|
||||
<a name="line-167"></a> <span class='hs-comment'>-- drag events</span>
|
||||
<a name="line-168"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragBegin</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-169"></a> <span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>moveInit</span>
|
||||
<a name="line-170"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragDrop</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-171"></a> <span class='hs-keyglyph'>\</span><span class='hs-varid'>dc</span> <span class='hs-varid'>p</span> <span class='hs-varid'>ts</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-172"></a> <span class='hs-varid'>p'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewConvertWidgetToTreeCoords</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-173"></a> <span class='hs-varid'>mpath</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetPathAtPos</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p'</span>
|
||||
<a name="line-174"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-175"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-176"></a> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>False</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-177"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-178"></a> <span class='hs-conid'>Just</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-179"></a> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>atomNew</span> <span class='hs-layout'>(</span><span class='hs-str'>"HSFM"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-180"></a> <span class='hs-varid'>dragGetData</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>dc</span> <span class='hs-varid'>atom</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-181"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-182"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragDataReceived</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-183"></a> <span class='hs-keyglyph'>\</span><span class='hs-varid'>dc</span> <span class='hs-varid'>p</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>ts</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-184"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-185"></a> <span class='hs-varid'>signalStopEmission</span> <span class='hs-varid'>treeView</span> <span class='hs-str'>"drag_data_received"</span>
|
||||
<a name="line-186"></a> <span class='hs-varid'>p'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewConvertWidgetToTreeCoords</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-187"></a> <span class='hs-varid'>mpath</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetPathAtPos</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p'</span>
|
||||
<a name="line-188"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-189"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>False</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-190"></a> <span class='hs-conid'>Just</span> <span class='hs-layout'>(</span><span class='hs-varid'>tp</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-191"></a> <span class='hs-varid'>mitem</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rawPathToItem</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>tp</span>
|
||||
<a name="line-192"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>mitem</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>item</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-193"></a> <span class='hs-varid'>operationFinal</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-194"></a> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>True</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-195"></a>
|
||||
<a name="line-196"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-197"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-198"></a> <span class='hs-varid'>fmv</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-199"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>itemActivated</span>
|
||||
<a name="line-200"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span><span class='hs-layout'>)</span>
|
||||
<a name="line-201"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-202"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-203"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-204"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-205"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>view</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-206"></a>
|
||||
<a name="line-207"></a> <span class='hs-comment'>-- focus events</span>
|
||||
<a name="line-208"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebook1</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>setFocusChild</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>w</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-209"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>w</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-210"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>leftNbIcon</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-211"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>leftNbIcon</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-212"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebook2</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>setFocusChild</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>w</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-213"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>w</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-214"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>rightNbIcon</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-215"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>rightNbIcon</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-216"></a>
|
||||
<a name="line-217"></a> <span class='hs-comment'>-- GUI events</span>
|
||||
<a name="line-218"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>backViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-219"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-220"></a> <span class='hs-varid'>t</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventTime</span>
|
||||
<a name="line-221"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-222"></a> <span class='hs-conid'>LeftButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-223"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-224"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-225"></a> <span class='hs-conid'>RightButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-226"></a> <span class='hs-varid'>his</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>readMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-227"></a> <span class='hs-varid'>menu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>mkHistoryMenuB</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-228"></a> <span class='hs-layout'>(</span><span class='hs-varid'>backwardsHistory</span> <span class='hs-varid'>his</span><span class='hs-layout'>)</span>
|
||||
<a name="line-229"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>menuPopup</span> <span class='hs-varid'>menu</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Just</span> <span class='hs-layout'>(</span><span class='hs-conid'>RightButton</span><span class='hs-layout'>,</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span>
|
||||
<a name="line-230"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-231"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-232"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>forwardViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-233"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-234"></a> <span class='hs-varid'>t</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventTime</span>
|
||||
<a name="line-235"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-236"></a> <span class='hs-conid'>LeftButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-237"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-238"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-239"></a> <span class='hs-conid'>RightButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-240"></a> <span class='hs-varid'>his</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>readMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-241"></a> <span class='hs-varid'>menu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>mkHistoryMenuF</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-242"></a> <span class='hs-layout'>(</span><span class='hs-varid'>forwardHistory</span> <span class='hs-varid'>his</span><span class='hs-layout'>)</span>
|
||||
<a name="line-243"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>menuPopup</span> <span class='hs-varid'>menu</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Just</span> <span class='hs-layout'>(</span><span class='hs-conid'>RightButton</span><span class='hs-layout'>,</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span>
|
||||
<a name="line-244"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-245"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-246"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>urlBar</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>entryActivated</span> <span class='hs-varop'>$</span> <span class='hs-varid'>urlGoTo</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-247"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>upViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-248"></a> <span class='hs-varid'>upDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-249"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>homeViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-250"></a> <span class='hs-varid'>goHome</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-251"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>refreshViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-252"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-253"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-254"></a>
|
||||
<a name="line-255"></a> <span class='hs-comment'>-- key events</span>
|
||||
<a name="line-256"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-257"></a> <span class='hs-conid'>ShowHiddenModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-258"></a> <span class='hs-conid'>ShowHiddenKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-259"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-260"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>modifyTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-261"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>x</span> <span class='hs-layout'>{</span> <span class='hs-varid'>showHidden</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>showHidden</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span><span class='hs-layout'>}</span><span class='hs-layout'>)</span>
|
||||
<a name="line-262"></a> <span class='hs-varop'>>></span> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-263"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-264"></a> <span class='hs-conid'>UpDirModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-265"></a> <span class='hs-conid'>UpDirKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-266"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>upDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-267"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-268"></a> <span class='hs-conid'>HistoryBackModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-269"></a> <span class='hs-conid'>HistoryBackKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-270"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-271"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-272"></a> <span class='hs-conid'>HistoryForwardModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-273"></a> <span class='hs-conid'>HistoryForwardKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-274"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-275"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-276"></a> <span class='hs-conid'>DeleteModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-277"></a> <span class='hs-conid'>DeleteKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-278"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>del</span>
|
||||
<a name="line-279"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-280"></a> <span class='hs-conid'>OpenModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-281"></a> <span class='hs-conid'>OpenKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-282"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span>
|
||||
<a name="line-283"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-284"></a> <span class='hs-conid'>CopyModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-285"></a> <span class='hs-conid'>CopyKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-286"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>copyInit</span>
|
||||
<a name="line-287"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-288"></a> <span class='hs-conid'>MoveModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-289"></a> <span class='hs-conid'>MoveKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-290"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>moveInit</span>
|
||||
<a name="line-291"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-292"></a> <span class='hs-conid'>PasteModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-293"></a> <span class='hs-conid'>PasteKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-294"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>operationFinal</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-295"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-296"></a> <span class='hs-conid'>NewTabModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-297"></a> <span class='hs-conid'>NewTabKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-298"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newTab'</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-299"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-300"></a> <span class='hs-conid'>CloseTabModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-301"></a> <span class='hs-conid'>CloseTabKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-302"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>closeTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-303"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-304"></a> <span class='hs-conid'>OpenTerminalModifier</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-305"></a> <span class='hs-conid'>OpenTerminalKey</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>glibToString</span> <span class='hs-varid'>eventKeyName</span>
|
||||
<a name="line-306"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>openTerminalHere</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-307"></a>
|
||||
<a name="line-308"></a> <span class='hs-comment'>-- mouse button click</span>
|
||||
<a name="line-309"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-310"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-311"></a> <span class='hs-varid'>t</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventTime</span>
|
||||
<a name="line-312"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-313"></a> <span class='hs-conid'>RightButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-314"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>showPopup</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>t</span>
|
||||
<a name="line-315"></a> <span class='hs-comment'>-- this is just to not screw with current selection</span>
|
||||
<a name="line-316"></a> <span class='hs-comment'>-- on right-click</span>
|
||||
<a name="line-317"></a> <span class='hs-comment'>-- TODO: this misbehaves under IconView</span>
|
||||
<a name="line-318"></a> <span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-layout'>,</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventCoordinates</span>
|
||||
<a name="line-319"></a> <span class='hs-varid'>mpath</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getPathAtPos</span> <span class='hs-varid'>fmv</span> <span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-layout'>,</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span>
|
||||
<a name="line-320"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-321"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-322"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-323"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-324"></a> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>tp</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-325"></a> <span class='hs-varid'>selectedTps</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getSelectedTreePaths</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-326"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>elem</span> <span class='hs-varid'>tp</span> <span class='hs-varid'>selectedTps</span>
|
||||
<a name="line-327"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-328"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-329"></a> <span class='hs-conid'>MiddleButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-330"></a> <span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-layout'>,</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventCoordinates</span>
|
||||
<a name="line-331"></a> <span class='hs-varid'>mitem</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-varid'>getPathAtPos</span> <span class='hs-varid'>fmv</span> <span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-layout'>,</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-332"></a> <span class='hs-varop'>>>=</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>mpos</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>join</span>
|
||||
<a name="line-333"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>forM</span> <span class='hs-varid'>mpos</span> <span class='hs-layout'>(</span><span class='hs-varid'>rawPathToItem</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-334"></a>
|
||||
<a name="line-335"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mitem</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-336"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-337"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-338"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-339"></a> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-340"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>opeInNewTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-341"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-342"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-343"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-344"></a>
|
||||
<a name="line-345"></a> <span class='hs-conid'>OtherButton</span> <span class='hs-num'>8</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-346"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-347"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-348"></a> <span class='hs-conid'>OtherButton</span> <span class='hs-num'>9</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-349"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-350"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-351"></a> <span class='hs-comment'>-- not right-click, so pass on the signal</span>
|
||||
<a name="line-352"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-353"></a>
|
||||
<a name="line-354"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-355"></a> <span class='hs-varid'>getPathAtPos</span> <span class='hs-varid'>fmv</span> <span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-layout'>,</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-356"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>fmv</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-357"></a> <span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-358"></a> <span class='hs-varid'>mp</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetPathAtPos</span> <span class='hs-varid'>treeView</span> <span class='hs-layout'>(</span><span class='hs-varid'>round</span> <span class='hs-varid'>x</span><span class='hs-layout'>,</span> <span class='hs-varid'>round</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span>
|
||||
<a name="line-359"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>fmap</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-layout'>(</span><span class='hs-varid'>p</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>mp</span>
|
||||
<a name="line-360"></a> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-361"></a> <span class='hs-varid'>fmap</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>tp</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>if</span> <span class='hs-varid'>null</span> <span class='hs-varid'>tp</span> <span class='hs-keyword'>then</span> <span class='hs-conid'>Nothing</span> <span class='hs-keyword'>else</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>tp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-362"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>iconViewGetPathAtPos</span> <span class='hs-varid'>iconView</span> <span class='hs-layout'>(</span><span class='hs-varid'>round</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>round</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span>
|
||||
<a name="line-363"></a>
|
||||
<a name="line-364"></a>
|
||||
<a name="line-365"></a>
|
||||
<a name="line-366"></a>
|
||||
<a name="line-367"></a><span class='hs-comment'>---- OTHER ----</span>
|
||||
<a name="line-368"></a>
|
||||
<a name="line-369"></a>
|
||||
<a name="line-370"></a><a name="openTerminalHere"></a><span class='hs-definition'>openTerminalHere</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>ProcessID</span>
|
||||
<a name="line-371"></a><span class='hs-definition'>openTerminalHere</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-372"></a> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span> <span class='hs-varop'><$></span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-373"></a> <span class='hs-conid'>SPP</span><span class='hs-varop'>.</span><span class='hs-varid'>forkProcess</span> <span class='hs-varop'>$</span> <span class='hs-varid'>terminalCommand</span> <span class='hs-varid'>cwd</span>
|
||||
<a name="line-374"></a>
|
||||
<a name="line-375"></a>
|
||||
<a name="line-376"></a>
|
||||
<a name="line-377"></a>
|
||||
<a name="line-378"></a><span class='hs-comment'>---- TAB OPERATIONS ----</span>
|
||||
<a name="line-379"></a>
|
||||
<a name="line-380"></a>
|
||||
<a name="line-381"></a><a name="closeTab"></a><span class='hs-comment'>-- |Closes the current tab, but only if there is more than one tab.</span>
|
||||
<a name="line-382"></a><span class='hs-definition'>closeTab</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-383"></a><span class='hs-definition'>closeTab</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-384"></a> <span class='hs-varid'>n</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookGetNPages</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-385"></a> <span class='hs-varid'>when</span> <span class='hs-layout'>(</span><span class='hs-varid'>n</span> <span class='hs-varop'>></span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>destroyView</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-386"></a>
|
||||
<a name="line-387"></a>
|
||||
<a name="line-388"></a><a name="newTab'"></a><span class='hs-definition'>newTab'</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-389"></a><span class='hs-definition'>newTab'</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-390"></a> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-391"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withErrorDialog</span>
|
||||
<a name="line-392"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>createTreeView</span> <span class='hs-varid'>cwd</span> <span class='hs-layout'>(</span><span class='hs-comment'>-</span><span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-393"></a>
|
||||
<a name="line-394"></a>
|
||||
<a name="line-395"></a><a name="opeInNewTab"></a><span class='hs-definition'>opeInNewTab</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-396"></a><span class='hs-definition'>opeInNewTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-conid'>DirOrSym</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-397"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withErrorDialog</span>
|
||||
<a name="line-398"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>createTreeView</span> <span class='hs-varid'>item</span> <span class='hs-layout'>(</span><span class='hs-comment'>-</span><span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-399"></a><span class='hs-definition'>opeInNewTab</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-400"></a>
|
||||
<a name="line-401"></a>
|
||||
<a name="line-402"></a>
|
||||
<a name="line-403"></a><span class='hs-comment'>---- FILE OPERATION CALLBACKS (COPY, MOVE, ...) ----</span>
|
||||
<a name="line-404"></a>
|
||||
<a name="line-405"></a>
|
||||
<a name="line-406"></a><a name="del"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Deletes a file or directory.</span>
|
||||
<a name="line-407"></a><span class='hs-definition'>del</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-408"></a><span class='hs-definition'>del</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-409"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cmsg</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"Really delete \""</span> <span class='hs-varop'>++</span> <span class='hs-varid'>getFPasStr</span> <span class='hs-varid'>item</span> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-410"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span>
|
||||
<a name="line-411"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>easyDelete</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-412"></a><span class='hs-comment'>-- this throws on the first error that occurs</span>
|
||||
<a name="line-413"></a><span class='hs-definition'>del</span> <span class='hs-varid'>items</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-conop'>:</span><span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-414"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cmsg</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"Really delete "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>show</span> <span class='hs-layout'>(</span><span class='hs-varid'>length</span> <span class='hs-varid'>items</span><span class='hs-layout'>)</span> <span class='hs-varop'>++</span> <span class='hs-str'>" files?"</span>
|
||||
<a name="line-415"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span>
|
||||
<a name="line-416"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>forM_</span> <span class='hs-varid'>items</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>item</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>easyDelete</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-417"></a><span class='hs-definition'>del</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span>
|
||||
<a name="line-418"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>throwIO</span> <span class='hs-varop'>$</span> <span class='hs-conid'>InvalidOperation</span>
|
||||
<a name="line-419"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-420"></a>
|
||||
<a name="line-421"></a>
|
||||
<a name="line-422"></a><a name="moveInit"></a><span class='hs-comment'>-- |Initializes a file move operation.</span>
|
||||
<a name="line-423"></a><span class='hs-definition'>moveInit</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-424"></a><span class='hs-definition'>moveInit</span> <span class='hs-varid'>items</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-conop'>:</span><span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-425"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>operationBuffer</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMove</span> <span class='hs-varop'>.</span> <span class='hs-conid'>PartialMove</span> <span class='hs-varop'>.</span> <span class='hs-varid'>map</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>items</span><span class='hs-layout'>)</span>
|
||||
<a name="line-426"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>sbmsg</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>items</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-427"></a> <span class='hs-layout'>(</span><span class='hs-varid'>item</span><span class='hs-conop'>:</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-str'>"Move buffer: "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>getFPasStr</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-428"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-str'>"Move buffer: "</span> <span class='hs-varop'>++</span> <span class='hs-layout'>(</span><span class='hs-varid'>show</span> <span class='hs-varop'>.</span> <span class='hs-varid'>length</span> <span class='hs-varop'>$</span> <span class='hs-varid'>items</span><span class='hs-layout'>)</span>
|
||||
<a name="line-429"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-430"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-431"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>pushStatusBar</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>sbmsg</span>
|
||||
<a name="line-432"></a><span class='hs-definition'>moveInit</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span>
|
||||
<a name="line-433"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>throwIO</span> <span class='hs-varop'>$</span> <span class='hs-conid'>InvalidOperation</span>
|
||||
<a name="line-434"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-435"></a>
|
||||
<a name="line-436"></a><a name="copyInit"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Initializes a file copy operation.</span>
|
||||
<a name="line-437"></a><span class='hs-definition'>copyInit</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-438"></a><span class='hs-definition'>copyInit</span> <span class='hs-varid'>items</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-conop'>:</span><span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-439"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>operationBuffer</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>FCopy</span> <span class='hs-varop'>.</span> <span class='hs-conid'>PartialCopy</span> <span class='hs-varop'>.</span> <span class='hs-varid'>map</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>items</span><span class='hs-layout'>)</span>
|
||||
<a name="line-440"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>sbmsg</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>items</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-441"></a> <span class='hs-layout'>(</span><span class='hs-varid'>item</span><span class='hs-conop'>:</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-str'>"Copy buffer: "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>getFPasStr</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-442"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-str'>"Copy buffer: "</span> <span class='hs-varop'>++</span> <span class='hs-layout'>(</span><span class='hs-varid'>show</span> <span class='hs-varop'>.</span> <span class='hs-varid'>length</span> <span class='hs-varop'>$</span> <span class='hs-varid'>items</span><span class='hs-layout'>)</span>
|
||||
<a name="line-443"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-444"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-445"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>pushStatusBar</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>sbmsg</span>
|
||||
<a name="line-446"></a><span class='hs-definition'>copyInit</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span>
|
||||
<a name="line-447"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>throwIO</span> <span class='hs-varop'>$</span> <span class='hs-conid'>InvalidOperation</span>
|
||||
<a name="line-448"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-449"></a>
|
||||
<a name="line-450"></a>
|
||||
<a name="line-451"></a><a name="operationFinal"></a><span class='hs-comment'>-- |Finalizes a file operation, such as copy or move.</span>
|
||||
<a name="line-452"></a><span class='hs-definition'>operationFinal</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Maybe</span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-453"></a><span class='hs-definition'>operationFinal</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>mitem</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-454"></a> <span class='hs-varid'>op</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>operationBuffer</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-455"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>mitem</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-456"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>path</span> <span class='hs-varop'><$></span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-457"></a> <span class='hs-conid'>Just</span> <span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-458"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>op</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-459"></a> <span class='hs-conid'>FMove</span> <span class='hs-layout'>(</span><span class='hs-conid'>PartialMove</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-460"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cmsg</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"Really move "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>imsg</span> <span class='hs-varid'>s</span>
|
||||
<a name="line-461"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" to \""</span> <span class='hs-varop'>++</span> <span class='hs-varid'>toString</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdir</span><span class='hs-layout'>)</span>
|
||||
<a name="line-462"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-463"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span> <span class='hs-varop'>$</span> <span class='hs-varid'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMove</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Move</span> <span class='hs-varid'>s</span> <span class='hs-varid'>cdir</span><span class='hs-layout'>)</span>
|
||||
<a name="line-464"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-465"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>operationBuffer</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-conid'>None</span>
|
||||
<a name="line-466"></a> <span class='hs-conid'>FCopy</span> <span class='hs-layout'>(</span><span class='hs-conid'>PartialCopy</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-467"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cmsg</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"Really copy "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>imsg</span> <span class='hs-varid'>s</span>
|
||||
<a name="line-468"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" to \""</span> <span class='hs-varop'>++</span> <span class='hs-varid'>toString</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdir</span><span class='hs-layout'>)</span>
|
||||
<a name="line-469"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-470"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span> <span class='hs-varop'>$</span> <span class='hs-varid'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FCopy</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Copy</span> <span class='hs-varid'>s</span> <span class='hs-varid'>cdir</span><span class='hs-layout'>)</span>
|
||||
<a name="line-471"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-472"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-473"></a> <span class='hs-varid'>imsg</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>s</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-474"></a> <span class='hs-layout'>(</span><span class='hs-varid'>item</span><span class='hs-conop'>:</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-str'>"\""</span> <span class='hs-varop'>++</span> <span class='hs-varid'>toString</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-varop'>++</span> <span class='hs-str'>"\""</span>
|
||||
<a name="line-475"></a> <span class='hs-varid'>items</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-varid'>show</span> <span class='hs-varop'>.</span> <span class='hs-varid'>length</span> <span class='hs-varop'>$</span> <span class='hs-varid'>items</span><span class='hs-layout'>)</span> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-476"></a>
|
||||
<a name="line-477"></a>
|
||||
<a name="line-478"></a><a name="newFile"></a><span class='hs-comment'>-- |Create a new file.</span>
|
||||
<a name="line-479"></a><span class='hs-definition'>newFile</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-480"></a><span class='hs-definition'>newFile</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-481"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-str'>"Enter file name"</span> <span class='hs-layout'>(</span><span class='hs-str'>""</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-482"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>pmfn</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>fromString</span> <span class='hs-varop'><$></span> <span class='hs-varid'>mfn</span>
|
||||
<a name="line-483"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>pmfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-484"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-485"></a> <span class='hs-varid'>createRegularFile</span> <span class='hs-varid'>newFilePerms</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span>
|
||||
<a name="line-486"></a>
|
||||
<a name="line-487"></a>
|
||||
<a name="line-488"></a><a name="newDir"></a><span class='hs-comment'>-- |Create a new directory.</span>
|
||||
<a name="line-489"></a><span class='hs-definition'>newDir</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-490"></a><span class='hs-definition'>newDir</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-491"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-str'>"Enter directory name"</span> <span class='hs-layout'>(</span><span class='hs-str'>""</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-492"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>pmfn</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>fromString</span> <span class='hs-varop'><$></span> <span class='hs-varid'>mfn</span>
|
||||
<a name="line-493"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>pmfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-494"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-495"></a> <span class='hs-varid'>createDir</span> <span class='hs-varid'>newDirPerms</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span>
|
||||
<a name="line-496"></a>
|
||||
<a name="line-497"></a>
|
||||
<a name="line-498"></a><a name="renameF"></a><span class='hs-definition'>renameF</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-499"></a><span class='hs-definition'>renameF</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-500"></a> <span class='hs-varid'>iname</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'><$></span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-501"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-str'>"Enter new file name"</span> <span class='hs-layout'>(</span><span class='hs-varid'>iname</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span><span class='hs-layout'>)</span>
|
||||
<a name="line-502"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>pmfn</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>fromString</span> <span class='hs-varop'><$></span> <span class='hs-varid'>mfn</span>
|
||||
<a name="line-503"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>pmfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-504"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cmsg</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"Really rename \""</span> <span class='hs-varop'>++</span> <span class='hs-varid'>getFPasStr</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-505"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\""</span> <span class='hs-varop'>++</span> <span class='hs-str'>" to \""</span>
|
||||
<a name="line-506"></a> <span class='hs-varop'>++</span> <span class='hs-varid'>toString</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>dirname</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-507"></a> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-508"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-509"></a> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-varid'>renameFile</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-510"></a> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>dirname</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span>
|
||||
<a name="line-511"></a><span class='hs-definition'>renameF</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span>
|
||||
<a name="line-512"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>throwIO</span> <span class='hs-varop'>$</span> <span class='hs-conid'>InvalidOperation</span>
|
||||
<a name="line-513"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-514"></a>
|
||||
<a name="line-515"></a>
|
||||
<a name="line-516"></a>
|
||||
<a name="line-517"></a>
|
||||
<a name="line-518"></a><span class='hs-comment'>---- DIRECTORY TRAVERSAL AND FILE OPENING CALLBACKS ----</span>
|
||||
<a name="line-519"></a>
|
||||
<a name="line-520"></a>
|
||||
<a name="line-521"></a><a name="urlGoTo"></a><span class='hs-comment'>-- |Go to the url given at the 'urlBar' and visualize it in the given</span>
|
||||
<a name="line-522"></a><span class='hs-comment'>-- treeView.</span>
|
||||
<a name="line-523"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-524"></a><span class='hs-comment'>-- If the url is invalid, does nothing.</span>
|
||||
<a name="line-525"></a><span class='hs-definition'>urlGoTo</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-526"></a><span class='hs-definition'>urlGoTo</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-527"></a> <span class='hs-varid'>fp</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>entryGetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>urlBar</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-528"></a> <span class='hs-varid'>forM_</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseAbs</span> <span class='hs-varid'>fp</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fp'</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-529"></a> <span class='hs-varid'>whenM</span> <span class='hs-layout'>(</span><span class='hs-varid'>canOpenDirectory</span> <span class='hs-varid'>fp'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-530"></a> <span class='hs-layout'>(</span><span class='hs-varid'>goDir</span> <span class='hs-conid'>True</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>=<<</span> <span class='hs-layout'>(</span><span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>$</span> <span class='hs-varid'>fp'</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-531"></a>
|
||||
<a name="line-532"></a>
|
||||
<a name="line-533"></a><a name="goHome"></a><span class='hs-definition'>goHome</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-534"></a><span class='hs-definition'>goHome</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-535"></a> <span class='hs-varid'>homedir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>home</span>
|
||||
<a name="line-536"></a> <span class='hs-varid'>forM_</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseAbs</span> <span class='hs-varid'>homedir</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fp'</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-537"></a> <span class='hs-varid'>whenM</span> <span class='hs-layout'>(</span><span class='hs-varid'>canOpenDirectory</span> <span class='hs-varid'>fp'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-538"></a> <span class='hs-layout'>(</span><span class='hs-varid'>goDir</span> <span class='hs-conid'>True</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>=<<</span> <span class='hs-layout'>(</span><span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>$</span> <span class='hs-varid'>fp'</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-539"></a>
|
||||
<a name="line-540"></a>
|
||||
<a name="line-541"></a><a name="execute"></a><span class='hs-comment'>-- |Execute a given file.</span>
|
||||
<a name="line-542"></a><span class='hs-definition'>execute</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-543"></a><span class='hs-definition'>execute</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-544"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>executeFile</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-conid'>[]</span>
|
||||
<a name="line-545"></a><span class='hs-definition'>execute</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span>
|
||||
<a name="line-546"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>throwIO</span> <span class='hs-varop'>$</span> <span class='hs-conid'>InvalidOperation</span>
|
||||
<a name="line-547"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-548"></a>
|
||||
<a name="line-549"></a>
|
||||
<a name="line-550"></a><a name="open"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Opens a file or directory.</span>
|
||||
<a name="line-551"></a><span class='hs-definition'>open</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-552"></a><span class='hs-definition'>open</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>item</span><span class='hs-keyglyph'>]</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-553"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>item</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-554"></a> <span class='hs-conid'>DirOrSym</span> <span class='hs-varid'>r</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-555"></a> <span class='hs-varid'>nv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>r</span>
|
||||
<a name="line-556"></a> <span class='hs-varid'>goDir</span> <span class='hs-conid'>True</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>nv</span>
|
||||
<a name="line-557"></a> <span class='hs-varid'>r</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-558"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>openFile</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>r</span>
|
||||
<a name="line-559"></a><span class='hs-definition'>open</span> <span class='hs-varid'>items</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-560"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>dirs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>filter</span> <span class='hs-layout'>(</span><span class='hs-varid'>fst</span> <span class='hs-varop'>.</span> <span class='hs-varid'>sdir</span><span class='hs-layout'>)</span> <span class='hs-varid'>items</span>
|
||||
<a name="line-561"></a> <span class='hs-varid'>files</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>filter</span> <span class='hs-layout'>(</span><span class='hs-varid'>fst</span> <span class='hs-varop'>.</span> <span class='hs-varid'>sfileLike</span><span class='hs-layout'>)</span> <span class='hs-varid'>items</span>
|
||||
<a name="line-562"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>dirs</span> <span class='hs-layout'>(</span><span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>.</span> <span class='hs-varid'>opeInNewTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-563"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>files</span> <span class='hs-layout'>(</span><span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>.</span> <span class='hs-varid'>openFile</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span>
|
||||
<a name="line-564"></a>
|
||||
<a name="line-565"></a>
|
||||
<a name="line-566"></a><a name="upDir"></a><span class='hs-comment'>-- |Go up one directory and visualize it in the treeView.</span>
|
||||
<a name="line-567"></a><span class='hs-definition'>upDir</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-568"></a><span class='hs-definition'>upDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-569"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-570"></a> <span class='hs-varid'>nv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>goUp</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-571"></a> <span class='hs-varid'>goDir</span> <span class='hs-conid'>True</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>nv</span>
|
||||
<a name="line-572"></a>
|
||||
<a name="line-573"></a>
|
||||
<a name="line-574"></a>
|
||||
<a name="line-575"></a>
|
||||
<a name="line-576"></a><span class='hs-comment'>---- HISTORY CALLBACKS ----</span>
|
||||
<a name="line-577"></a>
|
||||
<a name="line-578"></a>
|
||||
<a name="line-579"></a><a name="goHistoryBack"></a><span class='hs-comment'>-- |Go "back" in the history.</span>
|
||||
<a name="line-580"></a><span class='hs-definition'>goHistoryBack</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-layout'>)</span>
|
||||
<a name="line-581"></a><span class='hs-definition'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-582"></a> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>takeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-583"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>nhs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>historyBack</span> <span class='hs-varid'>hs</span>
|
||||
<a name="line-584"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-585"></a> <span class='hs-varid'>nv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>$</span> <span class='hs-varid'>currentDir</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-586"></a> <span class='hs-varid'>goDir</span> <span class='hs-conid'>False</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>nv</span>
|
||||
<a name="line-587"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>currentDir</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-588"></a>
|
||||
<a name="line-589"></a>
|
||||
<a name="line-590"></a><a name="goHistoryForward"></a><span class='hs-comment'>-- |Go "forward" in the history.</span>
|
||||
<a name="line-591"></a><span class='hs-definition'>goHistoryForward</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-layout'>)</span>
|
||||
<a name="line-592"></a><span class='hs-definition'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-593"></a> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>takeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-594"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>nhs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>historyForward</span> <span class='hs-varid'>hs</span>
|
||||
<a name="line-595"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-596"></a> <span class='hs-varid'>nv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>$</span> <span class='hs-varid'>currentDir</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-597"></a> <span class='hs-varid'>goDir</span> <span class='hs-conid'>False</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>nv</span>
|
||||
<a name="line-598"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>currentDir</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-599"></a>
|
||||
<a name="line-600"></a>
|
||||
<a name="line-601"></a><a name="mkHistoryMenuB"></a><span class='hs-comment'>-- |Show backwards history in a drop-down menu, depending on the input.</span>
|
||||
<a name="line-602"></a><span class='hs-definition'>mkHistoryMenuB</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Menu</span>
|
||||
<a name="line-603"></a><span class='hs-definition'>mkHistoryMenuB</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-604"></a> <span class='hs-varid'>menu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>menuNew</span>
|
||||
<a name="line-605"></a> <span class='hs-varid'>menuitems</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>forM</span> <span class='hs-varid'>hs</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>p</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-606"></a> <span class='hs-varid'>item</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>menuItemNewWithLabel</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span>
|
||||
<a name="line-607"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>item</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-608"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>iterateUntil</span> <span class='hs-layout'>(</span><span class='hs-varop'>==</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-609"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-610"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>menuitems</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>item</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>menuShellAppend</span> <span class='hs-varid'>menu</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-611"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>menu</span>
|
||||
<a name="line-612"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>menu</span>
|
||||
<a name="line-613"></a>
|
||||
<a name="line-614"></a>
|
||||
<a name="line-615"></a><a name="mkHistoryMenuF"></a><span class='hs-comment'>-- |Show forward history in a drop-down menu, depending on the input.</span>
|
||||
<a name="line-616"></a><span class='hs-definition'>mkHistoryMenuF</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Menu</span>
|
||||
<a name="line-617"></a><span class='hs-definition'>mkHistoryMenuF</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-618"></a> <span class='hs-varid'>menu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>menuNew</span>
|
||||
<a name="line-619"></a> <span class='hs-varid'>menuitems</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>forM</span> <span class='hs-varid'>hs</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>p</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-620"></a> <span class='hs-varid'>item</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>menuItemNewWithLabel</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span>
|
||||
<a name="line-621"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>item</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-622"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>iterateUntil</span> <span class='hs-layout'>(</span><span class='hs-varop'>==</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-623"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-624"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>menuitems</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>item</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>menuShellAppend</span> <span class='hs-varid'>menu</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-625"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>menu</span>
|
||||
<a name="line-626"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>menu</span>
|
||||
<a name="line-627"></a>
|
||||
<a name="line-628"></a>
|
||||
<a name="line-629"></a>
|
||||
<a name="line-630"></a>
|
||||
<a name="line-631"></a><span class='hs-comment'>---- RIGHTCLICK CALLBACKS ----</span>
|
||||
<a name="line-632"></a>
|
||||
<a name="line-633"></a>
|
||||
<a name="line-634"></a><a name="showPopup"></a><span class='hs-comment'>-- |TODO: hopefully this does not leak</span>
|
||||
<a name="line-635"></a><span class='hs-definition'>showPopup</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>TimeStamp</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-636"></a><span class='hs-definition'>showPopup</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>t</span>
|
||||
<a name="line-637"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>null</span> <span class='hs-varid'>myplugins</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-638"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>otherwise</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-639"></a>
|
||||
<a name="line-640"></a> <span class='hs-varid'>rcmenu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>doRcMenu</span>
|
||||
<a name="line-641"></a>
|
||||
<a name="line-642"></a> <span class='hs-comment'>-- add common callbacks</span>
|
||||
<a name="line-643"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>rcFileOpen</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-644"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span>
|
||||
<a name="line-645"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileExecute</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-646"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>execute</span>
|
||||
<a name="line-647"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileNewRegFile</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-648"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newFile</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-649"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileNewDir</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-650"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-651"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileNewTab</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-652"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newTab'</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-653"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileNewTerm</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-654"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>openTerminalHere</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-655"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileCopy</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-656"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>copyInit</span>
|
||||
<a name="line-657"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileRename</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-658"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>renameF</span>
|
||||
<a name="line-659"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFilePaste</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-660"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>operationFinal</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-661"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileDelete</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-662"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>del</span>
|
||||
<a name="line-663"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileProperty</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-664"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>showFilePropertyDialog</span>
|
||||
<a name="line-665"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileCut</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-666"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>moveInit</span>
|
||||
<a name="line-667"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileIconView</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-668"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>switchView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>createIconView</span>
|
||||
<a name="line-669"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileTreeView</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-670"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>switchView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>createTreeView</span>
|
||||
<a name="line-671"></a>
|
||||
<a name="line-672"></a>
|
||||
<a name="line-673"></a> <span class='hs-comment'>-- add another plugin separator after the existing one</span>
|
||||
<a name="line-674"></a> <span class='hs-comment'>-- where we want to place our plugins</span>
|
||||
<a name="line-675"></a> <span class='hs-varid'>sep2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>separatorMenuItemNew</span>
|
||||
<a name="line-676"></a> <span class='hs-varid'>widgetShow</span> <span class='hs-varid'>sep2</span>
|
||||
<a name="line-677"></a>
|
||||
<a name="line-678"></a> <span class='hs-varid'>menuShellInsert</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcMenu</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varid'>sep2</span> <span class='hs-varid'>insertPos</span>
|
||||
<a name="line-679"></a>
|
||||
<a name="line-680"></a> <span class='hs-varid'>plugins</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>forM</span> <span class='hs-varid'>myplugins</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-layout'>(</span><span class='hs-varid'>ma</span><span class='hs-layout'>,</span> <span class='hs-varid'>mb</span><span class='hs-layout'>,</span> <span class='hs-varid'>mc</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>fmap</span> <span class='hs-layout'>(</span><span class='hs-layout'>,</span> <span class='hs-varid'>mb</span><span class='hs-layout'>,</span> <span class='hs-varid'>mc</span><span class='hs-layout'>)</span> <span class='hs-varid'>ma</span>
|
||||
<a name="line-681"></a> <span class='hs-comment'>-- need to reverse plugins list so the order is right</span>
|
||||
<a name="line-682"></a> <span class='hs-varid'>forM_</span> <span class='hs-layout'>(</span><span class='hs-varid'>reverse</span> <span class='hs-varid'>plugins</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-layout'>(</span><span class='hs-varid'>plugin</span><span class='hs-layout'>,</span> <span class='hs-varid'>filter'</span><span class='hs-layout'>,</span> <span class='hs-varid'>cb</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-683"></a> <span class='hs-varid'>showItem</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>filter'</span>
|
||||
<a name="line-684"></a>
|
||||
<a name="line-685"></a> <span class='hs-varid'>menuShellInsert</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcMenu</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varid'>plugin</span> <span class='hs-varid'>insertPos</span>
|
||||
<a name="line-686"></a> <span class='hs-varid'>when</span> <span class='hs-varid'>showItem</span> <span class='hs-varop'>$</span> <span class='hs-varid'>widgetShow</span> <span class='hs-varid'>plugin</span>
|
||||
<a name="line-687"></a> <span class='hs-comment'>-- init callback</span>
|
||||
<a name="line-688"></a> <span class='hs-varid'>plugin</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cb</span>
|
||||
<a name="line-689"></a>
|
||||
<a name="line-690"></a> <span class='hs-varid'>menuPopup</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcMenu</span> <span class='hs-varid'>rcmenu</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Just</span> <span class='hs-layout'>(</span><span class='hs-conid'>RightButton</span><span class='hs-layout'>,</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span>
|
||||
<a name="line-691"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-692"></a> <span class='hs-varid'>doRcMenu</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-693"></a> <span class='hs-varid'>builder</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderNew</span>
|
||||
<a name="line-694"></a> <span class='hs-varid'>builderAddFromFile</span> <span class='hs-varid'>builder</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/builder.xml"</span>
|
||||
<a name="line-695"></a>
|
||||
<a name="line-696"></a> <span class='hs-comment'>-- create static right-click menu</span>
|
||||
<a name="line-697"></a> <span class='hs-varid'>rcMenu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToMenu</span>
|
||||
<a name="line-698"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcMenu"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-699"></a> <span class='hs-varid'>rcFileOpen</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-700"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileOpen"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-701"></a> <span class='hs-varid'>rcFileExecute</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-702"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileExecute"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-703"></a> <span class='hs-varid'>rcFileNewRegFile</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-704"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileNewRegFile"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-705"></a> <span class='hs-varid'>rcFileNewDir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-706"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileNewDir"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-707"></a> <span class='hs-varid'>rcFileNewTab</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-708"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileNewTab"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-709"></a> <span class='hs-varid'>rcFileNewTerm</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-710"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileNewTerm"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-711"></a> <span class='hs-varid'>rcFileCut</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-712"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileCut"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-713"></a> <span class='hs-varid'>rcFileCopy</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-714"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileCopy"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-715"></a> <span class='hs-varid'>rcFileRename</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-716"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileRename"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-717"></a> <span class='hs-varid'>rcFilePaste</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-718"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFilePaste"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-719"></a> <span class='hs-varid'>rcFileDelete</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-720"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileDelete"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-721"></a> <span class='hs-varid'>rcFileProperty</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-722"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileProperty"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-723"></a> <span class='hs-varid'>rcFileIconView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-724"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileIconView"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-725"></a> <span class='hs-varid'>rcFileTreeView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-726"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"rcFileTreeView"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-727"></a>
|
||||
<a name="line-728"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>MkRightClickMenu</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-729"></a>
|
||||
</pre></body>
|
||||
</html>
|
168
src/HSFM-GUI-Gtk-Data.html
Normal file
168
src/HSFM-GUI-Gtk-Data.html
Normal file
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/Data.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-20"></a>
|
||||
<a name="line-21"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-22"></a>
|
||||
<a name="line-23"></a>
|
||||
<a name="line-24"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>MVar</span>
|
||||
<a name="line-25"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-26"></a> <span class='hs-conid'>MVar</span>
|
||||
<a name="line-27"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-28"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>STM</span>
|
||||
<a name="line-29"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-30"></a> <span class='hs-conid'>TVar</span>
|
||||
<a name="line-31"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span> <span class='hs-varid'>hiding</span> <span class='hs-layout'>(</span><span class='hs-conid'>MenuBar</span><span class='hs-layout'>)</span>
|
||||
<a name="line-33"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-34"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-35"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>INotify</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-38"></a> <span class='hs-conid'>INotify</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-40"></a>
|
||||
<a name="line-41"></a>
|
||||
<a name="line-42"></a>
|
||||
<a name="line-43"></a> <span class='hs-comment'>------------------</span>
|
||||
<a name="line-44"></a> <span class='hs-comment'>--[ Base Types ]--</span>
|
||||
<a name="line-45"></a> <span class='hs-comment'>------------------</span>
|
||||
<a name="line-46"></a>
|
||||
<a name="line-47"></a>
|
||||
<a name="line-48"></a><a name="MyGUI"></a><span class='hs-comment'>-- |Monolithic object passed to various GUI functions in order</span>
|
||||
<a name="line-49"></a><a name="MyGUI"></a><span class='hs-comment'>-- to keep the API stable and not alter the parameters too much.</span>
|
||||
<a name="line-50"></a><a name="MyGUI"></a><span class='hs-comment'>-- This only holds GUI widgets that are needed to be read during</span>
|
||||
<a name="line-51"></a><a name="MyGUI"></a><span class='hs-comment'>-- runtime.</span>
|
||||
<a name="line-52"></a><a name="MyGUI"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyGUI</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-53"></a> <span class='hs-comment'>-- |main Window</span>
|
||||
<a name="line-54"></a> <span class='hs-varid'>rootWin</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Window</span>
|
||||
<a name="line-55"></a>
|
||||
<a name="line-56"></a> <span class='hs-comment'>-- widgets on the main window</span>
|
||||
<a name="line-57"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>menubar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>MenuBar</span>
|
||||
<a name="line-58"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>statusBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Statusbar</span>
|
||||
<a name="line-59"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>clearStatusBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-60"></a>
|
||||
<a name="line-61"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>notebook1</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Notebook</span>
|
||||
<a name="line-62"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>leftNbBtn</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ToggleButton</span>
|
||||
<a name="line-63"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>leftNbIcon</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Image</span>
|
||||
<a name="line-64"></a>
|
||||
<a name="line-65"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>notebook2</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Notebook</span>
|
||||
<a name="line-66"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rightNbBtn</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ToggleButton</span>
|
||||
<a name="line-67"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rightNbIcon</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Image</span>
|
||||
<a name="line-68"></a>
|
||||
<a name="line-69"></a> <span class='hs-comment'>-- other</span>
|
||||
<a name="line-70"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fprop</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>FilePropertyGrid</span>
|
||||
<a name="line-71"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>settings</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FMSettings</span><span class='hs-layout'>)</span>
|
||||
<a name="line-72"></a>
|
||||
<a name="line-73"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>operationBuffer</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FileOperation</span><span class='hs-layout'>)</span>
|
||||
<a name="line-74"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-75"></a>
|
||||
<a name="line-76"></a>
|
||||
<a name="line-77"></a><a name="MyView"></a><span class='hs-comment'>-- |This describes the contents of the current view and is separated from MyGUI,</span>
|
||||
<a name="line-78"></a><a name="MyView"></a><span class='hs-comment'>-- because we might want to have multiple views.</span>
|
||||
<a name="line-79"></a><a name="MyView"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyView</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-80"></a> <span class='hs-varid'>view</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FMView</span><span class='hs-layout'>)</span>
|
||||
<a name="line-81"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rawModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>ListStore</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-83"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>sortedModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>TypedTreeModelSort</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-84"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>filteredModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>TypedTreeModelFilter</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-85"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>inotify</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>INotify</span><span class='hs-layout'>)</span>
|
||||
<a name="line-86"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>notebook</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Notebook</span> <span class='hs-comment'>-- current notebook</span>
|
||||
<a name="line-87"></a>
|
||||
<a name="line-88"></a> <span class='hs-comment'>-- the first part of the tuple represents the "go back"</span>
|
||||
<a name="line-89"></a> <span class='hs-comment'>-- the second part the "go forth" in the history</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>history</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>BrowsingHistory</span><span class='hs-layout'>)</span>
|
||||
<a name="line-91"></a>
|
||||
<a name="line-92"></a> <span class='hs-comment'>-- sub-widgets</span>
|
||||
<a name="line-93"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>scroll</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ScrolledWindow</span>
|
||||
<a name="line-94"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>viewBox</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Box</span>
|
||||
<a name="line-95"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>backViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-96"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>upViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-97"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>forwardViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-98"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>homeViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-99"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>refreshViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-100"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>urlBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-101"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-102"></a>
|
||||
<a name="line-103"></a>
|
||||
<a name="line-104"></a><a name="MenuBar"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MenuBar</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMenuBar</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-105"></a> <span class='hs-varid'>menubarFileQuit</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-106"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>menubarHelpAbout</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-107"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-108"></a>
|
||||
<a name="line-109"></a><a name="RightClickMenu"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>RightClickMenu</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkRightClickMenu</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-110"></a> <span class='hs-varid'>rcMenu</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Menu</span>
|
||||
<a name="line-111"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileOpen</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-112"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileExecute</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-113"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileNewRegFile</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-114"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileNewDir</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-115"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileNewTab</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-116"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileNewTerm</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-117"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileCut</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-118"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileCopy</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-119"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileRename</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-120"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFilePaste</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-121"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileDelete</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-122"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileProperty</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-123"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileIconView</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-124"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileTreeView</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-125"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-126"></a>
|
||||
<a name="line-127"></a><a name="FilePropertyGrid"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FilePropertyGrid</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFilePropertyGrid</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-128"></a> <span class='hs-varid'>fpropGrid</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Grid</span>
|
||||
<a name="line-129"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropFnEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-130"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropLocEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-131"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropTsEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-132"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropModEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-133"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropAcEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-134"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropFTEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-135"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropPermEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-136"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropLDEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-137"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-138"></a>
|
||||
<a name="line-139"></a>
|
||||
<a name="line-140"></a><a name="FMSettings"></a><span class='hs-comment'>-- |FM-wide settings.</span>
|
||||
<a name="line-141"></a><a name="FMSettings"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FMSettings</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFMSettings</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-142"></a> <span class='hs-varid'>showHidden</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Bool</span>
|
||||
<a name="line-143"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>isLazy</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Bool</span>
|
||||
<a name="line-144"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>iconSize</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Int</span>
|
||||
<a name="line-145"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-146"></a>
|
||||
<a name="line-147"></a><a name="FMView"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>FMTreeView</span> <span class='hs-varop'>!</span><span class='hs-conid'>TreeView</span>
|
||||
<a name="line-148"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>FMIconView</span> <span class='hs-varop'>!</span><span class='hs-conid'>IconView</span>
|
||||
<a name="line-149"></a>
|
||||
<a name="line-150"></a><a name="Item"></a><span class='hs-keyword'>type</span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>File</span> <span class='hs-conid'>FileInfo</span>
|
||||
<a name="line-151"></a>
|
||||
<a name="line-152"></a>
|
||||
<a name="line-153"></a>
|
||||
<a name="line-154"></a><a name="fmViewToContainer"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Container</span>
|
||||
<a name="line-155"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>castToContainer</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toGObject</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-156"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMIconView</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>castToContainer</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toGObject</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-157"></a>
|
||||
</pre></body>
|
||||
</html>
|
319
src/HSFM-GUI-Gtk-Dialogs.html
Normal file
319
src/HSFM-GUI-Gtk-Dialogs.html
Normal file
@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/Dialogs.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-20"></a>
|
||||
<a name="line-21"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-22"></a>
|
||||
<a name="line-23"></a>
|
||||
<a name="line-24"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Codec</span><span class='hs-varop'>.</span><span class='hs-conid'>Binary</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span><span class='hs-varop'>.</span><span class='hs-conid'>String</span>
|
||||
<a name="line-25"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-26"></a> <span class='hs-varid'>decodeString</span>
|
||||
<a name="line-27"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-28"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span>
|
||||
<a name="line-29"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-30"></a> <span class='hs-varid'>catches</span>
|
||||
<a name="line-31"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>displayException</span>
|
||||
<a name="line-32"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>throwIO</span>
|
||||
<a name="line-33"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>IOException</span>
|
||||
<a name="line-34"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Handler</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-35"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-38"></a> <span class='hs-varid'>forM</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>when</span>
|
||||
<a name="line-40"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>void</span>
|
||||
<a name="line-41"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-42"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-44"></a> <span class='hs-conid'>ByteString</span>
|
||||
<a name="line-45"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-46"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>BS</span>
|
||||
<a name="line-47"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span>
|
||||
<a name="line-48"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-49"></a> <span class='hs-varid'>fromString</span>
|
||||
<a name="line-50"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-51"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Version</span>
|
||||
<a name="line-52"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-53"></a> <span class='hs-varid'>showVersion</span>
|
||||
<a name="line-54"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-55"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>Package</span>
|
||||
<a name="line-56"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-57"></a> <span class='hs-conid'>PackageIdentifier</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-58"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>PackageName</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-59"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-60"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>PackageDescription</span>
|
||||
<a name="line-61"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-62"></a> <span class='hs-conid'>GenericPackageDescription</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-63"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>PackageDescription</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-64"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-65"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>PackageDescription</span><span class='hs-varop'>.</span><span class='hs-conid'>Parse</span>
|
||||
<a name="line-66"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-67"></a> <span class='hs-varid'>readPackageDescription</span>
|
||||
<a name="line-68"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-69"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>Verbosity</span>
|
||||
<a name="line-70"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-71"></a> <span class='hs-varid'>silent</span>
|
||||
<a name="line-72"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-73"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-74"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HPath</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>P</span>
|
||||
<a name="line-75"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
|
||||
<a name="line-76"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-77"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-78"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>GlibString</span><span class='hs-conid'>()</span>
|
||||
<a name="line-79"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-80"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
|
||||
<a name="line-81"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-83"></a> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-84"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-85"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>UTFString</span>
|
||||
<a name="line-86"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-87"></a> <span class='hs-conid'>GlibString</span>
|
||||
<a name="line-88"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-89"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>FilePath</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-91"></a> <span class='hs-varid'>takeFileName</span>
|
||||
<a name="line-92"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-93"></a>
|
||||
<a name="line-94"></a>
|
||||
<a name="line-95"></a>
|
||||
<a name="line-96"></a>
|
||||
<a name="line-97"></a>
|
||||
<a name="line-98"></a>
|
||||
<a name="line-99"></a>
|
||||
<a name="line-100"></a>
|
||||
<a name="line-101"></a> <span class='hs-comment'>---------------------</span>
|
||||
<a name="line-102"></a> <span class='hs-comment'>--[ Dialog popups ]--</span>
|
||||
<a name="line-103"></a> <span class='hs-comment'>---------------------</span>
|
||||
<a name="line-104"></a>
|
||||
<a name="line-105"></a>
|
||||
<a name="line-106"></a><a name="showErrorDialog"></a><span class='hs-comment'>-- |Pops up an error Dialog with the given String.</span>
|
||||
<a name="line-107"></a><span class='hs-definition'>showErrorDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-108"></a><span class='hs-definition'>showErrorDialog</span> <span class='hs-varid'>str</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-109"></a> <span class='hs-varid'>errorDialog</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-110"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-111"></a> <span class='hs-conid'>MessageError</span>
|
||||
<a name="line-112"></a> <span class='hs-conid'>ButtonsClose</span>
|
||||
<a name="line-113"></a> <span class='hs-varid'>str</span>
|
||||
<a name="line-114"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>errorDialog</span>
|
||||
<a name="line-115"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>errorDialog</span>
|
||||
<a name="line-116"></a>
|
||||
<a name="line-117"></a>
|
||||
<a name="line-118"></a><a name="showConfirmationDialog"></a><span class='hs-comment'>-- |Asks the user for confirmation and returns True/False.</span>
|
||||
<a name="line-119"></a><span class='hs-definition'>showConfirmationDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Bool</span>
|
||||
<a name="line-120"></a><span class='hs-definition'>showConfirmationDialog</span> <span class='hs-varid'>str</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-121"></a> <span class='hs-varid'>confirmDialog</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-122"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-123"></a> <span class='hs-conid'>MessageQuestion</span>
|
||||
<a name="line-124"></a> <span class='hs-conid'>ButtonsYesNo</span>
|
||||
<a name="line-125"></a> <span class='hs-varid'>str</span>
|
||||
<a name="line-126"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>confirmDialog</span>
|
||||
<a name="line-127"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>confirmDialog</span>
|
||||
<a name="line-128"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-129"></a> <span class='hs-conid'>ResponseYes</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-130"></a> <span class='hs-conid'>ResponseNo</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-131"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-132"></a>
|
||||
<a name="line-133"></a>
|
||||
<a name="line-134"></a><a name="fileCollisionDialog"></a><span class='hs-definition'>fileCollisionDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>FCollisonMode</span><span class='hs-layout'>)</span>
|
||||
<a name="line-135"></a><span class='hs-definition'>fileCollisionDialog</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-136"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-137"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-138"></a> <span class='hs-conid'>MessageQuestion</span>
|
||||
<a name="line-139"></a> <span class='hs-conid'>ButtonsNone</span>
|
||||
<a name="line-140"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Target \""</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
|
||||
<a name="line-141"></a> <span class='hs-varid'>t</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
|
||||
<a name="line-142"></a> <span class='hs-varid'>fromString</span> <span class='hs-str'>"\" exists, how to proceed?"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-143"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-144"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Overwrite"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-145"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Overwrite all"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span>
|
||||
<a name="line-146"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Skip"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>3</span><span class='hs-layout'>)</span>
|
||||
<a name="line-147"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Rename"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>4</span><span class='hs-layout'>)</span>
|
||||
<a name="line-148"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-149"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-150"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-151"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-152"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Overwrite</span><span class='hs-layout'>)</span>
|
||||
<a name="line-153"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>OverwriteAll</span><span class='hs-layout'>)</span>
|
||||
<a name="line-154"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>3</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Skip</span><span class='hs-layout'>)</span>
|
||||
<a name="line-155"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>4</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-156"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Enter new name"</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeFileName</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span>
|
||||
<a name="line-157"></a> <span class='hs-varid'>forM</span> <span class='hs-varid'>mfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-158"></a> <span class='hs-varid'>pfn</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span>
|
||||
<a name="line-159"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Rename</span> <span class='hs-varid'>pfn</span>
|
||||
<a name="line-160"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span>
|
||||
<a name="line-161"></a>
|
||||
<a name="line-162"></a>
|
||||
<a name="line-163"></a><a name="renameDialog"></a><span class='hs-definition'>renameDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>FCollisonMode</span><span class='hs-layout'>)</span>
|
||||
<a name="line-164"></a><span class='hs-definition'>renameDialog</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-165"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-166"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-167"></a> <span class='hs-conid'>MessageQuestion</span>
|
||||
<a name="line-168"></a> <span class='hs-conid'>ButtonsNone</span>
|
||||
<a name="line-169"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Target \""</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
|
||||
<a name="line-170"></a> <span class='hs-varid'>t</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
|
||||
<a name="line-171"></a> <span class='hs-varid'>fromString</span> <span class='hs-str'>"\" exists, how to proceed?"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-172"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-173"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Skip"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-174"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Rename"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span>
|
||||
<a name="line-175"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-176"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-177"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-178"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-179"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Skip</span><span class='hs-layout'>)</span>
|
||||
<a name="line-180"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-181"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Enter new name"</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeFileName</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span>
|
||||
<a name="line-182"></a> <span class='hs-varid'>forM</span> <span class='hs-varid'>mfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-183"></a> <span class='hs-varid'>pfn</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span>
|
||||
<a name="line-184"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Rename</span> <span class='hs-varid'>pfn</span>
|
||||
<a name="line-185"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span>
|
||||
<a name="line-186"></a>
|
||||
<a name="line-187"></a>
|
||||
<a name="line-188"></a><a name="showAboutDialog"></a><span class='hs-comment'>-- |Shows the about dialog from the help menu.</span>
|
||||
<a name="line-189"></a><span class='hs-definition'>showAboutDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-190"></a><span class='hs-definition'>showAboutDialog</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-191"></a> <span class='hs-varid'>ad</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>aboutDialogNew</span>
|
||||
<a name="line-192"></a> <span class='hs-varid'>lstr</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>Prelude</span><span class='hs-varop'>.</span><span class='hs-varid'>readFile</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"LICENSE"</span>
|
||||
<a name="line-193"></a> <span class='hs-varid'>hsfmicon</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>pixbufNewFromFile</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/icons/hsfm.png"</span>
|
||||
<a name="line-194"></a> <span class='hs-varid'>pdesc</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>packageDescription</span>
|
||||
<a name="line-195"></a> <span class='hs-layout'>(</span><span class='hs-varid'>readPackageDescription</span> <span class='hs-varid'>silent</span>
|
||||
<a name="line-196"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"hsfm.cabal"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-197"></a> <span class='hs-varid'>set</span> <span class='hs-varid'>ad</span>
|
||||
<a name="line-198"></a> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>aboutDialogProgramName</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>unPackageName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span>
|
||||
<a name="line-199"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogName</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>unPackageName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span>
|
||||
<a name="line-200"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogVersion</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>showVersion</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgVersion</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span>
|
||||
<a name="line-201"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogCopyright</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>copyright</span> <span class='hs-varid'>pdesc</span>
|
||||
<a name="line-202"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogComments</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>description</span> <span class='hs-varid'>pdesc</span>
|
||||
<a name="line-203"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogLicense</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>lstr</span>
|
||||
<a name="line-204"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogWebsite</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>homepage</span> <span class='hs-varid'>pdesc</span>
|
||||
<a name="line-205"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogAuthors</span> <span class='hs-conop'>:=</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>author</span> <span class='hs-varid'>pdesc</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-206"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogLogo</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>hsfmicon</span>
|
||||
<a name="line-207"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogWrapLicense</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-208"></a> <span class='hs-keyglyph'>]</span>
|
||||
<a name="line-209"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>ad</span>
|
||||
<a name="line-210"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>ad</span>
|
||||
<a name="line-211"></a>
|
||||
<a name="line-212"></a>
|
||||
<a name="line-213"></a><a name="withConfirmationDialog"></a><span class='hs-comment'>-- |Carry out an IO action with a confirmation dialog.</span>
|
||||
<a name="line-214"></a><span class='hs-comment'>-- If the user presses "No", then do nothing.</span>
|
||||
<a name="line-215"></a><span class='hs-definition'>withConfirmationDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-216"></a><span class='hs-definition'>withConfirmationDialog</span> <span class='hs-varid'>str</span> <span class='hs-varid'>io</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-217"></a> <span class='hs-varid'>run</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>showConfirmationDialog</span> <span class='hs-varid'>str</span>
|
||||
<a name="line-218"></a> <span class='hs-varid'>when</span> <span class='hs-varid'>run</span> <span class='hs-varid'>io</span>
|
||||
<a name="line-219"></a>
|
||||
<a name="line-220"></a>
|
||||
<a name="line-221"></a><a name="withErrorDialog"></a><span class='hs-comment'>-- |Execute the given IO action. If the action throws exceptions,</span>
|
||||
<a name="line-222"></a><span class='hs-comment'>-- visualize them via 'showErrorDialog'.</span>
|
||||
<a name="line-223"></a><span class='hs-definition'>withErrorDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-224"></a><span class='hs-definition'>withErrorDialog</span> <span class='hs-varid'>io</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-225"></a> <span class='hs-varid'>catches</span> <span class='hs-layout'>(</span><span class='hs-varid'>void</span> <span class='hs-varid'>io</span><span class='hs-layout'>)</span>
|
||||
<a name="line-226"></a> <span class='hs-keyglyph'>[</span> <span class='hs-conid'>Handler</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>showErrorDialog</span>
|
||||
<a name="line-227"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>decodeString</span>
|
||||
<a name="line-228"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>displayException</span>
|
||||
<a name="line-229"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IOException</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-230"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Handler</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>showErrorDialog</span>
|
||||
<a name="line-231"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>displayException</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>HPathIOException</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-232"></a> <span class='hs-keyglyph'>]</span>
|
||||
<a name="line-233"></a>
|
||||
<a name="line-234"></a>
|
||||
<a name="line-235"></a><a name="textInputDialog"></a><span class='hs-comment'>-- |Asks the user which directory copy mode he wants via dialog popup</span>
|
||||
<a name="line-236"></a><span class='hs-comment'>-- and returns 'DirCopyMode'.</span>
|
||||
<a name="line-237"></a><span class='hs-definition'>textInputDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GlibString</span> <span class='hs-varid'>string</span>
|
||||
<a name="line-238"></a> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>string</span> <span class='hs-comment'>-- ^ window title</span>
|
||||
<a name="line-239"></a> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>string</span> <span class='hs-comment'>-- ^ initial text in input widget</span>
|
||||
<a name="line-240"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-241"></a><span class='hs-definition'>textInputDialog</span> <span class='hs-varid'>title</span> <span class='hs-varid'>inittext</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-242"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-243"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-244"></a> <span class='hs-conid'>MessageQuestion</span>
|
||||
<a name="line-245"></a> <span class='hs-conid'>ButtonsNone</span>
|
||||
<a name="line-246"></a> <span class='hs-varid'>title</span>
|
||||
<a name="line-247"></a> <span class='hs-varid'>entry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>entryNew</span>
|
||||
<a name="line-248"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-varid'>entry</span> <span class='hs-varid'>inittext</span>
|
||||
<a name="line-249"></a> <span class='hs-varid'>cbox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogGetActionArea</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-250"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Ok"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-251"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-252"></a> <span class='hs-varid'>boxPackStart</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>entry</span> <span class='hs-conid'>PackNatural</span> <span class='hs-num'>5</span>
|
||||
<a name="line-253"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-254"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-255"></a> <span class='hs-varid'>ret</span> <span class='hs-keyglyph'><-</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-256"></a> <span class='hs-comment'>-- TODO: make this more safe</span>
|
||||
<a name="line-257"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Just</span> <span class='hs-varop'><$></span> <span class='hs-varid'>entryGetText</span> <span class='hs-varid'>entry</span>
|
||||
<a name="line-258"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-259"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span>
|
||||
<a name="line-260"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span>
|
||||
<a name="line-261"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>ret</span>
|
||||
<a name="line-262"></a>
|
||||
<a name="line-263"></a>
|
||||
<a name="line-264"></a><a name="showFilePropertyDialog"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-265"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>item</span><span class='hs-keyglyph'>]</span> <span class='hs-varid'>mygui</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-266"></a> <span class='hs-varid'>dialog</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-267"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-268"></a> <span class='hs-conid'>MessageInfo</span>
|
||||
<a name="line-269"></a> <span class='hs-conid'>ButtonsNone</span>
|
||||
<a name="line-270"></a> <span class='hs-str'>"File Properties"</span>
|
||||
<a name="line-271"></a>
|
||||
<a name="line-272"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>fprop'</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fprop</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-273"></a> <span class='hs-varid'>grid</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fpropGrid</span> <span class='hs-varid'>fprop'</span>
|
||||
<a name="line-274"></a>
|
||||
<a name="line-275"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropFnEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>empty</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span>
|
||||
<a name="line-276"></a> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-277"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLocEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>dirname</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-278"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropTsEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>show</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fileSize</span> <span class='hs-varop'>$</span> <span class='hs-varid'>fvar</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-279"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropModEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packModTime</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-280"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropAcEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packAccessTime</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-281"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropFTEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packFileType</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-282"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropPermEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-283"></a> <span class='hs-layout'>(</span><span class='hs-varid'>tail</span> <span class='hs-varop'>$</span> <span class='hs-varid'>packPermissions</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-comment'>-- throw away the filetype part</span>
|
||||
<a name="line-284"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>packLinkDestination</span> <span class='hs-varid'>item</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-285"></a> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>dest</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-286"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-287"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-varid'>dest</span>
|
||||
<a name="line-288"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-289"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-290"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-str'>"( Not a symlink )"</span>
|
||||
<a name="line-291"></a>
|
||||
<a name="line-292"></a>
|
||||
<a name="line-293"></a> <span class='hs-varid'>cbox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogGetActionArea</span> <span class='hs-varid'>dialog</span>
|
||||
<a name="line-294"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>dialog</span> <span class='hs-str'>"Ok"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-295"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>dialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-296"></a> <span class='hs-varid'>boxPackStart</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>grid</span> <span class='hs-conid'>PackNatural</span> <span class='hs-num'>5</span>
|
||||
<a name="line-297"></a>
|
||||
<a name="line-298"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>dialog</span>
|
||||
<a name="line-299"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>dialog</span>
|
||||
<a name="line-300"></a>
|
||||
<a name="line-301"></a> <span class='hs-comment'>-- make sure our grid does not get destroyed</span>
|
||||
<a name="line-302"></a> <span class='hs-varid'>containerRemove</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>grid</span>
|
||||
<a name="line-303"></a>
|
||||
<a name="line-304"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>dialog</span>
|
||||
<a name="line-305"></a>
|
||||
<a name="line-306"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-307"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-308"></a>
|
||||
</pre></body>
|
||||
</html>
|
45
src/HSFM-GUI-Gtk-Errors.html
Normal file
45
src/HSFM-GUI-Gtk-Errors.html
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/Errors.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-20"></a>
|
||||
<a name="line-21"></a><span class='hs-comment'>-- |Provides error handling for Gtk.</span>
|
||||
<a name="line-22"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-23"></a>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span>
|
||||
<a name="line-26"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Typeable</span>
|
||||
<a name="line-27"></a>
|
||||
<a name="line-28"></a>
|
||||
<a name="line-29"></a>
|
||||
<a name="line-30"></a><a name="GtkException"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>GtkException</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>UnknownDialogButton</span>
|
||||
<a name="line-31"></a> <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Show</span><span class='hs-layout'>,</span> <span class='hs-conid'>Typeable</span><span class='hs-layout'>)</span>
|
||||
<a name="line-32"></a>
|
||||
<a name="line-33"></a><a name="instance%20Exception%20GtkException"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Exception</span> <span class='hs-conid'>GtkException</span>
|
||||
<a name="line-34"></a>
|
||||
</pre></body>
|
||||
</html>
|
82
src/HSFM-GUI-Gtk-Icons.html
Normal file
82
src/HSFM-GUI-Gtk-Icons.html
Normal file
@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/Icons.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-20"></a>
|
||||
<a name="line-21"></a><span class='hs-comment'>-- |Module for Gtk icon handling.</span>
|
||||
<a name="line-22"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Icons</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-23"></a>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Maybe</span>
|
||||
<a name="line-26"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-27"></a> <span class='hs-varid'>fromJust</span>
|
||||
<a name="line-28"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-29"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-30"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
|
||||
<a name="line-31"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-32"></a> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-33"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-34"></a>
|
||||
<a name="line-35"></a>
|
||||
<a name="line-36"></a><a name="GtkIcon"></a><span class='hs-comment'>-- |Icon type we use in our GUI.</span>
|
||||
<a name="line-37"></a><a name="GtkIcon"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>GtkIcon</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>IFolder</span>
|
||||
<a name="line-38"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>SymL</span>
|
||||
<a name="line-39"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>IFile</span>
|
||||
<a name="line-40"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>IError</span>
|
||||
<a name="line-41"></a>
|
||||
<a name="line-42"></a>
|
||||
<a name="line-43"></a><a name="getIcon"></a><span class='hs-comment'>-- |Gets an icon from the default icon theme and falls back to project-icons</span>
|
||||
<a name="line-44"></a><span class='hs-comment'>-- if not found. The requested icon size is not guaranteed.</span>
|
||||
<a name="line-45"></a><span class='hs-definition'>getIcon</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GtkIcon</span> <span class='hs-comment'>-- ^ icon we want</span>
|
||||
<a name="line-46"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IconTheme</span> <span class='hs-comment'>-- ^ which icon theme to get the icon from</span>
|
||||
<a name="line-47"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Int</span> <span class='hs-comment'>-- ^ requested icon size</span>
|
||||
<a name="line-48"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Pixbuf</span>
|
||||
<a name="line-49"></a><span class='hs-definition'>getIcon</span> <span class='hs-varid'>icon</span> <span class='hs-varid'>itheme</span> <span class='hs-varid'>isize</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-50"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>iname</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>iconToStr</span> <span class='hs-varid'>icon</span>
|
||||
<a name="line-51"></a> <span class='hs-varid'>hasicon</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconThemeHasIcon</span> <span class='hs-varid'>itheme</span> <span class='hs-varid'>iname</span>
|
||||
<a name="line-52"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>hasicon</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-53"></a> <span class='hs-conid'>True</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>iconThemeLoadIcon</span> <span class='hs-varid'>itheme</span> <span class='hs-varid'>iname</span> <span class='hs-varid'>isize</span>
|
||||
<a name="line-54"></a> <span class='hs-conid'>IconLookupUseBuiltin</span>
|
||||
<a name="line-55"></a> <span class='hs-conid'>False</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>pixbufNewFromFile</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-56"></a> <span class='hs-layout'>(</span><span class='hs-str'>"data/Gtk/icons/"</span> <span class='hs-varop'>++</span> <span class='hs-varid'>iname</span> <span class='hs-varop'>++</span> <span class='hs-str'>".png"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-57"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-58"></a> <span class='hs-varid'>iconToStr</span> <span class='hs-conid'>IFolder</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"gtk-directory"</span>
|
||||
<a name="line-59"></a> <span class='hs-varid'>iconToStr</span> <span class='hs-conid'>IFile</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"gtk-file"</span>
|
||||
<a name="line-60"></a> <span class='hs-varid'>iconToStr</span> <span class='hs-conid'>IError</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"error"</span>
|
||||
<a name="line-61"></a> <span class='hs-varid'>iconToStr</span> <span class='hs-conid'>SymL</span> <span class='hs-keyglyph'>=</span> <span class='hs-str'>"emblem-symbolic-link"</span>
|
||||
<a name="line-62"></a>
|
||||
<a name="line-63"></a>
|
||||
<a name="line-64"></a><a name="getSymlinkIcon"></a><span class='hs-definition'>getSymlinkIcon</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GtkIcon</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IconTheme</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Int</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Pixbuf</span>
|
||||
<a name="line-65"></a><span class='hs-definition'>getSymlinkIcon</span> <span class='hs-varid'>icon</span> <span class='hs-varid'>itheme</span> <span class='hs-varid'>isize</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-66"></a> <span class='hs-varid'>pix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>pixbufCopy</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getIcon</span> <span class='hs-varid'>icon</span> <span class='hs-varid'>itheme</span> <span class='hs-varid'>isize</span>
|
||||
<a name="line-67"></a> <span class='hs-varid'>sympix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>SymL</span> <span class='hs-varid'>itheme</span> <span class='hs-varid'>isize</span>
|
||||
<a name="line-68"></a>
|
||||
<a name="line-69"></a> <span class='hs-varid'>pixbufScale</span> <span class='hs-varid'>sympix</span> <span class='hs-varid'>pix</span> <span class='hs-num'>0</span> <span class='hs-num'>0</span> <span class='hs-num'>12</span> <span class='hs-num'>12</span> <span class='hs-num'>0</span> <span class='hs-num'>0</span> <span class='hs-num'>0.5</span> <span class='hs-num'>0.5</span> <span class='hs-conid'>InterpNearest</span>
|
||||
<a name="line-70"></a>
|
||||
<a name="line-71"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>pix</span>
|
||||
</pre></body>
|
||||
</html>
|
131
src/HSFM-GUI-Gtk-MyGUI.html
Normal file
131
src/HSFM-GUI-Gtk-MyGUI.html
Normal file
@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/MyGUI.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# LANGUAGE RecordWildCards #-}</span>
|
||||
<a name="line-20"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-21"></a>
|
||||
<a name="line-22"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>MyGUI</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-23"></a>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>STM</span>
|
||||
<a name="line-26"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-27"></a> <span class='hs-varid'>newTVarIO</span>
|
||||
<a name="line-28"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-29"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-30"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-31"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
|
||||
<a name="line-33"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-34"></a> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-35"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-36"></a>
|
||||
<a name="line-37"></a>
|
||||
<a name="line-38"></a>
|
||||
<a name="line-39"></a>
|
||||
<a name="line-40"></a> <span class='hs-comment'>-------------------------</span>
|
||||
<a name="line-41"></a> <span class='hs-comment'>--[ Main Window Setup ]--</span>
|
||||
<a name="line-42"></a> <span class='hs-comment'>-------------------------</span>
|
||||
<a name="line-43"></a>
|
||||
<a name="line-44"></a>
|
||||
<a name="line-45"></a><a name="createMyGUI"></a><span class='hs-comment'>-- |Set up the GUI. This only creates the permanent widgets.</span>
|
||||
<a name="line-46"></a><span class='hs-definition'>createMyGUI</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-47"></a><span class='hs-definition'>createMyGUI</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-48"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>settings'</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFMSettings</span> <span class='hs-conid'>False</span> <span class='hs-conid'>True</span> <span class='hs-num'>24</span>
|
||||
<a name="line-49"></a> <span class='hs-varid'>settings</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varid'>settings'</span>
|
||||
<a name="line-50"></a> <span class='hs-varid'>operationBuffer</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-conid'>None</span>
|
||||
<a name="line-51"></a>
|
||||
<a name="line-52"></a> <span class='hs-varid'>builder</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderNew</span>
|
||||
<a name="line-53"></a> <span class='hs-varid'>builderAddFromFile</span> <span class='hs-varid'>builder</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/builder.xml"</span>
|
||||
<a name="line-54"></a>
|
||||
<a name="line-55"></a> <span class='hs-comment'>-- get the pre-defined gui widgets</span>
|
||||
<a name="line-56"></a> <span class='hs-varid'>rootWin</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToWindow</span>
|
||||
<a name="line-57"></a> <span class='hs-str'>"rootWin"</span>
|
||||
<a name="line-58"></a> <span class='hs-varid'>menubarFileQuit</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-59"></a> <span class='hs-str'>"menubarFileQuit"</span>
|
||||
<a name="line-60"></a> <span class='hs-varid'>menubarHelpAbout</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-61"></a> <span class='hs-str'>"menubarHelpAbout"</span>
|
||||
<a name="line-62"></a> <span class='hs-varid'>statusBar</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToStatusbar</span>
|
||||
<a name="line-63"></a> <span class='hs-str'>"statusBar"</span>
|
||||
<a name="line-64"></a> <span class='hs-varid'>clearStatusBar</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-65"></a> <span class='hs-str'>"clearStatusBar"</span>
|
||||
<a name="line-66"></a> <span class='hs-varid'>fpropGrid</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToGrid</span>
|
||||
<a name="line-67"></a> <span class='hs-str'>"fpropGrid"</span>
|
||||
<a name="line-68"></a> <span class='hs-varid'>fpropFnEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-69"></a> <span class='hs-str'>"fpropFnEntry"</span>
|
||||
<a name="line-70"></a> <span class='hs-varid'>fpropLocEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-71"></a> <span class='hs-str'>"fpropLocEntry"</span>
|
||||
<a name="line-72"></a> <span class='hs-varid'>fpropTsEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-73"></a> <span class='hs-str'>"fpropTsEntry"</span>
|
||||
<a name="line-74"></a> <span class='hs-varid'>fpropModEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-75"></a> <span class='hs-str'>"fpropModEntry"</span>
|
||||
<a name="line-76"></a> <span class='hs-varid'>fpropAcEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-77"></a> <span class='hs-str'>"fpropAcEntry"</span>
|
||||
<a name="line-78"></a> <span class='hs-varid'>fpropFTEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-79"></a> <span class='hs-str'>"fpropFTEntry"</span>
|
||||
<a name="line-80"></a> <span class='hs-varid'>fpropPermEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-81"></a> <span class='hs-str'>"fpropPermEntry"</span>
|
||||
<a name="line-82"></a> <span class='hs-varid'>fpropLDEntry</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-83"></a> <span class='hs-str'>"fpropLDEntry"</span>
|
||||
<a name="line-84"></a> <span class='hs-varid'>notebook1</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToNotebook</span>
|
||||
<a name="line-85"></a> <span class='hs-str'>"notebook1"</span>
|
||||
<a name="line-86"></a> <span class='hs-varid'>notebook2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToNotebook</span>
|
||||
<a name="line-87"></a> <span class='hs-str'>"notebook2"</span>
|
||||
<a name="line-88"></a> <span class='hs-varid'>leftNbIcon</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImage</span>
|
||||
<a name="line-89"></a> <span class='hs-str'>"leftNbIcon"</span>
|
||||
<a name="line-90"></a> <span class='hs-varid'>rightNbIcon</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImage</span>
|
||||
<a name="line-91"></a> <span class='hs-str'>"rightNbIcon"</span>
|
||||
<a name="line-92"></a> <span class='hs-varid'>leftNbBtn</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToToggleButton</span>
|
||||
<a name="line-93"></a> <span class='hs-str'>"leftNbBtn"</span>
|
||||
<a name="line-94"></a> <span class='hs-varid'>rightNbBtn</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToToggleButton</span>
|
||||
<a name="line-95"></a> <span class='hs-str'>"rightNbBtn"</span>
|
||||
<a name="line-96"></a>
|
||||
<a name="line-97"></a>
|
||||
<a name="line-98"></a> <span class='hs-comment'>-- this is required so that hotkeys work as expected, because</span>
|
||||
<a name="line-99"></a> <span class='hs-comment'>-- we then can connect to signals from `viewBox` more reliably</span>
|
||||
<a name="line-100"></a> <span class='hs-varid'>widgetSetCanFocus</span> <span class='hs-varid'>notebook1</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-101"></a> <span class='hs-varid'>widgetSetCanFocus</span> <span class='hs-varid'>notebook2</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-102"></a>
|
||||
<a name="line-103"></a> <span class='hs-comment'>-- notebook toggle buttons</span>
|
||||
<a name="line-104"></a> <span class='hs-varid'>buttonSetImage</span> <span class='hs-varid'>leftNbBtn</span> <span class='hs-varid'>leftNbIcon</span>
|
||||
<a name="line-105"></a> <span class='hs-varid'>buttonSetImage</span> <span class='hs-varid'>rightNbBtn</span> <span class='hs-varid'>rightNbIcon</span>
|
||||
<a name="line-106"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-varid'>leftNbIcon</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-107"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-varid'>rightNbIcon</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-108"></a> <span class='hs-varid'>toggleButtonSetActive</span> <span class='hs-varid'>leftNbBtn</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-109"></a> <span class='hs-varid'>toggleButtonSetActive</span> <span class='hs-varid'>rightNbBtn</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-110"></a>
|
||||
<a name="line-111"></a> <span class='hs-comment'>-- construct the gui object</span>
|
||||
<a name="line-112"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>menubar</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMenuBar</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-113"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>fprop</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFilePropertyGrid</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-114"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>mygui</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyGUI</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-115"></a>
|
||||
<a name="line-116"></a> <span class='hs-comment'>-- sets the default icon</span>
|
||||
<a name="line-117"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>windowSetDefaultIconFromFile</span>
|
||||
<a name="line-118"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/icons/hsfm.png"</span>
|
||||
<a name="line-119"></a>
|
||||
<a name="line-120"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>mygui</span>
|
||||
</pre></body>
|
||||
</html>
|
445
src/HSFM-GUI-Gtk-MyView.html
Normal file
445
src/HSFM-GUI-Gtk-MyView.html
Normal file
@ -0,0 +1,445 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/MyView.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a><span class='hs-comment'>{-# LANGUAGE RecordWildCards #-}</span>
|
||||
<a name="line-20"></a>
|
||||
<a name="line-21"></a>
|
||||
<a name="line-22"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>MyView</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-23"></a>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>MVar</span>
|
||||
<a name="line-26"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-27"></a> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-28"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>putMVar</span>
|
||||
<a name="line-29"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>tryTakeMVar</span>
|
||||
<a name="line-30"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-31"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>STM</span>
|
||||
<a name="line-32"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-33"></a> <span class='hs-varid'>newTVarIO</span>
|
||||
<a name="line-34"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>readTVarIO</span>
|
||||
<a name="line-35"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-38"></a> <span class='hs-varid'>unless</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>void</span>
|
||||
<a name="line-40"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>when</span>
|
||||
<a name="line-41"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-42"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Class</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-44"></a> <span class='hs-varid'>liftIO</span>
|
||||
<a name="line-45"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-46"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Foldable</span>
|
||||
<a name="line-47"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-48"></a> <span class='hs-varid'>for_</span>
|
||||
<a name="line-49"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-50"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Maybe</span>
|
||||
<a name="line-51"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-52"></a> <span class='hs-varid'>catMaybes</span>
|
||||
<a name="line-53"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fromJust</span>
|
||||
<a name="line-54"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-55"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>String</span>
|
||||
<a name="line-56"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-57"></a> <span class='hs-varid'>fromString</span>
|
||||
<a name="line-58"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-59"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-60"></a><span class='hs-keyword'>import</span> <span class='hs-comment'>{-# SOURCE #-}</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Callbacks</span> <span class='hs-layout'>(</span><span class='hs-varid'>setViewCallbacks</span><span class='hs-layout'>)</span>
|
||||
<a name="line-61"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HPath</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>P</span>
|
||||
<a name="line-62"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-63"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>GlibString</span><span class='hs-conid'>()</span>
|
||||
<a name="line-64"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-65"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Icons</span>
|
||||
<a name="line-66"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-67"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-68"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-69"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
|
||||
<a name="line-70"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-71"></a> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-72"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-73"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-74"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>INotify</span>
|
||||
<a name="line-75"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-76"></a> <span class='hs-varid'>addWatch</span>
|
||||
<a name="line-77"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>initINotify</span>
|
||||
<a name="line-78"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>killINotify</span>
|
||||
<a name="line-79"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>EventVariety</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-80"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-81"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Error</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-83"></a> <span class='hs-varid'>catchIOError</span>
|
||||
<a name="line-84"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>ioError</span>
|
||||
<a name="line-85"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>isUserError</span>
|
||||
<a name="line-86"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-87"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>FilePath</span>
|
||||
<a name="line-88"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-89"></a> <span class='hs-varid'>hiddenFile</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-91"></a>
|
||||
<a name="line-92"></a>
|
||||
<a name="line-93"></a>
|
||||
<a name="line-94"></a><a name="newTab"></a><span class='hs-comment'>-- |Creates a new tab with its own view and refreshes the view.</span>
|
||||
<a name="line-95"></a><span class='hs-definition'>newTab</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Notebook</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Int</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-96"></a><span class='hs-definition'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>nb</span> <span class='hs-varid'>iofmv</span> <span class='hs-varid'>item</span> <span class='hs-varid'>pos</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-97"></a>
|
||||
<a name="line-98"></a>
|
||||
<a name="line-99"></a> <span class='hs-comment'>-- create eventbox with label</span>
|
||||
<a name="line-100"></a> <span class='hs-varid'>label</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>labelNewWithMnemonic</span>
|
||||
<a name="line-101"></a> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-102"></a> <span class='hs-varid'>ebox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventBoxNew</span>
|
||||
<a name="line-103"></a> <span class='hs-varid'>eventBoxSetVisibleWindow</span> <span class='hs-varid'>ebox</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-104"></a> <span class='hs-varid'>containerAdd</span> <span class='hs-varid'>ebox</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-105"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-106"></a>
|
||||
<a name="line-107"></a> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>createMyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>nb</span> <span class='hs-varid'>iofmv</span>
|
||||
<a name="line-108"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookInsertPageMenu</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-109"></a> <span class='hs-varid'>ebox</span> <span class='hs-varid'>ebox</span> <span class='hs-varid'>pos</span>
|
||||
<a name="line-110"></a>
|
||||
<a name="line-111"></a> <span class='hs-comment'>-- set initial history</span>
|
||||
<a name="line-112"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>historySize</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>5</span>
|
||||
<a name="line-113"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-114"></a> <span class='hs-layout'>(</span><span class='hs-conid'>BrowsingHistory</span> <span class='hs-conid'>[]</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-conid'>[]</span> <span class='hs-varid'>historySize</span><span class='hs-layout'>)</span>
|
||||
<a name="line-115"></a>
|
||||
<a name="line-116"></a> <span class='hs-varid'>notebookSetTabReorderable</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-117"></a>
|
||||
<a name="line-118"></a> <span class='hs-varid'>catchIOError</span> <span class='hs-layout'>(</span><span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-119"></a> <span class='hs-varid'>file</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseAbs</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromString</span>
|
||||
<a name="line-120"></a> <span class='hs-varop'>$</span> <span class='hs-str'>"/"</span>
|
||||
<a name="line-121"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>file</span>
|
||||
<a name="line-122"></a> <span class='hs-varid'>labelSetText</span> <span class='hs-varid'>label</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"/"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-123"></a> <span class='hs-varid'>unless</span> <span class='hs-layout'>(</span><span class='hs-varid'>isUserError</span> <span class='hs-varid'>e</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>ioError</span> <span class='hs-varid'>e</span><span class='hs-layout'>)</span>
|
||||
<a name="line-124"></a>
|
||||
<a name="line-125"></a> <span class='hs-comment'>-- close callback</span>
|
||||
<a name="line-126"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>ebox</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-127"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-128"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-129"></a> <span class='hs-conid'>MiddleButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-130"></a> <span class='hs-varid'>n</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookGetNPages</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-131"></a> <span class='hs-varid'>when</span> <span class='hs-layout'>(</span><span class='hs-varid'>n</span> <span class='hs-varop'>></span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>destroyView</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-132"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-133"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-134"></a>
|
||||
<a name="line-135"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-136"></a>
|
||||
<a name="line-137"></a>
|
||||
<a name="line-138"></a><a name="createMyView"></a><span class='hs-comment'>-- |Constructs the initial MyView object with a few dummy models.</span>
|
||||
<a name="line-139"></a><span class='hs-comment'>-- It also initializes the callbacks.</span>
|
||||
<a name="line-140"></a><span class='hs-definition'>createMyView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-141"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Notebook</span>
|
||||
<a name="line-142"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-143"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-144"></a><span class='hs-definition'>createMyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>nb</span> <span class='hs-varid'>iofmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-145"></a> <span class='hs-varid'>inotify</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-146"></a> <span class='hs-varid'>history</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-147"></a>
|
||||
<a name="line-148"></a> <span class='hs-varid'>builder</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderNew</span>
|
||||
<a name="line-149"></a> <span class='hs-varid'>builderAddFromFile</span> <span class='hs-varid'>builder</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/builder.xml"</span>
|
||||
<a name="line-150"></a>
|
||||
<a name="line-151"></a> <span class='hs-comment'>-- create dummy models, so we don't have to use MVar</span>
|
||||
<a name="line-152"></a> <span class='hs-varid'>rawModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>listStoreNew</span> <span class='hs-conid'>[]</span>
|
||||
<a name="line-153"></a> <span class='hs-varid'>filteredModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>treeModelFilterNew</span> <span class='hs-varid'>x</span> <span class='hs-conid'>[]</span><span class='hs-layout'>)</span>
|
||||
<a name="line-154"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varid'>rawModel</span>
|
||||
<a name="line-155"></a> <span class='hs-varid'>sortedModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>treeModelSortNewWithModel</span>
|
||||
<a name="line-156"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varid'>filteredModel</span>
|
||||
<a name="line-157"></a> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-158"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iofmv</span>
|
||||
<a name="line-159"></a> <span class='hs-varid'>view</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varid'>view'</span>
|
||||
<a name="line-160"></a>
|
||||
<a name="line-161"></a> <span class='hs-varid'>urlBar</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-162"></a> <span class='hs-str'>"urlBar"</span>
|
||||
<a name="line-163"></a>
|
||||
<a name="line-164"></a> <span class='hs-varid'>backViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-165"></a> <span class='hs-str'>"backViewB"</span>
|
||||
<a name="line-166"></a> <span class='hs-varid'>upViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-167"></a> <span class='hs-str'>"upViewB"</span>
|
||||
<a name="line-168"></a> <span class='hs-varid'>forwardViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-169"></a> <span class='hs-str'>"forwardViewB"</span>
|
||||
<a name="line-170"></a> <span class='hs-varid'>homeViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-171"></a> <span class='hs-str'>"homeViewB"</span>
|
||||
<a name="line-172"></a> <span class='hs-varid'>refreshViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-173"></a> <span class='hs-str'>"refreshViewB"</span>
|
||||
<a name="line-174"></a> <span class='hs-varid'>scroll</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToScrolledWindow</span>
|
||||
<a name="line-175"></a> <span class='hs-str'>"mainScroll"</span>
|
||||
<a name="line-176"></a> <span class='hs-varid'>viewBox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToBox</span>
|
||||
<a name="line-177"></a> <span class='hs-str'>"viewBox"</span>
|
||||
<a name="line-178"></a>
|
||||
<a name="line-179"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>notebook</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>nb</span>
|
||||
<a name="line-180"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyView</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-181"></a>
|
||||
<a name="line-182"></a> <span class='hs-comment'>-- set the bindings</span>
|
||||
<a name="line-183"></a> <span class='hs-varid'>setViewCallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-184"></a>
|
||||
<a name="line-185"></a> <span class='hs-comment'>-- add the treeview to the scroll container</span>
|
||||
<a name="line-186"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>oview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>view'</span>
|
||||
<a name="line-187"></a> <span class='hs-varid'>containerAdd</span> <span class='hs-varid'>scroll</span> <span class='hs-varid'>oview</span>
|
||||
<a name="line-188"></a>
|
||||
<a name="line-189"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>viewBox</span>
|
||||
<a name="line-190"></a>
|
||||
<a name="line-191"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-192"></a>
|
||||
<a name="line-193"></a>
|
||||
<a name="line-194"></a><a name="switchView"></a><span class='hs-comment'>-- |Switch the existing view in `MyView` with the one that the</span>
|
||||
<a name="line-195"></a><span class='hs-comment'>-- io action returns.</span>
|
||||
<a name="line-196"></a><span class='hs-definition'>switchView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-197"></a><span class='hs-definition'>switchView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>iofmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-198"></a> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-199"></a>
|
||||
<a name="line-200"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>nb</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-201"></a>
|
||||
<a name="line-202"></a> <span class='hs-varid'>oldpage</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>destroyView</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-203"></a>
|
||||
<a name="line-204"></a> <span class='hs-comment'>-- create new view and tab page where the previous one was</span>
|
||||
<a name="line-205"></a> <span class='hs-varid'>nview</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>nb</span> <span class='hs-varid'>iofmv</span> <span class='hs-varid'>cwd</span> <span class='hs-varid'>oldpage</span>
|
||||
<a name="line-206"></a>
|
||||
<a name="line-207"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookPageNum</span> <span class='hs-varid'>nb</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>nview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-208"></a> <span class='hs-varid'>notebookSetCurrentPage</span> <span class='hs-varid'>nb</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-209"></a>
|
||||
<a name="line-210"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>nview</span> <span class='hs-varid'>cwd</span>
|
||||
<a name="line-211"></a>
|
||||
<a name="line-212"></a>
|
||||
<a name="line-213"></a><a name="destroyView"></a><span class='hs-comment'>-- |Destroys the given view by disconnecting the watcher</span>
|
||||
<a name="line-214"></a><span class='hs-comment'>-- and destroying the active FMView container.</span>
|
||||
<a name="line-215"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-216"></a><span class='hs-comment'>-- Everything that needs to be done in order to forget about a</span>
|
||||
<a name="line-217"></a><span class='hs-comment'>-- view needs to be done here.</span>
|
||||
<a name="line-218"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-219"></a><span class='hs-comment'>-- Returns the page in the tab list this view corresponds to.</span>
|
||||
<a name="line-220"></a><span class='hs-definition'>destroyView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Int</span>
|
||||
<a name="line-221"></a><span class='hs-definition'>destroyView</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-222"></a> <span class='hs-comment'>-- disconnect watcher</span>
|
||||
<a name="line-223"></a> <span class='hs-varid'>mi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-224"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mi</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>i</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>killINotify</span> <span class='hs-varid'>i</span>
|
||||
<a name="line-225"></a>
|
||||
<a name="line-226"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookPageNum</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-227"></a>
|
||||
<a name="line-228"></a> <span class='hs-comment'>-- destroy old view and tab page</span>
|
||||
<a name="line-229"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-230"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-layout'>(</span><span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>view'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-231"></a> <span class='hs-varid'>notebookRemovePage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-232"></a>
|
||||
<a name="line-233"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-234"></a>
|
||||
<a name="line-235"></a>
|
||||
<a name="line-236"></a><a name="createIconView"></a><span class='hs-comment'>-- |Createss an IconView.</span>
|
||||
<a name="line-237"></a><span class='hs-definition'>createIconView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-238"></a><span class='hs-definition'>createIconView</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-239"></a> <span class='hs-varid'>iconv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconViewNew</span>
|
||||
<a name="line-240"></a> <span class='hs-varid'>iconViewSetSelectionMode</span> <span class='hs-varid'>iconv</span> <span class='hs-conid'>SelectionMultiple</span>
|
||||
<a name="line-241"></a> <span class='hs-varid'>iconViewSetColumns</span> <span class='hs-varid'>iconv</span> <span class='hs-layout'>(</span><span class='hs-comment'>-</span><span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-242"></a> <span class='hs-varid'>iconViewSetSpacing</span> <span class='hs-varid'>iconv</span> <span class='hs-num'>2</span>
|
||||
<a name="line-243"></a> <span class='hs-varid'>iconViewSetMargin</span> <span class='hs-varid'>iconv</span> <span class='hs-num'>0</span>
|
||||
<a name="line-244"></a> <span class='hs-comment'>{- set iconv [ iconViewItemOrientation := OrientationHorizontal ] -}</span>
|
||||
<a name="line-245"></a> <span class='hs-comment'>{- set iconv [ iconViewOrientation := OrientationHorizontal ] -}</span>
|
||||
<a name="line-246"></a>
|
||||
<a name="line-247"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconv</span>
|
||||
<a name="line-248"></a>
|
||||
<a name="line-249"></a>
|
||||
<a name="line-250"></a><a name="createTreeView"></a><span class='hs-comment'>-- |Creates a TreeView.</span>
|
||||
<a name="line-251"></a><span class='hs-definition'>createTreeView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-252"></a><span class='hs-definition'>createTreeView</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-253"></a> <span class='hs-comment'>-- create the final view</span>
|
||||
<a name="line-254"></a> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewNew</span>
|
||||
<a name="line-255"></a> <span class='hs-comment'>-- set selection mode</span>
|
||||
<a name="line-256"></a> <span class='hs-varid'>tvs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetSelection</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-257"></a> <span class='hs-varid'>treeSelectionSetMode</span> <span class='hs-varid'>tvs</span> <span class='hs-conid'>SelectionMultiple</span>
|
||||
<a name="line-258"></a>
|
||||
<a name="line-259"></a> <span class='hs-comment'>-- set drag and drop</span>
|
||||
<a name="line-260"></a> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>targetListNew</span>
|
||||
<a name="line-261"></a> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>atomNew</span> <span class='hs-layout'>(</span><span class='hs-str'>"HSFM"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-262"></a> <span class='hs-varid'>targetListAdd</span> <span class='hs-varid'>tl</span> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>TargetSameApp</span><span class='hs-keyglyph'>]</span> <span class='hs-num'>0</span>
|
||||
<a name="line-263"></a> <span class='hs-varid'>treeViewEnableModelDragDest</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>ActionCopy</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-264"></a> <span class='hs-varid'>treeViewEnableModelDragSource</span> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Button1</span><span class='hs-keyglyph'>]</span> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>ActionCopy</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-265"></a>
|
||||
<a name="line-266"></a> <span class='hs-comment'>-- create final tree model columns</span>
|
||||
<a name="line-267"></a> <span class='hs-varid'>renderTxt</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>cellRendererTextNew</span>
|
||||
<a name="line-268"></a> <span class='hs-varid'>renderPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>cellRendererPixbufNew</span>
|
||||
<a name="line-269"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>ct</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>cellText</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>CellRendererTextClass</span> <span class='hs-varid'>cr</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Attr</span> <span class='hs-varid'>cr</span> <span class='hs-conid'>String</span>
|
||||
<a name="line-270"></a> <span class='hs-varid'>cp</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>cellPixbuf</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>CellRendererPixbufClass</span> <span class='hs-varid'>self</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Attr</span> <span class='hs-varid'>self</span> <span class='hs-conid'>Pixbuf</span>
|
||||
<a name="line-271"></a>
|
||||
<a name="line-272"></a> <span class='hs-comment'>-- filename column</span>
|
||||
<a name="line-273"></a> <span class='hs-varid'>cF</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-274"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cF</span> <span class='hs-layout'>(</span><span class='hs-str'>"Filename"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-275"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cF</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-276"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cF</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-277"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cF</span> <span class='hs-num'>1</span>
|
||||
<a name="line-278"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderPix</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-279"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-280"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cF</span>
|
||||
<a name="line-281"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderPix</span> <span class='hs-varid'>cp</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span>
|
||||
<a name="line-282"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span>
|
||||
<a name="line-283"></a>
|
||||
<a name="line-284"></a> <span class='hs-comment'>-- date column</span>
|
||||
<a name="line-285"></a> <span class='hs-varid'>cMD</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-286"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cMD</span> <span class='hs-layout'>(</span><span class='hs-str'>"Date"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-287"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cMD</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-288"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cMD</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-289"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cMD</span> <span class='hs-num'>2</span>
|
||||
<a name="line-290"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cMD</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-291"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cMD</span>
|
||||
<a name="line-292"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cMD</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>2</span>
|
||||
<a name="line-293"></a>
|
||||
<a name="line-294"></a> <span class='hs-comment'>-- permissions column</span>
|
||||
<a name="line-295"></a> <span class='hs-varid'>cP</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-296"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cP</span> <span class='hs-layout'>(</span><span class='hs-str'>"Permission"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-297"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cP</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-298"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cP</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-299"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cP</span> <span class='hs-num'>3</span>
|
||||
<a name="line-300"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cP</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-301"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cP</span>
|
||||
<a name="line-302"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cP</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>3</span>
|
||||
<a name="line-303"></a>
|
||||
<a name="line-304"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-305"></a>
|
||||
<a name="line-306"></a>
|
||||
<a name="line-307"></a><a name="refreshView"></a><span class='hs-comment'>-- |Refreshes the View based on the given directory.</span>
|
||||
<a name="line-308"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-309"></a><span class='hs-comment'>-- Throws:</span>
|
||||
<a name="line-310"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-311"></a><span class='hs-comment'>-- - `userError` on inappropriate type</span>
|
||||
<a name="line-312"></a><span class='hs-definition'>refreshView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-313"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-314"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span>
|
||||
<a name="line-315"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-316"></a><span class='hs-definition'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-conid'>SymLink</span> <span class='hs-layout'>{</span> <span class='hs-varid'>sdest</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>d</span><span class='hs-keyglyph'>@</span><span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-317"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>d</span>
|
||||
<a name="line-318"></a><span class='hs-definition'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span><span class='hs-keyglyph'>@</span><span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-319"></a> <span class='hs-varid'>newRawModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fileListStore</span> <span class='hs-varid'>item</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-320"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>rawModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>newRawModel</span>
|
||||
<a name="line-321"></a>
|
||||
<a name="line-322"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-323"></a>
|
||||
<a name="line-324"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>cwd</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-325"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>cwd</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-326"></a>
|
||||
<a name="line-327"></a> <span class='hs-comment'>-- get selected items</span>
|
||||
<a name="line-328"></a> <span class='hs-varid'>tps</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSelectedTreePaths</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-329"></a> <span class='hs-varid'>trs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>catMaybes</span> <span class='hs-varop'><$></span> <span class='hs-varid'>mapM</span> <span class='hs-layout'>(</span><span class='hs-varid'>treeRowReferenceNew</span> <span class='hs-varid'>newRawModel</span><span class='hs-layout'>)</span> <span class='hs-varid'>tps</span>
|
||||
<a name="line-330"></a>
|
||||
<a name="line-331"></a> <span class='hs-varid'>constructView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-332"></a>
|
||||
<a name="line-333"></a> <span class='hs-comment'>-- reselect selected items</span>
|
||||
<a name="line-334"></a> <span class='hs-comment'>-- TODO: not implemented for icon view yet</span>
|
||||
<a name="line-335"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-336"></a> <span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-337"></a> <span class='hs-varid'>tvs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetSelection</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-338"></a> <span class='hs-varid'>ntps</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>mapM</span> <span class='hs-varid'>treeRowReferenceGetPath</span> <span class='hs-varid'>trs</span>
|
||||
<a name="line-339"></a> <span class='hs-varid'>mapM_</span> <span class='hs-layout'>(</span><span class='hs-varid'>treeSelectionSelectPath</span> <span class='hs-varid'>tvs</span><span class='hs-layout'>)</span> <span class='hs-varid'>ntps</span>
|
||||
<a name="line-340"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-341"></a><span class='hs-definition'>refreshView</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>ioError</span> <span class='hs-varop'>$</span> <span class='hs-varid'>userError</span> <span class='hs-str'>"Inappropriate type!"</span>
|
||||
<a name="line-342"></a>
|
||||
<a name="line-343"></a>
|
||||
<a name="line-344"></a><a name="constructView"></a><span class='hs-comment'>-- |Constructs the visible View with the current underlying mutable models,</span>
|
||||
<a name="line-345"></a><span class='hs-comment'>-- which are retrieved from 'MyGUI'.</span>
|
||||
<a name="line-346"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-347"></a><span class='hs-comment'>-- This sort of merges the components mygui and myview and fires up</span>
|
||||
<a name="line-348"></a><span class='hs-comment'>-- the actual models.</span>
|
||||
<a name="line-349"></a><span class='hs-definition'>constructView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-350"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-351"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-352"></a><span class='hs-definition'>constructView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-353"></a> <span class='hs-varid'>settings'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-354"></a>
|
||||
<a name="line-355"></a> <span class='hs-comment'>-- pix stuff</span>
|
||||
<a name="line-356"></a> <span class='hs-varid'>iT</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconThemeGetDefault</span>
|
||||
<a name="line-357"></a> <span class='hs-varid'>folderPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IFolder</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-358"></a> <span class='hs-varid'>folderSymPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSymlinkIcon</span> <span class='hs-conid'>IFolder</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-359"></a> <span class='hs-varid'>filePix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IFile</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-360"></a> <span class='hs-varid'>fileSymPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSymlinkIcon</span> <span class='hs-conid'>IFile</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-361"></a> <span class='hs-varid'>errorPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IError</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-362"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>folderPix</span>
|
||||
<a name="line-363"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>FileLike</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>filePix</span>
|
||||
<a name="line-364"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>DirSym</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>folderSymPix</span>
|
||||
<a name="line-365"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>FileLikeSym</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fileSymPix</span>
|
||||
<a name="line-366"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>BrokenSymlink</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>errorPix</span>
|
||||
<a name="line-367"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>errorPix</span>
|
||||
<a name="line-368"></a>
|
||||
<a name="line-369"></a>
|
||||
<a name="line-370"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-371"></a>
|
||||
<a name="line-372"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-373"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cdirp</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-374"></a>
|
||||
<a name="line-375"></a> <span class='hs-comment'>-- update urlBar</span>
|
||||
<a name="line-376"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>urlBar</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdirp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-377"></a>
|
||||
<a name="line-378"></a> <span class='hs-varid'>rawModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>rawModel</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-379"></a>
|
||||
<a name="line-380"></a> <span class='hs-comment'>-- filtering</span>
|
||||
<a name="line-381"></a> <span class='hs-varid'>filteredModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterNew</span> <span class='hs-varid'>rawModel'</span> <span class='hs-conid'>[]</span>
|
||||
<a name="line-382"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>filteredModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>filteredModel'</span>
|
||||
<a name="line-383"></a> <span class='hs-varid'>treeModelFilterSetVisibleFunc</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>iter</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-384"></a> <span class='hs-varid'>hidden</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>showHidden</span> <span class='hs-varop'><$></span> <span class='hs-varid'>readTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-385"></a> <span class='hs-varid'>item</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>iter</span> <span class='hs-varop'>>>=</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span>
|
||||
<a name="line-386"></a> <span class='hs-keyword'>if</span> <span class='hs-varid'>hidden</span>
|
||||
<a name="line-387"></a> <span class='hs-keyword'>then</span> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-388"></a> <span class='hs-keyword'>else</span> <span class='hs-varid'>return</span> <span class='hs-varop'>.</span> <span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>hiddenFile</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-389"></a>
|
||||
<a name="line-390"></a> <span class='hs-comment'>-- sorting</span>
|
||||
<a name="line-391"></a> <span class='hs-varid'>sortedModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelSortNewWithModel</span> <span class='hs-varid'>filteredModel'</span>
|
||||
<a name="line-392"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>sortedModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>sortedModel'</span>
|
||||
<a name="line-393"></a> <span class='hs-varid'>treeSortableSetSortFunc</span> <span class='hs-varid'>sortedModel'</span> <span class='hs-num'>1</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>iter1</span> <span class='hs-varid'>iter2</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-394"></a> <span class='hs-varid'>cIter1</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterConvertIterToChildIter</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varid'>iter1</span>
|
||||
<a name="line-395"></a> <span class='hs-varid'>cIter2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterConvertIterToChildIter</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varid'>iter2</span>
|
||||
<a name="line-396"></a> <span class='hs-varid'>item1</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>cIter1</span>
|
||||
<a name="line-397"></a> <span class='hs-varid'>item2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>cIter2</span>
|
||||
<a name="line-398"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>compare</span> <span class='hs-varid'>item1</span> <span class='hs-varid'>item2</span>
|
||||
<a name="line-399"></a> <span class='hs-varid'>treeSortableSetSortColumnId</span> <span class='hs-varid'>sortedModel'</span> <span class='hs-num'>1</span> <span class='hs-conid'>SortAscending</span>
|
||||
<a name="line-400"></a>
|
||||
<a name="line-401"></a> <span class='hs-comment'>-- set values</span>
|
||||
<a name="line-402"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-403"></a> <span class='hs-varid'>dirtreePix</span>
|
||||
<a name="line-404"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-405"></a> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>toFilePath</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span>
|
||||
<a name="line-406"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span>
|
||||
<a name="line-407"></a> <span class='hs-varid'>packModTime</span>
|
||||
<a name="line-408"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>3</span><span class='hs-layout'>)</span>
|
||||
<a name="line-409"></a> <span class='hs-varid'>packPermissions</span>
|
||||
<a name="line-410"></a>
|
||||
<a name="line-411"></a> <span class='hs-comment'>-- update model of view</span>
|
||||
<a name="line-412"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-413"></a> <span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-414"></a> <span class='hs-varid'>treeViewSetModel</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>sortedModel'</span>
|
||||
<a name="line-415"></a> <span class='hs-varid'>treeViewSetRubberBanding</span> <span class='hs-varid'>treeView</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-416"></a> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-417"></a> <span class='hs-varid'>iconViewSetModel</span> <span class='hs-varid'>iconView</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>sortedModel'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-418"></a> <span class='hs-varid'>iconViewSetPixbufColumn</span> <span class='hs-varid'>iconView</span>
|
||||
<a name="line-419"></a> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ColumnId</span> <span class='hs-varid'>item</span> <span class='hs-conid'>Pixbuf</span><span class='hs-layout'>)</span>
|
||||
<a name="line-420"></a> <span class='hs-varid'>iconViewSetTextColumn</span> <span class='hs-varid'>iconView</span>
|
||||
<a name="line-421"></a> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ColumnId</span> <span class='hs-varid'>item</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-422"></a>
|
||||
<a name="line-423"></a> <span class='hs-comment'>-- add watcher</span>
|
||||
<a name="line-424"></a> <span class='hs-varid'>mi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-425"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mi</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>i</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>killINotify</span> <span class='hs-varid'>i</span>
|
||||
<a name="line-426"></a> <span class='hs-varid'>newi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>initINotify</span>
|
||||
<a name="line-427"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>addWatch</span>
|
||||
<a name="line-428"></a> <span class='hs-varid'>newi</span>
|
||||
<a name="line-429"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Move</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveIn</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveOut</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveSelf</span><span class='hs-layout'>,</span> <span class='hs-conid'>Create</span><span class='hs-layout'>,</span> <span class='hs-conid'>Delete</span><span class='hs-layout'>,</span> <span class='hs-conid'>DeleteSelf</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-430"></a> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdirp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-431"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>postGUIAsync</span> <span class='hs-varop'>$</span> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span><span class='hs-layout'>)</span>
|
||||
<a name="line-432"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>newi</span>
|
||||
<a name="line-433"></a>
|
||||
<a name="line-434"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
</pre></body>
|
||||
</html>
|
122
src/HSFM-GUI-Gtk-Plugins.html
Normal file
122
src/HSFM-GUI-Gtk-Plugins.html
Normal file
@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
|
||||
<title>src/HSFM/GUI/Gtk/Plugins.hs</title>
|
||||
<link type='text/css' rel='stylesheet' href='hscolour.css' />
|
||||
</head>
|
||||
<body>
|
||||
<pre><a name="line-1"></a><span class='hs-comment'>{--
|
||||
<a name="line-2"></a>HSFM, a filemanager written in Haskell.
|
||||
<a name="line-3"></a>Copyright (C) 2016 Julian Ospald
|
||||
<a name="line-4"></a>
|
||||
<a name="line-5"></a>This program is free software; you can redistribute it and/or
|
||||
<a name="line-6"></a>modify it under the terms of the GNU General Public License
|
||||
<a name="line-7"></a>version 2 as published by the Free Software Foundation.
|
||||
<a name="line-8"></a>
|
||||
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
|
||||
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
<a name="line-12"></a>GNU General Public License for more details.
|
||||
<a name="line-13"></a>
|
||||
<a name="line-14"></a>You should have received a copy of the GNU General Public License
|
||||
<a name="line-15"></a>along with this program; if not, write to the Free Software
|
||||
<a name="line-16"></a>Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
<a name="line-17"></a>--}</span>
|
||||
<a name="line-18"></a>
|
||||
<a name="line-19"></a>
|
||||
<a name="line-20"></a><span class='hs-comment'>{-# OPTIONS_HADDOCK ignore-exports #-}</span>
|
||||
<a name="line-21"></a>
|
||||
<a name="line-22"></a>
|
||||
<a name="line-23"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Plugins</span> <span class='hs-keyword'>where</span>
|
||||
<a name="line-24"></a>
|
||||
<a name="line-25"></a>
|
||||
<a name="line-26"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-27"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span>
|
||||
<a name="line-28"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-29"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-30"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Settings</span>
|
||||
<a name="line-31"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Settings</span>
|
||||
<a name="line-33"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
|
||||
<a name="line-34"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-35"></a> <span class='hs-varid'>forM</span>
|
||||
<a name="line-36"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>forM_</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>void</span>
|
||||
<a name="line-38"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-39"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Process</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span>
|
||||
<a name="line-40"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-41"></a> <span class='hs-varid'>executeFile</span>
|
||||
<a name="line-42"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>forkProcess</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-44"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span>
|
||||
<a name="line-45"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-46"></a> <span class='hs-varid'>fromString</span>
|
||||
<a name="line-47"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-48"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>BS</span>
|
||||
<a name="line-49"></a>
|
||||
<a name="line-50"></a>
|
||||
<a name="line-51"></a>
|
||||
<a name="line-52"></a>
|
||||
<a name="line-53"></a>
|
||||
<a name="line-54"></a> <span class='hs-comment'>---------------</span>
|
||||
<a name="line-55"></a> <span class='hs-comment'>--[ Plugins ]--</span>
|
||||
<a name="line-56"></a> <span class='hs-comment'>---------------</span>
|
||||
<a name="line-57"></a>
|
||||
<a name="line-58"></a>
|
||||
<a name="line-59"></a>
|
||||
<a name="line-60"></a>
|
||||
<a name="line-61"></a><span class='hs-comment'>---- Global settings ----</span>
|
||||
<a name="line-62"></a>
|
||||
<a name="line-63"></a>
|
||||
<a name="line-64"></a>
|
||||
<a name="line-65"></a><a name="insertPos"></a><span class='hs-comment'>-- |Where to start inserting plugins.</span>
|
||||
<a name="line-66"></a><span class='hs-definition'>insertPos</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Int</span>
|
||||
<a name="line-67"></a><span class='hs-definition'>insertPos</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>4</span>
|
||||
<a name="line-68"></a>
|
||||
<a name="line-69"></a>
|
||||
<a name="line-70"></a><a name="myplugins"></a><span class='hs-comment'>-- |A list of plugins to add to the right-click menu at position</span>
|
||||
<a name="line-71"></a><span class='hs-comment'>-- `insertPos`.</span>
|
||||
<a name="line-72"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-73"></a><span class='hs-comment'>-- The left part of the triple is a function that returns the menuitem.</span>
|
||||
<a name="line-74"></a><span class='hs-comment'>-- The middle part of the triple is a filter function that</span>
|
||||
<a name="line-75"></a><span class='hs-comment'>-- decides whether the item is shown.</span>
|
||||
<a name="line-76"></a><span class='hs-comment'>-- The right part of the triple is the callback, which is invoked</span>
|
||||
<a name="line-77"></a><span class='hs-comment'>-- when the menu item is clicked.</span>
|
||||
<a name="line-78"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-79"></a><span class='hs-comment'>-- Plugins are added in order of this list.</span>
|
||||
<a name="line-80"></a><span class='hs-definition'>myplugins</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>MenuItem</span>
|
||||
<a name="line-81"></a> <span class='hs-layout'>,</span><span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Bool</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>,</span><span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
|
||||
<a name="line-83"></a> <span class='hs-keyglyph'>]</span>
|
||||
<a name="line-84"></a><span class='hs-definition'>myplugins</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-varid'>diffItem</span><span class='hs-layout'>,</span> <span class='hs-varid'>diffFilter</span><span class='hs-layout'>,</span> <span class='hs-varid'>diffCallback</span><span class='hs-layout'>)</span>
|
||||
<a name="line-85"></a> <span class='hs-keyglyph'>]</span>
|
||||
<a name="line-86"></a>
|
||||
<a name="line-87"></a>
|
||||
<a name="line-88"></a>
|
||||
<a name="line-89"></a>
|
||||
<a name="line-90"></a>
|
||||
<a name="line-91"></a><span class='hs-comment'>---- The plugins ----</span>
|
||||
<a name="line-92"></a>
|
||||
<a name="line-93"></a>
|
||||
<a name="line-94"></a>
|
||||
<a name="line-95"></a><a name="diffItem"></a><span class='hs-definition'>diffItem</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MenuItem</span>
|
||||
<a name="line-96"></a><span class='hs-definition'>diffItem</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>menuItemNewWithLabel</span> <span class='hs-str'>"diff"</span>
|
||||
<a name="line-97"></a>
|
||||
<a name="line-98"></a><a name="diffFilter"></a><span class='hs-definition'>diffFilter</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Bool</span>
|
||||
<a name="line-99"></a><span class='hs-definition'>diffFilter</span> <span class='hs-varid'>items</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span>
|
||||
<a name="line-100"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>length</span> <span class='hs-varid'>items</span> <span class='hs-varop'>></span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>and</span> <span class='hs-varop'>$</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>isFileC</span> <span class='hs-varid'>items</span>
|
||||
<a name="line-101"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>otherwise</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-102"></a>
|
||||
<a name="line-103"></a><a name="diffCallback"></a><span class='hs-definition'>diffCallback</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-104"></a><span class='hs-definition'>diffCallback</span> <span class='hs-varid'>items</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-105"></a> <span class='hs-varid'>forkProcess</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-106"></a> <span class='hs-varid'>executeFile</span>
|
||||
<a name="line-107"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"meld"</span><span class='hs-layout'>)</span>
|
||||
<a name="line-108"></a> <span class='hs-conid'>True</span>
|
||||
<a name="line-109"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>[</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"--diff"</span><span class='hs-keyglyph'>]</span> <span class='hs-varop'>++</span> <span class='hs-varid'>fmap</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span> <span class='hs-varid'>items</span><span class='hs-layout'>)</span>
|
||||
<a name="line-110"></a> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-111"></a>
|
||||
</pre></body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user