Lastest docs updated

travis build: 29
commit: 7998ea33de
auto-pushed to gh-pages
This commit is contained in:
travis-ci 2016-06-03 22:18:23 +00:00
parent 00142d90dc
commit 41d1273978
2 changed files with 267 additions and 261 deletions

View File

@ -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[ <!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");}; 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> -&gt; <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> -&gt; <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>

View File

@ -30,284 +30,290 @@
<a name="line-21"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span> <span class='hs-keyword'>where</span> <a name="line-21"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Dialogs</span> <span class='hs-keyword'>where</span>
<a name="line-22"></a> <a name="line-22"></a>
<a name="line-23"></a> <a name="line-23"></a>
<a name="line-24"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span> <a name="line-24"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Codec</span><span class='hs-varop'>.</span><span class='hs-conid'>Binary</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span><span class='hs-varop'>.</span><span class='hs-conid'>String</span>
<a name="line-25"></a> <span class='hs-layout'>(</span> <a name="line-25"></a> <span class='hs-layout'>(</span>
<a name="line-26"></a> <span class='hs-varid'>displayException</span> <a name="line-26"></a> <span class='hs-varid'>decodeString</span>
<a name="line-27"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>throwIO</span> <a name="line-27"></a> <span class='hs-layout'>)</span>
<a name="line-28"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>IOException</span> <a name="line-28"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Exception</span>
<a name="line-29"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>catches</span> <a name="line-29"></a> <span class='hs-layout'>(</span>
<a name="line-30"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Handler</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span> <a name="line-30"></a> <span class='hs-varid'>catches</span>
<a name="line-31"></a> <span class='hs-layout'>)</span> <a name="line-31"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>displayException</span>
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span> <a name="line-32"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>throwIO</span>
<a name="line-33"></a> <span class='hs-layout'>(</span> <a name="line-33"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>IOException</span>
<a name="line-34"></a> <span class='hs-varid'>forM</span> <a name="line-34"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Handler</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
<a name="line-35"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>when</span> <a name="line-35"></a> <span class='hs-layout'>)</span>
<a name="line-36"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>void</span> <a name="line-36"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
<a name="line-37"></a> <span class='hs-layout'>)</span> <a name="line-37"></a> <span class='hs-layout'>(</span>
<a name="line-38"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <a name="line-38"></a> <span class='hs-varid'>forM</span>
<a name="line-39"></a> <span class='hs-layout'>(</span> <a name="line-39"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>when</span>
<a name="line-40"></a> <span class='hs-conid'>ByteString</span> <a name="line-40"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>void</span>
<a name="line-41"></a> <span class='hs-layout'>)</span> <a name="line-41"></a> <span class='hs-layout'>)</span>
<a name="line-42"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>BS</span> <a name="line-42"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span>
<a name="line-43"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span> <a name="line-43"></a> <span class='hs-layout'>(</span>
<a name="line-44"></a> <span class='hs-layout'>(</span> <a name="line-44"></a> <span class='hs-conid'>ByteString</span>
<a name="line-45"></a> <span class='hs-varid'>fromString</span> <a name="line-45"></a> <span class='hs-layout'>)</span>
<a name="line-46"></a> <span class='hs-layout'>)</span> <a name="line-46"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>BS</span>
<a name="line-47"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Version</span> <a name="line-47"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>UTF8</span>
<a name="line-48"></a> <span class='hs-layout'>(</span> <a name="line-48"></a> <span class='hs-layout'>(</span>
<a name="line-49"></a> <span class='hs-varid'>showVersion</span> <a name="line-49"></a> <span class='hs-varid'>fromString</span>
<a name="line-50"></a> <span class='hs-layout'>)</span> <a name="line-50"></a> <span class='hs-layout'>)</span>
<a name="line-51"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>Package</span> <a name="line-51"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Version</span>
<a name="line-52"></a> <span class='hs-layout'>(</span> <a name="line-52"></a> <span class='hs-layout'>(</span>
<a name="line-53"></a> <span class='hs-conid'>PackageIdentifier</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span> <a name="line-53"></a> <span class='hs-varid'>showVersion</span>
<a name="line-54"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>PackageName</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span> <a name="line-54"></a> <span class='hs-layout'>)</span>
<a name="line-55"></a> <span class='hs-layout'>)</span> <a name="line-55"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>Package</span>
<a name="line-56"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>PackageDescription</span> <a name="line-56"></a> <span class='hs-layout'>(</span>
<a name="line-57"></a> <span class='hs-layout'>(</span> <a name="line-57"></a> <span class='hs-conid'>PackageIdentifier</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
<a name="line-58"></a> <span class='hs-conid'>GenericPackageDescription</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span> <a name="line-58"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>PackageName</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
<a name="line-59"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>PackageDescription</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span> <a name="line-59"></a> <span class='hs-layout'>)</span>
<a name="line-60"></a> <span class='hs-layout'>)</span> <a name="line-60"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>PackageDescription</span>
<a name="line-61"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>PackageDescription</span><span class='hs-varop'>.</span><span class='hs-conid'>Parse</span> <a name="line-61"></a> <span class='hs-layout'>(</span>
<a name="line-62"></a> <span class='hs-layout'>(</span> <a name="line-62"></a> <span class='hs-conid'>GenericPackageDescription</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
<a name="line-63"></a> <span class='hs-varid'>readPackageDescription</span> <a name="line-63"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>PackageDescription</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span>
<a name="line-64"></a> <span class='hs-layout'>)</span> <a name="line-64"></a> <span class='hs-layout'>)</span>
<a name="line-65"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>Verbosity</span> <a name="line-65"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>PackageDescription</span><span class='hs-varop'>.</span><span class='hs-conid'>Parse</span>
<a name="line-66"></a> <span class='hs-layout'>(</span> <a name="line-66"></a> <span class='hs-layout'>(</span>
<a name="line-67"></a> <span class='hs-varid'>silent</span> <a name="line-67"></a> <span class='hs-varid'>readPackageDescription</span>
<a name="line-68"></a> <span class='hs-layout'>)</span> <a name="line-68"></a> <span class='hs-layout'>)</span>
<a name="line-69"></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-69"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Distribution</span><span class='hs-varop'>.</span><span class='hs-conid'>Verbosity</span>
<a name="line-70"></a><span class='hs-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-70"></a> <span class='hs-layout'>(</span>
<a name="line-71"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span> <a name="line-71"></a> <span class='hs-varid'>silent</span>
<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'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</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'>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-73"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Graphics</span><span class='hs-varop'>.</span><span class='hs-conid'>UI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span>
<a name="line-74"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>GlibString</span><span class='hs-conid'>()</span> <a name="line-74"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>HPath</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>P</span>
<a name="line-75"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>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-75"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HPath</span><span class='hs-varop'>.</span><span class='hs-conid'>IO</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
<a name="line-76"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span> <a name="line-76"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>FileType</span>
<a name="line-77"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span> <a name="line-77"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>FileSystem</span><span class='hs-varop'>.</span><span class='hs-conid'>UtilTypes</span>
<a name="line-78"></a> <span class='hs-layout'>(</span> <a name="line-78"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>GlibString</span><span class='hs-conid'>()</span>
<a name="line-79"></a> <span class='hs-varid'>getDataFileName</span> <a name="line-79"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Data</span>
<a name="line-80"></a> <span class='hs-layout'>)</span> <a name="line-80"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>HSFM</span><span class='hs-varop'>.</span><span class='hs-conid'>GUI</span><span class='hs-varop'>.</span><span class='hs-conid'>Gtk</span><span class='hs-varop'>.</span><span class='hs-conid'>Errors</span>
<a name="line-81"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>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-81"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Paths_hsfm</span>
<a name="line-82"></a> <span class='hs-layout'>(</span> <a name="line-82"></a> <span class='hs-layout'>(</span>
<a name="line-83"></a> <span class='hs-conid'>GlibString</span> <a name="line-83"></a> <span class='hs-varid'>getDataFileName</span>
<a name="line-84"></a> <span class='hs-layout'>)</span> <a name="line-84"></a> <span class='hs-layout'>)</span>
<a name="line-85"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>FilePath</span> <a name="line-85"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Glib</span><span class='hs-varop'>.</span><span class='hs-conid'>UTFString</span>
<a name="line-86"></a> <span class='hs-layout'>(</span> <a name="line-86"></a> <span class='hs-layout'>(</span>
<a name="line-87"></a> <span class='hs-varid'>takeFileName</span> <a name="line-87"></a> <span class='hs-conid'>GlibString</span>
<a name="line-88"></a> <span class='hs-layout'>)</span> <a name="line-88"></a> <span class='hs-layout'>)</span>
<a name="line-89"></a> <a name="line-89"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Posix</span><span class='hs-varop'>.</span><span class='hs-conid'>FilePath</span>
<a name="line-90"></a> <a name="line-90"></a> <span class='hs-layout'>(</span>
<a name="line-91"></a> <a name="line-91"></a> <span class='hs-varid'>takeFileName</span>
<a name="line-92"></a> <a name="line-92"></a> <span class='hs-layout'>)</span>
<a name="line-93"></a> <a name="line-93"></a>
<a name="line-94"></a> <a name="line-94"></a>
<a name="line-95"></a> <a name="line-95"></a>
<a name="line-96"></a> <a name="line-96"></a>
<a name="line-97"></a> <span class='hs-comment'>---------------------</span> <a name="line-97"></a>
<a name="line-98"></a> <span class='hs-comment'>--[ Dialog popups ]--</span> <a name="line-98"></a>
<a name="line-99"></a> <span class='hs-comment'>---------------------</span> <a name="line-99"></a>
<a name="line-100"></a> <a name="line-100"></a>
<a name="line-101"></a> <a name="line-101"></a> <span class='hs-comment'>---------------------</span>
<a name="line-102"></a><a name="showErrorDialog"></a><span class='hs-comment'>-- |Pops up an error Dialog with the given String.</span> <a name="line-102"></a> <span class='hs-comment'>--[ Dialog popups ]--</span>
<a name="line-103"></a><span class='hs-definition'>showErrorDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <a name="line-103"></a> <span class='hs-comment'>---------------------</span>
<a name="line-104"></a><span class='hs-definition'>showErrorDialog</span> <span class='hs-varid'>str</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-104"></a>
<a name="line-105"></a> <span class='hs-varid'>errorDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span> <a name="line-105"></a>
<a name="line-106"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span> <a name="line-106"></a><a name="showErrorDialog"></a><span class='hs-comment'>-- |Pops up an error Dialog with the given String.</span>
<a name="line-107"></a> <span class='hs-conid'>MessageError</span> <a name="line-107"></a><span class='hs-definition'>showErrorDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-108"></a> <span class='hs-conid'>ButtonsClose</span> <a name="line-108"></a><span class='hs-definition'>showErrorDialog</span> <span class='hs-varid'>str</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-109"></a> <span class='hs-varid'>str</span> <a name="line-109"></a> <span class='hs-varid'>errorDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
<a name="line-110"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>errorDialog</span> <a name="line-110"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
<a name="line-111"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>errorDialog</span> <a name="line-111"></a> <span class='hs-conid'>MessageError</span>
<a name="line-112"></a> <a name="line-112"></a> <span class='hs-conid'>ButtonsClose</span>
<a name="line-113"></a> <a name="line-113"></a> <span class='hs-varid'>str</span>
<a name="line-114"></a><a name="showConfirmationDialog"></a><span class='hs-comment'>-- |Asks the user for confirmation and returns True/False.</span> <a name="line-114"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>errorDialog</span>
<a name="line-115"></a><span class='hs-definition'>showConfirmationDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Bool</span> <a name="line-115"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>errorDialog</span>
<a name="line-116"></a><span class='hs-definition'>showConfirmationDialog</span> <span class='hs-varid'>str</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-116"></a>
<a name="line-117"></a> <span class='hs-varid'>confirmDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span> <a name="line-117"></a>
<a name="line-118"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span> <a name="line-118"></a><a name="showConfirmationDialog"></a><span class='hs-comment'>-- |Asks the user for confirmation and returns True/False.</span>
<a name="line-119"></a> <span class='hs-conid'>MessageQuestion</span> <a name="line-119"></a><span class='hs-definition'>showConfirmationDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Bool</span>
<a name="line-120"></a> <span class='hs-conid'>ButtonsYesNo</span> <a name="line-120"></a><span class='hs-definition'>showConfirmationDialog</span> <span class='hs-varid'>str</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-121"></a> <span class='hs-varid'>str</span> <a name="line-121"></a> <span class='hs-varid'>confirmDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
<a name="line-122"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>confirmDialog</span> <a name="line-122"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
<a name="line-123"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>confirmDialog</span> <a name="line-123"></a> <span class='hs-conid'>MessageQuestion</span>
<a name="line-124"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span> <a name="line-124"></a> <span class='hs-conid'>ButtonsYesNo</span>
<a name="line-125"></a> <span class='hs-conid'>ResponseYes</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span> <a name="line-125"></a> <span class='hs-varid'>str</span>
<a name="line-126"></a> <span class='hs-conid'>ResponseNo</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span> <a name="line-126"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>confirmDialog</span>
<a name="line-127"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span> <a name="line-127"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>confirmDialog</span>
<a name="line-128"></a> <a name="line-128"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
<a name="line-129"></a> <a name="line-129"></a> <span class='hs-conid'>ResponseYes</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>True</span>
<a name="line-130"></a><a name="fileCollisionDialog"></a><span class='hs-definition'>fileCollisionDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>FCollisonMode</span><span class='hs-layout'>)</span> <a name="line-130"></a> <span class='hs-conid'>ResponseNo</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
<a name="line-131"></a><span class='hs-definition'>fileCollisionDialog</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-131"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>False</span>
<a name="line-132"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span> <a name="line-132"></a>
<a name="line-133"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span> <a name="line-133"></a>
<a name="line-134"></a> <span class='hs-conid'>MessageQuestion</span> <a name="line-134"></a><a name="fileCollisionDialog"></a><span class='hs-definition'>fileCollisionDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>FCollisonMode</span><span class='hs-layout'>)</span>
<a name="line-135"></a> <span class='hs-conid'>ButtonsNone</span> <a name="line-135"></a><span class='hs-definition'>fileCollisionDialog</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-136"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Target \""</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span> <a name="line-136"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
<a name="line-137"></a> <span class='hs-varid'>t</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span> <a name="line-137"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
<a name="line-138"></a> <span class='hs-varid'>fromString</span> <span class='hs-str'>"\" exists, how to proceed?"</span><span class='hs-layout'>)</span> <a name="line-138"></a> <span class='hs-conid'>MessageQuestion</span>
<a name="line-139"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span> <a name="line-139"></a> <span class='hs-conid'>ButtonsNone</span>
<a name="line-140"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Overwrite"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <a name="line-140"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Target \""</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
<a name="line-141"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Overwrite all"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span> <a name="line-141"></a> <span class='hs-varid'>t</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
<a name="line-142"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Skip"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>3</span><span class='hs-layout'>)</span> <a name="line-142"></a> <span class='hs-varid'>fromString</span> <span class='hs-str'>"\" exists, how to proceed?"</span><span class='hs-layout'>)</span>
<a name="line-143"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Rename"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>4</span><span class='hs-layout'>)</span> <a name="line-143"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
<a name="line-144"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span> <a name="line-144"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Overwrite"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
<a name="line-145"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span> <a name="line-145"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Overwrite all"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span>
<a name="line-146"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span> <a name="line-146"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Skip"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>3</span><span class='hs-layout'>)</span>
<a name="line-147"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span> <a name="line-147"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Rename"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>4</span><span class='hs-layout'>)</span>
<a name="line-148"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Overwrite</span><span class='hs-layout'>)</span> <a name="line-148"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-149"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>OverwriteAll</span><span class='hs-layout'>)</span> <a name="line-149"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-150"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>3</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Skip</span><span class='hs-layout'>)</span> <a name="line-150"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
<a name="line-151"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>4</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <a name="line-151"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span>
<a name="line-152"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Enter new name"</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeFileName</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <a name="line-152"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Overwrite</span><span class='hs-layout'>)</span>
<a name="line-153"></a> <span class='hs-varid'>forM</span> <span class='hs-varid'>mfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <a name="line-153"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>OverwriteAll</span><span class='hs-layout'>)</span>
<a name="line-154"></a> <span class='hs-varid'>pfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span> <a name="line-154"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>3</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Skip</span><span class='hs-layout'>)</span>
<a name="line-155"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Rename</span> <span class='hs-varid'>pfn</span> <a name="line-155"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>4</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span>
<a name="line-156"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span> <a name="line-156"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Enter new name"</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeFileName</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span>
<a name="line-157"></a> <a name="line-157"></a> <span class='hs-varid'>forM</span> <span class='hs-varid'>mfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span>
<a name="line-158"></a> <a name="line-158"></a> <span class='hs-varid'>pfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span>
<a name="line-159"></a><a name="renameDialog"></a><span class='hs-definition'>renameDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>FCollisonMode</span><span class='hs-layout'>)</span> <a name="line-159"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Rename</span> <span class='hs-varid'>pfn</span>
<a name="line-160"></a><span class='hs-definition'>renameDialog</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-160"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span>
<a name="line-161"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span> <a name="line-161"></a>
<a name="line-162"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span> <a name="line-162"></a>
<a name="line-163"></a> <span class='hs-conid'>MessageQuestion</span> <a name="line-163"></a><a name="renameDialog"></a><span class='hs-definition'>renameDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>FCollisonMode</span><span class='hs-layout'>)</span>
<a name="line-164"></a> <span class='hs-conid'>ButtonsNone</span> <a name="line-164"></a><span class='hs-definition'>renameDialog</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-165"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Target \""</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span> <a name="line-165"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
<a name="line-166"></a> <span class='hs-varid'>t</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span> <a name="line-166"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
<a name="line-167"></a> <span class='hs-varid'>fromString</span> <span class='hs-str'>"\" exists, how to proceed?"</span><span class='hs-layout'>)</span> <a name="line-167"></a> <span class='hs-conid'>MessageQuestion</span>
<a name="line-168"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span> <a name="line-168"></a> <span class='hs-conid'>ButtonsNone</span>
<a name="line-169"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Skip"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <a name="line-169"></a> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Target \""</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
<a name="line-170"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Rename"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span> <a name="line-170"></a> <span class='hs-varid'>t</span> <span class='hs-varop'>`</span><span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>append</span><span class='hs-varop'>`</span>
<a name="line-171"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span> <a name="line-171"></a> <span class='hs-varid'>fromString</span> <span class='hs-str'>"\" exists, how to proceed?"</span><span class='hs-layout'>)</span>
<a name="line-172"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span> <a name="line-172"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
<a name="line-173"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span> <a name="line-173"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Skip"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
<a name="line-174"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span> <a name="line-174"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Rename"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span><span class='hs-layout'>)</span>
<a name="line-175"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Skip</span><span class='hs-layout'>)</span> <a name="line-175"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-176"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <a name="line-176"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-177"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Enter new name"</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeFileName</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <a name="line-177"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
<a name="line-178"></a> <span class='hs-varid'>forM</span> <span class='hs-varid'>mfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <a name="line-178"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span>
<a name="line-179"></a> <span class='hs-varid'>pfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span> <a name="line-179"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-conid'>Skip</span><span class='hs-layout'>)</span>
<a name="line-180"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Rename</span> <span class='hs-varid'>pfn</span> <a name="line-180"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span>
<a name="line-181"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span> <a name="line-181"></a> <span class='hs-varid'>mfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>textInputDialog</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-str'>"Enter new name"</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>takeFileName</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span>
<a name="line-182"></a> <a name="line-182"></a> <span class='hs-varid'>forM</span> <span class='hs-varid'>mfn</span> <span class='hs-varop'>$</span> <span class='hs-keyglyph'>\</span><span class='hs-varid'>fn</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span>
<a name="line-183"></a> <a name="line-183"></a> <span class='hs-varid'>pfn</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>parseFn</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>fn</span><span class='hs-layout'>)</span>
<a name="line-184"></a><a name="showAboutDialog"></a><span class='hs-comment'>-- |Shows the about dialog from the help menu.</span> <a name="line-184"></a> <span class='hs-varid'>return</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Rename</span> <span class='hs-varid'>pfn</span>
<a name="line-185"></a><span class='hs-definition'>showAboutDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <a name="line-185"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span>
<a name="line-186"></a><span class='hs-definition'>showAboutDialog</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-186"></a>
<a name="line-187"></a> <span class='hs-varid'>ad</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>aboutDialogNew</span> <a name="line-187"></a>
<a name="line-188"></a> <span class='hs-varid'>lstr</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-conid'>Prelude</span><span class='hs-varop'>.</span><span class='hs-varid'>readFile</span> <span class='hs-varop'>=&lt;&lt;</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"LICENSE"</span> <a name="line-188"></a><a name="showAboutDialog"></a><span class='hs-comment'>-- |Shows the about dialog from the help menu.</span>
<a name="line-189"></a> <span class='hs-varid'>hsfmicon</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>pixbufNewFromFile</span> <span class='hs-varop'>=&lt;&lt;</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/icons/hsfm.png"</span> <a name="line-189"></a><span class='hs-definition'>showAboutDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-190"></a> <span class='hs-varid'>pdesc</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>packageDescription</span> <a name="line-190"></a><span class='hs-definition'>showAboutDialog</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-191"></a> <span class='hs-layout'>(</span><span class='hs-varid'>readPackageDescription</span> <span class='hs-varid'>silent</span> <a name="line-191"></a> <span class='hs-varid'>ad</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>aboutDialogNew</span>
<a name="line-192"></a> <span class='hs-varop'>=&lt;&lt;</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"hsfm.cabal"</span><span class='hs-layout'>)</span> <a name="line-192"></a> <span class='hs-varid'>lstr</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-conid'>Prelude</span><span class='hs-varop'>.</span><span class='hs-varid'>readFile</span> <span class='hs-varop'>=&lt;&lt;</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"LICENSE"</span>
<a name="line-193"></a> <span class='hs-varid'>set</span> <span class='hs-varid'>ad</span> <a name="line-193"></a> <span class='hs-varid'>hsfmicon</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>pixbufNewFromFile</span> <span class='hs-varop'>=&lt;&lt;</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"data/Gtk/icons/hsfm.png"</span>
<a name="line-194"></a> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>aboutDialogProgramName</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>unPackageName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span> <a name="line-194"></a> <span class='hs-varid'>pdesc</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>fmap</span> <span class='hs-varid'>packageDescription</span>
<a name="line-195"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogName</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>unPackageName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span> <a name="line-195"></a> <span class='hs-layout'>(</span><span class='hs-varid'>readPackageDescription</span> <span class='hs-varid'>silent</span>
<a name="line-196"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogVersion</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>showVersion</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgVersion</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span> <a name="line-196"></a> <span class='hs-varop'>=&lt;&lt;</span> <span class='hs-varid'>getDataFileName</span> <span class='hs-str'>"hsfm.cabal"</span><span class='hs-layout'>)</span>
<a name="line-197"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogCopyright</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>copyright</span> <span class='hs-varid'>pdesc</span> <a name="line-197"></a> <span class='hs-varid'>set</span> <span class='hs-varid'>ad</span>
<a name="line-198"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogComments</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>description</span> <span class='hs-varid'>pdesc</span> <a name="line-198"></a> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>aboutDialogProgramName</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>unPackageName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span>
<a name="line-199"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogLicense</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>lstr</span> <a name="line-199"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogName</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>unPackageName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgName</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span>
<a name="line-200"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogWebsite</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>homepage</span> <span class='hs-varid'>pdesc</span> <a name="line-200"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogVersion</span> <span class='hs-conop'>:=</span> <span class='hs-layout'>(</span><span class='hs-varid'>showVersion</span> <span class='hs-varop'>.</span> <span class='hs-varid'>pkgVersion</span> <span class='hs-varop'>.</span> <span class='hs-varid'>package</span><span class='hs-layout'>)</span> <span class='hs-varid'>pdesc</span>
<a name="line-201"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogAuthors</span> <span class='hs-conop'>:=</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>author</span> <span class='hs-varid'>pdesc</span><span class='hs-keyglyph'>]</span> <a name="line-201"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogCopyright</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>copyright</span> <span class='hs-varid'>pdesc</span>
<a name="line-202"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogLogo</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>hsfmicon</span> <a name="line-202"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogComments</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>description</span> <span class='hs-varid'>pdesc</span>
<a name="line-203"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogWrapLicense</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>True</span> <a name="line-203"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogLicense</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>lstr</span>
<a name="line-204"></a> <span class='hs-keyglyph'>]</span> <a name="line-204"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogWebsite</span> <span class='hs-conop'>:=</span> <span class='hs-varid'>homepage</span> <span class='hs-varid'>pdesc</span>
<a name="line-205"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>ad</span> <a name="line-205"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogAuthors</span> <span class='hs-conop'>:=</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>author</span> <span class='hs-varid'>pdesc</span><span class='hs-keyglyph'>]</span>
<a name="line-206"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>ad</span> <a name="line-206"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogLogo</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>Just</span> <span class='hs-varid'>hsfmicon</span>
<a name="line-207"></a> <a name="line-207"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>aboutDialogWrapLicense</span> <span class='hs-conop'>:=</span> <span class='hs-conid'>True</span>
<a name="line-208"></a> <a name="line-208"></a> <span class='hs-keyglyph'>]</span>
<a name="line-209"></a><a name="withConfirmationDialog"></a><span class='hs-comment'>-- |Carry out an IO action with a confirmation dialog.</span> <a name="line-209"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>ad</span>
<a name="line-210"></a><span class='hs-comment'>-- If the user presses "No", then do nothing.</span> <a name="line-210"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>ad</span>
<a name="line-211"></a><span class='hs-definition'>withConfirmationDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <a name="line-211"></a>
<a name="line-212"></a><span class='hs-definition'>withConfirmationDialog</span> <span class='hs-varid'>str</span> <span class='hs-varid'>io</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-212"></a>
<a name="line-213"></a> <span class='hs-varid'>run</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>showConfirmationDialog</span> <span class='hs-varid'>str</span> <a name="line-213"></a><a name="withConfirmationDialog"></a><span class='hs-comment'>-- |Carry out an IO action with a confirmation dialog.</span>
<a name="line-214"></a> <span class='hs-varid'>when</span> <span class='hs-varid'>run</span> <span class='hs-varid'>io</span> <a name="line-214"></a><span class='hs-comment'>-- If the user presses "No", then do nothing.</span>
<a name="line-215"></a> <a name="line-215"></a><span class='hs-definition'>withConfirmationDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>String</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-216"></a> <a name="line-216"></a><span class='hs-definition'>withConfirmationDialog</span> <span class='hs-varid'>str</span> <span class='hs-varid'>io</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-217"></a><a name="withErrorDialog"></a><span class='hs-comment'>-- |Execute the given IO action. If the action throws exceptions,</span> <a name="line-217"></a> <span class='hs-varid'>run</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>showConfirmationDialog</span> <span class='hs-varid'>str</span>
<a name="line-218"></a><span class='hs-comment'>-- visualize them via 'showErrorDialog'.</span> <a name="line-218"></a> <span class='hs-varid'>when</span> <span class='hs-varid'>run</span> <span class='hs-varid'>io</span>
<a name="line-219"></a><span class='hs-definition'>withErrorDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <a name="line-219"></a>
<a name="line-220"></a><span class='hs-definition'>withErrorDialog</span> <span class='hs-varid'>io</span> <span class='hs-keyglyph'>=</span> <a name="line-220"></a>
<a name="line-221"></a> <span class='hs-varid'>catches</span> <span class='hs-layout'>(</span><span class='hs-varid'>void</span> <span class='hs-varid'>io</span><span class='hs-layout'>)</span> <a name="line-221"></a><a name="withErrorDialog"></a><span class='hs-comment'>-- |Execute the given IO action. If the action throws exceptions,</span>
<a name="line-222"></a> <span class='hs-keyglyph'>[</span> <span class='hs-conid'>Handler</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>showErrorDialog</span> <a name="line-222"></a><span class='hs-comment'>-- visualize them via 'showErrorDialog'.</span>
<a name="line-223"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>displayException</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IOException</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <a name="line-223"></a><span class='hs-definition'>withErrorDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-224"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Handler</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>showErrorDialog</span> <a name="line-224"></a><span class='hs-definition'>withErrorDialog</span> <span class='hs-varid'>io</span> <span class='hs-keyglyph'>=</span>
<a name="line-225"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>displayException</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>HPathIOException</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <a name="line-225"></a> <span class='hs-varid'>catches</span> <span class='hs-layout'>(</span><span class='hs-varid'>void</span> <span class='hs-varid'>io</span><span class='hs-layout'>)</span>
<a name="line-226"></a> <span class='hs-keyglyph'>]</span> <a name="line-226"></a> <span class='hs-keyglyph'>[</span> <span class='hs-conid'>Handler</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>showErrorDialog</span>
<a name="line-227"></a> <a name="line-227"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>decodeString</span>
<a name="line-228"></a> <a name="line-228"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>displayException</span>
<a name="line-229"></a><a name="textInputDialog"></a><span class='hs-comment'>-- |Asks the user which directory copy mode he wants via dialog popup</span> <a name="line-229"></a> <span class='hs-varop'>$</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IOException</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-230"></a><span class='hs-comment'>-- and returns 'DirCopyMode'.</span> <a name="line-230"></a> <span class='hs-layout'>,</span> <span class='hs-conid'>Handler</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>showErrorDialog</span>
<a name="line-231"></a><span class='hs-definition'>textInputDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GlibString</span> <span class='hs-varid'>string</span> <a name="line-231"></a> <span class='hs-varop'>$</span> <span class='hs-varid'>displayException</span> <span class='hs-layout'>(</span><span class='hs-varid'>e</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>HPathIOException</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-232"></a> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>string</span> <span class='hs-comment'>-- ^ window title</span> <a name="line-232"></a> <span class='hs-keyglyph'>]</span>
<a name="line-233"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>string</span> <span class='hs-comment'>-- ^ initial text in input widget</span> <a name="line-233"></a>
<a name="line-234"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span> <a name="line-234"></a>
<a name="line-235"></a><span class='hs-definition'>textInputDialog</span> <span class='hs-varid'>title</span> <span class='hs-varid'>inittext</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-235"></a><a name="textInputDialog"></a><span class='hs-comment'>-- |Asks the user which directory copy mode he wants via dialog popup</span>
<a name="line-236"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span> <a name="line-236"></a><span class='hs-comment'>-- and returns 'DirCopyMode'.</span>
<a name="line-237"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span> <a name="line-237"></a><span class='hs-definition'>textInputDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>GlibString</span> <span class='hs-varid'>string</span>
<a name="line-238"></a> <span class='hs-conid'>MessageQuestion</span> <a name="line-238"></a> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>string</span> <span class='hs-comment'>-- ^ window title</span>
<a name="line-239"></a> <span class='hs-conid'>ButtonsNone</span> <a name="line-239"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>string</span> <span class='hs-comment'>-- ^ initial text in input widget</span>
<a name="line-240"></a> <span class='hs-varid'>title</span> <a name="line-240"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Maybe</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
<a name="line-241"></a> <span class='hs-varid'>entry</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>entryNew</span> <a name="line-241"></a><span class='hs-definition'>textInputDialog</span> <span class='hs-varid'>title</span> <span class='hs-varid'>inittext</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-242"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-varid'>entry</span> <span class='hs-varid'>inittext</span> <a name="line-242"></a> <span class='hs-varid'>chooserDialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
<a name="line-243"></a> <span class='hs-varid'>cbox</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogGetActionArea</span> <span class='hs-varid'>chooserDialog</span> <a name="line-243"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
<a name="line-244"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Ok"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span> <a name="line-244"></a> <span class='hs-conid'>MessageQuestion</span>
<a name="line-245"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <a name="line-245"></a> <span class='hs-conid'>ButtonsNone</span>
<a name="line-246"></a> <span class='hs-varid'>boxPackStart</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>entry</span> <span class='hs-conid'>PackNatural</span> <span class='hs-num'>5</span> <a name="line-246"></a> <span class='hs-varid'>title</span>
<a name="line-247"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>chooserDialog</span> <a name="line-247"></a> <span class='hs-varid'>entry</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>entryNew</span>
<a name="line-248"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span> <a name="line-248"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-varid'>entry</span> <span class='hs-varid'>inittext</span>
<a name="line-249"></a> <span class='hs-varid'>ret</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span> <a name="line-249"></a> <span class='hs-varid'>cbox</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogGetActionArea</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-250"></a> <span class='hs-comment'>-- TODO: make this more safe</span> <a name="line-250"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Ok"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
<a name="line-251"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Just</span> <span class='hs-varop'>&lt;$&gt;</span> <span class='hs-varid'>entryGetText</span> <span class='hs-varid'>entry</span> <a name="line-251"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>chooserDialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
<a name="line-252"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span> <a name="line-252"></a> <span class='hs-varid'>boxPackStart</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>entry</span> <span class='hs-conid'>PackNatural</span> <span class='hs-num'>5</span>
<a name="line-253"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span> <a name="line-253"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-254"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span> <a name="line-254"></a> <span class='hs-varid'>rID</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-255"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>ret</span> <a name="line-255"></a> <span class='hs-varid'>ret</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>rID</span> <span class='hs-keyword'>of</span>
<a name="line-256"></a> <a name="line-256"></a> <span class='hs-comment'>-- TODO: make this more safe</span>
<a name="line-257"></a> <a name="line-257"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Just</span> <span class='hs-varop'>&lt;$&gt;</span> <span class='hs-varid'>entryGetText</span> <span class='hs-varid'>entry</span>
<a name="line-258"></a><a name="showFilePropertyDialog"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <a name="line-258"></a> <span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>return</span> <span class='hs-conid'>Nothing</span>
<a name="line-259"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>item</span><span class='hs-keyglyph'>]</span> <span class='hs-varid'>mygui</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span> <a name="line-259"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>throwIO</span> <span class='hs-conid'>UnknownDialogButton</span>
<a name="line-260"></a> <span class='hs-varid'>dialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span> <a name="line-260"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>chooserDialog</span>
<a name="line-261"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span> <a name="line-261"></a> <span class='hs-varid'>return</span> <span class='hs-varid'>ret</span>
<a name="line-262"></a> <span class='hs-conid'>MessageInfo</span> <a name="line-262"></a>
<a name="line-263"></a> <span class='hs-conid'>ButtonsNone</span> <a name="line-263"></a>
<a name="line-264"></a> <span class='hs-str'>"File Properties"</span> <a name="line-264"></a><a name="showFilePropertyDialog"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Item</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>MyGUI</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>MyView</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-265"></a> <a name="line-265"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>item</span><span class='hs-keyglyph'>]</span> <span class='hs-varid'>mygui</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>do</span>
<a name="line-266"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>fprop'</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fprop</span> <span class='hs-varid'>mygui</span> <a name="line-266"></a> <span class='hs-varid'>dialog</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>messageDialogNew</span> <span class='hs-conid'>Nothing</span>
<a name="line-267"></a> <span class='hs-varid'>grid</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fpropGrid</span> <span class='hs-varid'>fprop'</span> <a name="line-267"></a> <span class='hs-keyglyph'>[</span><span class='hs-conid'>DialogDestroyWithParent</span><span class='hs-keyglyph'>]</span>
<a name="line-268"></a> <a name="line-268"></a> <span class='hs-conid'>MessageInfo</span>
<a name="line-269"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropFnEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>empty</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span> <a name="line-269"></a> <span class='hs-conid'>ButtonsNone</span>
<a name="line-270"></a> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <a name="line-270"></a> <span class='hs-str'>"File Properties"</span>
<a name="line-271"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLocEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>dirname</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <a name="line-271"></a>
<a name="line-272"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropTsEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromFreeVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>show</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fileSize</span><span class='hs-layout'>)</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <a name="line-272"></a> <span class='hs-keyword'>let</span> <span class='hs-varid'>fprop'</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fprop</span> <span class='hs-varid'>mygui</span>
<a name="line-273"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropModEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packModTime</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <a name="line-273"></a> <span class='hs-varid'>grid</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fpropGrid</span> <span class='hs-varid'>fprop'</span>
<a name="line-274"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropAcEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packAccessTime</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <a name="line-274"></a>
<a name="line-275"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropFTEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packFileType</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <a name="line-275"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropFnEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>maybe</span> <span class='hs-conid'>BS</span><span class='hs-varop'>.</span><span class='hs-varid'>empty</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromRel</span>
<a name="line-276"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropPermEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <a name="line-276"></a> <span class='hs-varop'>$</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>basename</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
<a name="line-277"></a> <span class='hs-layout'>(</span><span class='hs-varid'>tail</span> <span class='hs-varop'>$</span> <span class='hs-varid'>packPermissions</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-comment'>-- throw away the filetype part</span> <a name="line-277"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLocEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>fromAbs</span> <span class='hs-varop'>.</span> <span class='hs-conid'>P</span><span class='hs-varop'>.</span><span class='hs-varid'>dirname</span> <span class='hs-varop'>.</span> <span class='hs-varid'>path</span> <span class='hs-varop'>$</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
<a name="line-278"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>packLinkDestination</span> <span class='hs-varid'>item</span> <span class='hs-keyword'>of</span> <a name="line-278"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropTsEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromFreeVar</span> <span class='hs-layout'>(</span><span class='hs-varid'>show</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fileSize</span><span class='hs-layout'>)</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
<a name="line-279"></a> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>dest</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <a name="line-279"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropModEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packModTime</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
<a name="line-280"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span> <a name="line-280"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropAcEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packAccessTime</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
<a name="line-281"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-varid'>dest</span> <a name="line-281"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropFTEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>packFileType</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span>
<a name="line-282"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <a name="line-282"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropPermEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span>
<a name="line-283"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-conid'>False</span> <a name="line-283"></a> <span class='hs-layout'>(</span><span class='hs-varid'>tail</span> <span class='hs-varop'>$</span> <span class='hs-varid'>packPermissions</span> <span class='hs-varid'>item</span><span class='hs-layout'>)</span> <span class='hs-comment'>-- throw away the filetype part</span>
<a name="line-284"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-str'>"( Not a symlink )"</span> <a name="line-284"></a> <span class='hs-keyword'>case</span> <span class='hs-varid'>packLinkDestination</span> <span class='hs-varid'>item</span> <span class='hs-keyword'>of</span>
<a name="line-285"></a> <a name="line-285"></a> <span class='hs-layout'>(</span><span class='hs-conid'>Just</span> <span class='hs-varid'>dest</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span>
<a name="line-286"></a> <a name="line-286"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-conid'>True</span>
<a name="line-287"></a> <span class='hs-varid'>cbox</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogGetActionArea</span> <span class='hs-varid'>dialog</span> <a name="line-287"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-varid'>dest</span>
<a name="line-288"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>dialog</span> <span class='hs-str'>"Ok"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span> <a name="line-288"></a> <span class='hs-conid'>Nothing</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span>
<a name="line-289"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>dialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span> <a name="line-289"></a> <span class='hs-varid'>widgetSetSensitive</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-conid'>False</span>
<a name="line-290"></a> <span class='hs-varid'>boxPackStart</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>grid</span> <span class='hs-conid'>PackNatural</span> <span class='hs-num'>5</span> <a name="line-290"></a> <span class='hs-varid'>entrySetText</span> <span class='hs-layout'>(</span><span class='hs-varid'>fpropLDEntry</span> <span class='hs-varid'>fprop'</span><span class='hs-layout'>)</span> <span class='hs-str'>"( Not a symlink )"</span>
<a name="line-291"></a> <a name="line-291"></a>
<a name="line-292"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>dialog</span> <a name="line-292"></a>
<a name="line-293"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>dialog</span> <a name="line-293"></a> <span class='hs-varid'>cbox</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogGetActionArea</span> <span class='hs-varid'>dialog</span>
<a name="line-294"></a> <a name="line-294"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>dialog</span> <span class='hs-str'>"Ok"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>0</span><span class='hs-layout'>)</span>
<a name="line-295"></a> <span class='hs-comment'>-- make sure our grid does not get destroyed</span> <a name="line-295"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogAddButton</span> <span class='hs-varid'>dialog</span> <span class='hs-str'>"Cancel"</span> <span class='hs-layout'>(</span><span class='hs-conid'>ResponseUser</span> <span class='hs-num'>1</span><span class='hs-layout'>)</span>
<a name="line-296"></a> <span class='hs-varid'>containerRemove</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>grid</span> <a name="line-296"></a> <span class='hs-varid'>boxPackStart</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>grid</span> <span class='hs-conid'>PackNatural</span> <span class='hs-num'>5</span>
<a name="line-297"></a> <a name="line-297"></a>
<a name="line-298"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>dialog</span> <a name="line-298"></a> <span class='hs-varid'>widgetShowAll</span> <span class='hs-varid'>dialog</span>
<a name="line-299"></a> <a name="line-299"></a> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>&lt;-</span> <span class='hs-varid'>dialogRun</span> <span class='hs-varid'>dialog</span>
<a name="line-300"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span> <a name="line-300"></a>
<a name="line-301"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span> <a name="line-301"></a> <span class='hs-comment'>-- make sure our grid does not get destroyed</span>
<a name="line-302"></a> <a name="line-302"></a> <span class='hs-varid'>containerRemove</span> <span class='hs-layout'>(</span><span class='hs-varid'>castToBox</span> <span class='hs-varid'>cbox</span><span class='hs-layout'>)</span> <span class='hs-varid'>grid</span>
<a name="line-303"></a>
<a name="line-304"></a> <span class='hs-varid'>widgetDestroy</span> <span class='hs-varid'>dialog</span>
<a name="line-305"></a>
<a name="line-306"></a> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
<a name="line-307"></a><span class='hs-definition'>showFilePropertyDialog</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyword'>_</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>return</span> <span class='hs-conid'>()</span>
<a name="line-308"></a>
</pre></body> </pre></body>
</html> </html>