[Fencommits] fenfire-hs: changes to match the new gtk2hs 0.10.1 API
Tuukka Hastrup
Tuukka.Hastrup at iki.fi
Mon Oct 5 17:28:00 EEST 2009
Mon Oct 5 16:46:41 EEST 2009 Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
* changes to match the new gtk2hs 0.10.1 API
Ignore-this: e2e645edeb59631ee8a012896f01c4c8
M ./Fenfire/FRP.fhs +1
M ./Fenfire/Main.hs -4 +5
M ./Fenfire/Vobs.fhs -7 +1
Mon Oct 5 16:46:41 EEST 2009 Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
* changes to match the new gtk2hs 0.10.1 API
Ignore-this: e2e645edeb59631ee8a012896f01c4c8
diff -rN -u old-fenfire-hs/Fenfire/FRP.fhs new-fenfire-hs/Fenfire/FRP.fhs
--- old-fenfire-hs/Fenfire/FRP.fhs 2009-10-05 17:28:00.808164157 +0300
+++ new-fenfire-hs/Fenfire/FRP.fhs 2009-10-05 17:28:00.808164157 +0300
@@ -27,6 +27,7 @@
import Graphics.Rendering.Cairo
import Graphics.UI.Gtk
+import Graphics.UI.Gtk.Gdk.Events (Event(..))
newtype SF i o = SF { runSF :: TimeDiff -> i -> (o, SF i o) }
diff -rN -u old-fenfire-hs/Fenfire/Main.hs new-fenfire-hs/Fenfire/Main.hs
--- old-fenfire-hs/Fenfire/Main.hs 2009-10-05 17:28:00.808164157 +0300
+++ new-fenfire-hs/Fenfire/Main.hs 2009-10-05 17:28:00.818167107 +0300
@@ -49,6 +49,7 @@
styleGetText, styleGetBase,
styleGetAntiAliasing)
import Graphics.UI.Gtk.ModelView as New
+import Graphics.UI.Gtk.Gdk.Events (Event(..))
import qualified Network.URI
@@ -609,7 +610,7 @@
propList <- New.listStoreNew []
combo <- New.comboBoxNew
- set combo [ New.comboBoxModel := Just propList
+ set combo [ New.comboBoxModel := propList
, New.comboBoxFocusOnClick := False ]
renderer <- New.cellRendererTextNew
New.cellLayoutPackStart combo renderer True
@@ -618,8 +619,8 @@
New.onChanged combo $ do
active <- New.comboBoxGetActive combo
case active of
- Nothing -> return ()
- Just i -> do
+ (-1) -> return ()
+ i -> do
(prop,_name) <- listStoreGetValue propList i
state' <- readIORef stateRef
writeIORef stateRef $ state' {fsProperty=prop}
@@ -746,7 +747,7 @@
, containerBorderWidth := 6
, dialogHasSeparator := False
]
- image' <- imageNewFromStock stockDialogError iconSizeDialog
+ image' <- imageNewFromStock stockDialogError IconSizeDialog
set image' [ miscYalign := 0.0 ]
label' <- labelNew $ Just $ "<span weight=\"bold\" size=\"larger\">"++
escapeMarkup primary++"</span>\n\n"++escapeMarkup secondary
diff -rN -u old-fenfire-hs/Fenfire/Vobs.fhs new-fenfire-hs/Fenfire/Vobs.fhs
--- old-fenfire-hs/Fenfire/Vobs.fhs 2009-10-05 17:28:00.808164157 +0300
+++ new-fenfire-hs/Fenfire/Vobs.fhs 2009-10-05 17:28:00.808164157 +0300
@@ -35,6 +35,7 @@
import Control.Monad.Trans (liftIO, MonadIO)
import Graphics.UI.Gtk hiding (Point, Size, Layout, Color, get, fill)
+import Graphics.UI.Gtk.Gdk.Events (Event(..))
import qualified Graphics.Rendering.Cairo as C
import Graphics.Rendering.Cairo.Matrix (Matrix(Matrix))
import qualified Graphics.Rendering.Cairo.Matrix as Matrix
@@ -325,13 +326,6 @@
interpKeys = intersect (getKeys sc1) (getKeys sc2)
getKeys sc = [k | k <- keys sc, isJust (sc Map.! k)]
-instance Show Modifier where
- show Shift = "Shift"
- show Control = "Control"
- show Alt = "Alt"
- show Apple = "Apple"
- show Compose = "Compose"
-
timeDbg :: MonadIO m => String -> Endo (m ())
timeDbg s act | False = do out s; act; out s
| otherwise = act
More information about the Fencommits
mailing list