From: Duncan C. <dun...@us...> - 2004-08-06 02:03:56
|
Update of /cvsroot/gtk2hs/gtk2hs/gconf/System/Gnome/GConf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2888/gconf/System/Gnome/GConf Modified Files: GConfValue.chs GConfClient.chs Log Message: Remove GConfSchema type. It was never bound properly. This also fixes compatability with ghc 6.0 and ghc 5.04.x. Index: GConfValue.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gconf/System/Gnome/GConf/GConfValue.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GConfValue.chs 26 Jul 2004 12:02:31 -0000 1.1 +++ GConfValue.chs 6 Aug 2004 02:03:46 -0000 1.2 @@ -38,7 +38,6 @@ marshalToGConfValue, GConfValue(GConfValue), GConfValueDyn(..), - GConfSchema ) where import Monad (liftM, when) @@ -51,7 +50,6 @@ {# enum GConfValueType {underscoreToCase} deriving (Eq, Show) #} {# pointer *GConfValue newtype #} -{# pointer *GConfSchema foreign newtype #} -- | Class of types which can be kept by GConf class GConfValueClass value where @@ -80,7 +78,6 @@ | GConfValueInt Int | GConfValueFloat Double | GConfValueBool Bool - | GConfValueSchema GConfSchema | GConfValueList [GConfValueDyn] --must all be of same primitive type | GConfValuePair (GConfValueDyn, GConfValueDyn) --must both be primitive @@ -150,19 +147,6 @@ {# call unsafe gconf_value_set_string #} value strPtr return value -instance GConfValueClass GConfSchema where - typeofGConfValue _ = GconfValueString - - unsafeMarshalFromGConfValue value = do - ptr <- {# call unsafe gconf_value_get_schema #} value - liftM GConfSchema $ newForeignPtr_ ptr - - marshalToGConfValue s = do - value <- {# call unsafe gconf_value_new #} - (fromIntegral $ fromEnum GconfValueSchema) - {# call unsafe gconf_value_set_schema #} value s - return value - instance (GConfPrimitiveValueClass a, GConfPrimitiveValueClass b) => GConfValueClass (a,b) where typeofGConfValue _ = GconfValuePair @@ -322,7 +306,6 @@ GconfValueInt -> liftM GConfValueInt $ unsafeMarshalFromGConfValue value GconfValueFloat -> liftM GConfValueFloat $ unsafeMarshalFromGConfValue value GconfValueBool -> liftM GConfValueBool $ unsafeMarshalFromGConfValue value - GconfValueSchema -> liftM GConfValueSchema $ unsafeMarshalFromGConfValue value GconfValueList -> liftM GConfValueList $ unsafeMarshalGConfValueDynListFromGConfValue value GconfValuePair -> liftM GConfValuePair $ unsafeMarshalGConfValueDynPairFromGConfValue value @@ -335,7 +318,6 @@ (GConfValueInt v') -> marshalToGConfValue v' (GConfValueFloat v') -> marshalToGConfValue v' (GConfValueBool v') -> marshalToGConfValue v' - (GConfValueSchema v') -> marshalToGConfValue v' (GConfValueList v') -> marshalGConfValueDynListToGConfValue v' (GConfValuePair v') -> marshalGConfValueDynPairToGConfValue v' @@ -344,6 +326,5 @@ gconfValueDynGetType (GConfValueInt _) = GconfValueInt gconfValueDynGetType (GConfValueFloat _) = GconfValueFloat gconfValueDynGetType (GConfValueBool _) = GconfValueBool -gconfValueDynGetType (GConfValueSchema _) = GconfValueSchema gconfValueDynGetType (GConfValueList _) = GconfValueList gconfValueDynGetType (GConfValuePair _) = GconfValuePair Index: GConfClient.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gconf/System/Gnome/GConf/GConfClient.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GConfClient.chs 26 Jul 2004 12:02:31 -0000 1.1 +++ GConfClient.chs 6 Aug 2004 02:03:46 -0000 1.2 @@ -82,12 +82,11 @@ GConfPrimitiveValueClass, GConfValue, GConfValueDyn(..), - GConfSchema ) where import Monad (liftM, when) -import LocalData (newIORef, readIORef, writeIORef) +import LocalData (newIORef, readIORef, writeIORef, unsafePerformIO) import FFI {#import Hierarchy#} {#import Signal#} @@ -273,9 +272,6 @@ gconfGetString :: GConf -> String -> IO String gconfGetString = gconfGet -gconfGetSchema :: GConf -> String -> IO GConfSchema -gconfGetSchema = gconfGet - gconfGetPair :: GConfValueClass (a,b) => GConf -> String -> IO (a, b) gconfGetPair = gconfGet @@ -310,9 +306,6 @@ gconfSetString :: GConf -> String -> String -> IO () gconfSetString = gconfSet -gconfSetSchema :: GConf -> String -> GConfSchema -> IO () -gconfSetSchema = gconfSet - gconfSetPair :: GConfValueClass (a,b) => GConf -> String -> (a, b) -> IO () gconfSetPair = gconfSet |