packages feed

gtkimageview 0.11.1 → 0.12.0

raw patch · 10 files changed

+61/−33 lines, 10 filesdep ~glibdep ~gtksetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: glib, gtk

API changes (from Hackage documentation)

- Graphics.UI.Gtk.ImageView.AnimView: animViewGetAnim :: (AnimViewClass view) => view -> IO PixbufAnimation
+ Graphics.UI.Gtk.ImageView.AnimView: animViewGetAnim :: AnimViewClass view => view -> IO PixbufAnimation
- Graphics.UI.Gtk.ImageView.AnimView: animViewGetIsPlaying :: (AnimViewClass view) => view -> IO Bool
+ Graphics.UI.Gtk.ImageView.AnimView: animViewGetIsPlaying :: AnimViewClass view => view -> IO Bool
- Graphics.UI.Gtk.ImageView.AnimView: animViewSetAnim :: (AnimViewClass view) => view -> Maybe PixbufAnimation -> IO ()
+ Graphics.UI.Gtk.ImageView.AnimView: animViewSetAnim :: AnimViewClass view => view -> Maybe PixbufAnimation -> IO ()
- Graphics.UI.Gtk.ImageView.AnimView: animViewSetIsPlaying :: (AnimViewClass view) => view -> Bool -> IO ()
+ Graphics.UI.Gtk.ImageView.AnimView: animViewSetIsPlaying :: AnimViewClass view => view -> Bool -> IO ()
- Graphics.UI.Gtk.ImageView.AnimView: animViewStep :: (AnimViewClass view) => view -> IO ()
+ Graphics.UI.Gtk.ImageView.AnimView: animViewStep :: AnimViewClass view => view -> IO ()
- Graphics.UI.Gtk.ImageView.AnimView: class (ImageViewClass o) => AnimViewClass o
+ Graphics.UI.Gtk.ImageView.AnimView: class ImageViewClass o => AnimViewClass o
- Graphics.UI.Gtk.ImageView.AnimView: step :: (AnimViewClass view) => Signal view (IO ())
+ Graphics.UI.Gtk.ImageView.AnimView: step :: AnimViewClass view => Signal view (IO ())
- Graphics.UI.Gtk.ImageView.AnimView: toggleRunning :: (AnimViewClass view) => Signal view (IO ())
+ Graphics.UI.Gtk.ImageView.AnimView: toggleRunning :: AnimViewClass view => Signal view (IO ())
- Graphics.UI.Gtk.ImageView.IImageTool: class (GObjectClass o) => IImageToolClass o
+ Graphics.UI.Gtk.ImageView.IImageTool: class GObjectClass o => IImageToolClass o
- Graphics.UI.Gtk.ImageView.IImageTool: iimageToolPixbufChanged :: (IImageToolClass tool) => tool -> Bool -> Maybe Rectangle -> IO ()
+ Graphics.UI.Gtk.ImageView.IImageTool: iimageToolPixbufChanged :: IImageToolClass tool => tool -> Bool -> Maybe Rectangle -> IO ()
- Graphics.UI.Gtk.ImageView.ImageNav: class (WindowClass o) => ImageNavClass o
+ Graphics.UI.Gtk.ImageView.ImageNav: class WindowClass o => ImageNavClass o
- Graphics.UI.Gtk.ImageView.ImageNav: imageNavGetPixbuf :: (ImageNavClass nav) => nav -> IO (Maybe Pixbuf)
+ Graphics.UI.Gtk.ImageView.ImageNav: imageNavGetPixbuf :: ImageNavClass nav => nav -> IO (Maybe Pixbuf)
- Graphics.UI.Gtk.ImageView.ImageNav: imageNavGrab :: (ImageNavClass nav) => nav -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageNav: imageNavGrab :: ImageNavClass nav => nav -> IO ()
- Graphics.UI.Gtk.ImageView.ImageNav: imageNavNew :: (ImageViewClass view) => view -> IO ImageNav
+ Graphics.UI.Gtk.ImageView.ImageNav: imageNavNew :: ImageViewClass view => view -> IO ImageNav
- Graphics.UI.Gtk.ImageView.ImageNav: imageNavRelease :: (ImageNavClass nav) => nav -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageNav: imageNavRelease :: ImageNavClass nav => nav -> IO ()
- Graphics.UI.Gtk.ImageView.ImageNav: imageNavShowAndGrab :: (ImageNavClass nav) => nav -> Int -> Int -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageNav: imageNavShowAndGrab :: ImageNavClass nav => nav -> Int -> Int -> IO ()
- Graphics.UI.Gtk.ImageView.ImageScrollWin: class (TableClass o) => ImageScrollWinClass o
+ Graphics.UI.Gtk.ImageView.ImageScrollWin: class TableClass o => ImageScrollWinClass o
- Graphics.UI.Gtk.ImageView.ImageScrollWin: imageScrollWinNew :: (ImageViewClass view) => view -> IO ImageScrollWin
+ Graphics.UI.Gtk.ImageView.ImageScrollWin: imageScrollWinNew :: ImageViewClass view => view -> IO ImageScrollWin
- Graphics.UI.Gtk.ImageView.ImageToolDragger: class (GObjectClass o) => ImageToolDraggerClass o
+ Graphics.UI.Gtk.ImageView.ImageToolDragger: class GObjectClass o => ImageToolDraggerClass o
- Graphics.UI.Gtk.ImageView.ImageToolSelector: class (GObjectClass o) => ImageToolSelectorClass o
+ Graphics.UI.Gtk.ImageView.ImageToolSelector: class GObjectClass o => ImageToolSelectorClass o
- Graphics.UI.Gtk.ImageView.ImageToolSelector: imageToolSelectorGetSelection :: (ImageToolSelectorClass selector) => selector -> IO Rectangle
+ Graphics.UI.Gtk.ImageView.ImageToolSelector: imageToolSelectorGetSelection :: ImageToolSelectorClass selector => selector -> IO Rectangle
- Graphics.UI.Gtk.ImageView.ImageToolSelector: imageToolSelectorNew :: (ImageViewClass view) => view -> IO ImageToolSelector
+ Graphics.UI.Gtk.ImageView.ImageToolSelector: imageToolSelectorNew :: ImageViewClass view => view -> IO ImageToolSelector
- Graphics.UI.Gtk.ImageView.ImageToolSelector: imageToolSelectorSetSelection :: (ImageToolSelectorClass selector) => selector -> Rectangle -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageToolSelector: imageToolSelectorSetSelection :: ImageToolSelectorClass selector => selector -> Rectangle -> IO ()
- Graphics.UI.Gtk.ImageView.ImageToolSelector: selectionChanged :: (ImageToolSelectorClass selector) => Signal selector (IO ())
+ Graphics.UI.Gtk.ImageView.ImageToolSelector: selectionChanged :: ImageToolSelectorClass selector => Signal selector (IO ())
- Graphics.UI.Gtk.ImageView.ImageView: class (WidgetClass o) => ImageViewClass o
+ Graphics.UI.Gtk.ImageView.ImageView: class WidgetClass o => ImageViewClass o
- Graphics.UI.Gtk.ImageView.ImageView: imageViewDamagePixels :: (ImageViewClass view) => view -> Maybe Rectangle -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewDamagePixels :: ImageViewClass view => view -> Maybe Rectangle -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetBlackBg :: (ImageViewClass view) => view -> IO Bool
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetBlackBg :: ImageViewClass view => view -> IO Bool
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetCheckColors :: (ImageViewClass view) => view -> IO (Int, Int)
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetCheckColors :: ImageViewClass view => view -> IO (Int, Int)
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetDrawRect :: (ImageViewClass view) => view -> IO (Maybe Rectangle)
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetDrawRect :: ImageViewClass view => view -> IO (Maybe Rectangle)
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetFitting :: (ImageViewClass view) => view -> IO Bool
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetFitting :: ImageViewClass view => view -> IO Bool
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetInterpolation :: (ImageViewClass view) => view -> IO InterpType
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetInterpolation :: ImageViewClass view => view -> IO InterpType
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetPixbuf :: (ImageViewClass view) => view -> IO Pixbuf
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetPixbuf :: ImageViewClass view => view -> IO Pixbuf
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetShowCursor :: (ImageViewClass view) => view -> IO Bool
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetShowCursor :: ImageViewClass view => view -> IO Bool
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetShowFrame :: (ImageViewClass view) => view -> IO Bool
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetShowFrame :: ImageViewClass view => view -> IO Bool
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetTool :: (ImageViewClass view) => view -> IO IImageTool
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetTool :: ImageViewClass view => view -> IO IImageTool
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetViewport :: (ImageViewClass view) => view -> IO (Maybe Rectangle)
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetViewport :: ImageViewClass view => view -> IO (Maybe Rectangle)
- Graphics.UI.Gtk.ImageView.ImageView: imageViewGetZoom :: (ImageViewClass view) => view -> IO Double
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewGetZoom :: ImageViewClass view => view -> IO Double
- Graphics.UI.Gtk.ImageView.ImageView: imageViewImageToWidgetRect :: (ImageViewClass view) => view -> Rectangle -> Rectangle -> IO Bool
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewImageToWidgetRect :: ImageViewClass view => view -> Rectangle -> Rectangle -> IO Bool
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetBlackBg :: (ImageViewClass view) => view -> Bool -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetBlackBg :: ImageViewClass view => view -> Bool -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetFitting :: (ImageViewClass view) => view -> Bool -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetFitting :: ImageViewClass view => view -> Bool -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetInterpolation :: (ImageViewClass view) => view -> InterpType -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetInterpolation :: ImageViewClass view => view -> InterpType -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetOffset :: (ImageViewClass view) => view -> Double -> Double -> Bool -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetOffset :: ImageViewClass view => view -> Double -> Double -> Bool -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetPixbuf :: (ImageViewClass view) => view -> Maybe Pixbuf -> Bool -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetPixbuf :: ImageViewClass view => view -> Maybe Pixbuf -> Bool -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetShowCursor :: (ImageViewClass view) => view -> Bool -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetShowCursor :: ImageViewClass view => view -> Bool -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetShowFrame :: (ImageViewClass view) => view -> Bool -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetShowFrame :: ImageViewClass view => view -> Bool -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetTool :: (ImageViewClass view) => view -> IImageTool -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetTool :: ImageViewClass view => view -> IImageTool -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetTransp :: (ImageViewClass view) => view -> ImageTransp -> Int -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetTransp :: ImageViewClass view => view -> ImageTransp -> Int -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewSetZoom :: (ImageViewClass view) => view -> Double -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewSetZoom :: ImageViewClass view => view -> Double -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewZoomIn :: (ImageViewClass view) => view -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewZoomIn :: ImageViewClass view => view -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: imageViewZoomOut :: (ImageViewClass view) => view -> IO ()
+ Graphics.UI.Gtk.ImageView.ImageView: imageViewZoomOut :: ImageViewClass view => view -> IO ()
- Graphics.UI.Gtk.ImageView.ImageView: mouseWheelScroll :: (ImageViewClass view) => Signal view (ScrollDirection -> IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: mouseWheelScroll :: ImageViewClass view => Signal view (ScrollDirection -> IO ())
- Graphics.UI.Gtk.ImageView.ImageView: pixbufChanged :: (ImageViewClass view) => Signal view (IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: pixbufChanged :: ImageViewClass view => Signal view (IO ())
- Graphics.UI.Gtk.ImageView.ImageView: scroll :: (ImageViewClass view) => Signal view (ScrollType -> ScrollType -> IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: scroll :: ImageViewClass view => Signal view (ScrollType -> ScrollType -> IO ())
- Graphics.UI.Gtk.ImageView.ImageView: setFitting :: (ImageViewClass view) => Signal view (Int -> IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: setFitting :: ImageViewClass view => Signal view (Int -> IO ())
- Graphics.UI.Gtk.ImageView.ImageView: setScrollAdjustments :: (ImageViewClass view) => Signal view (Adjustment -> Adjustment -> IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: setScrollAdjustments :: ImageViewClass view => Signal view (Adjustment -> Adjustment -> IO ())
- Graphics.UI.Gtk.ImageView.ImageView: setZoom :: (ImageViewClass view) => Signal view (Double -> IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: setZoom :: ImageViewClass view => Signal view (Double -> IO ())
- Graphics.UI.Gtk.ImageView.ImageView: zoomChanged :: (ImageViewClass view) => Signal view (IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: zoomChanged :: ImageViewClass view => Signal view (IO ())
- Graphics.UI.Gtk.ImageView.ImageView: zoomIn :: (ImageViewClass view) => Signal view (IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: zoomIn :: ImageViewClass view => Signal view (IO ())
- Graphics.UI.Gtk.ImageView.ImageView: zoomOut :: (ImageViewClass view) => Signal view (IO ())
+ Graphics.UI.Gtk.ImageView.ImageView: zoomOut :: ImageViewClass view => Signal view (IO ())

Files

Graphics/UI/Gtk/ImageView/AnimView.chs view
@@ -73,7 +73,7 @@ animViewGetAnim :: AnimViewClass view => view                  -> IO PixbufAnimation -- ^ returns the current animation  animViewGetAnim view =-  makeNewGObject mkPixbufAnimation $+  wrapNewGObject mkPixbufAnimation $   {#call gtk_anim_view_get_anim #}     (toAnimView view) 
Graphics/UI/Gtk/ImageView/ImageNav.chs view
@@ -74,7 +74,7 @@ imageNavGetPixbuf :: ImageNavClass nav => nav                   -> IO (Maybe Pixbuf) -- ^ returns the pixbuf in the navigation area this image navigator shows, or 'Nothing' if none exist. imageNavGetPixbuf nav = -  maybeNull (makeNewGObject mkPixbuf) $+  maybeNull (wrapNewGObject mkPixbuf) $   {#call gtk_image_nav_get_pixbuf #}     (toImageNav nav) 
Graphics/UI/Gtk/ImageView/ImageToolDragger.chs view
@@ -52,7 +52,7 @@ -- | Creates and returns a new dragger tool. imageToolDraggerNew :: ImageViewClass view => view -> IO ImageToolDragger imageToolDraggerNew view = -  makeNewGObject mkImageToolDragger $+  wrapNewGObject mkImageToolDragger $   liftM (castPtr :: Ptr IImageTool -> Ptr ImageToolDragger) $   {# call unsafe gtk_image_tool_dragger_new #}     (toImageView view)
Graphics/UI/Gtk/ImageView/ImageToolSelector.chs view
@@ -80,7 +80,7 @@ -- * selection : (0, 0) - [0, 0] imageToolSelectorNew :: ImageViewClass view => view -> IO ImageToolSelector imageToolSelectorNew view = -  makeNewGObject mkImageToolSelector $+  wrapNewGObject mkImageToolSelector $   liftM (castPtr :: Ptr IImageTool -> Ptr ImageToolSelector) $   {# call unsafe gtk_image_tool_selector_new #}     (toImageView view)
Graphics/UI/Gtk/ImageView/ImageView.chs view
@@ -263,7 +263,7 @@ imageViewGetPixbuf :: ImageViewClass view => view                    -> IO Pixbuf -- ^ returns The pixbuf this view shows.  imageViewGetPixbuf view =-  makeNewGObject mkPixbuf $+  wrapNewGObject mkPixbuf $   {#call gtk_image_view_get_pixbuf #}     (toImageView view)   
Graphics/UI/Gtk/ImageView/Signals.chs view
@@ -52,7 +52,7 @@ import Control.Monad	(liftM)  import System.Glib.FFI-import System.Glib.UTFString   (peekUTFString)+import System.Glib.UTFString   (peekUTFString,maybePeekUTFString) import System.Glib.GError      (failOnGError) {#import System.Glib.Signals#} {#import System.Glib.GObject#} 
Gtk2HsSetup.hs view
@@ -23,16 +23,24 @@         CABAL_VERSION_MICRO) #else #warning Setup.hs is guessing the version of Cabal. If compilation of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when building (prefixed by --ghc-option= when using the 'cabal' command)+#if (__GLASGOW_HASKELL__ >= 700)+#define CABAL_VERSION CABAL_VERSION_ENCODE(1,10,0)+#else #if (__GLASGOW_HASKELL__ >= 612) #define CABAL_VERSION CABAL_VERSION_ENCODE(1,8,0) #else #define CABAL_VERSION CABAL_VERSION_ENCODE(1,6,0) #endif #endif+#endif  -- | Build a Gtk2hs package. ---module Gtk2HsSetup ( gtk2hsUserHooks, getPkgConfigPackages ) where+module Gtk2HsSetup ( +  gtk2hsUserHooks, +  getPkgConfigPackages, +  checkGtk2hsBuildtools+  ) where  import Distribution.Simple import Distribution.Simple.PreProcess@@ -65,7 +73,7 @@ import Distribution.Simple.Compiler  ( Compiler(..) ) import Distribution.Simple.Program (   Program(..), ConfiguredProgram(..),-  rawSystemProgramConf, rawSystemProgramStdoutConf,+  rawSystemProgramConf, rawSystemProgramStdoutConf, programName,   c2hsProgram, pkgConfigProgram, requireProgram, ghcPkgProgram,   simpleProgram, lookupProgram, rawSystemProgramStdout, ProgArg) import Distribution.ModuleName ( ModuleName, components, toFilePath )@@ -83,10 +91,11 @@ #endif import Distribution.Text ( simpleParse, display ) import System.FilePath-import System.Directory ( doesFileExist )+import System.Exit (exitFailure)+import System.Directory ( doesFileExist, getDirectoryContents, doesDirectoryExist ) import Distribution.Version (Version(..)) import Distribution.Verbosity-import Control.Monad (when, unless, filterM)+import Control.Monad (when, unless, filterM, liftM, forM, forM_) import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList ) import Data.List (isPrefixOf, isSuffixOf, nub) import Data.Char (isAlpha)@@ -94,7 +103,6 @@ import qualified Data.Set as S  import Control.Applicative ((<$>))-import System.Directory (getDirectoryContents, doesDirectoryExist)  -- the name of the c2hs pre-compiled header file precompFile = "precompchs.bin"@@ -103,13 +111,13 @@     hookedPrograms = [typeGenProgram, signalGenProgram, c2hsLocal],     hookedPreProcessors = [("chs", ourC2hs)],     confHook = \pd cf ->-      confHook simpleUserHooks pd cf >>= return . adjustLocalBuildInfo,+      (fmap adjustLocalBuildInfo (confHook simpleUserHooks pd cf)),     postConf = \args cf pd lbi -> do       genSynthezisedFiles (fromFlag (configVerbosity cf)) pd lbi       postConf simpleUserHooks args cf pd lbi,     buildHook = \pd lbi uh bf -> fixDeps pd >>= \pd ->-                                 (buildHook simpleUserHooks) pd lbi uh bf,-    copyHook = \pd lbi uh flags -> (copyHook simpleUserHooks) pd lbi uh flags >>+                                 buildHook simpleUserHooks pd lbi uh bf,+    copyHook = \pd lbi uh flags -> copyHook simpleUserHooks pd lbi uh flags >>       installCHI pd lbi (fromFlag (copyVerbosity flags)) (fromFlag (copyDest flags)),     instHook = \pd lbi uh flags -> #if defined(mingw32_HOST_OS) || defined(__MINGW32__)@@ -187,7 +195,11 @@      _ | modeGenerateRegFile   -> die "Generate Reg File not supported"        | modeGenerateRegScript -> die "Generate Reg Script not supported"        | otherwise             -> registerPackage verbosity+#if CABAL_VERSION_CHECK(1,10,0)+                                    installedPkgInfo pkg lbi inplace [packageDb]+#else                                     installedPkgInfo pkg lbi inplace packageDb+#endif    where     modeGenerateRegFile = isJust (flagToMaybe (regGenPkgConf regFlags))@@ -298,7 +310,7 @@ getCppOptions bi lbi     = nub $       ["-I" ++ dir | dir <- PD.includeDirs bi]-   ++ [opt | opt@('-':c:_) <- (PD.cppOptions bi ++ PD.ccOptions bi), c `elem` "DIU"]+   ++ [opt | opt@('-':c:_) <- PD.cppOptions bi ++ PD.ccOptions bi, c `elem` "DIU"]  installCHI :: PackageDescription -- ^information from the .cabal file         -> LocalBuildInfo -- ^information from the configure step@@ -308,14 +320,13 @@   let InstallDirs { libdir = libPref } = absoluteInstallDirs pkg lbi copydest   -- cannot use the recommended 'findModuleFiles' since it fails if there exists   -- a modules that does not have a .chi file-  mFiles <- mapM (findFileWithExtension' ["chi"] [buildDir lbi])-                 (map toFilePath+  mFiles <- mapM (findFileWithExtension' ["chi"] [buildDir lbi] . toFilePath) #if CABAL_VERSION_CHECK(1,8,0)                    (PD.libModules lib) #else                    (PD.libModules pkg) #endif-                 )+                    let files = [ f | Just f <- mFiles ] #if CABAL_VERSION_CHECK(1,8,0)   installOrdinaryFiles verbosity libPref files@@ -331,13 +342,13 @@ ------------------------------------------------------------------------------  typeGenProgram :: Program-typeGenProgram = (simpleProgram "gtk2hsTypeGen")+typeGenProgram = simpleProgram "gtk2hsTypeGen"  signalGenProgram :: Program-signalGenProgram = (simpleProgram "gtk2hsHookGenerator")+signalGenProgram = simpleProgram "gtk2hsHookGenerator"  c2hsLocal :: Program-c2hsLocal = (simpleProgram "gtk2hsC2hs")+c2hsLocal = simpleProgram "gtk2hsC2hs"  genSynthezisedFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO () genSynthezisedFiles verb pd lbi = do@@ -370,7 +381,7 @@          res <- rawSystemProgramStdoutConf verb prog (withPrograms lbi) args          rewriteFile outFile res -  (flip mapM_) (filter (\(tag,_) -> "x-types-" `isPrefixOf` tag && "file" `isSuffixOf` tag) xList) $+  forM_ (filter (\(tag,_) -> "x-types-" `isPrefixOf` tag && "file" `isSuffixOf` tag) xList) $     \(fileTag, f) -> do       let tag = reverse (drop 4 (reverse fileTag))       info verb ("Ensuring that class hierarchy in "++f++" is up-to-date.")@@ -391,7 +402,7 @@   sequence     [ do version <- pkgconfig ["--modversion", display pkgname]          case simpleParse version of-           Nothing -> die $ "parsing output of pkg-config --modversion failed"+           Nothing -> die "parsing output of pkg-config --modversion failed"            Just v  -> return (PackageIdentifier pkgname v)     | Dependency pkgname _ <- concatMap pkgconfigDepends (allBuildInfo pkg) ]   where@@ -456,9 +467,9 @@ extractDeps :: ModDep -> IO ModDep extractDeps md@ModDep { mdLocation = Nothing } = return md extractDeps md@ModDep { mdLocation = Just f } = withUTF8FileContents f $ \con -> do-  let findImports acc (('{':'#':xs):xxs) = case (dropWhile ((==) ' ') xs) of+  let findImports acc (('{':'#':xs):xxs) = case (dropWhile (' ' ==) xs) of         ('i':'m':'p':'o':'r':'t':' ':ys) ->-          case simpleParse (takeWhile ((/=) '#') ys) of+          case simpleParse (takeWhile ('#' /=) ys) of             Just m -> findImports (m:acc) xxs              Nothing -> die ("cannot parse chs import in "++f++":\n"++                             "offending line is {#"++xs)@@ -484,3 +495,17 @@         Just md -> (md:out', visited')           where             (out',visited') = foldl visit (out, m `S.insert` visited) (mdRequires md)++-- Check user whether install gtk2hs-buildtools correctly.+checkGtk2hsBuildtools :: [String] -> IO ()+checkGtk2hsBuildtools programs = do+  programInfos <- mapM (\ name -> do+                         location <- programFindLocation (simpleProgram name) normal+                         return (name, location)+                      ) programs+  let printError name = do+        putStrLn $ "Cannot find " ++ name ++ "\n" +                 ++ "Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin)."+        exitFailure+  forM_ programInfos $ \ (name, location) ->+    when (isNothing location) (printError name) 
Setup.hs view
@@ -1,7 +1,10 @@ -- Setup file for a Gtk2Hs module. Contains only adjustments specific to this module, -- all Gtk2Hs-specific boilerplate is stored in Gtk2HsSetup.hs which should be kept -- identical across all modules.-import Gtk2HsSetup ( gtk2hsUserHooks )+import Gtk2HsSetup ( gtk2hsUserHooks, checkGtk2hsBuildtools ) import Distribution.Simple ( defaultMainWithHooks ) -main = defaultMainWithHooks gtk2hsUserHooks+main = do+  checkGtk2hsBuildtools ["gtk2hsC2hs", "gtk2hsTypeGen", "gtk2hsHookGenerator"]+  defaultMainWithHooks gtk2hsUserHooks+  
demo/ImageViewer.hs view
@@ -11,15 +11,15 @@  import Graphics.UI.Gtk import Graphics.UI.Gtk.ImageView-import System.Environment +import System.Environment  main = do   -- Get program arguments.   args <- getArgs   case args of     -- Display help-    ["--help"] -> -       putStrLn $ "Welcome to Gtk2hs Image Viewer demo. :)\n\n" ++ +    ["--help"] ->+       putStrLn $ "Welcome to Gtk2hs Image Viewer demo. :)\n\n" ++                   "Usage: imageviewer filepath\n\n" ++                   "  -- Gtk2hs Team"     -- Start program.
gtkimageview.cabal view
@@ -1,5 +1,5 @@ Name:           gtkimageview-Version:        0.11.1+Version:        0.12.0 License:        LGPL-2.1 License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team@@ -47,8 +47,8 @@    Library         build-depends:  base >= 4 && < 5, array, containers, haskell98, mtl,-                        glib  >= 0.11 && < 0.12, -                        gtk   >= 0.11 && < 0.12+                        glib  >= 0.12 && < 0.13, +                        gtk   >= 0.12 && < 0.13 						         build-tools:    gtk2hsC2hs, gtk2hsHookGenerator, gtk2hsTypeGen