gi-gtk-hs 0.3.3.0 → 0.3.4.0
raw patch · 2 files changed
+2/−9 lines, 2 files
Files
gi-gtk-hs.cabal view
@@ -1,5 +1,5 @@ name: gi-gtk-hs-version: 0.3.3.0+version: 0.3.4.0 synopsis: A wrapper for gi-gtk, adding a few more idiomatic API parts on top description: A wrapper for gi-gtk, adding a few more idiomatic API parts on top homepage: https://github.com/haskell-gi/gi-gtk-hs
src/Data/GI/Gtk/ModelView/CustomStore.hs view
@@ -130,7 +130,6 @@ -> m () customStoreSetColumn model (ColumnId _ setter colId) acc | colId<0 = return () | otherwise = liftIO $ do- putStrLn "Here 2" ptr <- withManagedPtr (toTypedTreeModel model) gtk2hs_store_get_impl impl <- deRefStablePtr ptr let cMap = customStoreColumns impl@@ -229,24 +228,19 @@ -- ^ Functions to enable this store to receive drag events. -> m (model row) customStoreNew priv con tmIface mDragSource mDragDest = liftIO $ do- putStrLn "Here 3" cMap <- columnMapNew let dummyDragSource = DragSourceIface { customDragSourceRowDraggable = \_ _ -> return False, customDragSourceDragDataGet = \_ _ _ -> return False, customDragSourceDragDataDelete = \_ _ -> return False } let dummyDragDest = DragDestIface { customDragDestRowDropPossible = \_ _ _ -> return False, customDragDestDragDataReceived = \_ _ _ -> return False }- putStrLn "Here 4" implPtr <- newStablePtr CustomStoreImplementation { customStoreColumns = cMap, customStoreIface = tmIface, customTreeDragSourceIface = fromMaybe dummyDragSource mDragSource, customTreeDragDestIface = fromMaybe dummyDragDest mDragDest }- putStrLn "Here 5" privPtr <- newStablePtr priv- putStrLn "Here 6" storePtr <- gtk2hs_store_new implPtr privPtr- putStrLn "Here 7" con <$> newObject CustomStore storePtr @@ -259,7 +253,6 @@ -- customStoreGetRow :: (MonadIO m, IsTypedTreeModel model) => model row -> TreeIter -> m row customStoreGetRow model iter = liftIO $ do- putStrLn "Here 1" impl <- withManagedPtr (toTypedTreeModel model) gtk2hs_store_get_impl >>= deRefStablePtr treeModelIfaceGetRow (customStoreIface impl) iter @@ -344,7 +337,7 @@ tempManagedPtr :: Ptr a -> IO (ManagedPtr a) tempManagedPtr p = do- isOwned <- newIORef False+ isOwned <- newIORef True fPtr <- newForeignPtr_ p return $ ManagedPtr fPtr isOwned