Sun Feb 17 11:43:03 GMT 2008  Eric Kow <[EMAIL PROTECTED]>
  * Fix typo pointed out on bugtracker.

Sun Feb 17 13:05:53 GMT 2008  Eric Kow <[EMAIL PROTECTED]>
  * Fix UTF8Sampler test case.

Sun Feb 17 17:41:42 GMT 2008  Eric Kow <[EMAIL PROTECTED]>
  * Add a bugs directory for test cases.

Sun Feb 17 17:42:03 GMT 2008  Eric Kow <[EMAIL PROTECTED]>
  * Add NonModalDialog test case (bug #1372529)

Sun Feb 17 17:43:26 GMT 2008  Eric Kow <[EMAIL PROTECTED]>
  * Add the submenu bug.

New patches:

[Fix typo pointed out on bugtracker.
Eric Kow <[EMAIL PROTECTED]>**20080217114303] {
hunk ./homepage/quickstart.html 248
        <span class="comment">-- react on user input</span>
        set p [on click&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := dropBall vballs p&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="comment">-- drop ball</span>
              ,on clickRight&nbsp;&nbsp;&nbsp; := (\pt -> ballsFrame)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="comment">-- new window</span>
-             ,on (charKey 'p') := set t [enable&nbsp;&nbsp; :~ not]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="comment">-- pause</span>
+             ,on (charKey 'p') := set t [enabled&nbsp;&nbsp; :~ not]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="comment">-- pause</span>
              ,on (charKey '-') := set t [interval :~ \i -> i*2]&nbsp; <span class="comment">-- increase interval</span>
              ,on (charKey '+') := set t [interval :~ \i -> max 1 (i `div` 2)]
              ]
hunk ./homepage/quickstart.html 277
 click causes a new ball to drop, a right click opens another frame (!), a <code>p</code>-key pauses the
 balls, and <code>+/-</code> increase/decrease the speed of the balls. Note how the operator
 <code>(:~)</code> applies a function to an attribute value instead of assigning one. Thus, the
-expression <code>(set t [enable :~ not])</code> flips the enabled state of the timer.</p>
+expression <code>(set t [enabled :~ not])</code> flips the enabled state of the timer.</p>
 
 <p>Finally, we specify the layout of the frame, using <code>minsize</code> to specifiy the minimal size
 of the panel and thus the size of the frame as it is not resizeable.</p>
}
[Fix UTF8Sampler test case.
Eric Kow <[EMAIL PROTECTED]>**20080217130553] hunk ./samples/test/UTF8Sampler.hs 83
 readTestFile :: IO String
 readTestFile =
  do h  <- openBinaryFile testFile ReadMode
-    ws <- hGetBytes h $ hFileSize testFile
+    hsize <- hFileSize h
+    ws <- hGetBytes h $ fromIntegral hsize
     return . fst . decode $ ws
 
 testFile :: FilePath
[Add a bugs directory for test cases.
Eric Kow <[EMAIL PROTECTED]>**20080217174142] {
adddir ./bugs
addfile ./bugs/makefile
hunk ./bugs/makefile 1
+COMPILE=ghc -package wx
+ifeq ($(shell uname),Darwin)
+PREP=macosx-app
+else
+PREP=#
+endif
+
+APPS= \
+
+.PHONY: clean
+
+all: $(APPS)
+
+%: %.hs
+	$(COMPILE) --make -o $@ $<
+	$(PREP) $@
+
+clean:
+	rm -rf $(APPS) *.o *.hi *.app
}
[Add NonModalDialog test case (bug #1372529)
Eric Kow <[EMAIL PROTECTED]>**20080217174203] {
addfile ./bugs/NonModalDialog.hs
hunk ./bugs/NonModalDialog.hs 1
+-- Compile with ghc -fglasgow-exts
+-- --make NonModalDialogTest.hs -o
+-- NonModalDialogTest
+
+module Main where
+import Graphics.UI.WX
+main = start $ do
+         f <- frame [ text := "program" ]
+         w <- get f parent    -- added line
+         d <- dialog w [ text := "Some dialog" ]
+         let bugtext = unlines [ "Bug: closing these two windows should exit the"
+                               , "program, but it does not" ]
+         set d [ visible := True, layout := margin 10 $ label bugtext ]
hunk ./bugs/makefile 9
 endif
 
 APPS= \
+      NonModalDialog\
 
 .PHONY: clean
 
}
[Add the submenu bug.
Eric Kow <[EMAIL PROTECTED]>**20080217174326] {
addfile ./bugs/SubMenu.hs
hunk ./bugs/SubMenu.hs 1
+{- From Maarten <maarten <at> snowlion.nl>
+-
+The following code doesn't seem to work properly. Either the main entry
+(m1/mp1) or it's sub menu entry (ms1/mps1) do not seem to propagate the
+event when pressed. It is possible to make it working by uncomments the
+lines where the menu commands are registered in the frame.
+-}
+
+module Main where
+
+import Graphics.UI.WX
+
+main :: IO ()
+main = start gui
+
+gui :: IO ()
+gui = do
+  f <- frame [ text := "Hello world!" ]
+
+  m   <- menuPane [ text := "&Menu" ]
+  m1 <- menuItem m [ text := "Menu m1"
+                   , on command := putStrLn "menu m1"]
+  --  set f [ on (menu m1) := putStrLn "menu m1" ]
+  menuLine m
+  sub <- menuPane [text := "Sub menu"]
+  ms1 <- menuItem sub [ text := "submenu ms1"
+                      , on command := putStrLn "submenu ms1" ]
+  --  set f [ on (menu ms1) := putStrLn "submenu ms1" ]
+  menuSub m sub [ text := "Sub" ]
+  menuItem m [text := "E&xit", on command := close f]
+
+  set f [menuBar := [m], on mouse := mouseEvent f, clientSize := sz 200 200 ]
+  return ()
+
+mouseEvent f eventMouse = do
+  case eventMouse of
+    MouseRightDown mousePoint _ -> doPopup f mousePoint
+    _ -> return ()
+
+doPopup f mousePoint = do
+  m <- makePopupMenu f "&Popup" "Doesnt' work..."
+  menuPopup m mousePoint f
+  objectDelete m
+
+makePopupMenu f c t = do
+  mp   <- menuPane [ text := c ]
+  mp1 <- menuItem mp [ text := "Popup mp1"
+                     , on command := putStrLn "popup mp1"]
+  --  set f [ on (menu mp1) := putStrLn "popup mp1" ]
+  menuLine mp
+  sub <- menuPane [text := "more text"]
+  mps1 <- menuItem sub [ text := "Popup mps1"
+                       , on command := putStrLn "popup mps1"]
+  menuSub mp sub [ text := "Sub" ]
+  --  set f [ on (menu mps1) := putStrLn "popup mps1" ]
+  return mp
hunk ./bugs/makefile 10
 
 APPS= \
       NonModalDialog\
+      SubMenu\
 
 .PHONY: clean
 
}

Context:

[Synch Visual Studio Project's wxc library version
shelarcy <[EMAIL PROTECTED]>**20080216161420] 
[Synch Visual Studio Project's output dir same as makefile
shelarcy <[EMAIL PROTECTED]>**20080216155656] 
[Ugly hack to make setup haddock work without first building.
Eric Kow <[EMAIL PROTECTED]>**20080216135157] 
[Bump to 0.10.2.
Eric Kow <[EMAIL PROTECTED]>**20080216130854] 
[Mimick cabal in placement of haddocks.
Eric Kow <[EMAIL PROTECTED]>**20080216130819] 
[Move cabal stuff to end of makefile.
Eric Kow <[EMAIL PROTECTED]>**20080216125445
 so that all variables are defined.
] 
[Add Hs-Source-Dirs for wxcore.cabal.
Eric Kow <[EMAIL PROTECTED]>**20080216125112
 In case we ever switch to the Simple build type.
] 
[Re-add time package dependency (needed by wxdirect).
Eric Kow <[EMAIL PROTECTED]>**20080216124853] 
[Improve description and synopsis of cabal files.
Eric Kow <[EMAIL PROTECTED]>**20080216124832] 
[Split doc building into wxcore and wx version.
Eric Kow <[EMAIL PROTECTED]>**20080216124746] 
[Modernise haskell98 imports in wxdirect.
Eric Kow <[EMAIL PROTECTED]>**20080216120113] 
[Prefer /usr/local/wxhaskell/bin/wx-config to the one on the path.
Eric Kow <[EMAIL PROTECTED]>**20080216113844
 
 This makes it easier to install wxhaskell via cabal-install.
 Just set up a symbolic link to point to point to your wxWidgets,
 no need for the --wx-config flag.
] 
[Add some --bindir, --datadir, --libexecdir to configure script.
Eric Kow <[EMAIL PROTECTED]>**20080216113837
 For Cabal.  The last two are ignored.
] 
[Change output dir to 'dist' to mimick cabal.
Eric Kow <[EMAIL PROTECTED]>**20080216104847] 
[Modernise haskell98 imports in wxcore.
Eric Kow <[EMAIL PROTECTED]>**20080216100020] 
[Consolidate build targets which exist purely for the sake of Cabal.
Eric Kow <[EMAIL PROTECTED]>**20080216095845] 
[Fix some dependencies that Ross Paterson pointed out.
Eric Kow <[EMAIL PROTECTED]>**20080215181444] 
[TAG 0.10.1
Eric Kow <[EMAIL PROTECTED]>**20080215173503] 
Patch bundle hash:
eb1efef97874ac1c3ee6830ecd5dbe540623deea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to