Lastest docs updated
travis build: 26
commit: 3e4621fe70
auto-pushed to gh-pages
This commit is contained in:
parent
5469c14b34
commit
00a849b03a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +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 src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" 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 id="v:version" class="def">version</a> :: <a href="https://hackage.haskell.org/package/Cabal-1.25.0.0/docs/Distribution-Version.html#t:Version">Version</a> <a href="src/Paths_hsfm.html#version" class="link">Source</a> <a href="#v:version" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getBinDir" class="def">getBinDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getBinDir" class="link">Source</a> <a href="#v:getBinDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getLibDir" class="def">getLibDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getLibDir" class="link">Source</a> <a href="#v:getLibDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getDataDir" class="def">getDataDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getDataDir" class="link">Source</a> <a href="#v:getDataDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getLibexecDir" class="def">getLibexecDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getLibexecDir" class="link">Source</a> <a href="#v:getLibexecDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getDataFileName" class="def">getDataFileName</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> -> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getDataFileName" class="link">Source</a> <a href="#v:getDataFileName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getSysconfDir" class="def">getSysconfDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getSysconfDir" class="link">Source</a> <a href="#v:getSysconfDir" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></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 id="v:version" class="def">version</a> :: <a href="https://hackage.haskell.org/package/Cabal-1.24.0.0/docs/Distribution-Version.html#t:Version">Version</a> <a href="src/Paths_hsfm.html#version" class="link">Source</a> <a href="#v:version" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getBinDir" class="def">getBinDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getBinDir" class="link">Source</a> <a href="#v:getBinDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getLibDir" class="def">getLibDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getLibDir" class="link">Source</a> <a href="#v:getLibDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getDataDir" class="def">getDataDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getDataDir" class="link">Source</a> <a href="#v:getDataDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getLibexecDir" class="def">getLibexecDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getLibexecDir" class="link">Source</a> <a href="#v:getLibexecDir" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getDataFileName" class="def">getDataFileName</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> -> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getDataFileName" class="link">Source</a> <a href="#v:getDataFileName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getSysconfDir" class="def">getSysconfDir</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO">IO</a> <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:FilePath">FilePath</a> <a href="src/Paths_hsfm.html#getSysconfDir" class="link">Source</a> <a href="#v:getSysconfDir" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|
File diff suppressed because one or more lines are too long
@ -1,4 +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 src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" 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-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">newTabHere</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newTabHere">HSFM.GUI.Gtk.Callbacks</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></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|
||||
</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-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">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></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|
@ -1,4 +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 src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" 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-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">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">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">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.17.2</p></div></body></html>
|
||||
</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-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">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">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.17.2</p></div></body></html>
|
File diff suppressed because one or more lines are too long
BIN
hsfm.haddock
BIN
hsfm.haddock
Binary file not shown.
@ -1,4 +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 src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" 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:newTabHere" target="main">newTabHere</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:goHistoryPrev" target="main">goHistoryPrev</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryNext" target="main">goHistoryNext</a></p></div></div></body></html>
|
||||
</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:goHistoryPrev" target="main">goHistoryPrev</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryNext" target="main">goHistoryNext</a></p></div></div></body></html>
|
@ -238,339 +238,337 @@
|
||||
<a name="line-229"></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-230"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Control</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-231"></a> <span class='hs-str'>"t"</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-232"></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-keyword'>do</span>
|
||||
<a name="line-233"></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-234"></a> <span class='hs-varid'>newTabHere</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>cwd</span>
|
||||
<a name="line-235"></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-236"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Control</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-237"></a> <span class='hs-str'>"w"</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-238"></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-239"></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-240"></a> <span class='hs-str'>"F4"</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-241"></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-242"></a>
|
||||
<a name="line-243"></a> <span class='hs-comment'>-- mouse button click</span>
|
||||
<a name="line-244"></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-245"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-246"></a> <span class='hs-varid'>t</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventTime</span>
|
||||
<a name="line-247"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-248"></a> <span class='hs-conid'>RightButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-249"></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-layout'>(</span><span class='hs-varid'>rcMenu</span> <span class='hs-varop'>.</span> <span class='hs-varid'>rcmenu</span> <span class='hs-varop'>$</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-250"></a> <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-251"></a> <span class='hs-comment'>-- this is just to not screw with current selection</span>
|
||||
<a name="line-252"></a> <span class='hs-comment'>-- on right-click</span>
|
||||
<a name="line-253"></a> <span class='hs-comment'>-- TODO: this misbehaves under IconView</span>
|
||||
<a name="line-254"></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-255"></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-256"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-257"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-258"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-259"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-260"></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-261"></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-262"></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-263"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-264"></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-265"></a> <span class='hs-conid'>MiddleButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-266"></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-267"></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-268"></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-269"></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-270"></a>
|
||||
<a name="line-271"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mitem</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-272"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-273"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-274"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-275"></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-276"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newTabHere</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-277"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-278"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-279"></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-280"></a>
|
||||
<a name="line-281"></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-282"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryPrev</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-283"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-284"></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-285"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryNext</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-286"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-287"></a> <span class='hs-comment'>-- not right-click, so pass on the signal</span>
|
||||
<a name="line-288"></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-289"></a>
|
||||
<a name="line-290"></a> <span class='hs-comment'>-- right click menu</span>
|
||||
<a name="line-291"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileOpen</span> <span class='hs-varop'>.</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-292"></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-293"></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-varop'>.</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-294"></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-295"></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-varop'>.</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-296"></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-297"></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-varop'>.</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-298"></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-299"></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-varop'>.</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-300"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-301"></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-302"></a> <span class='hs-varid'>newTabHere</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>cwd</span>
|
||||
<a name="line-303"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileNewTabHere</span> <span class='hs-varop'>.</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-304"></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-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>items</span> <span class='hs-varid'>mygui'</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-305"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>items</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newTabHere</span> <span class='hs-varid'>mygui'</span>
|
||||
<a name="line-306"></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-varop'>.</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-307"></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-308"></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-varop'>.</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-309"></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-310"></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-varop'>.</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-311"></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-312"></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-varop'>.</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-313"></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-314"></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-varop'>.</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-315"></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-316"></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-varop'>.</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-317"></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-318"></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-varop'>.</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-319"></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-320"></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-varop'>.</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-321"></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-322"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-323"></a>
|
||||
<a name="line-324"></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-325"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>fmv</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-326"></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-327"></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-328"></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-329"></a> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-330"></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-331"></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-232"></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-233"></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-234"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Control</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-235"></a> <span class='hs-str'>"w"</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-236"></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-237"></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-238"></a> <span class='hs-str'>"F4"</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-239"></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-240"></a>
|
||||
<a name="line-241"></a> <span class='hs-comment'>-- mouse button click</span>
|
||||
<a name="line-242"></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-243"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-244"></a> <span class='hs-varid'>t</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventTime</span>
|
||||
<a name="line-245"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-246"></a> <span class='hs-conid'>RightButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-247"></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-layout'>(</span><span class='hs-varid'>rcMenu</span> <span class='hs-varop'>.</span> <span class='hs-varid'>rcmenu</span> <span class='hs-varop'>$</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-248"></a> <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-249"></a> <span class='hs-comment'>-- this is just to not screw with current selection</span>
|
||||
<a name="line-250"></a> <span class='hs-comment'>-- on right-click</span>
|
||||
<a name="line-251"></a> <span class='hs-comment'>-- TODO: this misbehaves under IconView</span>
|
||||
<a name="line-252"></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-253"></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-254"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-255"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-256"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-257"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-258"></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-259"></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-260"></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-261"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-262"></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-263"></a> <span class='hs-conid'>MiddleButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-264"></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-265"></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-266"></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-267"></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-268"></a>
|
||||
<a name="line-269"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mitem</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-270"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-271"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-272"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-273"></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-274"></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'>item</span>
|
||||
<a name="line-275"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-276"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-277"></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-278"></a>
|
||||
<a name="line-279"></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-280"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryPrev</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-281"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-282"></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-283"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryNext</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-284"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-285"></a> <span class='hs-comment'>-- not right-click, so pass on the signal</span>
|
||||
<a name="line-286"></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-287"></a>
|
||||
<a name="line-288"></a> <span class='hs-comment'>-- right click menu</span>
|
||||
<a name="line-289"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>rcFileOpen</span> <span class='hs-varop'>.</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-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'>open</span>
|
||||
<a name="line-291"></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-varop'>.</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-292"></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-293"></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-varop'>.</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-294"></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-295"></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-varop'>.</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-296"></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-297"></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-varop'>.</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-298"></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-299"></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-varop'>.</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-300"></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-301"></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-varop'>.</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-302"></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-303"></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-varop'>.</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-304"></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-305"></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-varop'>.</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-306"></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-307"></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-varop'>.</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-308"></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-309"></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-varop'>.</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-310"></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-311"></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-varop'>.</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-312"></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-313"></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-varop'>.</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-314"></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-315"></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-varop'>.</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-316"></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-317"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-318"></a>
|
||||
<a name="line-319"></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-320"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>fmv</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-321"></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-322"></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-323"></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-324"></a> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-325"></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-326"></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-327"></a>
|
||||
<a name="line-328"></a>
|
||||
<a name="line-329"></a>
|
||||
<a name="line-330"></a>
|
||||
<a name="line-331"></a><span class='hs-comment'>---- OTHER ----</span>
|
||||
<a name="line-332"></a>
|
||||
<a name="line-333"></a>
|
||||
<a name="line-334"></a>
|
||||
<a name="line-335"></a>
|
||||
<a name="line-336"></a><span class='hs-comment'>---- OTHER ----</span>
|
||||
<a name="line-337"></a>
|
||||
<a name="line-338"></a>
|
||||
<a name="line-339"></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-340"></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-341"></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-342"></a> <span class='hs-comment'>-- TODO: make terminal configurable</span>
|
||||
<a name="line-343"></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-conid'>SPP</span><span class='hs-varop'>.</span><span class='hs-varid'>executeFile</span> <span class='hs-str'>"sakura"</span> <span class='hs-conid'>True</span> <span class='hs-keyglyph'>[</span><span class='hs-str'>"-d"</span><span class='hs-layout'>,</span> <span class='hs-varid'>cwd</span><span class='hs-keyglyph'>]</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-334"></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-335"></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-336"></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-337"></a> <span class='hs-comment'>-- TODO: make terminal configurable</span>
|
||||
<a name="line-338"></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-conid'>SPP</span><span class='hs-varop'>.</span><span class='hs-varid'>executeFile</span> <span class='hs-str'>"sakura"</span> <span class='hs-conid'>True</span> <span class='hs-keyglyph'>[</span><span class='hs-str'>"-d"</span><span class='hs-layout'>,</span> <span class='hs-varid'>cwd</span><span class='hs-keyglyph'>]</span> <span class='hs-conid'>Nothing</span>
|
||||
<a name="line-339"></a>
|
||||
<a name="line-340"></a>
|
||||
<a name="line-341"></a>
|
||||
<a name="line-342"></a>
|
||||
<a name="line-343"></a><span class='hs-comment'>---- TAB OPERATIONS ----</span>
|
||||
<a name="line-344"></a>
|
||||
<a name="line-345"></a>
|
||||
<a name="line-346"></a>
|
||||
<a name="line-347"></a>
|
||||
<a name="line-348"></a><span class='hs-comment'>---- TAB OPERATIONS ----</span>
|
||||
<a name="line-349"></a>
|
||||
<a name="line-350"></a>
|
||||
<a name="line-351"></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-352"></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-353"></a><span class='hs-definition'>closeTab</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-354"></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'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-355"></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'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-356"></a>
|
||||
<a name="line-346"></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-347"></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-348"></a><span class='hs-definition'>closeTab</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-349"></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'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-350"></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'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-351"></a>
|
||||
<a name="line-352"></a>
|
||||
<a name="line-353"></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-354"></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-355"></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-356"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</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-357"></a>
|
||||
<a name="line-358"></a><a name="newTabHere"></a><span class='hs-definition'>newTabHere</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</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-359"></a><span class='hs-definition'>newTabHere</span> <span class='hs-varid'>mygui</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-360"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</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-361"></a><span class='hs-definition'>newTabHere</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-362"></a>
|
||||
<a name="line-358"></a>
|
||||
<a name="line-359"></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'>Item</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-360"></a><span class='hs-definition'>opeInNewTab</span> <span class='hs-varid'>mygui</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-361"></a> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>withErrorDialog</span> <span class='hs-varop'>$</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</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-362"></a><span class='hs-definition'>opeInNewTab</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-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'>---- FILE OPERATION CALLBACKS (COPY, MOVE, ...) ----</span>
|
||||
<a name="line-366"></a><span class='hs-comment'>---- FILE OPERATION CALLBACKS (COPY, MOVE, ...) ----</span>
|
||||
<a name="line-367"></a>
|
||||
<a name="line-368"></a>
|
||||
<a name="line-369"></a>
|
||||
<a name="line-370"></a><a name="del"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Deletes a file or directory.</span>
|
||||
<a name="line-371"></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-372"></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-373"></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-374"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span>
|
||||
<a name="line-375"></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-376"></a><span class='hs-comment'>-- this throws on the first error that occurs</span>
|
||||
<a name="line-377"></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-378"></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-379"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span>
|
||||
<a name="line-380"></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-381"></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-382"></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-383"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-369"></a><a name="del"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Deletes a file or directory.</span>
|
||||
<a name="line-370"></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-371"></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-372"></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-373"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span>
|
||||
<a name="line-374"></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-375"></a><span class='hs-comment'>-- this throws on the first error that occurs</span>
|
||||
<a name="line-376"></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-377"></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-378"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span>
|
||||
<a name="line-379"></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-380"></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-381"></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-382"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-383"></a>
|
||||
<a name="line-384"></a>
|
||||
<a name="line-385"></a>
|
||||
<a name="line-386"></a><a name="moveInit"></a><span class='hs-comment'>-- |Initializes a file move operation.</span>
|
||||
<a name="line-387"></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-388"></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-389"></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-390"></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-391"></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-392"></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-393"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-394"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-395"></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-396"></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-397"></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-398"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-399"></a>
|
||||
<a name="line-400"></a><a name="copyInit"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Initializes a file copy operation.</span>
|
||||
<a name="line-401"></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-402"></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-403"></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-404"></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-405"></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-406"></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-407"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-408"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-409"></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-410"></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-411"></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-412"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-385"></a><a name="moveInit"></a><span class='hs-comment'>-- |Initializes a file move operation.</span>
|
||||
<a name="line-386"></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-387"></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-388"></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-389"></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-390"></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-391"></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-392"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-393"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-394"></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-395"></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-396"></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-397"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-398"></a>
|
||||
<a name="line-399"></a><a name="copyInit"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Initializes a file copy operation.</span>
|
||||
<a name="line-400"></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-401"></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-402"></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-403"></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-404"></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-405"></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-406"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-407"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-408"></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-409"></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-410"></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-411"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-412"></a>
|
||||
<a name="line-413"></a>
|
||||
<a name="line-414"></a>
|
||||
<a name="line-415"></a><a name="operationFinal"></a><span class='hs-comment'>-- |Finalizes a file operation, such as copy or move.</span>
|
||||
<a name="line-416"></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-417"></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-418"></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-419"></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-420"></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-421"></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-422"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>op</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-423"></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-424"></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-425"></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-426"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-427"></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-428"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-429"></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-430"></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-431"></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-432"></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-433"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-434"></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-435"></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-436"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-437"></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-438"></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-439"></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-414"></a><a name="operationFinal"></a><span class='hs-comment'>-- |Finalizes a file operation, such as copy or move.</span>
|
||||
<a name="line-415"></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-416"></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-417"></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-418"></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-419"></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-420"></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-421"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>op</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-422"></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-423"></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-424"></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-425"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-426"></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-427"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-428"></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-429"></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-430"></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-431"></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-432"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-433"></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-434"></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-435"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-436"></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-437"></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-438"></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-439"></a>
|
||||
<a name="line-440"></a>
|
||||
<a name="line-441"></a>
|
||||
<a name="line-442"></a><a name="newFile"></a><span class='hs-comment'>-- |Create a new file.</span>
|
||||
<a name="line-443"></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-444"></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-445"></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-446"></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-447"></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-448"></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-449"></a> <span class='hs-varid'>createRegularFile</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-441"></a><a name="newFile"></a><span class='hs-comment'>-- |Create a new file.</span>
|
||||
<a name="line-442"></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-443"></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-444"></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-445"></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-446"></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-447"></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-448"></a> <span class='hs-varid'>createRegularFile</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-449"></a>
|
||||
<a name="line-450"></a>
|
||||
<a name="line-451"></a>
|
||||
<a name="line-452"></a><a name="newDir"></a><span class='hs-comment'>-- |Create a new directory.</span>
|
||||
<a name="line-453"></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-454"></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-455"></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-456"></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-457"></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-458"></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-459"></a> <span class='hs-varid'>createDir</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-451"></a><a name="newDir"></a><span class='hs-comment'>-- |Create a new directory.</span>
|
||||
<a name="line-452"></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-453"></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-454"></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-455"></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-456"></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-457"></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-458"></a> <span class='hs-varid'>createDir</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-459"></a>
|
||||
<a name="line-460"></a>
|
||||
<a name="line-461"></a>
|
||||
<a name="line-462"></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-463"></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-464"></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-465"></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-466"></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-467"></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-468"></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-469"></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-470"></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-471"></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-472"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-473"></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-474"></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-475"></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-476"></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-477"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-461"></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-462"></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-463"></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-464"></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-465"></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-466"></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-467"></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-468"></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-469"></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-470"></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-471"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-472"></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-473"></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-474"></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-475"></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-476"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-477"></a>
|
||||
<a name="line-478"></a>
|
||||
<a name="line-479"></a>
|
||||
<a name="line-480"></a>
|
||||
<a name="line-481"></a>
|
||||
<a name="line-482"></a><span class='hs-comment'>---- DIRECTORY TRAVERSAL AND FILE OPENING CALLBACKS ----</span>
|
||||
<a name="line-481"></a><span class='hs-comment'>---- DIRECTORY TRAVERSAL AND FILE OPENING CALLBACKS ----</span>
|
||||
<a name="line-482"></a>
|
||||
<a name="line-483"></a>
|
||||
<a name="line-484"></a>
|
||||
<a name="line-485"></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-486"></a><span class='hs-comment'>-- treeView.</span>
|
||||
<a name="line-487"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-488"></a><span class='hs-comment'>-- If the url is invalid, does nothing.</span>
|
||||
<a name="line-489"></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-490"></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-491"></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-492"></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-493"></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-494"></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-484"></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-485"></a><span class='hs-comment'>-- treeView.</span>
|
||||
<a name="line-486"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-487"></a><span class='hs-comment'>-- If the url is invalid, does nothing.</span>
|
||||
<a name="line-488"></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-489"></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-490"></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-491"></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-492"></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-493"></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-494"></a>
|
||||
<a name="line-495"></a>
|
||||
<a name="line-496"></a>
|
||||
<a name="line-497"></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-498"></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-499"></a> <span class='hs-varid'>mhomedir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getEnv</span> <span class='hs-str'>"HOME"</span>
|
||||
<a name="line-500"></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-varop'>=<<</span> <span class='hs-varid'>mhomedir</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-501"></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-502"></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-496"></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-497"></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-498"></a> <span class='hs-varid'>mhomedir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getEnv</span> <span class='hs-str'>"HOME"</span>
|
||||
<a name="line-499"></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-varop'>=<<</span> <span class='hs-varid'>mhomedir</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-500"></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-501"></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-502"></a>
|
||||
<a name="line-503"></a>
|
||||
<a name="line-504"></a>
|
||||
<a name="line-505"></a><a name="execute"></a><span class='hs-comment'>-- |Execute a given file.</span>
|
||||
<a name="line-506"></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-507"></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-508"></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-509"></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-510"></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-511"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-504"></a><a name="execute"></a><span class='hs-comment'>-- |Execute a given file.</span>
|
||||
<a name="line-505"></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-506"></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-507"></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-508"></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-509"></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-510"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-511"></a>
|
||||
<a name="line-512"></a>
|
||||
<a name="line-513"></a>
|
||||
<a name="line-514"></a><a name="open"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Opens a file or directory.</span>
|
||||
<a name="line-515"></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-516"></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-517"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>item</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-518"></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-519"></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-520"></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-521"></a> <span class='hs-varid'>r</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-522"></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-523"></a><span class='hs-comment'>-- this throws on the first error that occurs</span>
|
||||
<a name="line-524"></a><span class='hs-definition'>open</span> <span class='hs-layout'>(</span><span class='hs-conid'>FileLikeList</span> <span class='hs-varid'>fs</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>
|
||||
<a name="line-525"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>fs</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>f</span> <span class='hs-keyglyph'>-></span> <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'>f</span>
|
||||
<a name="line-526"></a><span class='hs-definition'>open</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-527"></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-528"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-529"></a>
|
||||
<a name="line-530"></a>
|
||||
<a name="line-531"></a><a name="upDir"></a><span class='hs-comment'>-- |Go up one directory and visualize it in the treeView.</span>
|
||||
<a name="line-532"></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-533"></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-534"></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-535"></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-536"></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-537"></a>
|
||||
<a name="line-538"></a>
|
||||
<a name="line-539"></a><a name="goHistoryPrev"></a><span class='hs-comment'>-- |Go "back" in the history.</span>
|
||||
<a name="line-540"></a><span class='hs-definition'>goHistoryPrev</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-541"></a><span class='hs-definition'>goHistoryPrev</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-542"></a> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</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-543"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>hs</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-544"></a> <span class='hs-layout'>(</span><span class='hs-conid'>[]</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'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-545"></a> <span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-conop'>:</span><span class='hs-varid'>xs</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-546"></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-547"></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'>x</span>
|
||||
<a name="line-548"></a> <span class='hs-varid'>modifyTVarIO</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-549"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-varid'>n</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-varid'>xs</span><span class='hs-layout'>,</span> <span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span> <span class='hs-varop'>`addHistory`</span> <span class='hs-varid'>n</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-550"></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-551"></a>
|
||||
<a name="line-552"></a>
|
||||
<a name="line-553"></a><a name="goHistoryNext"></a><span class='hs-comment'>-- |Go "forth" in the history.</span>
|
||||
<a name="line-554"></a><span class='hs-definition'>goHistoryNext</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-555"></a><span class='hs-definition'>goHistoryNext</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-556"></a> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</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-557"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>hs</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-558"></a> <span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-559"></a> <span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-varid'>x</span><span class='hs-conop'>:</span><span class='hs-varid'>xs</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-560"></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-561"></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'>x</span>
|
||||
<a name="line-562"></a> <span class='hs-varid'>modifyTVarIO</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-563"></a> <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-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span> <span class='hs-varop'>`addHistory`</span> <span class='hs-varid'>p</span><span class='hs-layout'>,</span> <span class='hs-varid'>xs</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-564"></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-565"></a>
|
||||
<a name="line-513"></a><a name="open"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Opens a file or directory.</span>
|
||||
<a name="line-514"></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-515"></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-516"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>item</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-517"></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-518"></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-519"></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-520"></a> <span class='hs-varid'>r</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-521"></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-522"></a><span class='hs-definition'>open</span> <span class='hs-varid'>items</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-523"></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-524"></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-525"></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-layout'>)</span>
|
||||
<a name="line-526"></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-527"></a>
|
||||
<a name="line-528"></a>
|
||||
<a name="line-529"></a><a name="upDir"></a><span class='hs-comment'>-- |Go up one directory and visualize it in the treeView.</span>
|
||||
<a name="line-530"></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-531"></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-532"></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-533"></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-534"></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-535"></a>
|
||||
<a name="line-536"></a>
|
||||
<a name="line-537"></a><a name="goHistoryPrev"></a><span class='hs-comment'>-- |Go "back" in the history.</span>
|
||||
<a name="line-538"></a><span class='hs-definition'>goHistoryPrev</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-539"></a><span class='hs-definition'>goHistoryPrev</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-540"></a> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</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-541"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>hs</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-542"></a> <span class='hs-layout'>(</span><span class='hs-conid'>[]</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'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-543"></a> <span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-conop'>:</span><span class='hs-varid'>xs</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-544"></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-545"></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'>x</span>
|
||||
<a name="line-546"></a> <span class='hs-varid'>modifyTVarIO</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-547"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-varid'>n</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-varid'>xs</span><span class='hs-layout'>,</span> <span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span> <span class='hs-varop'>`addHistory`</span> <span class='hs-varid'>n</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-548"></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-549"></a>
|
||||
<a name="line-550"></a>
|
||||
<a name="line-551"></a><a name="goHistoryNext"></a><span class='hs-comment'>-- |Go "forth" in the history.</span>
|
||||
<a name="line-552"></a><span class='hs-definition'>goHistoryNext</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-553"></a><span class='hs-definition'>goHistoryNext</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-554"></a> <span class='hs-varid'>hs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</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-555"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>hs</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-556"></a> <span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-557"></a> <span class='hs-layout'>(</span><span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-varid'>x</span><span class='hs-conop'>:</span><span class='hs-varid'>xs</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-558"></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-559"></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'>x</span>
|
||||
<a name="line-560"></a> <span class='hs-varid'>modifyTVarIO</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-561"></a> <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-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span> <span class='hs-varop'>`addHistory`</span> <span class='hs-varid'>p</span><span class='hs-layout'>,</span> <span class='hs-varid'>xs</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-562"></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-563"></a>
|
||||
</pre></body>
|
||||
</html>
|
||||
|
@ -117,7 +117,7 @@
|
||||
<a name="line-108"></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-109"></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-110"></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-111"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileNewTabHere</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-111"></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-112"></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-113"></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-114"></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>
|
||||
|
@ -172,8 +172,8 @@
|
||||
<a name="line-163"></a> <span class='hs-str'>"rcFileNewDir"</span>
|
||||
<a name="line-164"></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-165"></a> <span class='hs-str'>"rcFileNewTab"</span>
|
||||
<a name="line-166"></a> <span class='hs-varid'>rcFileNewTabHere</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-167"></a> <span class='hs-str'>"rcFileNewTabHere"</span>
|
||||
<a name="line-166"></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-167"></a> <span class='hs-str'>"rcFileNewTerm"</span>
|
||||
<a name="line-168"></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-169"></a> <span class='hs-str'>"rcFileCut"</span>
|
||||
<a name="line-170"></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>
|
||||
|
Loading…
Reference in New Issue
Block a user