binding-gtk 0.2 → 0.2.1
raw patch · 4 files changed
+22/−7 lines, 4 filesdep +binding-gtkdep +directorydep ~basedep ~binding-corePVP ok
version bump matches the API change (PVP)
Dependencies added: binding-gtk, directory
Dependency ranges changed: base, binding-core
API changes (from Hackage documentation)
Files
- binding-gtk.cabal +16/−5
- demo/in.txt +0/−1
- demo/lists.hs +5/−1
- src/Graphics/UI/Gtk/Binding.hs +1/−0
binding-gtk.cabal view
@@ -1,23 +1,34 @@ name: binding-gtk -version: 0.2 -cabal-version: >= 1.6 +version: 0.2.1 +cabal-version: >= 1.9.2 license: BSD3 license-file: LICENSE author: Gideon Sireling -maintainer: haskell@accursoft.org +maintainer: code@accursoft.org homepage: http://code.accursoft.com/binding bug-reports: http://code.accursoft.com/binding/issues synopsis: Data Binding in Gtk2Hs build-type: Simple category: GUI, User Interfaces -extra-source-files: demo/simple.hs demo/lists.hs, demo/in.txt description: Bind mutable data and lists to Gtk2Hs widgets. Examples are provided by the included demo programs. library - build-depends: base <5, gtk, binding-core, mtl + build-depends: base <5, gtk, binding-core >=0.2, mtl hs-source-dirs: src exposed-modules: Graphics.UI.Gtk.Binding + +test-suite simple + type: exitcode-stdio-1.0 + main-is: simple.hs + build-depends: base, gtk, binding-core >=0.2, binding-gtk + hs-source-dirs: demo + +test-suite lists + type: exitcode-stdio-1.0 + main-is: lists.hs + build-depends: base, gtk, binding-core >=0.2, binding-gtk, directory + hs-source-dirs: demo source-repository head type: hg
− demo/in.txt
@@ -1,1 +0,0 @@-[Person {name = "Joe", age = 32, active = True},Person {name = "Fred", age = 50, active = False},Person {name = "Alice", age = 43, active = True}]
demo/lists.hs view
@@ -1,13 +1,17 @@ import Data.IORef import Control.Monad import Graphics.UI.Gtk +import System.Directory import Data.Binding.List import Graphics.UI.Gtk.Binding data Person = Person {name::String, age::Int, active::Bool} deriving (Read, Show) -main = do --read the input +main = do --create an input file if none exists + doesFileExist "in.txt" >>= (`unless` writeFile "in.txt" + "[Person {name = \"Joe\", age = 32, active = True},Person {name = \"Fred\", age = 50, active = False},Person {name = \"Alice\", age = 43, active = True}]") + --read the input f <- readFile "in.txt" bl <- toBindingList $ read f :: IO (BindingList IORef Person) --create widgits
src/Graphics/UI/Gtk/Binding.hs view
@@ -53,6 +53,7 @@ writeVar source (read d) return False +{-# ANN navigation "HLint: ignore Use void" #-} -- | Create a set of navigation buttons for a binding list. navigation :: Variable v => BindingList v a -- ^ the binding list