Lastest docs updated
travis build: 30
commit: 05a62cb382
auto-pushed to gh-pages
This commit is contained in:
parent
0c82156757
commit
3b8be2acf7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
HSFM-History.html
Normal file
6
HSFM-History.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.History</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script 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_HSFM-History.html");};
|
||||
//]]>
|
||||
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-History.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.History</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:BrowsingHistory">BrowsingHistory</a> = <a href="#v:BrowsingHistory">BrowsingHistory</a> {<ul class="subs"><li><a href="#v:backwardsHistory">backwardsHistory</a> :: [Path Abs]</li><li><a href="#v:currentDir">currentDir</a> :: Path Abs</li><li><a href="#v:forwardHistory">forwardHistory</a> :: [Path Abs]</li><li><a href="#v:maxSize">maxSize</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><a href="#v:goNewPath">goNewPath</a> :: Path Abs -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a></li><li class="src short"><a href="#v:goBack">goBack</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a></li><li class="src short"><a href="#v:goForward">goForward</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:BrowsingHistory" class="def">BrowsingHistory</a> <a href="src/HSFM-History.html#BrowsingHistory" class="link">Source</a> <a href="#t:BrowsingHistory" class="selflink">#</a></p><div class="doc"><p>Browsing history. For <code><a href="HSFM-History.html#v:forwardHistory">forwardHistory</a></code> and <code><a href="HSFM-History.html#v:backwardsHistory">backwardsHistory</a></code>
|
||||
the first item is the most recent one.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:BrowsingHistory" class="def">BrowsingHistory</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:backwardsHistory" class="def">backwardsHistory</a> :: [Path Abs]</dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:currentDir" class="def">currentDir</a> :: Path Abs</dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:forwardHistory" class="def">forwardHistory</a> :: [Path Abs]</dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:maxSize" class="def">maxSize</a> :: <a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Int.html#t:Int">Int</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><a id="v:goNewPath" class="def">goNewPath</a> :: Path Abs -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> <a href="src/HSFM-History.html#goNewPath" class="link">Source</a> <a href="#v:goNewPath" class="selflink">#</a></p><div class="doc"><p>This is meant to be called after e.g. a new path is entered
|
||||
(not navigated to via the history) and the history needs updating.</p></div></div><div class="top"><p class="src"><a id="v:goBack" class="def">goBack</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> <a href="src/HSFM-History.html#goBack" class="link">Source</a> <a href="#v:goBack" class="selflink">#</a></p><div class="doc"><p>Go back in the history.</p></div></div><div class="top"><p class="src"><a id="v:goForward" class="def">goForward</a> :: <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> -> <a href="HSFM-History.html#t:BrowsingHistory">BrowsingHistory</a> <a href="src/HSFM-History.html#goForward" class="link">Source</a> <a href="#v:goForward" class="selflink">#</a></p><div class="doc"><p>Go forward in the history.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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>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>
|
@ -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 - A)</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 - A</p><table><tr><td class="src">accessTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:accessTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">accessTimeHiRes</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:accessTimeHiRes">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">addHistory</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:addHistory">HSFM.GUI.Gtk.Utils</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - A</p><table><tr><td class="src">accessTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:accessTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">accessTimeHiRes</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:accessTimeHiRes">HSFM.FileSystem.FileType</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - B)</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 - B</p><table><tr><td class="src">BlockDev</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:BlockDev">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">BrokenSymlink</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:BrokenSymlink">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">brokenSymlink</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:brokenSymlink">HSFM.FileSystem.FileType</a></td></tr></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 - B</p><table><tr><td class="src">backwardsHistory</td><td class="module"><a href="HSFM-History.html#v:backwardsHistory">HSFM.History</a></td></tr><tr><td class="src">BlockDev</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:BlockDev">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">BrokenSymlink</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:BrokenSymlink">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">brokenSymlink</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:brokenSymlink">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">BrowsingHistory</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-History.html#t:BrowsingHistory">HSFM.History</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-History.html#v:BrowsingHistory">HSFM.History</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - C)</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 - C</p><table><tr><td class="src">CharDev</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:CharDev">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">clearStatusBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:clearStatusBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">closeTab</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:closeTab">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">comparingConstr</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:comparingConstr">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">constructView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:constructView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">Copy</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#t:Copy">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:Copy">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">copyInit</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:copyInit">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">createIconView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createIconView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">createMyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-MyGUI.html#v:createMyGUI">HSFM.GUI.Gtk.MyGUI</a></td></tr><tr><td class="src">createMyView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createMyView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">createTreeView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createTreeView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">cwd</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:cwd">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">c_strlen</td><td class="module"><a href="HSFM-GUI-Glib-GlibString.html#v:c_strlen">HSFM.GUI.Glib.GlibString</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - C</p><table><tr><td class="src">CharDev</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:CharDev">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">clearStatusBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:clearStatusBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">closeTab</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:closeTab">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">comparingConstr</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:comparingConstr">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">constructView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:constructView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">Copy</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#t:Copy">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:Copy">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">copyInit</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:copyInit">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">createIconView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createIconView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">createMyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-MyGUI.html#v:createMyGUI">HSFM.GUI.Gtk.MyGUI</a></td></tr><tr><td class="src">createMyView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createMyView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">createTreeView</td><td class="module"><a href="HSFM-GUI-Gtk-MyView.html#v:createTreeView">HSFM.GUI.Gtk.MyView</a></td></tr><tr><td class="src">currentDir</td><td class="module"><a href="HSFM-History.html#v:currentDir">HSFM.History</a></td></tr><tr><td class="src">cwd</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:cwd">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">c_strlen</td><td class="module"><a href="HSFM-GUI-Glib-GlibString.html#v:c_strlen">HSFM.GUI.Glib.GlibString</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - G)</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 - G</p><table><tr><td class="src">getBinDir</td><td class="module"><a href="Paths_hsfm.html#v:getBinDir">Paths_hsfm</a></td></tr><tr><td class="src">getContents</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getContents">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getCurrentDir</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getCurrentDir">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getDataDir</td><td class="module"><a href="Paths_hsfm.html#v:getDataDir">Paths_hsfm</a></td></tr><tr><td class="src">getDataFileName</td><td class="module"><a href="Paths_hsfm.html#v:getDataFileName">Paths_hsfm</a></td></tr><tr><td class="src">getFileInfo</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFileInfo">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getFirstItem</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getFirstItem">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getFPasStr</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFPasStr">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getFreeVar</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFreeVar">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:getIcon">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">getLibDir</td><td class="module"><a href="Paths_hsfm.html#v:getLibDir">Paths_hsfm</a></td></tr><tr><td class="src">getLibexecDir</td><td class="module"><a href="Paths_hsfm.html#v:getLibexecDir">Paths_hsfm</a></td></tr><tr><td class="src">getSelectedItems</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedItems">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getSelectedTreePaths</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedTreePaths">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getSymlinkIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:getSymlinkIcon">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">getSysconfDir</td><td class="module"><a href="Paths_hsfm.html#v:getSysconfDir">Paths_hsfm</a></td></tr><tr><td class="src">goDir</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:goDir">HSFM.GUI.Gtk.Callbacks.Utils</a></td></tr><tr><td class="src">goHistoryNext</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryNext">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goHistoryPrev</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryPrev">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goHome</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHome">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goUp</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:goUp">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">goUp'</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:goUp-39-">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">GtkException</td><td class="module"><a href="HSFM-GUI-Gtk-Errors.html#t:GtkException">HSFM.GUI.Gtk.Errors</a></td></tr><tr><td class="src">GtkIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon">HSFM.GUI.Gtk.Icons</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - G</p><table><tr><td class="src">getBinDir</td><td class="module"><a href="Paths_hsfm.html#v:getBinDir">Paths_hsfm</a></td></tr><tr><td class="src">getContents</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getContents">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getCurrentDir</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getCurrentDir">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getDataDir</td><td class="module"><a href="Paths_hsfm.html#v:getDataDir">Paths_hsfm</a></td></tr><tr><td class="src">getDataFileName</td><td class="module"><a href="Paths_hsfm.html#v:getDataFileName">Paths_hsfm</a></td></tr><tr><td class="src">getFileInfo</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFileInfo">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getFirstItem</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getFirstItem">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getFPasStr</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFPasStr">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getFreeVar</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:getFreeVar">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">getIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:getIcon">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">getLibDir</td><td class="module"><a href="Paths_hsfm.html#v:getLibDir">Paths_hsfm</a></td></tr><tr><td class="src">getLibexecDir</td><td class="module"><a href="Paths_hsfm.html#v:getLibexecDir">Paths_hsfm</a></td></tr><tr><td class="src">getSelectedItems</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedItems">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getSelectedTreePaths</td><td class="module"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedTreePaths">HSFM.GUI.Gtk.Utils</a></td></tr><tr><td class="src">getSymlinkIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#v:getSymlinkIcon">HSFM.GUI.Gtk.Icons</a></td></tr><tr><td class="src">getSysconfDir</td><td class="module"><a href="Paths_hsfm.html#v:getSysconfDir">Paths_hsfm</a></td></tr><tr><td class="src">goBack</td><td class="module"><a href="HSFM-History.html#v:goBack">HSFM.History</a></td></tr><tr><td class="src">goDir</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html#v:goDir">HSFM.GUI.Gtk.Callbacks.Utils</a></td></tr><tr><td class="src">goForward</td><td class="module"><a href="HSFM-History.html#v:goForward">HSFM.History</a></td></tr><tr><td class="src">goHistoryBack</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryBack">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goHistoryForward</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryForward">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goHome</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHome">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">goNewPath</td><td class="module"><a href="HSFM-History.html#v:goNewPath">HSFM.History</a></td></tr><tr><td class="src">goUp</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:goUp">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">goUp'</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:goUp-39-">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">GtkException</td><td class="module"><a href="HSFM-GUI-Gtk-Errors.html#t:GtkException">HSFM.GUI.Gtk.Errors</a></td></tr><tr><td class="src">GtkIcon</td><td class="module"><a href="HSFM-GUI-Gtk-Icons.html#t:GtkIcon">HSFM.GUI.Gtk.Icons</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - M)</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 - M</p><table><tr><td class="src">main</td><td class="module"><a href="Main.html#v:main">Main</a></td></tr><tr><td class="src">maybeD</td><td class="module"><a href="HSFM-Utils-MyPrelude.html#v:maybeD">HSFM.Utils.MyPrelude</a></td></tr><tr><td class="src">MenuBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MenuBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubarFileQuit</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubarFileQuit">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubarHelpAbout</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubarHelpAbout">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkFilePropertyGrid</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkFilePropertyGrid">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkFMSettings</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkFMSettings">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMenuBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMenuBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMyGUI">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMyView</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMyView">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkRightClickMenu</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkRightClickMenu">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">modificationTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:modificationTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">modificationTimeHiRes</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:modificationTimeHiRes">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">modifyTVarIO</td><td class="module"><a href="HSFM-Utils-IO.html#v:modifyTVarIO">HSFM.Utils.IO</a></td></tr><tr><td class="src">Move</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#t:Move">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:Move">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">moveInit</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:moveInit">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">MyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MyView</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MyView">HSFM.GUI.Gtk.Data</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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 - M</p><table><tr><td class="src">main</td><td class="module"><a href="Main.html#v:main">Main</a></td></tr><tr><td class="src">maxSize</td><td class="module"><a href="HSFM-History.html#v:maxSize">HSFM.History</a></td></tr><tr><td class="src">maybeD</td><td class="module"><a href="HSFM-Utils-MyPrelude.html#v:maybeD">HSFM.Utils.MyPrelude</a></td></tr><tr><td class="src">MenuBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MenuBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubarFileQuit</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubarFileQuit">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">menubarHelpAbout</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:menubarHelpAbout">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkFilePropertyGrid</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkFilePropertyGrid">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkFMSettings</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkFMSettings">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMenuBar</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMenuBar">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMyGUI">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkMyView</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkMyView">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MkRightClickMenu</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#v:MkRightClickMenu">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">modificationTime</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:modificationTime">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">modificationTimeHiRes</td><td class="module"><a href="HSFM-FileSystem-FileType.html#v:modificationTimeHiRes">HSFM.FileSystem.FileType</a></td></tr><tr><td class="src">modifyTVarIO</td><td class="module"><a href="HSFM-Utils-IO.html#v:modifyTVarIO">HSFM.Utils.IO</a></td></tr><tr><td class="src">Move</td><td> </td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#t:Move">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="HSFM-FileSystem-UtilTypes.html#v:Move">HSFM.FileSystem.UtilTypes</a></td></tr><tr><td class="src">moveInit</td><td class="module"><a href="HSFM-GUI-Gtk-Callbacks.html#v:moveInit">HSFM.GUI.Gtk.Callbacks</a></td></tr><tr><td class="src">MyGUI</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MyGUI">HSFM.GUI.Gtk.Data</a></td></tr><tr><td class="src">MyView</td><td class="module"><a href="HSFM-GUI-Gtk-Data.html#t:MyView">HSFM.GUI.Gtk.Data</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|
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-gtk</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-list"><p class="caption">Modules</p><ul><li class="module"><a href="HSFM-FileSystem-FileType.html" target="main">HSFM.FileSystem.FileType</a></li><li class="module"><a href="HSFM-FileSystem-UtilTypes.html" target="main">HSFM.FileSystem.UtilTypes</a></li><li class="module"><a href="HSFM-GUI-Glib-GlibString.html" target="main">HSFM.GUI.Glib.GlibString</a></li><li class="module"><a href="HSFM-GUI-Gtk-Callbacks.html" target="main">HSFM.GUI.Gtk.Callbacks</a></li><li class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html" target="main">HSFM.GUI.Gtk.Callbacks.Utils</a></li><li class="module"><a href="HSFM-GUI-Gtk-Data.html" target="main">HSFM.GUI.Gtk.Data</a></li><li class="module"><a href="HSFM-GUI-Gtk-Dialogs.html" target="main">HSFM.GUI.Gtk.Dialogs</a></li><li class="module"><a href="HSFM-GUI-Gtk-Errors.html" target="main">HSFM.GUI.Gtk.Errors</a></li><li class="module"><a href="HSFM-GUI-Gtk-Icons.html" target="main">HSFM.GUI.Gtk.Icons</a></li><li class="module"><a href="HSFM-GUI-Gtk-MyGUI.html" target="main">HSFM.GUI.Gtk.MyGUI</a></li><li class="module"><a href="HSFM-GUI-Gtk-MyView.html" target="main">HSFM.GUI.Gtk.MyView</a></li><li class="module"><a href="HSFM-GUI-Gtk-Utils.html" target="main">HSFM.GUI.Gtk.Utils</a></li><li class="module"><a href="HSFM-Utils-IO.html" target="main">HSFM.Utils.IO</a></li><li class="module"><a href="HSFM-Utils-MyPrelude.html" target="main">HSFM.Utils.MyPrelude</a></li><li class="module"><a href="Main.html" target="main">Main</a></li><li class="module"><a href="Paths_hsfm.html" target="main">Paths_hsfm</a></li></ul></div></body></html>
|
||||
</script></head><body id="mini"><div id="module-list"><p class="caption">Modules</p><ul><li class="module"><a href="HSFM-FileSystem-FileType.html" target="main">HSFM.FileSystem.FileType</a></li><li class="module"><a href="HSFM-FileSystem-UtilTypes.html" target="main">HSFM.FileSystem.UtilTypes</a></li><li class="module"><a href="HSFM-GUI-Glib-GlibString.html" target="main">HSFM.GUI.Glib.GlibString</a></li><li class="module"><a href="HSFM-GUI-Gtk-Callbacks.html" target="main">HSFM.GUI.Gtk.Callbacks</a></li><li class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html" target="main">HSFM.GUI.Gtk.Callbacks.Utils</a></li><li class="module"><a href="HSFM-GUI-Gtk-Data.html" target="main">HSFM.GUI.Gtk.Data</a></li><li class="module"><a href="HSFM-GUI-Gtk-Dialogs.html" target="main">HSFM.GUI.Gtk.Dialogs</a></li><li class="module"><a href="HSFM-GUI-Gtk-Errors.html" target="main">HSFM.GUI.Gtk.Errors</a></li><li class="module"><a href="HSFM-GUI-Gtk-Icons.html" target="main">HSFM.GUI.Gtk.Icons</a></li><li class="module"><a href="HSFM-GUI-Gtk-MyGUI.html" target="main">HSFM.GUI.Gtk.MyGUI</a></li><li class="module"><a href="HSFM-GUI-Gtk-MyView.html" target="main">HSFM.GUI.Gtk.MyView</a></li><li class="module"><a href="HSFM-GUI-Gtk-Utils.html" target="main">HSFM.GUI.Gtk.Utils</a></li><li class="module"><a href="HSFM-History.html" target="main">HSFM.History</a></li><li class="module"><a href="HSFM-Utils-IO.html" target="main">HSFM.Utils.IO</a></li><li class="module"><a href="HSFM-Utils-MyPrelude.html" target="main">HSFM.Utils.MyPrelude</a></li><li class="module"><a href="Main.html" target="main">Main</a></li><li class="module"><a href="Paths_hsfm.html" target="main">Paths_hsfm</a></li></ul></div></body></html>
|
@ -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</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="description"><h1>hsfm-gtk</h1><div class="doc"><p>FileManager written in haskell</p></div></div><div id="module-list"><p class="caption">Modules</p><ul><li><span id="control.n.1" class="module collapser" onclick="toggleSection('n.1')">HSFM</span><ul id="section.n.1" class="show"><li><span id="control.n.1.1" class="module collapser" onclick="toggleSection('n.1.1')">FileSystem</span><ul id="section.n.1.1" class="show"><li><span class="module"><a href="HSFM-FileSystem-FileType.html">HSFM.FileSystem.FileType</a></span></li><li><span class="module"><a href="HSFM-FileSystem-UtilTypes.html">HSFM.FileSystem.UtilTypes</a></span></li></ul></li><li><span id="control.n.1.2" class="module collapser" onclick="toggleSection('n.1.2')">GUI</span><ul id="section.n.1.2" class="show"><li><span id="control.n.1.2.1" class="module collapser" onclick="toggleSection('n.1.2.1')">Glib</span><ul id="section.n.1.2.1" class="show"><li><span class="module"><a href="HSFM-GUI-Glib-GlibString.html">HSFM.GUI.Glib.GlibString</a></span></li></ul></li><li><span id="control.n.1.2.2" class="module collapser" onclick="toggleSection('n.1.2.2')">Gtk</span><ul id="section.n.1.2.2" class="show"><li><span class="module"><span id="control.n.1.2.2.1" class="collapser" onclick="toggleSection('n.1.2.2.1')"> </span><a href="HSFM-GUI-Gtk-Callbacks.html">HSFM.GUI.Gtk.Callbacks</a></span><ul id="section.n.1.2.2.1" class="show"><li><span class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html">HSFM.GUI.Gtk.Callbacks.Utils</a></span></li></ul></li><li><span class="module"><a href="HSFM-GUI-Gtk-Data.html">HSFM.GUI.Gtk.Data</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Dialogs.html">HSFM.GUI.Gtk.Dialogs</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Errors.html">HSFM.GUI.Gtk.Errors</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Icons.html">HSFM.GUI.Gtk.Icons</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-MyGUI.html">HSFM.GUI.Gtk.MyGUI</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-MyView.html">HSFM.GUI.Gtk.MyView</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Utils.html">HSFM.GUI.Gtk.Utils</a></span></li></ul></li></ul></li><li><span id="control.n.1.3" class="module collapser" onclick="toggleSection('n.1.3')">Utils</span><ul id="section.n.1.3" class="show"><li><span class="module"><a href="HSFM-Utils-IO.html">HSFM.Utils.IO</a></span></li><li><span class="module"><a href="HSFM-Utils-MyPrelude.html">HSFM.Utils.MyPrelude</a></span></li></ul></li></ul></li><li><span class="module"><a href="Main.html">Main</a></span></li><li><span class="module"><a href="Paths_hsfm.html">Paths_hsfm</a></span></li></ul></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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="description"><h1>hsfm-gtk</h1><div class="doc"><p>FileManager written in haskell</p></div></div><div id="module-list"><p class="caption">Modules</p><ul><li><span id="control.n.1" class="module collapser" onclick="toggleSection('n.1')">HSFM</span><ul id="section.n.1" class="show"><li><span id="control.n.1.1" class="module collapser" onclick="toggleSection('n.1.1')">FileSystem</span><ul id="section.n.1.1" class="show"><li><span class="module"><a href="HSFM-FileSystem-FileType.html">HSFM.FileSystem.FileType</a></span></li><li><span class="module"><a href="HSFM-FileSystem-UtilTypes.html">HSFM.FileSystem.UtilTypes</a></span></li></ul></li><li><span id="control.n.1.2" class="module collapser" onclick="toggleSection('n.1.2')">GUI</span><ul id="section.n.1.2" class="show"><li><span id="control.n.1.2.1" class="module collapser" onclick="toggleSection('n.1.2.1')">Glib</span><ul id="section.n.1.2.1" class="show"><li><span class="module"><a href="HSFM-GUI-Glib-GlibString.html">HSFM.GUI.Glib.GlibString</a></span></li></ul></li><li><span id="control.n.1.2.2" class="module collapser" onclick="toggleSection('n.1.2.2')">Gtk</span><ul id="section.n.1.2.2" class="show"><li><span class="module"><span id="control.n.1.2.2.1" class="collapser" onclick="toggleSection('n.1.2.2.1')"> </span><a href="HSFM-GUI-Gtk-Callbacks.html">HSFM.GUI.Gtk.Callbacks</a></span><ul id="section.n.1.2.2.1" class="show"><li><span class="module"><a href="HSFM-GUI-Gtk-Callbacks-Utils.html">HSFM.GUI.Gtk.Callbacks.Utils</a></span></li></ul></li><li><span class="module"><a href="HSFM-GUI-Gtk-Data.html">HSFM.GUI.Gtk.Data</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Dialogs.html">HSFM.GUI.Gtk.Dialogs</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Errors.html">HSFM.GUI.Gtk.Errors</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Icons.html">HSFM.GUI.Gtk.Icons</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-MyGUI.html">HSFM.GUI.Gtk.MyGUI</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-MyView.html">HSFM.GUI.Gtk.MyView</a></span></li><li><span class="module"><a href="HSFM-GUI-Gtk-Utils.html">HSFM.GUI.Gtk.Utils</a></span></li></ul></li></ul></li><li><span class="module"><a href="HSFM-History.html">HSFM.History</a></span></li><li><span id="control.n.1.4" class="module collapser" onclick="toggleSection('n.1.4')">Utils</span><ul id="section.n.1.4" class="show"><li><span class="module"><a href="HSFM-Utils-IO.html">HSFM.Utils.IO</a></span></li><li><span class="module"><a href="HSFM-Utils-MyPrelude.html">HSFM.Utils.MyPrelude</a></span></li></ul></li></ul></li><li><span class="module"><a href="Main.html">Main</a></span></li><li><span class="module"><a href="Paths_hsfm.html">Paths_hsfm</a></span></li></ul></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.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.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: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>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Callbacks</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:setGUICallbacks" target="main">setGUICallbacks</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:setViewCallbacks" target="main">setViewCallbacks</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:openTerminalHere" target="main">openTerminalHere</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:closeTab" target="main">closeTab</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newTab-39-" target="main">newTab'</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:opeInNewTab" target="main">opeInNewTab</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:del" target="main">del</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:moveInit" target="main">moveInit</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:copyInit" target="main">copyInit</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:operationFinal" target="main">operationFinal</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newFile" target="main">newFile</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:newDir" target="main">newDir</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:renameF" target="main">renameF</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:urlGoTo" target="main">urlGoTo</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHome" target="main">goHome</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:execute" target="main">execute</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:open" target="main">open</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:upDir" target="main">upDir</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryBack" target="main">goHistoryBack</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Callbacks.html#v:goHistoryForward" target="main">goHistoryForward</a></p></div></div></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.GUI.Gtk.Utils</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script 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.Utils</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedTreePaths" target="main">getSelectedTreePaths</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedItems" target="main">getSelectedItems</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:withItems" target="main">withItems</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:fileListStore" target="main">fileListStore</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getFirstItem" target="main">getFirstItem</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getCurrentDir" target="main">getCurrentDir</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:pushStatusBar" target="main">pushStatusBar</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:popStatusbar" target="main">popStatusbar</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:rawPathToIter" target="main">rawPathToIter</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:rawPathToItem" target="main">rawPathToItem</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:addHistory" target="main">addHistory</a></p></div></div></body></html>
|
||||
</script></head><body id="mini"><div id="module-header"><p class="caption">HSFM.GUI.Gtk.Utils</p></div><div id="interface"><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedTreePaths" target="main">getSelectedTreePaths</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getSelectedItems" target="main">getSelectedItems</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:withItems" target="main">withItems</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:fileListStore" target="main">fileListStore</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getFirstItem" target="main">getFirstItem</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:getCurrentDir" target="main">getCurrentDir</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:pushStatusBar" target="main">pushStatusBar</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:popStatusbar" target="main">popStatusbar</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:rawPathToIter" target="main">rawPathToIter</a></p></div><div class="top"><p class="src"><a href="HSFM-GUI-Gtk-Utils.html#v:rawPathToItem" target="main">rawPathToItem</a></p></div></div></body></html>
|
4
mini_HSFM-History.html
Normal file
4
mini_HSFM-History.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSFM.History</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script 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.History</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="HSFM-History.html#t:BrowsingHistory" target="main">BrowsingHistory</a></p></div><div class="top"><p class="src"><a href="HSFM-History.html#v:goNewPath" target="main">goNewPath</a></p></div><div class="top"><p class="src"><a href="HSFM-History.html#v:goBack" target="main">goBack</a></p></div><div class="top"><p class="src"><a href="HSFM-History.html#v:goForward" target="main">goForward</a></p></div></div></body></html>
|
@ -38,98 +38,105 @@
|
||||
<a name="line-29"></a> <span class='hs-varid'>forM_</span>
|
||||
<a name="line-30"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>when</span>
|
||||
<a name="line-31"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Maybe</span>
|
||||
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Foldable</span>
|
||||
<a name="line-33"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-34"></a> <span class='hs-varid'>fromJust</span>
|
||||
<a name="line-34"></a> <span class='hs-varid'>for_</span>
|
||||
<a name="line-35"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>GHC</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span>
|
||||
<a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Maybe</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-38"></a> <span class='hs-conid'>IOErrorType</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-38"></a> <span class='hs-varid'>fromJust</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-40"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-41"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HPath</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>P</span>
|
||||
<a name="line-42"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-43"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
|
||||
<a name="line-44"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-45"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-46"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-47"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span>
|
||||
<a name="line-48"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>MyView</span>
|
||||
<a name="line-49"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-50"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-51"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-52"></a> <span class='hs-varid'>modifyTVarIO</span>
|
||||
<a name="line-53"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-40"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>GHC</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span>
|
||||
<a name="line-41"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-42"></a> <span class='hs-conid'>IOErrorType</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-44"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
|
||||
<a name="line-45"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HPath</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>P</span>
|
||||
<a name="line-46"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-47"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
|
||||
<a name="line-48"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-49"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-50"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-51"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span>
|
||||
<a name="line-52"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>MyView</span>
|
||||
<a name="line-53"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-54"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-55"></a>
|
||||
<a name="line-56"></a>
|
||||
<a name="line-57"></a>
|
||||
<a name="line-58"></a>
|
||||
<a name="line-59"></a><a name="doFileOperation"></a><span class='hs-comment'>-- |Carries out a file operation with the appropriate error handling</span>
|
||||
<a name="line-60"></a><span class='hs-comment'>-- allowing the user to react to various exceptions with further input.</span>
|
||||
<a name="line-61"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FileOperation</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-62"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FCopy</span> <span class='hs-layout'>(</span><span class='hs-conid'>Copy</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-63"></a> <span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>easyCopyOverwrite</span> <span class='hs-varid'>easyCopy</span>
|
||||
<a name="line-64"></a> <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'>fs'</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span>
|
||||
<a name="line-65"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMove</span> <span class='hs-layout'>(</span><span class='hs-conid'>Move</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-66"></a> <span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>moveFileOverwrite</span> <span class='hs-varid'>moveFile</span>
|
||||
<a name="line-67"></a> <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'>fs'</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span>
|
||||
<a name="line-68"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-69"></a>
|
||||
<a name="line-70"></a>
|
||||
<a name="line-71"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-72"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span>
|
||||
<a name="line-73"></a> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>b</span><span class='hs-layout'>)</span>
|
||||
<a name="line-74"></a> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span>
|
||||
<a name="line-75"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-76"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-77"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-conid'>[]</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-78"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-conop'>:</span><span class='hs-varid'>fs</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>mcOverwrite</span> <span class='hs-varid'>mc</span> <span class='hs-varid'>rest</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-79"></a> <span class='hs-varid'>toname</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varid'>f</span>
|
||||
<a name="line-80"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>topath</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>toname</span>
|
||||
<a name="line-81"></a> <span class='hs-varid'>reactOnError</span> <span class='hs-layout'>(</span><span class='hs-varid'>mc</span> <span class='hs-varid'>f</span> <span class='hs-varid'>topath</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span><span class='hs-layout'>)</span>
|
||||
<a name="line-82"></a> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>AlreadyExists</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-83"></a> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>FileDoesExist</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span><span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span>
|
||||
<a name="line-84"></a> <span class='hs-layout'>,</span><span class='hs-layout'>(</span><span class='hs-conid'>DirDoesExist</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span>
|
||||
<a name="line-85"></a> <span class='hs-layout'>,</span><span class='hs-layout'>(</span><span class='hs-conid'>SameFile</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>renameDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-86"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-87"></a> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>diag</span> <span class='hs-varid'>topath</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-88"></a> <span class='hs-varid'>mcm</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>diag</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>topath</span>
|
||||
<a name="line-89"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>mcm</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>cm</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>case</span> <span class='hs-varid'>cm</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-90"></a> <span class='hs-conid'>Overwrite</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>mcOverwrite</span> <span class='hs-varid'>f</span> <span class='hs-varid'>topath</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-91"></a> <span class='hs-conid'>OverwriteAll</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>forM_</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-conop'>:</span><span class='hs-varid'>fs</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-92"></a> <span class='hs-varid'>toname'</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-93"></a> <span class='hs-varid'>mcOverwrite</span> <span class='hs-varid'>x</span> <span class='hs-layout'>(</span><span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>toname'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-94"></a> <span class='hs-conid'>Skip</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-95"></a> <span class='hs-conid'>Rename</span> <span class='hs-varid'>newn</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>mc</span> <span class='hs-varid'>f</span> <span class='hs-layout'>(</span><span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>newn</span><span class='hs-layout'>)</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-96"></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-97"></a>
|
||||
<a name="line-98"></a>
|
||||
<a name="line-99"></a><a name="goDir"></a><span class='hs-comment'>-- |Helper that is invoked for any directory change operations.</span>
|
||||
<a name="line-100"></a><span class='hs-definition'>goDir</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Bool</span> <span class='hs-comment'>-- ^ whether to update the history</span>
|
||||
<a name="line-101"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-102"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-103"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span>
|
||||
<a name="line-104"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-105"></a><span class='hs-definition'>goDir</span> <span class='hs-varid'>bhis</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-106"></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-107"></a> <span class='hs-varid'>when</span> <span class='hs-varid'>bhis</span> <span class='hs-varop'>$</span> <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-108"></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-conid'>[]</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-109"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-110"></a>
|
||||
<a name="line-111"></a> <span class='hs-comment'>-- set notebook tab label</span>
|
||||
<a name="line-112"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookGetCurrentPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-113"></a> <span class='hs-varid'>child</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookGetNthPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-114"></a>
|
||||
<a name="line-115"></a> <span class='hs-comment'>-- get the label</span>
|
||||
<a name="line-116"></a> <span class='hs-varid'>ebox</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToEventBox</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span><span class='hs-layout'>)</span>
|
||||
<a name="line-117"></a> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookGetTabLabel</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>child</span>
|
||||
<a name="line-118"></a> <span class='hs-varid'>label</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToLabel</span> <span class='hs-varop'>.</span> <span class='hs-varid'>head</span><span class='hs-layout'>)</span> <span class='hs-varop'><$></span> <span class='hs-varid'>containerGetChildren</span> <span class='hs-varid'>ebox</span>
|
||||
<a name="line-119"></a>
|
||||
<a name="line-120"></a> <span class='hs-comment'>-- set the label</span>
|
||||
<a name="line-121"></a> <span class='hs-varid'>labelSetText</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-122"></a> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-123"></a> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-124"></a>
|
||||
<a name="line-55"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>MVar</span>
|
||||
<a name="line-56"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-57"></a> <span class='hs-varid'>putMVar</span>
|
||||
<a name="line-58"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>tryTakeMVar</span>
|
||||
<a name="line-59"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-60"></a>
|
||||
<a name="line-61"></a>
|
||||
<a name="line-62"></a>
|
||||
<a name="line-63"></a>
|
||||
<a name="line-64"></a><a name="doFileOperation"></a><span class='hs-comment'>-- |Carries out a file operation with the appropriate error handling</span>
|
||||
<a name="line-65"></a><span class='hs-comment'>-- allowing the user to react to various exceptions with further input.</span>
|
||||
<a name="line-66"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FileOperation</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-67"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FCopy</span> <span class='hs-layout'>(</span><span class='hs-conid'>Copy</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-68"></a> <span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>easyCopyOverwrite</span> <span class='hs-varid'>easyCopy</span>
|
||||
<a name="line-69"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FCopy</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Copy</span> <span class='hs-varid'>fs'</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span>
|
||||
<a name="line-70"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMove</span> <span class='hs-layout'>(</span><span class='hs-conid'>Move</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-71"></a> <span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f'</span><span class='hs-conop'>:</span><span class='hs-varid'>fs'</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>moveFileOverwrite</span> <span class='hs-varid'>moveFile</span>
|
||||
<a name="line-72"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMove</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Move</span> <span class='hs-varid'>fs'</span> <span class='hs-varid'>to</span><span class='hs-layout'>)</span>
|
||||
<a name="line-73"></a><span class='hs-definition'>doFileOperation</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-74"></a>
|
||||
<a name="line-75"></a>
|
||||
<a name="line-76"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-77"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span>
|
||||
<a name="line-78"></a> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>b</span><span class='hs-layout'>)</span>
|
||||
<a name="line-79"></a> <span class='hs-keyglyph'>-></span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-varid'>b1</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Path</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-conid'>Abs</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span><span class='hs-layout'>)</span>
|
||||
<a name="line-80"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-81"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-82"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-conid'>[]</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-83"></a><span class='hs-sel'>_doFileOperation</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-conop'>:</span><span class='hs-varid'>fs</span><span class='hs-layout'>)</span> <span class='hs-varid'>to</span> <span class='hs-varid'>mcOverwrite</span> <span class='hs-varid'>mc</span> <span class='hs-varid'>rest</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-84"></a> <span class='hs-varid'>toname</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varid'>f</span>
|
||||
<a name="line-85"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>topath</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>toname</span>
|
||||
<a name="line-86"></a> <span class='hs-varid'>reactOnError</span> <span class='hs-layout'>(</span><span class='hs-varid'>mc</span> <span class='hs-varid'>f</span> <span class='hs-varid'>topath</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span><span class='hs-layout'>)</span>
|
||||
<a name="line-87"></a> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>AlreadyExists</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-88"></a> <span class='hs-keyglyph'>[</span><span class='hs-layout'>(</span><span class='hs-conid'>FileDoesExist</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span><span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span>
|
||||
<a name="line-89"></a> <span class='hs-layout'>,</span><span class='hs-layout'>(</span><span class='hs-conid'>DirDoesExist</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>fileCollisionDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>,</span><span class='hs-layout'>(</span><span class='hs-conid'>SameFile</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>,</span> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>renameDialog</span> <span class='hs-varid'>topath</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-91"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-92"></a> <span class='hs-varid'>collisionAction</span> <span class='hs-varid'>diag</span> <span class='hs-varid'>topath</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-93"></a> <span class='hs-varid'>mcm</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>diag</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>topath</span>
|
||||
<a name="line-94"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>mcm</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>cm</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>case</span> <span class='hs-varid'>cm</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-95"></a> <span class='hs-conid'>Overwrite</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>mcOverwrite</span> <span class='hs-varid'>f</span> <span class='hs-varid'>topath</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-96"></a> <span class='hs-conid'>OverwriteAll</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>forM_</span> <span class='hs-layout'>(</span><span class='hs-varid'>f</span><span class='hs-conop'>:</span><span class='hs-varid'>fs</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-97"></a> <span class='hs-varid'>toname'</span> <span class='hs-keyglyph'><-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-98"></a> <span class='hs-varid'>mcOverwrite</span> <span class='hs-varid'>x</span> <span class='hs-layout'>(</span><span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>toname'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-99"></a> <span class='hs-conid'>Skip</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-100"></a> <span class='hs-conid'>Rename</span> <span class='hs-varid'>newn</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>mc</span> <span class='hs-varid'>f</span> <span class='hs-layout'>(</span><span class='hs-varid'>to</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</></span> <span class='hs-varid'>newn</span><span class='hs-layout'>)</span> <span class='hs-varop'>>></span> <span class='hs-varid'>rest</span>
|
||||
<a name="line-101"></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-102"></a>
|
||||
<a name="line-103"></a>
|
||||
<a name="line-104"></a><a name="goDir"></a><span class='hs-comment'>-- |Helper that is invoked for any directory change operations.</span>
|
||||
<a name="line-105"></a><span class='hs-definition'>goDir</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Bool</span> <span class='hs-comment'>-- ^ whether to update the history</span>
|
||||
<a name="line-106"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-107"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-108"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span>
|
||||
<a name="line-109"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-110"></a><span class='hs-definition'>goDir</span> <span class='hs-varid'>bhis</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-111"></a> <span class='hs-varid'>when</span> <span class='hs-varid'>bhis</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-112"></a> <span class='hs-varid'>mhs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-113"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mhs</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>hs</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-114"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>nhs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>goNewPath</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-varid'>hs</span>
|
||||
<a name="line-115"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-116"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-117"></a>
|
||||
<a name="line-118"></a> <span class='hs-comment'>-- set notebook tab label</span>
|
||||
<a name="line-119"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookGetCurrentPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-120"></a> <span class='hs-varid'>child</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookGetNthPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-121"></a>
|
||||
<a name="line-122"></a> <span class='hs-comment'>-- get the label</span>
|
||||
<a name="line-123"></a> <span class='hs-varid'>ebox</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToEventBox</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span><span class='hs-layout'>)</span>
|
||||
<a name="line-124"></a> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookGetTabLabel</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>child</span>
|
||||
<a name="line-125"></a> <span class='hs-varid'>label</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToLabel</span> <span class='hs-varop'>.</span> <span class='hs-varid'>head</span><span class='hs-layout'>)</span> <span class='hs-varop'><$></span> <span class='hs-varid'>containerGetChildren</span> <span class='hs-varid'>ebox</span>
|
||||
<a name="line-126"></a>
|
||||
<a name="line-127"></a> <span class='hs-comment'>-- set the label</span>
|
||||
<a name="line-128"></a> <span class='hs-varid'>labelSetText</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-129"></a> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-130"></a> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-131"></a>
|
||||
</pre></body>
|
||||
</html>
|
||||
|
@ -81,494 +81,494 @@
|
||||
<a name="line-72"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span>
|
||||
<a name="line-73"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>MyView</span>
|
||||
<a name="line-74"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-75"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-76"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-77"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>UTFString</span>
|
||||
<a name="line-78"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-79"></a> <span class='hs-varid'>glibToString</span>
|
||||
<a name="line-80"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-81"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Env</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-83"></a> <span class='hs-varid'>getEnv</span>
|
||||
<a name="line-84"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-85"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Process</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>SPP</span>
|
||||
<a name="line-86"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Types</span>
|
||||
<a name="line-87"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-88"></a> <span class='hs-conid'>ProcessID</span>
|
||||
<a name="line-89"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-90"></a>
|
||||
<a name="line-91"></a>
|
||||
<a name="line-92"></a>
|
||||
<a name="line-93"></a>
|
||||
<a name="line-94"></a>
|
||||
<a name="line-95"></a> <span class='hs-comment'>-----------------</span>
|
||||
<a name="line-96"></a> <span class='hs-comment'>--[ Callbacks ]--</span>
|
||||
<a name="line-97"></a> <span class='hs-comment'>-----------------</span>
|
||||
<a name="line-75"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-76"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-77"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-78"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>UTFString</span>
|
||||
<a name="line-79"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-80"></a> <span class='hs-varid'>glibToString</span>
|
||||
<a name="line-81"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-82"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Env</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span>
|
||||
<a name="line-83"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-84"></a> <span class='hs-varid'>getEnv</span>
|
||||
<a name="line-85"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-86"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Process</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>SPP</span>
|
||||
<a name="line-87"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>Types</span>
|
||||
<a name="line-88"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-89"></a> <span class='hs-conid'>ProcessID</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-91"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Concurrent</span><span class='hs-varop'>.</span><span class='hs-conid'>MVar</span>
|
||||
<a name="line-92"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-93"></a> <span class='hs-varid'>putMVar</span>
|
||||
<a name="line-94"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>tryTakeMVar</span>
|
||||
<a name="line-95"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-96"></a>
|
||||
<a name="line-97"></a>
|
||||
<a name="line-98"></a>
|
||||
<a name="line-99"></a>
|
||||
<a name="line-100"></a>
|
||||
<a name="line-101"></a>
|
||||
<a name="line-102"></a><span class='hs-comment'>---- MAIN CALLBACK ENTRYPOINT ----</span>
|
||||
<a name="line-103"></a>
|
||||
<a name="line-101"></a> <span class='hs-comment'>-----------------</span>
|
||||
<a name="line-102"></a> <span class='hs-comment'>--[ Callbacks ]--</span>
|
||||
<a name="line-103"></a> <span class='hs-comment'>-----------------</span>
|
||||
<a name="line-104"></a>
|
||||
<a name="line-105"></a><a name="setGUICallbacks"></a><span class='hs-comment'>-- |Set callbacks for the whole gui, on hotkeys, events and stuff.</span>
|
||||
<a name="line-106"></a><span class='hs-definition'>setGUICallbacks</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-107"></a><span class='hs-definition'>setGUICallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-108"></a>
|
||||
<a name="line-109"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>clearStatusBar</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-110"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-111"></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-112"></a>
|
||||
<a name="line-113"></a> <span class='hs-comment'>-- menubar-file</span>
|
||||
<a name="line-114"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>menubarFileQuit</span> <span class='hs-varop'>.</span> <span class='hs-varid'>menubar</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-115"></a> <span class='hs-varid'>mainQuit</span>
|
||||
<a name="line-116"></a>
|
||||
<a name="line-117"></a> <span class='hs-comment'>-- menubar-help</span>
|
||||
<a name="line-118"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>menubarHelpAbout</span> <span class='hs-varop'>.</span> <span class='hs-varid'>menubar</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-119"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varid'>showAboutDialog</span>
|
||||
<a name="line-120"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-121"></a>
|
||||
<a name="line-122"></a> <span class='hs-comment'>-- key events</span>
|
||||
<a name="line-123"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rootWin</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-124"></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-125"></a> <span class='hs-str'>"q"</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-126"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varid'>mainQuit</span>
|
||||
<a name="line-105"></a>
|
||||
<a name="line-106"></a>
|
||||
<a name="line-107"></a>
|
||||
<a name="line-108"></a><span class='hs-comment'>---- MAIN CALLBACK ENTRYPOINT ----</span>
|
||||
<a name="line-109"></a>
|
||||
<a name="line-110"></a>
|
||||
<a name="line-111"></a><a name="setGUICallbacks"></a><span class='hs-comment'>-- |Set callbacks for the whole gui, on hotkeys, events and stuff.</span>
|
||||
<a name="line-112"></a><span class='hs-definition'>setGUICallbacks</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-113"></a><span class='hs-definition'>setGUICallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-114"></a>
|
||||
<a name="line-115"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>clearStatusBar</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-116"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-117"></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-118"></a>
|
||||
<a name="line-119"></a> <span class='hs-comment'>-- menubar-file</span>
|
||||
<a name="line-120"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>menubarFileQuit</span> <span class='hs-varop'>.</span> <span class='hs-varid'>menubar</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-121"></a> <span class='hs-varid'>mainQuit</span>
|
||||
<a name="line-122"></a>
|
||||
<a name="line-123"></a> <span class='hs-comment'>-- menubar-help</span>
|
||||
<a name="line-124"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-layout'>(</span><span class='hs-varid'>menubarHelpAbout</span> <span class='hs-varop'>.</span> <span class='hs-varid'>menubar</span><span class='hs-layout'>)</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>menuItemActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-125"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varid'>showAboutDialog</span>
|
||||
<a name="line-126"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-127"></a>
|
||||
<a name="line-128"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-129"></a>
|
||||
<a name="line-130"></a>
|
||||
<a name="line-131"></a><a name="setViewCallbacks"></a><span class='hs-comment'>-- |Set callbacks specific to a given view, on hotkeys, events and stuff.</span>
|
||||
<a name="line-132"></a><span class='hs-definition'>setViewCallbacks</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-133"></a><span class='hs-definition'>setViewCallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-134"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-135"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-136"></a> <span class='hs-varid'>fmv</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-137"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>rowActivated</span>
|
||||
<a name="line-138"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span><span class='hs-layout'>)</span>
|
||||
<a name="line-139"></a>
|
||||
<a name="line-140"></a> <span class='hs-comment'>-- drag events</span>
|
||||
<a name="line-141"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragBegin</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-142"></a> <span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>moveInit</span>
|
||||
<a name="line-143"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragDrop</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-144"></a> <span class='hs-keyglyph'>\</span><span class='hs-varid'>dc</span> <span class='hs-varid'>p</span> <span class='hs-varid'>ts</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-145"></a> <span class='hs-varid'>p'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewConvertWidgetToTreeCoords</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-146"></a> <span class='hs-varid'>mpath</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetPathAtPos</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p'</span>
|
||||
<a name="line-147"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-148"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-149"></a> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>False</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-150"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-151"></a> <span class='hs-conid'>Just</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-152"></a> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>atomNew</span> <span class='hs-layout'>(</span><span class='hs-str'>"HSFM"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-153"></a> <span class='hs-varid'>dragGetData</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>dc</span> <span class='hs-varid'>atom</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-154"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-155"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragDataReceived</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-156"></a> <span class='hs-keyglyph'>\</span><span class='hs-varid'>dc</span> <span class='hs-varid'>p</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>ts</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-157"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-158"></a> <span class='hs-varid'>signalStopEmission</span> <span class='hs-varid'>treeView</span> <span class='hs-str'>"drag_data_received"</span>
|
||||
<a name="line-159"></a> <span class='hs-varid'>p'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewConvertWidgetToTreeCoords</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-160"></a> <span class='hs-varid'>mpath</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetPathAtPos</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p'</span>
|
||||
<a name="line-161"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-162"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>False</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-163"></a> <span class='hs-conid'>Just</span> <span class='hs-layout'>(</span><span class='hs-varid'>tp</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-164"></a> <span class='hs-varid'>mitem</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rawPathToItem</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>tp</span>
|
||||
<a name="line-165"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>mitem</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>item</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-166"></a> <span class='hs-varid'>operationFinal</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-167"></a> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>True</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-168"></a>
|
||||
<a name="line-169"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-170"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-171"></a> <span class='hs-varid'>fmv</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-172"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>itemActivated</span>
|
||||
<a name="line-173"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span><span class='hs-layout'>)</span>
|
||||
<a name="line-174"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-175"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-176"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-177"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-178"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>view</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-179"></a>
|
||||
<a name="line-180"></a> <span class='hs-comment'>-- GUI events</span>
|
||||
<a name="line-181"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>urlBar</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>entryActivated</span> <span class='hs-varop'>$</span> <span class='hs-varid'>urlGoTo</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-182"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>upViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-183"></a> <span class='hs-varid'>upDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-184"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>homeViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-185"></a> <span class='hs-varid'>goHome</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-186"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>refreshViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-187"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-188"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-189"></a>
|
||||
<a name="line-190"></a> <span class='hs-comment'>-- key events</span>
|
||||
<a name="line-191"></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-192"></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-193"></a> <span class='hs-str'>"h"</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-194"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-195"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>modifyTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-196"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>x</span> <span class='hs-layout'>{</span> <span class='hs-varid'>showHidden</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>showHidden</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span><span class='hs-layout'>}</span><span class='hs-layout'>)</span>
|
||||
<a name="line-197"></a> <span class='hs-varop'>>></span> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-198"></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-199"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Alt</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-200"></a> <span class='hs-str'>"Up"</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-201"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>upDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-202"></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-203"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Alt</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-204"></a> <span class='hs-str'>"Left"</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-205"></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-206"></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-207"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Alt</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-208"></a> <span class='hs-str'>"Right"</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-209"></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-210"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-211"></a> <span class='hs-str'>"Delete"</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-212"></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-213"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-214"></a> <span class='hs-conid'>[]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-215"></a> <span class='hs-str'>"Return"</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-216"></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-217"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-218"></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-219"></a> <span class='hs-str'>"c"</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-220"></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-221"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-222"></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-223"></a> <span class='hs-str'>"x"</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-224"></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-225"></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-226"></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-227"></a> <span class='hs-str'>"v"</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-228"></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-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-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-128"></a> <span class='hs-comment'>-- key events</span>
|
||||
<a name="line-129"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rootWin</span> <span class='hs-varid'>mygui</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-130"></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-131"></a> <span class='hs-str'>"q"</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-132"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varid'>mainQuit</span>
|
||||
<a name="line-133"></a>
|
||||
<a name="line-134"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-135"></a>
|
||||
<a name="line-136"></a>
|
||||
<a name="line-137"></a><a name="setViewCallbacks"></a><span class='hs-comment'>-- |Set callbacks specific to a given view, on hotkeys, events and stuff.</span>
|
||||
<a name="line-138"></a><span class='hs-definition'>setViewCallbacks</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-139"></a><span class='hs-definition'>setViewCallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-140"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-141"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-142"></a> <span class='hs-varid'>fmv</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-143"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>rowActivated</span>
|
||||
<a name="line-144"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span><span class='hs-layout'>)</span>
|
||||
<a name="line-145"></a>
|
||||
<a name="line-146"></a> <span class='hs-comment'>-- drag events</span>
|
||||
<a name="line-147"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragBegin</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-148"></a> <span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>moveInit</span>
|
||||
<a name="line-149"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragDrop</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-150"></a> <span class='hs-keyglyph'>\</span><span class='hs-varid'>dc</span> <span class='hs-varid'>p</span> <span class='hs-varid'>ts</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-151"></a> <span class='hs-varid'>p'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewConvertWidgetToTreeCoords</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-152"></a> <span class='hs-varid'>mpath</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetPathAtPos</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p'</span>
|
||||
<a name="line-153"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-154"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-155"></a> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>False</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-156"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-157"></a> <span class='hs-conid'>Just</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-158"></a> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>atomNew</span> <span class='hs-layout'>(</span><span class='hs-str'>"HSFM"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-159"></a> <span class='hs-varid'>dragGetData</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>dc</span> <span class='hs-varid'>atom</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-160"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-161"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>dragDataReceived</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-162"></a> <span class='hs-keyglyph'>\</span><span class='hs-varid'>dc</span> <span class='hs-varid'>p</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>ts</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-163"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-164"></a> <span class='hs-varid'>signalStopEmission</span> <span class='hs-varid'>treeView</span> <span class='hs-str'>"drag_data_received"</span>
|
||||
<a name="line-165"></a> <span class='hs-varid'>p'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewConvertWidgetToTreeCoords</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p</span>
|
||||
<a name="line-166"></a> <span class='hs-varid'>mpath</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetPathAtPos</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>p'</span>
|
||||
<a name="line-167"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-168"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>False</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-169"></a> <span class='hs-conid'>Just</span> <span class='hs-layout'>(</span><span class='hs-varid'>tp</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>,</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-170"></a> <span class='hs-varid'>mitem</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rawPathToItem</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>tp</span>
|
||||
<a name="line-171"></a> <span class='hs-varid'>forM_</span> <span class='hs-varid'>mitem</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>item</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-172"></a> <span class='hs-varid'>operationFinal</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-173"></a> <span class='hs-varid'>dragFinish</span> <span class='hs-varid'>dc</span> <span class='hs-conid'>True</span> <span class='hs-conid'>False</span> <span class='hs-varid'>ts</span>
|
||||
<a name="line-174"></a>
|
||||
<a name="line-175"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-176"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-177"></a> <span class='hs-varid'>fmv</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-178"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconView</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>itemActivated</span>
|
||||
<a name="line-179"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>withItems</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>open</span><span class='hs-layout'>)</span>
|
||||
<a name="line-180"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-181"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-182"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-183"></a> <span class='hs-varid'>commonGuiEvents</span> <span class='hs-varid'>fmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-184"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>view</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>fmv</span>
|
||||
<a name="line-185"></a>
|
||||
<a name="line-186"></a> <span class='hs-comment'>-- GUI events</span>
|
||||
<a name="line-187"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>urlBar</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>entryActivated</span> <span class='hs-varop'>$</span> <span class='hs-varid'>urlGoTo</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-188"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>upViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-189"></a> <span class='hs-varid'>upDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-190"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>homeViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-191"></a> <span class='hs-varid'>goHome</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-192"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>refreshViewB</span> <span class='hs-varid'>myview</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonActivated</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-193"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-194"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-195"></a>
|
||||
<a name="line-196"></a> <span class='hs-comment'>-- key events</span>
|
||||
<a name="line-197"></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-198"></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-199"></a> <span class='hs-str'>"h"</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-200"></a> <span class='hs-varid'>cdir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getCurrentDir</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-201"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>modifyTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-202"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>x</span> <span class='hs-layout'>{</span> <span class='hs-varid'>showHidden</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>showHidden</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span><span class='hs-layout'>}</span><span class='hs-layout'>)</span>
|
||||
<a name="line-203"></a> <span class='hs-varop'>>></span> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-204"></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-205"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Alt</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-206"></a> <span class='hs-str'>"Up"</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-207"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>upDir</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-208"></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-209"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Alt</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-210"></a> <span class='hs-str'>"Left"</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-211"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-212"></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-213"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Alt</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-214"></a> <span class='hs-str'>"Right"</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-215"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-216"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-217"></a> <span class='hs-str'>"Delete"</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-218"></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-219"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-220"></a> <span class='hs-conid'>[]</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventModifier</span>
|
||||
<a name="line-221"></a> <span class='hs-str'>"Return"</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-222"></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-223"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-224"></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-225"></a> <span class='hs-str'>"c"</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-226"></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-227"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>view</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>keyPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-varid'>tryEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-228"></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-229"></a> <span class='hs-str'>"x"</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-230"></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-231"></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-232"></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-233"></a> <span class='hs-str'>"v"</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-234"></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-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'>"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-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'>newTab'</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-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-241"></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-242"></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-243"></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-244"></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-245"></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-246"></a>
|
||||
<a name="line-247"></a> <span class='hs-comment'>-- mouse button click</span>
|
||||
<a name="line-248"></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-249"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-250"></a> <span class='hs-varid'>t</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventTime</span>
|
||||
<a name="line-251"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-252"></a> <span class='hs-conid'>RightButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-253"></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-254"></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-255"></a> <span class='hs-comment'>-- this is just to not screw with current selection</span>
|
||||
<a name="line-256"></a> <span class='hs-comment'>-- on right-click</span>
|
||||
<a name="line-257"></a> <span class='hs-comment'>-- TODO: this misbehaves under IconView</span>
|
||||
<a name="line-258"></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-259"></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-260"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mpath</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-261"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-262"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-263"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-264"></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-265"></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-266"></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-267"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-268"></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-269"></a> <span class='hs-conid'>MiddleButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-270"></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-271"></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-272"></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-273"></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-274"></a>
|
||||
<a name="line-275"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>mitem</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-276"></a> <span class='hs-comment'>-- item under the cursor, only pass on the signal</span>
|
||||
<a name="line-277"></a> <span class='hs-comment'>-- if the item under the cursor is not within the current</span>
|
||||
<a name="line-278"></a> <span class='hs-comment'>-- selection</span>
|
||||
<a name="line-279"></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-280"></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-281"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-282"></a> <span class='hs-comment'>-- no item under the cursor, pass on the signal</span>
|
||||
<a name="line-283"></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-284"></a>
|
||||
<a name="line-285"></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-286"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-287"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-288"></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-289"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-290"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-291"></a> <span class='hs-comment'>-- not right-click, so pass on the signal</span>
|
||||
<a name="line-292"></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-293"></a>
|
||||
<a name="line-294"></a> <span class='hs-comment'>-- right click menu</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'>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-296"></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-297"></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-298"></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-299"></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-300"></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-301"></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-302"></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-303"></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-304"></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-305"></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-306"></a> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>openTerminalHere</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-307"></a> <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-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'>copyInit</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'>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-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'>renameF</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'>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-312"></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-313"></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-314"></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-315"></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-316"></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-317"></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-318"></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-319"></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-320"></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-321"></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-322"></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-323"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-324"></a>
|
||||
<a name="line-325"></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-326"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>fmv</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-327"></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-328"></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-329"></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-330"></a> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-331"></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-332"></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-333"></a>
|
||||
<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-334"></a>
|
||||
<a name="line-335"></a>
|
||||
<a name="line-336"></a>
|
||||
<a name="line-337"></a><span class='hs-comment'>---- OTHER ----</span>
|
||||
<a name="line-338"></a>
|
||||
<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-340"></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-341"></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-342"></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-343"></a> <span class='hs-comment'>-- TODO: make terminal configurable</span>
|
||||
<a name="line-344"></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-345"></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-346"></a>
|
||||
<a name="line-347"></a>
|
||||
<a name="line-348"></a>
|
||||
<a name="line-349"></a><span class='hs-comment'>---- TAB OPERATIONS ----</span>
|
||||
<a name="line-350"></a>
|
||||
<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-352"></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-353"></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-354"></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-355"></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-356"></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-357"></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-359"></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-360"></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-361"></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-362"></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-363"></a>
|
||||
<a name="line-364"></a>
|
||||
<a name="line-365"></a>
|
||||
<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="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="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="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="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="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="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><span class='hs-comment'>---- DIRECTORY TRAVERSAL AND FILE OPENING CALLBACKS ----</span>
|
||||
<a name="line-482"></a>
|
||||
<a name="line-365"></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-366"></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-367"></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-368"></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-369"></a>
|
||||
<a name="line-370"></a>
|
||||
<a name="line-371"></a>
|
||||
<a name="line-372"></a><span class='hs-comment'>---- FILE OPERATION CALLBACKS (COPY, MOVE, ...) ----</span>
|
||||
<a name="line-373"></a>
|
||||
<a name="line-374"></a>
|
||||
<a name="line-375"></a><a name="del"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Deletes a file or directory.</span>
|
||||
<a name="line-376"></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-377"></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-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'>getFPasStr</span> <span class='hs-varid'>item</span> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</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'>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-comment'>-- this throws on the first error that occurs</span>
|
||||
<a name="line-382"></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-383"></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-384"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span>
|
||||
<a name="line-385"></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-386"></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-387"></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-388"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-389"></a>
|
||||
<a name="line-390"></a>
|
||||
<a name="line-391"></a><a name="moveInit"></a><span class='hs-comment'>-- |Initializes a file move operation.</span>
|
||||
<a name="line-392"></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-393"></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-394"></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-395"></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-396"></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-397"></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-398"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-399"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-400"></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-401"></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-402"></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-403"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-404"></a>
|
||||
<a name="line-405"></a><a name="copyInit"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Initializes a file copy operation.</span>
|
||||
<a name="line-406"></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-407"></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-408"></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-409"></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-410"></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-411"></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-412"></a> <span class='hs-varop'>++</span> <span class='hs-str'>" items"</span>
|
||||
<a name="line-413"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-414"></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-415"></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-416"></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-417"></a> <span class='hs-str'>"No file selected!"</span>
|
||||
<a name="line-418"></a>
|
||||
<a name="line-419"></a>
|
||||
<a name="line-420"></a><a name="operationFinal"></a><span class='hs-comment'>-- |Finalizes a file operation, such as copy or move.</span>
|
||||
<a name="line-421"></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-422"></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-423"></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-424"></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-425"></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-426"></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-427"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>op</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-428"></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-429"></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-430"></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-431"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-432"></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-433"></a> <span class='hs-varid'>popStatusbar</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-434"></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-435"></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-436"></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-437"></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-438"></a> <span class='hs-varop'>++</span> <span class='hs-str'>"\"?"</span>
|
||||
<a name="line-439"></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-440"></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-441"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-442"></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-443"></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-444"></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-445"></a>
|
||||
<a name="line-446"></a>
|
||||
<a name="line-447"></a><a name="newFile"></a><span class='hs-comment'>-- |Create a new file.</span>
|
||||
<a name="line-448"></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-449"></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-450"></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-451"></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-452"></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-453"></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-454"></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-455"></a>
|
||||
<a name="line-456"></a>
|
||||
<a name="line-457"></a><a name="newDir"></a><span class='hs-comment'>-- |Create a new directory.</span>
|
||||
<a name="line-458"></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-459"></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-460"></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-461"></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-462"></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-463"></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-464"></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-465"></a>
|
||||
<a name="line-466"></a>
|
||||
<a name="line-467"></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-468"></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-469"></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-470"></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-471"></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-472"></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-473"></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-474"></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-475"></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-476"></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-477"></a> <span class='hs-varid'>withConfirmationDialog</span> <span class='hs-varid'>cmsg</span> <span class='hs-varop'>$</span>
|
||||
<a name="line-478"></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-479"></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-480"></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-481"></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-482"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-483"></a>
|
||||
<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="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="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="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-484"></a>
|
||||
<a name="line-485"></a>
|
||||
<a name="line-486"></a>
|
||||
<a name="line-487"></a><span class='hs-comment'>---- DIRECTORY TRAVERSAL AND FILE OPENING CALLBACKS ----</span>
|
||||
<a name="line-488"></a>
|
||||
<a name="line-489"></a>
|
||||
<a name="line-490"></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-491"></a><span class='hs-comment'>-- treeView.</span>
|
||||
<a name="line-492"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-493"></a><span class='hs-comment'>-- If the url is invalid, does nothing.</span>
|
||||
<a name="line-494"></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-495"></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-496"></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-497"></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-498"></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-499"></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-500"></a>
|
||||
<a name="line-501"></a>
|
||||
<a name="line-502"></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-503"></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-504"></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-505"></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-506"></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-507"></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-508"></a>
|
||||
<a name="line-509"></a>
|
||||
<a name="line-510"></a><a name="execute"></a><span class='hs-comment'>-- |Execute a given file.</span>
|
||||
<a name="line-511"></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-512"></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-513"></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-514"></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-515"></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-516"></a> <span class='hs-str'>"Operation not supported on multiple files"</span>
|
||||
<a name="line-517"></a>
|
||||
<a name="line-518"></a>
|
||||
<a name="line-519"></a><a name="open"></a><span class='hs-comment'>-- |Supposed to be used with 'withRows'. Opens a file or directory.</span>
|
||||
<a name="line-520"></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-521"></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-522"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>item</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-523"></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-524"></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-525"></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-526"></a> <span class='hs-varid'>r</span> <span class='hs-keyglyph'>-></span>
|
||||
<a name="line-527"></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-528"></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-529"></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-530"></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-531"></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-532"></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-533"></a>
|
||||
<a name="line-534"></a>
|
||||
<a name="line-535"></a><a name="upDir"></a><span class='hs-comment'>-- |Go up one directory and visualize it in the treeView.</span>
|
||||
<a name="line-536"></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-537"></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-538"></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-539"></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-540"></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-541"></a>
|
||||
<a name="line-542"></a>
|
||||
<a name="line-543"></a><a name="goHistoryBack"></a><span class='hs-comment'>-- |Go "back" in the history.</span>
|
||||
<a name="line-544"></a><span class='hs-definition'>goHistoryBack</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-545"></a><span class='hs-definition'>goHistoryBack</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-546"></a> <span class='hs-varid'>mhs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-547"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mhs</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>hs</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-548"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>nhs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>goBack</span> <span class='hs-varid'>hs</span>
|
||||
<a name="line-549"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-550"></a> <span class='hs-varid'>nv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>$</span> <span class='hs-varid'>currentDir</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-551"></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-552"></a>
|
||||
<a name="line-553"></a>
|
||||
<a name="line-554"></a><a name="goHistoryForward"></a><span class='hs-comment'>-- |Go "forward" in the history.</span>
|
||||
<a name="line-555"></a><span class='hs-definition'>goHistoryForward</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-556"></a><span class='hs-definition'>goHistoryForward</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-557"></a> <span class='hs-varid'>mhs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-558"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mhs</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>hs</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-559"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>nhs</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>goForward</span> <span class='hs-varid'>hs</span>
|
||||
<a name="line-560"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>nhs</span>
|
||||
<a name="line-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'>currentDir</span> <span class='hs-varid'>nhs</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>
|
||||
|
@ -39,125 +39,121 @@
|
||||
<a name="line-30"></a> <span class='hs-conid'>TVar</span>
|
||||
<a name="line-31"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span> <span class='hs-varid'>hiding</span> <span class='hs-layout'>(</span><span class='hs-conid'>MenuBar</span><span class='hs-layout'>)</span>
|
||||
<a name="line-33"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span>
|
||||
<a name="line-34"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-35"></a> <span class='hs-conid'>Abs</span>
|
||||
<a name="line-36"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Path</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-38"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-39"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-40"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>INotify</span>
|
||||
<a name="line-41"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-42"></a> <span class='hs-conid'>INotify</span>
|
||||
<a name="line-43"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-44"></a>
|
||||
<a name="line-45"></a>
|
||||
<a name="line-33"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
|
||||
<a name="line-34"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
|
||||
<a name="line-35"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>INotify</span>
|
||||
<a name="line-37"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-38"></a> <span class='hs-conid'>INotify</span>
|
||||
<a name="line-39"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-40"></a>
|
||||
<a name="line-41"></a>
|
||||
<a name="line-42"></a>
|
||||
<a name="line-43"></a> <span class='hs-comment'>------------------</span>
|
||||
<a name="line-44"></a> <span class='hs-comment'>--[ Base Types ]--</span>
|
||||
<a name="line-45"></a> <span class='hs-comment'>------------------</span>
|
||||
<a name="line-46"></a>
|
||||
<a name="line-47"></a> <span class='hs-comment'>------------------</span>
|
||||
<a name="line-48"></a> <span class='hs-comment'>--[ Base Types ]--</span>
|
||||
<a name="line-49"></a> <span class='hs-comment'>------------------</span>
|
||||
<a name="line-50"></a>
|
||||
<a name="line-51"></a>
|
||||
<a name="line-52"></a><a name="MyGUI"></a><span class='hs-comment'>-- |Monolithic object passed to various GUI functions in order</span>
|
||||
<a name="line-53"></a><a name="MyGUI"></a><span class='hs-comment'>-- to keep the API stable and not alter the parameters too much.</span>
|
||||
<a name="line-54"></a><a name="MyGUI"></a><span class='hs-comment'>-- This only holds GUI widgets that are needed to be read during</span>
|
||||
<a name="line-55"></a><a name="MyGUI"></a><span class='hs-comment'>-- runtime.</span>
|
||||
<a name="line-56"></a><a name="MyGUI"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyGUI</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-57"></a> <span class='hs-comment'>-- |main Window</span>
|
||||
<a name="line-58"></a> <span class='hs-varid'>rootWin</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Window</span>
|
||||
<a name="line-59"></a>
|
||||
<a name="line-60"></a> <span class='hs-comment'>-- widgets on the main window</span>
|
||||
<a name="line-61"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>menubar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>MenuBar</span>
|
||||
<a name="line-62"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>statusBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Statusbar</span>
|
||||
<a name="line-63"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>clearStatusBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-64"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>notebook</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Notebook</span>
|
||||
<a name="line-47"></a>
|
||||
<a name="line-48"></a><a name="MyGUI"></a><span class='hs-comment'>-- |Monolithic object passed to various GUI functions in order</span>
|
||||
<a name="line-49"></a><a name="MyGUI"></a><span class='hs-comment'>-- to keep the API stable and not alter the parameters too much.</span>
|
||||
<a name="line-50"></a><a name="MyGUI"></a><span class='hs-comment'>-- This only holds GUI widgets that are needed to be read during</span>
|
||||
<a name="line-51"></a><a name="MyGUI"></a><span class='hs-comment'>-- runtime.</span>
|
||||
<a name="line-52"></a><a name="MyGUI"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyGUI</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-53"></a> <span class='hs-comment'>-- |main Window</span>
|
||||
<a name="line-54"></a> <span class='hs-varid'>rootWin</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Window</span>
|
||||
<a name="line-55"></a>
|
||||
<a name="line-56"></a> <span class='hs-comment'>-- widgets on the main window</span>
|
||||
<a name="line-57"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>menubar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>MenuBar</span>
|
||||
<a name="line-58"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>statusBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Statusbar</span>
|
||||
<a name="line-59"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>clearStatusBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-60"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>notebook</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Notebook</span>
|
||||
<a name="line-61"></a>
|
||||
<a name="line-62"></a> <span class='hs-comment'>-- other</span>
|
||||
<a name="line-63"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fprop</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>FilePropertyGrid</span>
|
||||
<a name="line-64"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>settings</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FMSettings</span><span class='hs-layout'>)</span>
|
||||
<a name="line-65"></a>
|
||||
<a name="line-66"></a> <span class='hs-comment'>-- other</span>
|
||||
<a name="line-67"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fprop</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>FilePropertyGrid</span>
|
||||
<a name="line-68"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>settings</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FMSettings</span><span class='hs-layout'>)</span>
|
||||
<a name="line-66"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>operationBuffer</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FileOperation</span><span class='hs-layout'>)</span>
|
||||
<a name="line-67"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-68"></a>
|
||||
<a name="line-69"></a>
|
||||
<a name="line-70"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>operationBuffer</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FileOperation</span><span class='hs-layout'>)</span>
|
||||
<a name="line-71"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-72"></a>
|
||||
<a name="line-73"></a>
|
||||
<a name="line-74"></a><a name="MyView"></a><span class='hs-comment'>-- |This describes the contents of the current view and is separated from MyGUI,</span>
|
||||
<a name="line-75"></a><a name="MyView"></a><span class='hs-comment'>-- because we might want to have multiple views.</span>
|
||||
<a name="line-76"></a><a name="MyView"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyView</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-77"></a> <span class='hs-varid'>view</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FMView</span><span class='hs-layout'>)</span>
|
||||
<a name="line-78"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-79"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rawModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>ListStore</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-80"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>sortedModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>TypedTreeModelSort</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-81"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>filteredModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>TypedTreeModelFilter</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>inotify</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>INotify</span><span class='hs-layout'>)</span>
|
||||
<a name="line-70"></a><a name="MyView"></a><span class='hs-comment'>-- |This describes the contents of the current view and is separated from MyGUI,</span>
|
||||
<a name="line-71"></a><a name="MyView"></a><span class='hs-comment'>-- because we might want to have multiple views.</span>
|
||||
<a name="line-72"></a><a name="MyView"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyView</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-73"></a> <span class='hs-varid'>view</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-conid'>FMView</span><span class='hs-layout'>)</span>
|
||||
<a name="line-74"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-75"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rawModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>ListStore</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-76"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>sortedModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>TypedTreeModelSort</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-77"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>filteredModel</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-conid'>TypedTreeModelFilter</span> <span class='hs-conid'>Item</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-78"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>inotify</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>INotify</span><span class='hs-layout'>)</span>
|
||||
<a name="line-79"></a>
|
||||
<a name="line-80"></a> <span class='hs-comment'>-- the first part of the tuple represents the "go back"</span>
|
||||
<a name="line-81"></a> <span class='hs-comment'>-- the second part the "go forth" in the history</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>history</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>MVar</span> <span class='hs-conid'>BrowsingHistory</span><span class='hs-layout'>)</span>
|
||||
<a name="line-83"></a>
|
||||
<a name="line-84"></a> <span class='hs-comment'>-- the first part of the tuple represents the "go back"</span>
|
||||
<a name="line-85"></a> <span class='hs-comment'>-- the second part the "go forth" in the history</span>
|
||||
<a name="line-86"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>history</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-layout'>(</span><span class='hs-conid'>TVar</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>[</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Path</span> <span class='hs-conid'>Abs</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
|
||||
<a name="line-87"></a>
|
||||
<a name="line-88"></a> <span class='hs-comment'>-- sub-widgets</span>
|
||||
<a name="line-89"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>scroll</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ScrolledWindow</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>viewBox</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Box</span>
|
||||
<a name="line-91"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcmenu</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>RightClickMenu</span>
|
||||
<a name="line-92"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>upViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-93"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>homeViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-94"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>refreshViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-95"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>urlBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-96"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-97"></a>
|
||||
<a name="line-98"></a>
|
||||
<a name="line-99"></a><a name="MenuBar"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MenuBar</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMenuBar</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-100"></a> <span class='hs-varid'>menubarFileQuit</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-101"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>menubarHelpAbout</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-102"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-103"></a>
|
||||
<a name="line-104"></a><a name="RightClickMenu"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>RightClickMenu</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkRightClickMenu</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-105"></a> <span class='hs-varid'>rcMenu</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Menu</span>
|
||||
<a name="line-106"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileOpen</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-107"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileExecute</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-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'>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>
|
||||
<a name="line-115"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFilePaste</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-116"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileDelete</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-117"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileProperty</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-118"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileIconView</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-119"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileTreeView</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-120"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-121"></a>
|
||||
<a name="line-122"></a><a name="FilePropertyGrid"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FilePropertyGrid</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFilePropertyGrid</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-123"></a> <span class='hs-varid'>fpropGrid</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Grid</span>
|
||||
<a name="line-124"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropFnEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-125"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropLocEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-126"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropTsEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-127"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropModEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-128"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropAcEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-129"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropFTEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-130"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropPermEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-131"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropLDEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-132"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-133"></a>
|
||||
<a name="line-134"></a>
|
||||
<a name="line-135"></a><a name="FMSettings"></a><span class='hs-comment'>-- |FM-wide settings.</span>
|
||||
<a name="line-136"></a><a name="FMSettings"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FMSettings</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFMSettings</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-137"></a> <span class='hs-varid'>showHidden</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Bool</span>
|
||||
<a name="line-138"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>isLazy</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Bool</span>
|
||||
<a name="line-139"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>iconSize</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Int</span>
|
||||
<a name="line-140"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-141"></a>
|
||||
<a name="line-142"></a><a name="FMView"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>FMTreeView</span> <span class='hs-varop'>!</span><span class='hs-conid'>TreeView</span>
|
||||
<a name="line-143"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>FMIconView</span> <span class='hs-varop'>!</span><span class='hs-conid'>IconView</span>
|
||||
<a name="line-84"></a> <span class='hs-comment'>-- sub-widgets</span>
|
||||
<a name="line-85"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>scroll</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ScrolledWindow</span>
|
||||
<a name="line-86"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>viewBox</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Box</span>
|
||||
<a name="line-87"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcmenu</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>RightClickMenu</span>
|
||||
<a name="line-88"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>upViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-89"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>homeViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>refreshViewB</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Button</span>
|
||||
<a name="line-91"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>urlBar</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-92"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-93"></a>
|
||||
<a name="line-94"></a>
|
||||
<a name="line-95"></a><a name="MenuBar"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>MenuBar</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMenuBar</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-96"></a> <span class='hs-varid'>menubarFileQuit</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-97"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>menubarHelpAbout</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-98"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-99"></a>
|
||||
<a name="line-100"></a><a name="RightClickMenu"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>RightClickMenu</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkRightClickMenu</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-101"></a> <span class='hs-varid'>rcMenu</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Menu</span>
|
||||
<a name="line-102"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileOpen</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-103"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileExecute</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-104"></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-105"></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-106"></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-107"></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-108"></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-109"></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-110"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileRename</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-111"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFilePaste</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-112"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileDelete</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-113"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileProperty</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-114"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileIconView</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-115"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>rcFileTreeView</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>ImageMenuItem</span>
|
||||
<a name="line-116"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-117"></a>
|
||||
<a name="line-118"></a><a name="FilePropertyGrid"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FilePropertyGrid</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFilePropertyGrid</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-119"></a> <span class='hs-varid'>fpropGrid</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Grid</span>
|
||||
<a name="line-120"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropFnEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-121"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropLocEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-122"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropTsEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-123"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropModEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-124"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropAcEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-125"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropFTEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-126"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropPermEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-127"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>fpropLDEntry</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Entry</span>
|
||||
<a name="line-128"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-129"></a>
|
||||
<a name="line-130"></a>
|
||||
<a name="line-131"></a><a name="FMSettings"></a><span class='hs-comment'>-- |FM-wide settings.</span>
|
||||
<a name="line-132"></a><a name="FMSettings"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FMSettings</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkFMSettings</span> <span class='hs-layout'>{</span>
|
||||
<a name="line-133"></a> <span class='hs-varid'>showHidden</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Bool</span>
|
||||
<a name="line-134"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>isLazy</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Bool</span>
|
||||
<a name="line-135"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>iconSize</span> <span class='hs-keyglyph'>::</span> <span class='hs-varop'>!</span><span class='hs-conid'>Int</span>
|
||||
<a name="line-136"></a><span class='hs-layout'>}</span>
|
||||
<a name="line-137"></a>
|
||||
<a name="line-138"></a><a name="FMView"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>FMTreeView</span> <span class='hs-varop'>!</span><span class='hs-conid'>TreeView</span>
|
||||
<a name="line-139"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>FMIconView</span> <span class='hs-varop'>!</span><span class='hs-conid'>IconView</span>
|
||||
<a name="line-140"></a>
|
||||
<a name="line-141"></a><a name="Item"></a><span class='hs-keyword'>type</span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>File</span> <span class='hs-conid'>FileInfo</span>
|
||||
<a name="line-142"></a>
|
||||
<a name="line-143"></a>
|
||||
<a name="line-144"></a>
|
||||
<a name="line-145"></a><a name="Item"></a><span class='hs-keyword'>type</span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>File</span> <span class='hs-conid'>FileInfo</span>
|
||||
<a name="line-146"></a>
|
||||
<a name="line-147"></a>
|
||||
<a name="line-145"></a><a name="fmViewToContainer"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Container</span>
|
||||
<a name="line-146"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>castToContainer</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toGObject</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-147"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMIconView</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>castToContainer</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toGObject</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-148"></a>
|
||||
<a name="line-149"></a><a name="fmViewToContainer"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Container</span>
|
||||
<a name="line-150"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>castToContainer</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toGObject</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-151"></a><span class='hs-definition'>fmViewToContainer</span> <span class='hs-layout'>(</span><span class='hs-conid'>FMIconView</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>castToContainer</span> <span class='hs-varop'>.</span> <span class='hs-varid'>toGObject</span> <span class='hs-varop'>$</span> <span class='hs-varid'>x</span>
|
||||
<a name="line-152"></a>
|
||||
</pre></body>
|
||||
</html>
|
||||
|
@ -73,387 +73,395 @@
|
||||
<a name="line-64"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
|
||||
<a name="line-65"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Icons</span>
|
||||
<a name="line-66"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span>
|
||||
<a name="line-67"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-68"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
|
||||
<a name="line-69"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-70"></a> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-71"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-72"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-73"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>INotify</span>
|
||||
<a name="line-74"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-75"></a> <span class='hs-varid'>addWatch</span>
|
||||
<a name="line-76"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>initINotify</span>
|
||||
<a name="line-77"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>killINotify</span>
|
||||
<a name="line-78"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>EventVariety</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-79"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-80"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Error</span>
|
||||
<a name="line-81"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-82"></a> <span class='hs-varid'>catchIOError</span>
|
||||
<a name="line-83"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>ioError</span>
|
||||
<a name="line-84"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>isUserError</span>
|
||||
<a name="line-85"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-86"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>FilePath</span>
|
||||
<a name="line-87"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-88"></a> <span class='hs-varid'>hiddenFile</span>
|
||||
<a name="line-89"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-90"></a>
|
||||
<a name="line-67"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>History</span>
|
||||
<a name="line-68"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>Utils</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span>
|
||||
<a name="line-69"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
|
||||
<a name="line-70"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-71"></a> <span class='hs-varid'>getDataFileName</span>
|
||||
<a name="line-72"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-73"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Prelude</span> <span class='hs-varid'>hiding</span><span class='hs-layout'>(</span><span class='hs-varid'>readFile</span><span class='hs-layout'>)</span>
|
||||
<a name="line-74"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>INotify</span>
|
||||
<a name="line-75"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-76"></a> <span class='hs-varid'>addWatch</span>
|
||||
<a name="line-77"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>initINotify</span>
|
||||
<a name="line-78"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>killINotify</span>
|
||||
<a name="line-79"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>EventVariety</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
|
||||
<a name="line-80"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-81"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Error</span>
|
||||
<a name="line-82"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-83"></a> <span class='hs-varid'>catchIOError</span>
|
||||
<a name="line-84"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>ioError</span>
|
||||
<a name="line-85"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>isUserError</span>
|
||||
<a name="line-86"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-87"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>FilePath</span>
|
||||
<a name="line-88"></a> <span class='hs-layout'>(</span>
|
||||
<a name="line-89"></a> <span class='hs-varid'>hiddenFile</span>
|
||||
<a name="line-90"></a> <span class='hs-layout'>)</span>
|
||||
<a name="line-91"></a>
|
||||
<a name="line-92"></a>
|
||||
<a name="line-93"></a><a name="newTab"></a><span class='hs-comment'>-- |Creates a new tab with its own view and refreshes the view.</span>
|
||||
<a name="line-94"></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'>IO</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Int</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-95"></a><span class='hs-definition'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span> <span class='hs-varid'>item</span> <span class='hs-varid'>pos</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-96"></a> <span class='hs-comment'>-- create eventbox with label</span>
|
||||
<a name="line-97"></a> <span class='hs-varid'>label</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>labelNewWithMnemonic</span>
|
||||
<a name="line-98"></a> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-99"></a> <span class='hs-varid'>ebox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventBoxNew</span>
|
||||
<a name="line-100"></a> <span class='hs-varid'>eventBoxSetVisibleWindow</span> <span class='hs-varid'>ebox</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-101"></a> <span class='hs-varid'>containerAdd</span> <span class='hs-varid'>ebox</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-102"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-103"></a>
|
||||
<a name="line-104"></a> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>createMyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span>
|
||||
<a name="line-105"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookInsertPageMenu</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-106"></a> <span class='hs-varid'>ebox</span> <span class='hs-varid'>ebox</span> <span class='hs-varid'>pos</span>
|
||||
<a name="line-107"></a>
|
||||
<a name="line-108"></a> <span class='hs-varid'>notebookSetTabReorderable</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-109"></a>
|
||||
<a name="line-110"></a> <span class='hs-varid'>catchIOError</span> <span class='hs-layout'>(</span><span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-111"></a> <span class='hs-varid'>file</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseAbs</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromString</span>
|
||||
<a name="line-112"></a> <span class='hs-varop'>$</span> <span class='hs-str'>"/"</span>
|
||||
<a name="line-113"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>file</span>
|
||||
<a name="line-114"></a> <span class='hs-varid'>labelSetText</span> <span class='hs-varid'>label</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"/"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-115"></a> <span class='hs-varid'>unless</span> <span class='hs-layout'>(</span><span class='hs-varid'>isUserError</span> <span class='hs-varid'>e</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>ioError</span> <span class='hs-varid'>e</span><span class='hs-layout'>)</span>
|
||||
<a name="line-116"></a>
|
||||
<a name="line-117"></a> <span class='hs-comment'>-- close callback</span>
|
||||
<a name="line-118"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>ebox</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-119"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-120"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-121"></a> <span class='hs-conid'>MiddleButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-122"></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-123"></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-124"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-125"></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-126"></a>
|
||||
<a name="line-127"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-128"></a>
|
||||
<a name="line-129"></a>
|
||||
<a name="line-130"></a><a name="createMyView"></a><span class='hs-comment'>-- |Constructs the initial MyView object with a few dummy models.</span>
|
||||
<a name="line-131"></a><span class='hs-comment'>-- It also initializes the callbacks.</span>
|
||||
<a name="line-132"></a><span class='hs-definition'>createMyView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-133"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-134"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-135"></a><span class='hs-definition'>createMyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-136"></a> <span class='hs-varid'>inotify</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-137"></a> <span class='hs-varid'>history</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-layout'>(</span><span class='hs-conid'>[]</span><span class='hs-layout'>,</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span>
|
||||
<a name="line-138"></a>
|
||||
<a name="line-139"></a> <span class='hs-varid'>builder</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderNew</span>
|
||||
<a name="line-140"></a> <span class='hs-varid'>builderAddFromFile</span> <span class='hs-varid'>builder</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/builder.xml"</span>
|
||||
<a name="line-141"></a>
|
||||
<a name="line-142"></a> <span class='hs-comment'>-- create dummy models, so we don't have to use MVar</span>
|
||||
<a name="line-143"></a> <span class='hs-varid'>rawModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>listStoreNew</span> <span class='hs-conid'>[]</span>
|
||||
<a name="line-144"></a> <span class='hs-varid'>filteredModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>treeModelFilterNew</span> <span class='hs-varid'>x</span> <span class='hs-conid'>[]</span><span class='hs-layout'>)</span>
|
||||
<a name="line-145"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varid'>rawModel</span>
|
||||
<a name="line-146"></a> <span class='hs-varid'>sortedModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>treeModelSortNewWithModel</span>
|
||||
<a name="line-147"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varid'>filteredModel</span>
|
||||
<a name="line-148"></a> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-149"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iofmv</span>
|
||||
<a name="line-150"></a> <span class='hs-varid'>view</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varid'>view'</span>
|
||||
<a name="line-151"></a>
|
||||
<a name="line-152"></a> <span class='hs-varid'>urlBar</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-153"></a> <span class='hs-str'>"urlBar"</span>
|
||||
<a name="line-154"></a> <span class='hs-varid'>rcMenu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToMenu</span>
|
||||
<a name="line-155"></a> <span class='hs-str'>"rcMenu"</span>
|
||||
<a name="line-156"></a> <span class='hs-varid'>rcFileOpen</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-157"></a> <span class='hs-str'>"rcFileOpen"</span>
|
||||
<a name="line-158"></a> <span class='hs-varid'>rcFileExecute</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-159"></a> <span class='hs-str'>"rcFileExecute"</span>
|
||||
<a name="line-160"></a> <span class='hs-varid'>rcFileNewRegFile</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-161"></a> <span class='hs-str'>"rcFileNewRegFile"</span>
|
||||
<a name="line-162"></a> <span class='hs-varid'>rcFileNewDir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-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'>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>
|
||||
<a name="line-171"></a> <span class='hs-str'>"rcFileCopy"</span>
|
||||
<a name="line-172"></a> <span class='hs-varid'>rcFileRename</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-173"></a> <span class='hs-str'>"rcFileRename"</span>
|
||||
<a name="line-174"></a> <span class='hs-varid'>rcFilePaste</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-175"></a> <span class='hs-str'>"rcFilePaste"</span>
|
||||
<a name="line-176"></a> <span class='hs-varid'>rcFileDelete</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-177"></a> <span class='hs-str'>"rcFileDelete"</span>
|
||||
<a name="line-178"></a> <span class='hs-varid'>rcFileProperty</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-179"></a> <span class='hs-str'>"rcFileProperty"</span>
|
||||
<a name="line-180"></a> <span class='hs-varid'>rcFileIconView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-181"></a> <span class='hs-str'>"rcFileIconView"</span>
|
||||
<a name="line-182"></a> <span class='hs-varid'>rcFileTreeView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-183"></a> <span class='hs-str'>"rcFileTreeView"</span>
|
||||
<a name="line-184"></a> <span class='hs-varid'>upViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-185"></a> <span class='hs-str'>"upViewB"</span>
|
||||
<a name="line-186"></a> <span class='hs-varid'>homeViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-187"></a> <span class='hs-str'>"homeViewB"</span>
|
||||
<a name="line-188"></a> <span class='hs-varid'>refreshViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-189"></a> <span class='hs-str'>"refreshViewB"</span>
|
||||
<a name="line-190"></a> <span class='hs-varid'>scroll</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToScrolledWindow</span>
|
||||
<a name="line-191"></a> <span class='hs-str'>"mainScroll"</span>
|
||||
<a name="line-192"></a> <span class='hs-varid'>viewBox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToBox</span>
|
||||
<a name="line-193"></a> <span class='hs-str'>"viewBox"</span>
|
||||
<a name="line-194"></a>
|
||||
<a name="line-195"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>rcmenu</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkRightClickMenu</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-196"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyView</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-197"></a>
|
||||
<a name="line-198"></a> <span class='hs-comment'>-- set the bindings</span>
|
||||
<a name="line-199"></a> <span class='hs-varid'>setViewCallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-200"></a>
|
||||
<a name="line-201"></a> <span class='hs-comment'>-- add the treeview to the scroll container</span>
|
||||
<a name="line-202"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>oview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>view'</span>
|
||||
<a name="line-203"></a> <span class='hs-varid'>containerAdd</span> <span class='hs-varid'>scroll</span> <span class='hs-varid'>oview</span>
|
||||
<a name="line-204"></a>
|
||||
<a name="line-205"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>viewBox</span>
|
||||
<a name="line-206"></a>
|
||||
<a name="line-207"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-93"></a>
|
||||
<a name="line-94"></a><a name="newTab"></a><span class='hs-comment'>-- |Creates a new tab with its own view and refreshes the view.</span>
|
||||
<a name="line-95"></a><span class='hs-definition'>newTab</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Int</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-96"></a><span class='hs-definition'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span> <span class='hs-varid'>item</span> <span class='hs-varid'>pos</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-97"></a>
|
||||
<a name="line-98"></a>
|
||||
<a name="line-99"></a> <span class='hs-comment'>-- create eventbox with label</span>
|
||||
<a name="line-100"></a> <span class='hs-varid'>label</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>labelNewWithMnemonic</span>
|
||||
<a name="line-101"></a> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>$</span> <span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
|
||||
<a name="line-102"></a> <span class='hs-varid'>ebox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventBoxNew</span>
|
||||
<a name="line-103"></a> <span class='hs-varid'>eventBoxSetVisibleWindow</span> <span class='hs-varid'>ebox</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-104"></a> <span class='hs-varid'>containerAdd</span> <span class='hs-varid'>ebox</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-105"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>label</span>
|
||||
<a name="line-106"></a>
|
||||
<a name="line-107"></a> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>createMyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span>
|
||||
<a name="line-108"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookInsertPageMenu</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-109"></a> <span class='hs-varid'>ebox</span> <span class='hs-varid'>ebox</span> <span class='hs-varid'>pos</span>
|
||||
<a name="line-110"></a>
|
||||
<a name="line-111"></a> <span class='hs-comment'>-- set initial history</span>
|
||||
<a name="line-112"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>historySize</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>5</span>
|
||||
<a name="line-113"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>history</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-114"></a> <span class='hs-layout'>(</span><span class='hs-conid'>BrowsingHistory</span> <span class='hs-conid'>[]</span> <span class='hs-layout'>(</span><span class='hs-varid'>path</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-conid'>[]</span> <span class='hs-varid'>historySize</span><span class='hs-layout'>)</span>
|
||||
<a name="line-115"></a>
|
||||
<a name="line-116"></a> <span class='hs-varid'>notebookSetTabReorderable</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-117"></a>
|
||||
<a name="line-118"></a> <span class='hs-varid'>catchIOError</span> <span class='hs-layout'>(</span><span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-119"></a> <span class='hs-varid'>file</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readFile</span> <span class='hs-varid'>getFileInfo</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseAbs</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromString</span>
|
||||
<a name="line-120"></a> <span class='hs-varop'>$</span> <span class='hs-str'>"/"</span>
|
||||
<a name="line-121"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>file</span>
|
||||
<a name="line-122"></a> <span class='hs-varid'>labelSetText</span> <span class='hs-varid'>label</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"/"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-123"></a> <span class='hs-varid'>unless</span> <span class='hs-layout'>(</span><span class='hs-varid'>isUserError</span> <span class='hs-varid'>e</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>ioError</span> <span class='hs-varid'>e</span><span class='hs-layout'>)</span>
|
||||
<a name="line-124"></a>
|
||||
<a name="line-125"></a> <span class='hs-comment'>-- close callback</span>
|
||||
<a name="line-126"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>ebox</span> <span class='hs-varop'>`on`</span> <span class='hs-varid'>buttonPressEvent</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-127"></a> <span class='hs-varid'>eb</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>eventButton</span>
|
||||
<a name="line-128"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>eb</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-129"></a> <span class='hs-conid'>MiddleButton</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>liftIO</span> <span class='hs-varop'>$</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-130"></a> <span class='hs-varid'>n</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>notebookGetNPages</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-131"></a> <span class='hs-varid'>when</span> <span class='hs-layout'>(</span><span class='hs-varid'>n</span> <span class='hs-varop'>></span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <span class='hs-varop'>$</span> <span class='hs-varid'>void</span> <span class='hs-varop'>$</span> <span class='hs-varid'>destroyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-132"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-133"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-134"></a>
|
||||
<a name="line-135"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-136"></a>
|
||||
<a name="line-137"></a>
|
||||
<a name="line-138"></a><a name="createMyView"></a><span class='hs-comment'>-- |Constructs the initial MyView object with a few dummy models.</span>
|
||||
<a name="line-139"></a><span class='hs-comment'>-- It also initializes the callbacks.</span>
|
||||
<a name="line-140"></a><span class='hs-definition'>createMyView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-141"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-142"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-143"></a><span class='hs-definition'>createMyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-144"></a> <span class='hs-varid'>inotify</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-145"></a> <span class='hs-varid'>history</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-146"></a>
|
||||
<a name="line-147"></a> <span class='hs-varid'>builder</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderNew</span>
|
||||
<a name="line-148"></a> <span class='hs-varid'>builderAddFromFile</span> <span class='hs-varid'>builder</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/builder.xml"</span>
|
||||
<a name="line-149"></a>
|
||||
<a name="line-150"></a> <span class='hs-comment'>-- create dummy models, so we don't have to use MVar</span>
|
||||
<a name="line-151"></a> <span class='hs-varid'>rawModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>listStoreNew</span> <span class='hs-conid'>[]</span>
|
||||
<a name="line-152"></a> <span class='hs-varid'>filteredModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>x</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>treeModelFilterNew</span> <span class='hs-varid'>x</span> <span class='hs-conid'>[]</span><span class='hs-layout'>)</span>
|
||||
<a name="line-153"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varid'>rawModel</span>
|
||||
<a name="line-154"></a> <span class='hs-varid'>sortedModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varop'>=<<</span> <span class='hs-varid'>treeModelSortNewWithModel</span>
|
||||
<a name="line-155"></a> <span class='hs-varop'>=<<</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varid'>filteredModel</span>
|
||||
<a name="line-156"></a> <span class='hs-varid'>cwd</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newEmptyMVar</span>
|
||||
<a name="line-157"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iofmv</span>
|
||||
<a name="line-158"></a> <span class='hs-varid'>view</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTVarIO</span> <span class='hs-varid'>view'</span>
|
||||
<a name="line-159"></a>
|
||||
<a name="line-160"></a> <span class='hs-varid'>urlBar</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToEntry</span>
|
||||
<a name="line-161"></a> <span class='hs-str'>"urlBar"</span>
|
||||
<a name="line-162"></a> <span class='hs-varid'>rcMenu</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToMenu</span>
|
||||
<a name="line-163"></a> <span class='hs-str'>"rcMenu"</span>
|
||||
<a name="line-164"></a> <span class='hs-varid'>rcFileOpen</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-165"></a> <span class='hs-str'>"rcFileOpen"</span>
|
||||
<a name="line-166"></a> <span class='hs-varid'>rcFileExecute</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-167"></a> <span class='hs-str'>"rcFileExecute"</span>
|
||||
<a name="line-168"></a> <span class='hs-varid'>rcFileNewRegFile</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-169"></a> <span class='hs-str'>"rcFileNewRegFile"</span>
|
||||
<a name="line-170"></a> <span class='hs-varid'>rcFileNewDir</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-171"></a> <span class='hs-str'>"rcFileNewDir"</span>
|
||||
<a name="line-172"></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-173"></a> <span class='hs-str'>"rcFileNewTab"</span>
|
||||
<a name="line-174"></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-175"></a> <span class='hs-str'>"rcFileNewTerm"</span>
|
||||
<a name="line-176"></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-177"></a> <span class='hs-str'>"rcFileCut"</span>
|
||||
<a name="line-178"></a> <span class='hs-varid'>rcFileCopy</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-179"></a> <span class='hs-str'>"rcFileCopy"</span>
|
||||
<a name="line-180"></a> <span class='hs-varid'>rcFileRename</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-181"></a> <span class='hs-str'>"rcFileRename"</span>
|
||||
<a name="line-182"></a> <span class='hs-varid'>rcFilePaste</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-183"></a> <span class='hs-str'>"rcFilePaste"</span>
|
||||
<a name="line-184"></a> <span class='hs-varid'>rcFileDelete</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-185"></a> <span class='hs-str'>"rcFileDelete"</span>
|
||||
<a name="line-186"></a> <span class='hs-varid'>rcFileProperty</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-187"></a> <span class='hs-str'>"rcFileProperty"</span>
|
||||
<a name="line-188"></a> <span class='hs-varid'>rcFileIconView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-189"></a> <span class='hs-str'>"rcFileIconView"</span>
|
||||
<a name="line-190"></a> <span class='hs-varid'>rcFileTreeView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToImageMenuItem</span>
|
||||
<a name="line-191"></a> <span class='hs-str'>"rcFileTreeView"</span>
|
||||
<a name="line-192"></a> <span class='hs-varid'>upViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-193"></a> <span class='hs-str'>"upViewB"</span>
|
||||
<a name="line-194"></a> <span class='hs-varid'>homeViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-195"></a> <span class='hs-str'>"homeViewB"</span>
|
||||
<a name="line-196"></a> <span class='hs-varid'>refreshViewB</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToButton</span>
|
||||
<a name="line-197"></a> <span class='hs-str'>"refreshViewB"</span>
|
||||
<a name="line-198"></a> <span class='hs-varid'>scroll</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToScrolledWindow</span>
|
||||
<a name="line-199"></a> <span class='hs-str'>"mainScroll"</span>
|
||||
<a name="line-200"></a> <span class='hs-varid'>viewBox</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>builderGetObject</span> <span class='hs-varid'>builder</span> <span class='hs-varid'>castToBox</span>
|
||||
<a name="line-201"></a> <span class='hs-str'>"viewBox"</span>
|
||||
<a name="line-202"></a>
|
||||
<a name="line-203"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>rcmenu</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkRightClickMenu</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-204"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MkMyView</span> <span class='hs-layout'>{</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>}</span>
|
||||
<a name="line-205"></a>
|
||||
<a name="line-206"></a> <span class='hs-comment'>-- set the bindings</span>
|
||||
<a name="line-207"></a> <span class='hs-varid'>setViewCallbacks</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-208"></a>
|
||||
<a name="line-209"></a>
|
||||
<a name="line-210"></a><a name="switchView"></a><span class='hs-comment'>-- |Switch the existing view in `MyView` with the one that the</span>
|
||||
<a name="line-211"></a><span class='hs-comment'>-- io action returns.</span>
|
||||
<a name="line-212"></a><span class='hs-definition'>switchView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-213"></a><span class='hs-definition'>switchView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>iofmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-214"></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-215"></a>
|
||||
<a name="line-216"></a> <span class='hs-varid'>oldpage</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>destroyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-209"></a> <span class='hs-comment'>-- add the treeview to the scroll container</span>
|
||||
<a name="line-210"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>oview</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>view'</span>
|
||||
<a name="line-211"></a> <span class='hs-varid'>containerAdd</span> <span class='hs-varid'>scroll</span> <span class='hs-varid'>oview</span>
|
||||
<a name="line-212"></a>
|
||||
<a name="line-213"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>viewBox</span>
|
||||
<a name="line-214"></a>
|
||||
<a name="line-215"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-216"></a>
|
||||
<a name="line-217"></a>
|
||||
<a name="line-218"></a> <span class='hs-comment'>-- create new view and tab page where the previous one was</span>
|
||||
<a name="line-219"></a> <span class='hs-varid'>nview</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span> <span class='hs-varid'>cwd</span> <span class='hs-varid'>oldpage</span>
|
||||
<a name="line-220"></a>
|
||||
<a name="line-221"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookPageNum</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>nview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-222"></a> <span class='hs-varid'>notebookSetCurrentPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-218"></a><a name="switchView"></a><span class='hs-comment'>-- |Switch the existing view in `MyView` with the one that the</span>
|
||||
<a name="line-219"></a><span class='hs-comment'>-- io action returns.</span>
|
||||
<a name="line-220"></a><span class='hs-definition'>switchView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-221"></a><span class='hs-definition'>switchView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>iofmv</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-222"></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-223"></a>
|
||||
<a name="line-224"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>nview</span> <span class='hs-varid'>cwd</span>
|
||||
<a name="line-224"></a> <span class='hs-varid'>oldpage</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>destroyView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-225"></a>
|
||||
<a name="line-226"></a>
|
||||
<a name="line-227"></a><a name="destroyView"></a><span class='hs-comment'>-- |Destroys the given view by disconnecting the watcher</span>
|
||||
<a name="line-228"></a><span class='hs-comment'>-- and destroying the active FMView container.</span>
|
||||
<a name="line-229"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-230"></a><span class='hs-comment'>-- Everything that needs to be done in order to forget about a</span>
|
||||
<a name="line-231"></a><span class='hs-comment'>-- view needs to be done here.</span>
|
||||
<a name="line-232"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-233"></a><span class='hs-comment'>-- Returns the page in the tab list this view corresponds to.</span>
|
||||
<a name="line-234"></a><span class='hs-definition'>destroyView</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'>Int</span>
|
||||
<a name="line-235"></a><span class='hs-definition'>destroyView</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-236"></a> <span class='hs-comment'>-- disconnect watcher</span>
|
||||
<a name="line-237"></a> <span class='hs-varid'>mi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-238"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mi</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>i</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>killINotify</span> <span class='hs-varid'>i</span>
|
||||
<a name="line-239"></a>
|
||||
<a name="line-240"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookPageNum</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-241"></a>
|
||||
<a name="line-242"></a> <span class='hs-comment'>-- destroy old view and tab page</span>
|
||||
<a name="line-243"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-244"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-layout'>(</span><span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>view'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-245"></a> <span class='hs-varid'>notebookRemovePage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-246"></a>
|
||||
<a name="line-247"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-248"></a>
|
||||
<a name="line-226"></a> <span class='hs-comment'>-- create new view and tab page where the previous one was</span>
|
||||
<a name="line-227"></a> <span class='hs-varid'>nview</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>newTab</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>iofmv</span> <span class='hs-varid'>cwd</span> <span class='hs-varid'>oldpage</span>
|
||||
<a name="line-228"></a>
|
||||
<a name="line-229"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookPageNum</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>nview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-230"></a> <span class='hs-varid'>notebookSetCurrentPage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-231"></a>
|
||||
<a name="line-232"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>nview</span> <span class='hs-varid'>cwd</span>
|
||||
<a name="line-233"></a>
|
||||
<a name="line-234"></a>
|
||||
<a name="line-235"></a><a name="destroyView"></a><span class='hs-comment'>-- |Destroys the given view by disconnecting the watcher</span>
|
||||
<a name="line-236"></a><span class='hs-comment'>-- and destroying the active FMView container.</span>
|
||||
<a name="line-237"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-238"></a><span class='hs-comment'>-- Everything that needs to be done in order to forget about a</span>
|
||||
<a name="line-239"></a><span class='hs-comment'>-- view needs to be done here.</span>
|
||||
<a name="line-240"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-241"></a><span class='hs-comment'>-- Returns the page in the tab list this view corresponds to.</span>
|
||||
<a name="line-242"></a><span class='hs-definition'>destroyView</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'>Int</span>
|
||||
<a name="line-243"></a><span class='hs-definition'>destroyView</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-244"></a> <span class='hs-comment'>-- disconnect watcher</span>
|
||||
<a name="line-245"></a> <span class='hs-varid'>mi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-246"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mi</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>i</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>killINotify</span> <span class='hs-varid'>i</span>
|
||||
<a name="line-247"></a>
|
||||
<a name="line-248"></a> <span class='hs-varid'>page</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'><$></span> <span class='hs-varid'>notebookPageNum</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>viewBox</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-249"></a>
|
||||
<a name="line-250"></a><a name="createIconView"></a><span class='hs-comment'>-- |Createss an IconView.</span>
|
||||
<a name="line-251"></a><span class='hs-definition'>createIconView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-252"></a><span class='hs-definition'>createIconView</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-253"></a> <span class='hs-varid'>iconv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconViewNew</span>
|
||||
<a name="line-254"></a> <span class='hs-varid'>iconViewSetSelectionMode</span> <span class='hs-varid'>iconv</span> <span class='hs-conid'>SelectionMultiple</span>
|
||||
<a name="line-255"></a> <span class='hs-varid'>iconViewSetColumns</span> <span class='hs-varid'>iconv</span> <span class='hs-layout'>(</span><span class='hs-comment'>-</span><span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-256"></a> <span class='hs-varid'>iconViewSetSpacing</span> <span class='hs-varid'>iconv</span> <span class='hs-num'>2</span>
|
||||
<a name="line-257"></a> <span class='hs-varid'>iconViewSetMargin</span> <span class='hs-varid'>iconv</span> <span class='hs-num'>0</span>
|
||||
<a name="line-258"></a> <span class='hs-comment'>{- set iconv [ iconViewItemOrientation := OrientationHorizontal ] -}</span>
|
||||
<a name="line-259"></a> <span class='hs-comment'>{- set iconv [ iconViewOrientation := OrientationHorizontal ] -}</span>
|
||||
<a name="line-260"></a>
|
||||
<a name="line-261"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconv</span>
|
||||
<a name="line-262"></a>
|
||||
<a name="line-263"></a>
|
||||
<a name="line-264"></a><a name="createTreeView"></a><span class='hs-comment'>-- |Creates a TreeView.</span>
|
||||
<a name="line-265"></a><span class='hs-definition'>createTreeView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-266"></a><span class='hs-definition'>createTreeView</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-267"></a> <span class='hs-comment'>-- create the final view</span>
|
||||
<a name="line-268"></a> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewNew</span>
|
||||
<a name="line-269"></a> <span class='hs-comment'>-- set selection mode</span>
|
||||
<a name="line-270"></a> <span class='hs-varid'>tvs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetSelection</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-271"></a> <span class='hs-varid'>treeSelectionSetMode</span> <span class='hs-varid'>tvs</span> <span class='hs-conid'>SelectionMultiple</span>
|
||||
<a name="line-272"></a>
|
||||
<a name="line-273"></a> <span class='hs-comment'>-- set drag and drop</span>
|
||||
<a name="line-274"></a> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>targetListNew</span>
|
||||
<a name="line-275"></a> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>atomNew</span> <span class='hs-layout'>(</span><span class='hs-str'>"HSFM"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-276"></a> <span class='hs-varid'>targetListAdd</span> <span class='hs-varid'>tl</span> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>TargetSameApp</span><span class='hs-keyglyph'>]</span> <span class='hs-num'>0</span>
|
||||
<a name="line-277"></a> <span class='hs-varid'>treeViewEnableModelDragDest</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>ActionCopy</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-278"></a> <span class='hs-varid'>treeViewEnableModelDragSource</span> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Button1</span><span class='hs-keyglyph'>]</span> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>ActionCopy</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-279"></a>
|
||||
<a name="line-280"></a> <span class='hs-comment'>-- create final tree model columns</span>
|
||||
<a name="line-281"></a> <span class='hs-varid'>renderTxt</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>cellRendererTextNew</span>
|
||||
<a name="line-282"></a> <span class='hs-varid'>renderPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>cellRendererPixbufNew</span>
|
||||
<a name="line-283"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>ct</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>cellText</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>CellRendererTextClass</span> <span class='hs-varid'>cr</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Attr</span> <span class='hs-varid'>cr</span> <span class='hs-conid'>String</span>
|
||||
<a name="line-284"></a> <span class='hs-varid'>cp</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>cellPixbuf</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>CellRendererPixbufClass</span> <span class='hs-varid'>self</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Attr</span> <span class='hs-varid'>self</span> <span class='hs-conid'>Pixbuf</span>
|
||||
<a name="line-285"></a>
|
||||
<a name="line-286"></a> <span class='hs-comment'>-- filename column</span>
|
||||
<a name="line-287"></a> <span class='hs-varid'>cF</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-288"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cF</span> <span class='hs-layout'>(</span><span class='hs-str'>"Filename"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-289"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cF</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-290"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cF</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-291"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cF</span> <span class='hs-num'>1</span>
|
||||
<a name="line-292"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderPix</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-293"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-294"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cF</span>
|
||||
<a name="line-295"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderPix</span> <span class='hs-varid'>cp</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span>
|
||||
<a name="line-296"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span>
|
||||
<a name="line-297"></a>
|
||||
<a name="line-298"></a> <span class='hs-comment'>-- date column</span>
|
||||
<a name="line-299"></a> <span class='hs-varid'>cMD</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-300"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cMD</span> <span class='hs-layout'>(</span><span class='hs-str'>"Date"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-301"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cMD</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-302"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cMD</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-303"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cMD</span> <span class='hs-num'>2</span>
|
||||
<a name="line-304"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cMD</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-305"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cMD</span>
|
||||
<a name="line-306"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cMD</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>2</span>
|
||||
<a name="line-307"></a>
|
||||
<a name="line-308"></a> <span class='hs-comment'>-- permissions column</span>
|
||||
<a name="line-309"></a> <span class='hs-varid'>cP</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-310"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cP</span> <span class='hs-layout'>(</span><span class='hs-str'>"Permission"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-311"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cP</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-312"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cP</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-313"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cP</span> <span class='hs-num'>3</span>
|
||||
<a name="line-314"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cP</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-315"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cP</span>
|
||||
<a name="line-316"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cP</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>3</span>
|
||||
<a name="line-317"></a>
|
||||
<a name="line-318"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-319"></a>
|
||||
<a name="line-320"></a>
|
||||
<a name="line-321"></a><a name="refreshView"></a><span class='hs-comment'>-- |Refreshes the View based on the given directory.</span>
|
||||
<a name="line-322"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-323"></a><span class='hs-comment'>-- Throws:</span>
|
||||
<a name="line-324"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-325"></a><span class='hs-comment'>-- - `userError` on inappropriate type</span>
|
||||
<a name="line-326"></a><span class='hs-definition'>refreshView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-327"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-328"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span>
|
||||
<a name="line-329"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-330"></a><span class='hs-definition'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-conid'>SymLink</span> <span class='hs-layout'>{</span> <span class='hs-varid'>sdest</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>d</span><span class='hs-keyglyph'>@</span><span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-331"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>d</span>
|
||||
<a name="line-332"></a><span class='hs-definition'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span><span class='hs-keyglyph'>@</span><span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-333"></a> <span class='hs-varid'>newRawModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fileListStore</span> <span class='hs-varid'>item</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-334"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>rawModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>newRawModel</span>
|
||||
<a name="line-335"></a>
|
||||
<a name="line-336"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-337"></a>
|
||||
<a name="line-338"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>cwd</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-339"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>cwd</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-340"></a>
|
||||
<a name="line-341"></a> <span class='hs-comment'>-- get selected items</span>
|
||||
<a name="line-342"></a> <span class='hs-varid'>tps</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSelectedTreePaths</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-343"></a> <span class='hs-varid'>trs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>catMaybes</span> <span class='hs-varop'><$></span> <span class='hs-varid'>mapM</span> <span class='hs-layout'>(</span><span class='hs-varid'>treeRowReferenceNew</span> <span class='hs-varid'>newRawModel</span><span class='hs-layout'>)</span> <span class='hs-varid'>tps</span>
|
||||
<a name="line-344"></a>
|
||||
<a name="line-345"></a> <span class='hs-varid'>constructView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-346"></a>
|
||||
<a name="line-347"></a> <span class='hs-comment'>-- reselect selected items</span>
|
||||
<a name="line-348"></a> <span class='hs-comment'>-- TODO: not implemented for icon view yet</span>
|
||||
<a name="line-349"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-350"></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-351"></a> <span class='hs-varid'>tvs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetSelection</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-352"></a> <span class='hs-varid'>ntps</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>mapM</span> <span class='hs-varid'>treeRowReferenceGetPath</span> <span class='hs-varid'>trs</span>
|
||||
<a name="line-353"></a> <span class='hs-varid'>mapM_</span> <span class='hs-layout'>(</span><span class='hs-varid'>treeSelectionSelectPath</span> <span class='hs-varid'>tvs</span><span class='hs-layout'>)</span> <span class='hs-varid'>ntps</span>
|
||||
<a name="line-354"></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-355"></a><span class='hs-definition'>refreshView</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>ioError</span> <span class='hs-varop'>$</span> <span class='hs-varid'>userError</span> <span class='hs-str'>"Inappropriate type!"</span>
|
||||
<a name="line-356"></a>
|
||||
<a name="line-357"></a>
|
||||
<a name="line-358"></a><a name="constructView"></a><span class='hs-comment'>-- |Constructs the visible View with the current underlying mutable models,</span>
|
||||
<a name="line-359"></a><span class='hs-comment'>-- which are retrieved from 'MyGUI'.</span>
|
||||
<a name="line-360"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-361"></a><span class='hs-comment'>-- This sort of merges the components mygui and myview and fires up</span>
|
||||
<a name="line-362"></a><span class='hs-comment'>-- the actual models.</span>
|
||||
<a name="line-363"></a><span class='hs-definition'>constructView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-364"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-365"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-366"></a><span class='hs-definition'>constructView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-367"></a> <span class='hs-varid'>settings'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-368"></a>
|
||||
<a name="line-369"></a> <span class='hs-comment'>-- pix stuff</span>
|
||||
<a name="line-370"></a> <span class='hs-varid'>iT</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconThemeGetDefault</span>
|
||||
<a name="line-371"></a> <span class='hs-varid'>folderPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IFolder</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-372"></a> <span class='hs-varid'>folderSymPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSymlinkIcon</span> <span class='hs-conid'>IFolder</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-373"></a> <span class='hs-varid'>filePix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IFile</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-374"></a> <span class='hs-varid'>fileSymPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSymlinkIcon</span> <span class='hs-conid'>IFile</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-375"></a> <span class='hs-varid'>errorPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IError</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-376"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>folderPix</span>
|
||||
<a name="line-377"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>FileLike</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>filePix</span>
|
||||
<a name="line-378"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>DirSym</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>folderSymPix</span>
|
||||
<a name="line-379"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>FileLikeSym</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fileSymPix</span>
|
||||
<a name="line-380"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>BrokenSymlink</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>errorPix</span>
|
||||
<a name="line-381"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>errorPix</span>
|
||||
<a name="line-382"></a>
|
||||
<a name="line-383"></a>
|
||||
<a name="line-384"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-385"></a>
|
||||
<a name="line-386"></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-387"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cdirp</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-388"></a>
|
||||
<a name="line-389"></a> <span class='hs-comment'>-- update urlBar</span>
|
||||
<a name="line-390"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>urlBar</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdirp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-250"></a> <span class='hs-comment'>-- destroy old view and tab page</span>
|
||||
<a name="line-251"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-252"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-layout'>(</span><span class='hs-varid'>fmViewToContainer</span> <span class='hs-varid'>view'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-253"></a> <span class='hs-varid'>notebookRemovePage</span> <span class='hs-layout'>(</span><span class='hs-varid'>notebook</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-254"></a>
|
||||
<a name="line-255"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>page</span>
|
||||
<a name="line-256"></a>
|
||||
<a name="line-257"></a>
|
||||
<a name="line-258"></a><a name="createIconView"></a><span class='hs-comment'>-- |Createss an IconView.</span>
|
||||
<a name="line-259"></a><span class='hs-definition'>createIconView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-260"></a><span class='hs-definition'>createIconView</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-261"></a> <span class='hs-varid'>iconv</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconViewNew</span>
|
||||
<a name="line-262"></a> <span class='hs-varid'>iconViewSetSelectionMode</span> <span class='hs-varid'>iconv</span> <span class='hs-conid'>SelectionMultiple</span>
|
||||
<a name="line-263"></a> <span class='hs-varid'>iconViewSetColumns</span> <span class='hs-varid'>iconv</span> <span class='hs-layout'>(</span><span class='hs-comment'>-</span><span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-264"></a> <span class='hs-varid'>iconViewSetSpacing</span> <span class='hs-varid'>iconv</span> <span class='hs-num'>2</span>
|
||||
<a name="line-265"></a> <span class='hs-varid'>iconViewSetMargin</span> <span class='hs-varid'>iconv</span> <span class='hs-num'>0</span>
|
||||
<a name="line-266"></a> <span class='hs-comment'>{- set iconv [ iconViewItemOrientation := OrientationHorizontal ] -}</span>
|
||||
<a name="line-267"></a> <span class='hs-comment'>{- set iconv [ iconViewOrientation := OrientationHorizontal ] -}</span>
|
||||
<a name="line-268"></a>
|
||||
<a name="line-269"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconv</span>
|
||||
<a name="line-270"></a>
|
||||
<a name="line-271"></a>
|
||||
<a name="line-272"></a><a name="createTreeView"></a><span class='hs-comment'>-- |Creates a TreeView.</span>
|
||||
<a name="line-273"></a><span class='hs-definition'>createTreeView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>FMView</span>
|
||||
<a name="line-274"></a><span class='hs-definition'>createTreeView</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-275"></a> <span class='hs-comment'>-- create the final view</span>
|
||||
<a name="line-276"></a> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewNew</span>
|
||||
<a name="line-277"></a> <span class='hs-comment'>-- set selection mode</span>
|
||||
<a name="line-278"></a> <span class='hs-varid'>tvs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetSelection</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-279"></a> <span class='hs-varid'>treeSelectionSetMode</span> <span class='hs-varid'>tvs</span> <span class='hs-conid'>SelectionMultiple</span>
|
||||
<a name="line-280"></a>
|
||||
<a name="line-281"></a> <span class='hs-comment'>-- set drag and drop</span>
|
||||
<a name="line-282"></a> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>targetListNew</span>
|
||||
<a name="line-283"></a> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>atomNew</span> <span class='hs-layout'>(</span><span class='hs-str'>"HSFM"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-284"></a> <span class='hs-varid'>targetListAdd</span> <span class='hs-varid'>tl</span> <span class='hs-varid'>atom</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>TargetSameApp</span><span class='hs-keyglyph'>]</span> <span class='hs-num'>0</span>
|
||||
<a name="line-285"></a> <span class='hs-varid'>treeViewEnableModelDragDest</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>ActionCopy</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-286"></a> <span class='hs-varid'>treeViewEnableModelDragSource</span> <span class='hs-varid'>treeView</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Button1</span><span class='hs-keyglyph'>]</span> <span class='hs-varid'>tl</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>ActionCopy</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-287"></a>
|
||||
<a name="line-288"></a> <span class='hs-comment'>-- create final tree model columns</span>
|
||||
<a name="line-289"></a> <span class='hs-varid'>renderTxt</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>cellRendererTextNew</span>
|
||||
<a name="line-290"></a> <span class='hs-varid'>renderPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>cellRendererPixbufNew</span>
|
||||
<a name="line-291"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>ct</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>cellText</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>CellRendererTextClass</span> <span class='hs-varid'>cr</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Attr</span> <span class='hs-varid'>cr</span> <span class='hs-conid'>String</span>
|
||||
<a name="line-292"></a> <span class='hs-varid'>cp</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>cellPixbuf</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>CellRendererPixbufClass</span> <span class='hs-varid'>self</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=></span> <span class='hs-conid'>Attr</span> <span class='hs-varid'>self</span> <span class='hs-conid'>Pixbuf</span>
|
||||
<a name="line-293"></a>
|
||||
<a name="line-294"></a> <span class='hs-comment'>-- filename column</span>
|
||||
<a name="line-295"></a> <span class='hs-varid'>cF</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-296"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cF</span> <span class='hs-layout'>(</span><span class='hs-str'>"Filename"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-297"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cF</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-298"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cF</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-299"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cF</span> <span class='hs-num'>1</span>
|
||||
<a name="line-300"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderPix</span> <span class='hs-conid'>False</span>
|
||||
<a name="line-301"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-302"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cF</span>
|
||||
<a name="line-303"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderPix</span> <span class='hs-varid'>cp</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span>
|
||||
<a name="line-304"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cF</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span>
|
||||
<a name="line-305"></a>
|
||||
<a name="line-306"></a> <span class='hs-comment'>-- date column</span>
|
||||
<a name="line-307"></a> <span class='hs-varid'>cMD</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-308"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cMD</span> <span class='hs-layout'>(</span><span class='hs-str'>"Date"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-309"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cMD</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-310"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cMD</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-311"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cMD</span> <span class='hs-num'>2</span>
|
||||
<a name="line-312"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cMD</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-313"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cMD</span>
|
||||
<a name="line-314"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cMD</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>2</span>
|
||||
<a name="line-315"></a>
|
||||
<a name="line-316"></a> <span class='hs-comment'>-- permissions column</span>
|
||||
<a name="line-317"></a> <span class='hs-varid'>cP</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewColumnNew</span>
|
||||
<a name="line-318"></a> <span class='hs-varid'>treeViewColumnSetTitle</span> <span class='hs-varid'>cP</span> <span class='hs-layout'>(</span><span class='hs-str'>"Permission"</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-319"></a> <span class='hs-varid'>treeViewColumnSetResizable</span> <span class='hs-varid'>cP</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-320"></a> <span class='hs-varid'>treeViewColumnSetClickable</span> <span class='hs-varid'>cP</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-321"></a> <span class='hs-varid'>treeViewColumnSetSortColumnId</span> <span class='hs-varid'>cP</span> <span class='hs-num'>3</span>
|
||||
<a name="line-322"></a> <span class='hs-varid'>cellLayoutPackStart</span> <span class='hs-varid'>cP</span> <span class='hs-varid'>renderTxt</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-323"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewAppendColumn</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>cP</span>
|
||||
<a name="line-324"></a> <span class='hs-varid'>cellLayoutAddColumnAttribute</span> <span class='hs-varid'>cP</span> <span class='hs-varid'>renderTxt</span> <span class='hs-varid'>ct</span> <span class='hs-varop'>$</span> <span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>3</span>
|
||||
<a name="line-325"></a>
|
||||
<a name="line-326"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>FMTreeView</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-327"></a>
|
||||
<a name="line-328"></a>
|
||||
<a name="line-329"></a><a name="refreshView"></a><span class='hs-comment'>-- |Refreshes the View based on the given directory.</span>
|
||||
<a name="line-330"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-331"></a><span class='hs-comment'>-- Throws:</span>
|
||||
<a name="line-332"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-333"></a><span class='hs-comment'>-- - `userError` on inappropriate type</span>
|
||||
<a name="line-334"></a><span class='hs-definition'>refreshView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-335"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-336"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Item</span>
|
||||
<a name="line-337"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-338"></a><span class='hs-definition'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-conid'>SymLink</span> <span class='hs-layout'>{</span> <span class='hs-varid'>sdest</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>d</span><span class='hs-keyglyph'>@</span><span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span>
|
||||
<a name="line-339"></a> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>d</span>
|
||||
<a name="line-340"></a><span class='hs-definition'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>item</span><span class='hs-keyglyph'>@</span><span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-341"></a> <span class='hs-varid'>newRawModel</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>fileListStore</span> <span class='hs-varid'>item</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-342"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>rawModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>newRawModel</span>
|
||||
<a name="line-343"></a>
|
||||
<a name="line-344"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-345"></a>
|
||||
<a name="line-346"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>cwd</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-347"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>cwd</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-348"></a>
|
||||
<a name="line-349"></a> <span class='hs-comment'>-- get selected items</span>
|
||||
<a name="line-350"></a> <span class='hs-varid'>tps</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSelectedTreePaths</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-351"></a> <span class='hs-varid'>trs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>catMaybes</span> <span class='hs-varop'><$></span> <span class='hs-varid'>mapM</span> <span class='hs-layout'>(</span><span class='hs-varid'>treeRowReferenceNew</span> <span class='hs-varid'>newRawModel</span><span class='hs-layout'>)</span> <span class='hs-varid'>tps</span>
|
||||
<a name="line-352"></a>
|
||||
<a name="line-353"></a> <span class='hs-varid'>constructView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-354"></a>
|
||||
<a name="line-355"></a> <span class='hs-comment'>-- reselect selected items</span>
|
||||
<a name="line-356"></a> <span class='hs-comment'>-- TODO: not implemented for icon view yet</span>
|
||||
<a name="line-357"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-358"></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-359"></a> <span class='hs-varid'>tvs</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeViewGetSelection</span> <span class='hs-varid'>treeView</span>
|
||||
<a name="line-360"></a> <span class='hs-varid'>ntps</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>mapM</span> <span class='hs-varid'>treeRowReferenceGetPath</span> <span class='hs-varid'>trs</span>
|
||||
<a name="line-361"></a> <span class='hs-varid'>mapM_</span> <span class='hs-layout'>(</span><span class='hs-varid'>treeSelectionSelectPath</span> <span class='hs-varid'>tvs</span><span class='hs-layout'>)</span> <span class='hs-varid'>ntps</span>
|
||||
<a name="line-362"></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-363"></a><span class='hs-definition'>refreshView</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>ioError</span> <span class='hs-varop'>$</span> <span class='hs-varid'>userError</span> <span class='hs-str'>"Inappropriate type!"</span>
|
||||
<a name="line-364"></a>
|
||||
<a name="line-365"></a>
|
||||
<a name="line-366"></a><a name="constructView"></a><span class='hs-comment'>-- |Constructs the visible View with the current underlying mutable models,</span>
|
||||
<a name="line-367"></a><span class='hs-comment'>-- which are retrieved from 'MyGUI'.</span>
|
||||
<a name="line-368"></a><span class='hs-comment'>--</span>
|
||||
<a name="line-369"></a><span class='hs-comment'>-- This sort of merges the components mygui and myview and fires up</span>
|
||||
<a name="line-370"></a><span class='hs-comment'>-- the actual models.</span>
|
||||
<a name="line-371"></a><span class='hs-definition'>constructView</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>MyGUI</span>
|
||||
<a name="line-372"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MyView</span>
|
||||
<a name="line-373"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-374"></a><span class='hs-definition'>constructView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-375"></a> <span class='hs-varid'>settings'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span>
|
||||
<a name="line-376"></a>
|
||||
<a name="line-377"></a> <span class='hs-comment'>-- pix stuff</span>
|
||||
<a name="line-378"></a> <span class='hs-varid'>iT</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>iconThemeGetDefault</span>
|
||||
<a name="line-379"></a> <span class='hs-varid'>folderPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IFolder</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-380"></a> <span class='hs-varid'>folderSymPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSymlinkIcon</span> <span class='hs-conid'>IFolder</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-381"></a> <span class='hs-varid'>filePix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IFile</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-382"></a> <span class='hs-varid'>fileSymPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getSymlinkIcon</span> <span class='hs-conid'>IFile</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-383"></a> <span class='hs-varid'>errorPix</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>getIcon</span> <span class='hs-conid'>IError</span> <span class='hs-varid'>iT</span> <span class='hs-layout'>(</span><span class='hs-varid'>iconSize</span> <span class='hs-varid'>settings'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-384"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>Dir</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>folderPix</span>
|
||||
<a name="line-385"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>FileLike</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>filePix</span>
|
||||
<a name="line-386"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>DirSym</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>folderSymPix</span>
|
||||
<a name="line-387"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>FileLikeSym</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fileSymPix</span>
|
||||
<a name="line-388"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-conid'>BrokenSymlink</span><span class='hs-layout'>{</span><span class='hs-layout'>}</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>errorPix</span>
|
||||
<a name="line-389"></a> <span class='hs-varid'>dirtreePix</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>errorPix</span>
|
||||
<a name="line-390"></a>
|
||||
<a name="line-391"></a>
|
||||
<a name="line-392"></a> <span class='hs-varid'>rawModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>rawModel</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-392"></a> <span class='hs-varid'>view'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>view</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-393"></a>
|
||||
<a name="line-394"></a> <span class='hs-comment'>-- filtering</span>
|
||||
<a name="line-395"></a> <span class='hs-varid'>filteredModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterNew</span> <span class='hs-varid'>rawModel'</span> <span class='hs-conid'>[]</span>
|
||||
<a name="line-396"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>filteredModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>filteredModel'</span>
|
||||
<a name="line-397"></a> <span class='hs-varid'>treeModelFilterSetVisibleFunc</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>iter</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-398"></a> <span class='hs-varid'>hidden</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>showHidden</span> <span class='hs-varop'><$></span> <span class='hs-varid'>readTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-399"></a> <span class='hs-varid'>item</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>iter</span> <span class='hs-varop'>>>=</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span>
|
||||
<a name="line-400"></a> <span class='hs-keyword'>if</span> <span class='hs-varid'>hidden</span>
|
||||
<a name="line-401"></a> <span class='hs-keyword'>then</span> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-402"></a> <span class='hs-keyword'>else</span> <span class='hs-varid'>return</span> <span class='hs-varop'>.</span> <span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>hiddenFile</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-403"></a>
|
||||
<a name="line-404"></a> <span class='hs-comment'>-- sorting</span>
|
||||
<a name="line-405"></a> <span class='hs-varid'>sortedModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelSortNewWithModel</span> <span class='hs-varid'>filteredModel'</span>
|
||||
<a name="line-406"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>sortedModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>sortedModel'</span>
|
||||
<a name="line-407"></a> <span class='hs-varid'>treeSortableSetSortFunc</span> <span class='hs-varid'>sortedModel'</span> <span class='hs-num'>1</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>iter1</span> <span class='hs-varid'>iter2</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-408"></a> <span class='hs-varid'>cIter1</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterConvertIterToChildIter</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varid'>iter1</span>
|
||||
<a name="line-409"></a> <span class='hs-varid'>cIter2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterConvertIterToChildIter</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varid'>iter2</span>
|
||||
<a name="line-410"></a> <span class='hs-varid'>item1</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>cIter1</span>
|
||||
<a name="line-411"></a> <span class='hs-varid'>item2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>cIter2</span>
|
||||
<a name="line-412"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>compare</span> <span class='hs-varid'>item1</span> <span class='hs-varid'>item2</span>
|
||||
<a name="line-413"></a> <span class='hs-varid'>treeSortableSetSortColumnId</span> <span class='hs-varid'>sortedModel'</span> <span class='hs-num'>1</span> <span class='hs-conid'>SortAscending</span>
|
||||
<a name="line-414"></a>
|
||||
<a name="line-415"></a> <span class='hs-comment'>-- set values</span>
|
||||
<a name="line-416"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-417"></a> <span class='hs-varid'>dirtreePix</span>
|
||||
<a name="line-418"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-419"></a> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>toFilePath</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span>
|
||||
<a name="line-420"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span>
|
||||
<a name="line-421"></a> <span class='hs-varid'>packModTime</span>
|
||||
<a name="line-422"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>3</span><span class='hs-layout'>)</span>
|
||||
<a name="line-423"></a> <span class='hs-varid'>packPermissions</span>
|
||||
<a name="line-424"></a>
|
||||
<a name="line-425"></a> <span class='hs-comment'>-- update model of view</span>
|
||||
<a name="line-426"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-427"></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-428"></a> <span class='hs-varid'>treeViewSetModel</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>sortedModel'</span>
|
||||
<a name="line-429"></a> <span class='hs-varid'>treeViewSetRubberBanding</span> <span class='hs-varid'>treeView</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-430"></a> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-431"></a> <span class='hs-varid'>iconViewSetModel</span> <span class='hs-varid'>iconView</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>sortedModel'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-432"></a> <span class='hs-varid'>iconViewSetPixbufColumn</span> <span class='hs-varid'>iconView</span>
|
||||
<a name="line-433"></a> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ColumnId</span> <span class='hs-varid'>item</span> <span class='hs-conid'>Pixbuf</span><span class='hs-layout'>)</span>
|
||||
<a name="line-434"></a> <span class='hs-varid'>iconViewSetTextColumn</span> <span class='hs-varid'>iconView</span>
|
||||
<a name="line-435"></a> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ColumnId</span> <span class='hs-varid'>item</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-436"></a>
|
||||
<a name="line-437"></a> <span class='hs-comment'>-- add watcher</span>
|
||||
<a name="line-438"></a> <span class='hs-varid'>mi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-439"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mi</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>i</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>killINotify</span> <span class='hs-varid'>i</span>
|
||||
<a name="line-440"></a> <span class='hs-varid'>newi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>initINotify</span>
|
||||
<a name="line-441"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>addWatch</span>
|
||||
<a name="line-442"></a> <span class='hs-varid'>newi</span>
|
||||
<a name="line-443"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Move</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveIn</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveOut</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveSelf</span><span class='hs-layout'>,</span> <span class='hs-conid'>Create</span><span class='hs-layout'>,</span> <span class='hs-conid'>Delete</span><span class='hs-layout'>,</span> <span class='hs-conid'>DeleteSelf</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-444"></a> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdirp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-445"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>postGUIAsync</span> <span class='hs-varop'>$</span> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span><span class='hs-layout'>)</span>
|
||||
<a name="line-446"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>newi</span>
|
||||
<a name="line-447"></a>
|
||||
<a name="line-448"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
<a name="line-394"></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-395"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>cdirp</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>path</span> <span class='hs-varid'>cdir</span>
|
||||
<a name="line-396"></a>
|
||||
<a name="line-397"></a> <span class='hs-comment'>-- update urlBar</span>
|
||||
<a name="line-398"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>urlBar</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdirp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-399"></a>
|
||||
<a name="line-400"></a> <span class='hs-varid'>rawModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>readTVarIO</span> <span class='hs-varop'>$</span> <span class='hs-varid'>rawModel</span> <span class='hs-varid'>myview</span>
|
||||
<a name="line-401"></a>
|
||||
<a name="line-402"></a> <span class='hs-comment'>-- filtering</span>
|
||||
<a name="line-403"></a> <span class='hs-varid'>filteredModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterNew</span> <span class='hs-varid'>rawModel'</span> <span class='hs-conid'>[]</span>
|
||||
<a name="line-404"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>filteredModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>filteredModel'</span>
|
||||
<a name="line-405"></a> <span class='hs-varid'>treeModelFilterSetVisibleFunc</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>iter</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-406"></a> <span class='hs-varid'>hidden</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>showHidden</span> <span class='hs-varop'><$></span> <span class='hs-varid'>readTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>settings</span> <span class='hs-varid'>mygui</span><span class='hs-layout'>)</span>
|
||||
<a name="line-407"></a> <span class='hs-varid'>item</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>iter</span> <span class='hs-varop'>>>=</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span>
|
||||
<a name="line-408"></a> <span class='hs-keyword'>if</span> <span class='hs-varid'>hidden</span>
|
||||
<a name="line-409"></a> <span class='hs-keyword'>then</span> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-410"></a> <span class='hs-keyword'>else</span> <span class='hs-varid'>return</span> <span class='hs-varop'>.</span> <span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>hiddenFile</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span>
|
||||
<a name="line-411"></a>
|
||||
<a name="line-412"></a> <span class='hs-comment'>-- sorting</span>
|
||||
<a name="line-413"></a> <span class='hs-varid'>sortedModel'</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelSortNewWithModel</span> <span class='hs-varid'>filteredModel'</span>
|
||||
<a name="line-414"></a> <span class='hs-varid'>writeTVarIO</span> <span class='hs-layout'>(</span><span class='hs-varid'>sortedModel</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>sortedModel'</span>
|
||||
<a name="line-415"></a> <span class='hs-varid'>treeSortableSetSortFunc</span> <span class='hs-varid'>sortedModel'</span> <span class='hs-num'>1</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>iter1</span> <span class='hs-varid'>iter2</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-416"></a> <span class='hs-varid'>cIter1</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterConvertIterToChildIter</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varid'>iter1</span>
|
||||
<a name="line-417"></a> <span class='hs-varid'>cIter2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelFilterConvertIterToChildIter</span> <span class='hs-varid'>filteredModel'</span> <span class='hs-varid'>iter2</span>
|
||||
<a name="line-418"></a> <span class='hs-varid'>item1</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>cIter1</span>
|
||||
<a name="line-419"></a> <span class='hs-varid'>item2</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>cIter2</span>
|
||||
<a name="line-420"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-varid'>compare</span> <span class='hs-varid'>item1</span> <span class='hs-varid'>item2</span>
|
||||
<a name="line-421"></a> <span class='hs-varid'>treeSortableSetSortColumnId</span> <span class='hs-varid'>sortedModel'</span> <span class='hs-num'>1</span> <span class='hs-conid'>SortAscending</span>
|
||||
<a name="line-422"></a>
|
||||
<a name="line-423"></a> <span class='hs-comment'>-- set values</span>
|
||||
<a name="line-424"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
|
||||
<a name="line-425"></a> <span class='hs-varid'>dirtreePix</span>
|
||||
<a name="line-426"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
|
||||
<a name="line-427"></a> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>toFilePath</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromJust</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span><span class='hs-layout'>)</span>
|
||||
<a name="line-428"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span>
|
||||
<a name="line-429"></a> <span class='hs-varid'>packModTime</span>
|
||||
<a name="line-430"></a> <span class='hs-varid'>treeModelSetColumn</span> <span class='hs-varid'>rawModel'</span> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>3</span><span class='hs-layout'>)</span>
|
||||
<a name="line-431"></a> <span class='hs-varid'>packPermissions</span>
|
||||
<a name="line-432"></a>
|
||||
<a name="line-433"></a> <span class='hs-comment'>-- update model of view</span>
|
||||
<a name="line-434"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>view'</span> <span class='hs-keyword'>of</span>
|
||||
<a name="line-435"></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-436"></a> <span class='hs-varid'>treeViewSetModel</span> <span class='hs-varid'>treeView</span> <span class='hs-varid'>sortedModel'</span>
|
||||
<a name="line-437"></a> <span class='hs-varid'>treeViewSetRubberBanding</span> <span class='hs-varid'>treeView</span> <span class='hs-conid'>True</span>
|
||||
<a name="line-438"></a> <span class='hs-conid'>FMIconView</span> <span class='hs-varid'>iconView</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>do</span>
|
||||
<a name="line-439"></a> <span class='hs-varid'>iconViewSetModel</span> <span class='hs-varid'>iconView</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>sortedModel'</span><span class='hs-layout'>)</span>
|
||||
<a name="line-440"></a> <span class='hs-varid'>iconViewSetPixbufColumn</span> <span class='hs-varid'>iconView</span>
|
||||
<a name="line-441"></a> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdPixbuf</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ColumnId</span> <span class='hs-varid'>item</span> <span class='hs-conid'>Pixbuf</span><span class='hs-layout'>)</span>
|
||||
<a name="line-442"></a> <span class='hs-varid'>iconViewSetTextColumn</span> <span class='hs-varid'>iconView</span>
|
||||
<a name="line-443"></a> <span class='hs-layout'>(</span><span class='hs-varid'>makeColumnIdString</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ColumnId</span> <span class='hs-varid'>item</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
|
||||
<a name="line-444"></a>
|
||||
<a name="line-445"></a> <span class='hs-comment'>-- add watcher</span>
|
||||
<a name="line-446"></a> <span class='hs-varid'>mi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>tryTakeMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span>
|
||||
<a name="line-447"></a> <span class='hs-varid'>for_</span> <span class='hs-varid'>mi</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>i</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>killINotify</span> <span class='hs-varid'>i</span>
|
||||
<a name="line-448"></a> <span class='hs-varid'>newi</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>initINotify</span>
|
||||
<a name="line-449"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>addWatch</span>
|
||||
<a name="line-450"></a> <span class='hs-varid'>newi</span>
|
||||
<a name="line-451"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Move</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveIn</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveOut</span><span class='hs-layout'>,</span> <span class='hs-conid'>MoveSelf</span><span class='hs-layout'>,</span> <span class='hs-conid'>Create</span><span class='hs-layout'>,</span> <span class='hs-conid'>Delete</span><span class='hs-layout'>,</span> <span class='hs-conid'>DeleteSelf</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-452"></a> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varid'>cdirp</span><span class='hs-layout'>)</span>
|
||||
<a name="line-453"></a> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>postGUIAsync</span> <span class='hs-varop'>$</span> <span class='hs-varid'>refreshView</span> <span class='hs-varid'>mygui</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>cdir</span><span class='hs-layout'>)</span>
|
||||
<a name="line-454"></a> <span class='hs-varid'>putMVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>inotify</span> <span class='hs-varid'>myview</span><span class='hs-layout'>)</span> <span class='hs-varid'>newi</span>
|
||||
<a name="line-455"></a>
|
||||
<a name="line-456"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
|
||||
</pre></body>
|
||||
</html>
|
||||
|
@ -161,17 +161,5 @@
|
||||
<a name="line-152"></a> <span class='hs-varid'>miter</span> <span class='hs-keyglyph'><-</span> <span class='hs-varid'>rawPathToIter</span> <span class='hs-varid'>myview</span> <span class='hs-varid'>tp</span>
|
||||
<a name="line-153"></a> <span class='hs-varid'>forM</span> <span class='hs-varid'>miter</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>iter</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>treeModelGetRow</span> <span class='hs-varid'>rawModel'</span> <span class='hs-varid'>iter</span>
|
||||
<a name="line-154"></a>
|
||||
<a name="line-155"></a>
|
||||
<a name="line-156"></a><a name="addHistory"></a><span class='hs-comment'>-- |Makes sure the list is max 5. This is probably not very efficient</span>
|
||||
<a name="line-157"></a><span class='hs-comment'>-- but we don't care, since it's a small list anyway.</span>
|
||||
<a name="line-158"></a><span class='hs-definition'>addHistory</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Eq</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=></span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>a</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>a</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-159"></a><span class='hs-definition'>addHistory</span> <span class='hs-varid'>i</span> <span class='hs-conid'>[]</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>i</span><span class='hs-keyglyph'>]</span>
|
||||
<a name="line-160"></a><span class='hs-definition'>addHistory</span> <span class='hs-varid'>i</span> <span class='hs-varid'>xs</span><span class='hs-keyglyph'>@</span><span class='hs-layout'>(</span><span class='hs-varid'>x</span><span class='hs-conop'>:</span><span class='hs-keyword'>_</span><span class='hs-layout'>)</span>
|
||||
<a name="line-161"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>i</span> <span class='hs-varop'>==</span> <span class='hs-varid'>x</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>xs</span>
|
||||
<a name="line-162"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>length</span> <span class='hs-varid'>xs</span> <span class='hs-varop'>==</span> <span class='hs-varid'>maxLength</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:</span> <span class='hs-varid'>take</span> <span class='hs-layout'>(</span><span class='hs-varid'>maxLength</span> <span class='hs-comment'>-</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <span class='hs-varid'>xs</span>
|
||||
<a name="line-163"></a> <span class='hs-keyglyph'>|</span> <span class='hs-varid'>otherwise</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>i</span> <span class='hs-conop'>:</span> <span class='hs-varid'>xs</span>
|
||||
<a name="line-164"></a> <span class='hs-keyword'>where</span>
|
||||
<a name="line-165"></a> <span class='hs-varid'>maxLength</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>10</span>
|
||||
<a name="line-166"></a>
|
||||
</pre></body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user