You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Daniel W. <dm...@lu...> - 2012-11-24 03:13:04
|
diffing dir... Fri Jun 10 00:56:25 BST 2011 Daniel Wagner <da...@wa...> * add the "entryBuffer" attribute to bind to the "gtk_entry_set_buffer" and "gtk_entry_get_buffer" functions Ignore-this: a4dd3aede78d6dc09646fd31159bd2be hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 106 + entryBuffer, hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 206 +-- | Sets the given buffer as the buffer being displayed. +-- +entrySetBuffer :: (EntryClass self, EntryBufferClass buffer) => self -> buffer -> IO () +entrySetBuffer self buffer = + {# call entry_set_buffer #} + (toEntry self) + (toEntryBuffer buffer) + +-- Although the documentation doesn't say one way or the other, a look at the +-- source indicates that gtk_entry_get_buffer doesn't increment the reference +-- count of the GtkEntryBuffer it returns, so, like textViewGetBuffer, we must +-- increment it ourselves. + +-- | Returns the 'EntryBuffer' being displayed. +-- +entryGetBuffer :: EntryClass self => self -> IO EntryBuffer +entryGetBuffer self = + makeNewGObject mkEntryBuffer $ + {# call entry_get_buffer #} + (toEntry self) + hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 650 +-- | The buffer being displayed. +-- +entryBuffer :: EntryClass self => Attr self EntryBuffer +entryBuffer = newAttr + entryGetBuffer + entrySetBuffer + |
From: Daniel W. <dm...@lu...> - 2012-11-24 03:13:01
|
diffing dir... Fri Jun 10 00:55:56 BST 2011 Daniel Wagner <da...@wa...> * bind to the gtk_entry_new_with_buffer function Ignore-this: 371643b493db38d100f89399874da2b hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 55 + entryNewWithBuffer, hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 192 +-- | Creates a new 'Entry' widget backed by a particular 'EntryBuffer'. One +-- buffer can be shared among many widgets. +-- +entryNewWithBuffer :: EntryBufferClass buffer => buffer -> IO Entry +entryNewWithBuffer buffer = + makeNewObject mkEntry $ + liftM (castPtr :: Ptr Widget -> Ptr Entry) $ + {# call unsafe entry_new_with_buffer #} + (toEntryBuffer buffer) + |
From: Daniel W. <dm...@lu...> - 2012-11-21 18:40:43
|
diffing dir... Wed Nov 21 18:39:55 GMT 2012 Daniel Wagner <da...@wa...> * remind myself to use darcs tag Ignore-this: f11ae45b0988ca38e2a242c1c647382 hunk ./RELEASING 30 +* darcs tag those babies! |
From: Daniel W. <dm...@lu...> - 2012-11-21 18:40:42
|
diffing dir... Wed Nov 21 18:37:12 GMT 2012 Daniel Wagner <da...@wa...> tagged 0.12.4 Ignore-this: bc26deb864d6fc9c817c156598eb9f0 |
From: Daniel W. <dm...@lu...> - 2012-11-04 21:02:23
|
diffing dir... Sun Nov 4 20:29:04 GMT 2012 Daniel Wagner <da...@wa...> * version bumps Ignore-this: b960ee20608d17c3574e40e8a454b80a hunk ./cairo/cairo.cabal 2 -Version: 0.12.3.1 +Version: 0.12.4 hunk ./gio/gio.cabal 2 -Version: 0.12.3 +Version: 0.12.4 hunk ./glib/glib.cabal 2 -Version: 0.12.3.1 +Version: 0.12.4 hunk ./gtk/gtk.cabal 2 -Version: 0.12.3.1 +Version: 0.12.4 hunk ./pango/pango.cabal 2 -Version: 0.12.3 +Version: 0.12.4 hunk ./tools/gtk2hs-buildtools.cabal 2 -Version: 0.12.3.1 +Version: 0.12.4 |
From: Daniel W. <dm...@lu...> - 2012-11-03 13:53:58
|
diffing dir... Sat Nov 3 13:53:04 GMT 2012 Daniel Wagner <da...@wa...> * whitespace only Ignore-this: b76ab22da8e3f076d92952ee54a14d20 hunk ./glib/System/Glib/Signals.chs 201 -foreign import ccall "wrapper" mkDestructor :: IO () -> IO GClosureNotify [_^I_] [_$_] - [_^I_] [_$_] +foreign import ccall "wrapper" mkDestructor :: IO () -> IO GClosureNotify + hunk ./glib/System/Glib/Signals.chs 204 -mkFunPtrClosureNotify hPtr = do [_^I_] [_$_] - dRef <- newIORef nullFunPtr [_^I_] [_$_] - dPtr <- mkDestructor $ do [_^I_] [_$_] - freeHaskellFunPtr hPtr [_^I_] [_$_] - dPtr <- readIORef dRef [_^I_] [_$_] - freeHaskellFunPtr dPtr [_^I_] [_$_] - writeIORef dRef dPtr [_^I_] [_$_] +mkFunPtrClosureNotify hPtr = do + dRef <- newIORef nullFunPtr + dPtr <- mkDestructor $ do + freeHaskellFunPtr hPtr + dPtr <- readIORef dRef + freeHaskellFunPtr dPtr + writeIORef dRef dPtr hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs 174 + hunk ./gtk/Graphics/UI/Gtk/General/General.chs 418 + |
From: Daniel W. <dm...@lu...> - 2012-11-03 13:53:55
|
diffing dir... Wed Sep 26 01:54:09 BST 2012 jw...@gm... * modify foreign import functions for ghc-7.6 compatibility Ignore-this: 5d912e2b7782f0f002e88e76d0b52b26 ghc-7.6 appears to be much more restrictive when coercing types of functions imported via the FFI than previous versions. Before, unused arguments could be omitted, and types such as 'Ptr NewtypeWrapper' were allowed. ghc-7.6 no longer seems to accept these, so some wrapped functions needed to have arguments added or argument types changed. The changed argument types are strictly in internal APIs, so a major version bump is not necessary. hunk ./gio/System/GIO/Async/AsyncResult.chs 50 - (Ptr GObject -> Ptr AsyncResult -> Ptr () -> IO ()) -> IO GAsyncReadyCallback + (Ptr () -> Ptr AsyncResult -> Ptr () -> IO ()) -> IO GAsyncReadyCallback hunk ./gio/System/GIO/Async/AsyncResult.chs 55 - object <- (makeNewGObject mkGObject . return) cObject + object <- (makeNewGObject mkGObject . return) (castPtr cObject) hunk ./glib/System/Glib/GObject.chs 130 -foreign import ccall "wrapper" mkDestroyNotifyPtr :: IO () -> IO DestroyNotify - hunk ./glib/System/Glib/MainLoop.chs 74 -foreign import ccall "wrapper" mkSourceFunc :: IO {#type gint#} -> IO SourceFunc +foreign import ccall "wrapper" mkSourceFunc :: (Ptr () -> IO {#type gint#}) -> IO SourceFunc hunk ./glib/System/Glib/MainLoop.chs 82 - funPtr <- mkSourceFunc fun + funPtr <- mkSourceFunc (const fun) hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs 129 -foreign import ccall "wrapper" mkDestructor :: IO () -> IO GWeakNotify +foreign import ccall "wrapper" mkDestructor + :: (Ptr () -> Ptr GObject -> IO ()) -> IO GWeakNotify hunk ./gtk/Graphics/UI/Gtk/Abstract/Object.chs 138 - uFunPtr <- mkDestructor $ do + uFunPtr <- mkDestructor $ \_ _ -> do hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 263 - (\_ sPtr info -> runReaderT (getFunc info) sPtr >> return ()) + (\_ sPtr info _ -> runReaderT (getFunc info) sPtr >> return ()) hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 285 - (Ptr Clipboard -> Ptr () -> {#type guint#} -> IO ()) -> IO ClipboardGetFunc + (Ptr Clipboard -> Ptr () -> {#type guint#} -> Ptr () -> IO ()) -> IO ClipboardGetFunc hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 316 - (\_ sPtr info -> runReaderT (getFunc info) sPtr >> return ()) + (\_ sPtr info _ -> runReaderT (getFunc info) sPtr >> return ()) hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 407 - (\_ sPtr -> do + (\_ sPtr _ -> do hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 421 - (Ptr Clipboard -> Ptr () -> IO ()) -> IO ClipboardReceivedFunc + (Ptr Clipboard -> Ptr () -> Ptr () -> IO ()) -> IO ClipboardReceivedFunc hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 442 - (\_ sPtr -> do + (\_ sPtr _ -> do hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 456 - (Ptr Clipboard -> CString -> IO ()) -> IO ClipboardTextReceivedFunc + (Ptr Clipboard -> CString -> Ptr () -> IO ()) -> IO ClipboardTextReceivedFunc hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 480 - (\_ sPtr -> do + (\_ sPtr _ -> do hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 493 - (Ptr Clipboard -> Ptr Pixbuf -> IO ()) -> IO ClipboardImageReceivedFunc + (Ptr Clipboard -> Ptr Pixbuf -> Ptr () -> IO ()) -> IO ClipboardImageReceivedFunc hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 516 - (\_ tPtr len -> do + (\_ tPtr len _ -> do hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 531 - (Ptr Clipboard -> Ptr (Ptr ()) -> {#type gint#} -> IO ()) -> IO ClipboardTargetsReceivedFunc + (Ptr Clipboard -> Ptr (Ptr ()) -> {#type gint#} -> Ptr () -> IO ()) -> IO ClipboardTargetsReceivedFunc hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 555 - (\_ tPtr sPtr len -> do + (\_ tPtr sPtr len _ -> do hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 558 - str <- peekUTFStringLen (sPtr,fromIntegral len) + str <- peekUTFStringLen (castPtr sPtr,fromIntegral len) hunk ./gtk/Graphics/UI/Gtk/General/Clipboard.chs 571 - (Ptr Clipboard -> Ptr () -> CString -> {#type gsize#} -> IO ()) -> + (Ptr Clipboard -> Ptr () -> Ptr CUChar -> {#type gsize#} -> Ptr () -> IO ()) -> hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs 496 - funPtr <- mkRowSeparatorFunc $ \_ iterPtr -> do + funPtr <- mkRowSeparatorFunc $ \_ iterPtr _ -> do hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs 499 - return (extract value) + return (fromBool $ extract value) hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs 506 - (Ptr TreeModel -> Ptr TreeIter -> IO Bool) -> IO TreeViewRowSeparatorFunc + (Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO {#type gboolean #}) -> IO TreeViewRowSeparatorFunc hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs 430 - (Ptr () -> Ptr () -> Ptr TreeIter -> Ptr () -> IO CInt) -> + (Ptr TreeModel -> Ptr NativeTreePath -> Ptr TreeIter -> Ptr () -> IO CInt) -> hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModelFilter.chs 163 - (Ptr TreeModelFilter -> Ptr TreeIter -> Ptr () -> IO {#type gboolean#}) -> + (Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO {#type gboolean#}) -> hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeSelection.chs 154 - fPtr <- mkTreeSelectionFunc (\_ _ tp _ -> do + fPtr <- mkTreeSelectionFunc (\_ _ tp _ _ -> do hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeSelection.chs 171 - (Ptr () -> Ptr () -> Ptr TreePath -> Ptr () -> IO CInt)-> + (Ptr TreeSelection -> Ptr TreeModel -> Ptr NativeTreePath -> {#type gint#} -> Ptr () -> IO CInt)-> hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeSelection.chs 202 - fPtr <- mkTreeSelectionForeachFunc (\_ _ iterPtr -> do + fPtr <- mkTreeSelectionForeachFunc (\_ _ iterPtr _ -> do hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeSelection.chs 222 - (Ptr () -> Ptr () -> Ptr TreeIter -> IO ()) -> IO TreeSelectionForeachFunc + (Ptr TreeModel -> Ptr NativeTreePath -> Ptr TreeIter -> Ptr () -> IO ()) -> IO TreeSelectionForeachFunc hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs 585 - (Ptr () -> Ptr TreeViewColumn -> Ptr TreeViewColumn -> Ptr TreeViewColumn -> + (Ptr TreeView -> Ptr TreeViewColumn -> Ptr TreeViewColumn -> Ptr TreeViewColumn -> hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs 801 - (Ptr () -> Ptr NativeTreePath -> Ptr () -> IO ()) -> + (Ptr TreeView -> Ptr NativeTreePath -> Ptr () -> IO ()) -> hunk ./gtk/Graphics/UI/Gtk/Multiline/TextIter.chs 800 - ({#type gunichar#} -> Ptr () -> {#type gboolean#}) -> IO TextCharPredicate + ({#type gunichar#} -> Ptr () -> IO {#type gboolean#}) -> IO TextCharPredicate hunk ./gtk/Graphics/UI/Gtk/Multiline/TextIter.chs 813 - fPtr <- mkTextCharPredicate (\c _ -> fromBool $ pred (chr (fromIntegral c))) + fPtr <- mkTextCharPredicate (\c _ -> return $ fromBool $ pred (chr (fromIntegral c))) hunk ./gtk/Graphics/UI/Gtk/Multiline/TextIter.chs 830 - fPtr <- mkTextCharPredicate (\c _ -> fromBool $ pred (chr (fromIntegral c))) + fPtr <- mkTextCharPredicate (\c _ -> return $ fromBool $ pred (chr (fromIntegral c))) hunk ./gtk/Graphics/UI/Gtk/Windows/Assistant.chs 277 - ({#type glong#} -> Ptr () -> IO {#type glong#}) + ({#type gint#} -> Ptr () -> IO {#type gint#}) |
From: Daniel W. <dm...@lu...> - 2012-11-03 13:53:52
|
diffing dir... Wed Sep 26 02:00:51 BST 2012 jw...@gm... * fix 'catch' statements for ghc-7.6 compatibility Ignore-this: cb638480bc10f2b446c6e0b251b35a10 hunk ./tools/c2hs/base/general/FileOps.hs 34 +import Prelude hiding (catch) hunk ./tools/c2hs/base/general/FileOps.hs 40 +import Control.Exception (catch, SomeException) hunk ./tools/c2hs/base/general/FileOps.hs 94 - `catch` \_ -> createLoop (attempts - 1) rs' + `catch` handler attempts rs' hunk ./tools/c2hs/base/general/FileOps.hs 96 + handler :: Int -> [Int] -> SomeException -> IO (Handle,FilePath) + handler attempts rs' _ = createLoop (attempts - 1) rs' + hunk ./tools/c2hs/base/state/StateTrans.hs 82 +import Prelude hiding (catch) + hunk ./tools/c2hs/base/state/StateTrans.hs 85 +import Control.Exception (catch) |
From: Daniel W. <dm...@lu...> - 2012-11-03 13:53:49
|
diffing dir... Wed Sep 26 02:01:19 BST 2012 jw...@gm... * tools/c2hs: import foreign data constructors (CInt) Ignore-this: 7660daffca37235fda0f8cc47426a70 hunk ./tools/c2hs/toplevel/C2HSConfig.hs 49 -import Foreign.C (CInt) +import Foreign.C (CInt(..)) |
From: Daniel W. <dm...@lu...> - 2012-10-10 23:58:54
|
diffing dir... Thu Oct 11 00:25:56 BST 2012 Daniel Wagner <da...@wa...> * fix documentation bug: mention widgetTooltipText instead of widgetSetTooltipText Ignore-this: f9b29cc7376afc3312852126bc2a65b9 hunk ./gtk/Graphics/UI/Gtk/Misc/Tooltip.chs 37 --- Basic tooltips can be realized simply by using 'widgetSetTooltipText' or --- 'widgetSetTooltipMarkup' without any explicit tooltip object. +-- Basic tooltips can be realized simply by using 'widgetTooltipText' or +-- 'widgetTooltipMarkup' without any explicit tooltip object. |
From: Daniel W. <dm...@lu...> - 2012-09-03 19:25:21
|
diffing dir... Sun Sep 2 17:51:31 BST 2012 Duncan Coutts <du...@co...> * Fix for finding the .dll names for ghci Ignore-this: f2ca3b6959a1355ca708e8b7c091a50d Should fix the problem that the cairo package fails to load in ghci on Windows hunk ./cairo/Gtk2HsSetup.hs 59 -import Data.List (isPrefixOf, isSuffixOf, nub) +import Data.List (isPrefixOf, isSuffixOf, nub, minimumBy) +import Data.Ord as Ord (comparing) hunk ./cairo/Gtk2HsSetup.hs 104 - dll:_ -> [dropExtension dll] - _ -> if lib == "z" then [] else [lib] + dlls@(_:_) -> [dropExtension (pickDll dlls)] + _ -> if lib == "z" then [] else [lib] + where + -- If there are several .dll files matching the one we're after then we + -- just have to guess. For example for recent Windows cairo builds we get + -- libcairo-2.dll libcairo-gobject-2.dll libcairo-script-interpreter-2.dll + -- Our heuristic is to pick the one with the shortest name. + -- Yes this is a hack but the proper solution is hard: we would need to + -- parse the .a file and see which .dll file(s) it needed to link to. + pickDll = minimumBy (Ord.comparing length) |
From: Daniel W. <dm...@lu...> - 2012-07-08 09:49:36
|
diffing dir... Sun Jul 8 10:43:22 BST 2012 Daniel Wagner <da...@wa...> * Gergely Risko's patch to make tryEvent more useful Ignore-this: 526940ab1b2222de547f24dce4d95db4 Previously, tryEvent would catch pattern-match failure exceptions and Do The Right Thing. However, it didn't catch the exception thrown when calling "guard". This patch lets it behave the same when guards fail as when patterns are exhausted. hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 642 --- threw a pattern match exception. +-- threw a pattern match exception or calls mzero (e.g. via guard). hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 649 - , Handler (\ e -> if isUserError e && "Pattern" `isPrefixOf` ioeGetErrorString e + , Handler (\ e -> if isUserError e && + ("Pattern" `isPrefixOf` ioeGetErrorString e || + "mzero" == ioeGetErrorString e) hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 659 + | "user error (mzero" `isPrefixOf` show e -> + return False |
From: Daniel W. <dm...@lu...> - 2012-06-17 21:58:15
|
diffing dir... Sun Jun 17 22:41:49 BST 2012 Daniel Wagner <da...@wa...> * forgot to bump the gtk package number -- which explains why the build fixes didn't make it to Hackage Ignore-this: bf0869569fbe3a78a3ac57317b78fcec hunk ./gtk/gtk.cabal 2 -Version: 0.12.3 +Version: 0.12.3.1 |
From: Daniel W. <dm...@lu...> - 2012-06-11 22:43:21
|
diffing dir... Mon Jun 11 23:41:57 BST 2012 Daniel Wagner <da...@wa...> * add a small demo of DND code Ignore-this: 7f6658e7f84c4ad5292b20042b7757b8 hunk ./gtk/demo/demos.txt 96 +textdrop: a minimal sample program showing how to become a drag-n-drop destination + adddir ./gtk/demo/textdrop |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:11:07
|
diffing dir... Mon May 28 19:27:42 BST 2012 Daniel Wagner <da...@wa...> * use forward-compatible Foreign.C.Types imports Ignore-this: 6c4a618a653ddbaef4bd6974e7177d45 Previously, the hierarchy generator used #if in an attempt to choose between two choices for an import line. The one choice gives warnings on old GHC's; the other gives warnings on new GHC's. However, the symbol used in the #if isn't defined by gtk2hs' custom build system, so one of the two choices was the defacto code. Until this patch, the defacto code was the one that produced warnings on new GHC's. It should be possible to revise the build system to define this symbol, but it is becoming less and less likely I will have the energy to work out how to do this correctly. Instead this patch makes the choice to prefer the import that compiles cleanly on new GHC's, and let old GHC's print warnings. hunk ./tools/hierarchyGen/Hierarchy.chs.template 41 -#if __GLASGOW_HASKELL__>=704 hunk ./tools/hierarchyGen/Hierarchy.chs.template 42 -#else -import Foreign.C.Types (CULong, CUInt) -#endif -import System.Glib.GType (GType, typeInstanceIsA) +import System.Glib.GType (GType, typeInstanceIsA) |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:11:07
|
diffing dir... Sun Jun 3 00:58:22 BST 2012 Daniel Wagner <da...@wa...> * change gdk_threads_enter import from unsafe to safe Ignore-this: cae9259155505b623b1afe09f4df2143 Safe imports have two uses: when a function may call back into Haskell, it must be marked safe; and when a function may block (or take a long time to compute), it may be marked safe to avoid blocking all other Haskell threads from making progress. The cost of marking a function safe is decreased (serial) performance. Since the typical use case for gdk_threads_enter is to grab a lock in concurrent code, it is important to ensure that other Haskell threads can make progress -- especially since one of them may be holding the lock. hunk ./gtk/Graphics/UI/Gtk/General/General.chs 205 -{#fun unsafe gdk_threads_enter as threadsEnter {} -> `()' #} +{#fun gdk_threads_enter as threadsEnter {} -> `()' #} |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:59
|
diffing dir... Sun May 27 22:51:17 BST 2012 Daniel Wagner <da...@wa...> * remove TreeStoreStatic Ignore-this: 87504218d1864b1239985ee7fb4e3495 This module hasn't been touched in over five years; doesn't build; and wasn't mentioned in the cabal file anyway. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeStoreStatic.hs 1 -module Graphics.UI.Gtk.ModelView.TreeStoreStatic ( - treeStoreNewStatic - ) where - -import Data.Bits -import Data.Word (Word) -import qualified Data.Tree as Tree -import Data.Tree (Tree) -import Data.Array - -import Graphics.UI.Gtk.ModelView.TreeModel -import Graphics.UI.Gtk.ModelView.CustomStore -import Graphics.UI.Gtk.ModelView.TreeIter -import Graphics.UI.Gtk.ModelView.Column - -import Control.Exception (assert) - --------------------------------------------- --- internal model data types --- - -data ArrTree a = Node a !(ArrForest a) - | Leaf a -type ArrForest a = Array Word (ArrTree a) - -label :: ArrTree a -> a -label (Node a _) = a -label (Leaf a) = a - -mkArrForest :: [Tree a] -> ArrForest a -mkArrForest trees = - let bounds = (0, fromIntegral (length trees) - 1) - in listArray bounds (map mkArrTree trees) - -mkArrTree :: Tree a -> ArrTree a -mkArrTree (Tree.Node a []) = Leaf a -mkArrTree (Tree.Node a trees) = Node a (mkArrForest trees) - --------------------------------------------- --- the actual TreeStore implementation --- - -treeStoreNewStatic :: [Column a] -> [Tree a] -> IO TreeModel -treeStoreNewStatic rs ts = - customStoreNew $ - let forest = mkArrForest ts - cols = listArray (0, length rs - 1) rs - in CustomStore { - customStoreGetFlags = return [], - customStoreGetNColumns = return (length rs), - customStoreGetColumnType = \n -> return $! columnGType (cols ! n), - - customStoreGetIter = \path -> return $! pathToIter forest path, - customStoreGetPath = \iter -> return $! iterToPath forest iter, - - customStoreGetValue = \iter i gvalue -> - case forest `lookupNode` iter of [_$_] - (node, _, _, _, _) -> - columnSetGValue (cols ! i) (label node) gvalue, - - customStoreIterNext = \iter -> return $! treeStoreIterNext forest iter, - customStoreIterChildren = \iter -> return $! treeStoreIterChildren forest iter, - customStoreIterHasChild = \iter -> return $! treeStoreIterHasChild forest iter, - customStoreIterNChildren = \iter -> return $! treeStoreIterNChildren forest iter, - customStoreIterNthChild = \iter n -> return $! treeStoreIterNthChild forest iter n, - customStoreIterParent = \iter -> return $! treeStoreIterParent forest iter, - - customStoreRefNode = \_ -> return (), - customStoreUnrefNode = \_ -> return () -} - -treeStoreIterNext :: ArrForest a -> TreeIter -> Maybe TreeIter -treeStoreIterNext forest iter = - case forest `lookupNode` iter of - (_, forest, index, off, count) - | inRange (bounds forest) index -> Just $! setBitSlice iter off count (index+1) - | otherwise -> Nothing - -treeStoreIterChildren forest Nothing - | forestElemCount forest == 0 = Nothing - | otherwise = Just $! TreeIter 0 1 0 0 -treeStoreIterChildren forest (Just iter) = - case forest `lookupNode` iter of - (Leaf _, _, _, _, _) -> Nothing - (Node _ forest, _, index, off, count) -> - let count' = forestBitsNeeded forest - in Just $! setBitSlice iter (off+count) count' 1 - -treeStoreIterHasChild forest iter = - case forest `lookupNode` iter of - (Leaf _, _, _, _, _) -> False - (Node _ _, _, _, _, _) -> True - -treeStoreIterNChildren forest Nothing = forestElemCount forest -treeStoreIterNChildren forest (Just iter) = - case forest `lookupNode` iter of - (Leaf _, _, _, _, _) -> 0 - (Node _ forest, _, _, _, _) -> forestElemCount forest - -treeStoreIterNthChild forest Nothing n = Just $! TreeIter 0 (fromIntegral n + 1) 0 0 -treeStoreIterNthChild forest (Just iter) n = - case forest `lookupNode` iter of - (Leaf _, _, _, _, _) -> Nothing - (Node _ forest, _, _, off, count) -> - let count' = forestBitsNeeded forest - in Just $! setBitSlice iter (off+count) count' (fromIntegral n + 1) - -treeStoreIterParent forest iter = - case forest `lookupNode` iter of - (_, forest, _, 0, count) -> Nothing - (_, forest, _, off, count) -> Just $! setBitSlice iter off count 0 - --------------------------------------------- --- lookup functions --- - -lookupNode :: ArrForest a -> TreeIter -> (ArrTree a, ArrForest a, Word, Int, Int) -lookupNode forest iter = - let count = forestBitsNeeded forest - index = getBitSlice iter 0 count - in lookup forest index 0 count - - where - lookup :: [_$_] - ArrForest a -- the forest of trees we are currently looking in - -> Word -- the index of the node in the forest (non-zero) - -> Int -- the iterator bit offset for the node in the forest - -> Int -- the number of bits needed to index the current forest - - -> (ArrTree a, -- the node we found - ArrForest a, -- the forrest the node is part of - Word, -- the index of the node within the forest - Int, -- the iterator bit offset for the node we found - Int) -- the iterator bit count for the forest - lookup forest index bit count = - assert (index > 0) $ - case forest ! (index - 1) of - node@(Leaf _) -> (node, forest, index, bit, count) - node@(Node _ forest') -> - let count' = forestBitsNeeded forest' - in case getBitSlice iter (bit+count) count' of - 0 -> (node, forest, index, bit, count) - index -> lookup forest' index (bit+count) count' - -iterToPath :: ArrForest a -> TreeIter -> TreePath -iterToPath forest iter = lookup forest 0 - where - lookup :: ArrForest a -> Int -> TreePath - lookup forest off = - let count = forestBitsNeeded forest - in case getBitSlice iter off count of [_$_] - 0 -> [] - index -> - case forest ! (index - 1) of - Leaf _ -> fromIntegral index - 1 : [] - Node _ forest -> fromIntegral index - 1 - : lookup forest (off+count) - -pathToIter :: ArrForest a -> TreePath -> Maybe TreeIter -pathToIter forest [] = Nothing -pathToIter forest path = lookup forest path 0 (TreeIter 0 0 0 0) - where - lookup :: ArrForest a -> TreePath -> Int -> TreeIter -> Maybe TreeIter - lookup forest [] off iter = Just iter - lookup forest (index:path) off iter = - let count = forestBitsNeeded forest - index' = fromIntegral index + 1 - iter' = setBitSlice iter off count index' - in if not $ inRange (bounds forest) (index' - 1) - then Nothing - else case forest ! (index' - 1) of - Leaf _ | null path -> Just $! iter' - | otherwise -> Nothing - Node _ forest -> lookup forest path (off + count) iter' - -forestBitsNeeded :: ArrForest a -> Int -forestBitsNeeded forest = - case bounds forest of - (_, upperBound) -> bitsNeeded (upperBound + 2) - -forestElemCount :: ArrForest a -> Int -forestElemCount forest = - case bounds forest of - (_, upperBound) -> fromIntegral (upperBound + 1) - --------------------------------------------- --- low leve bit-twiddling utility functions --- - -bitsNeeded :: Word -> Int -bitsNeeded n = bitsNeeded' 0 n - where bitsNeeded' b 0 = b - bitsNeeded' b n = bitsNeeded' (b+1) (n `shiftR` 1) - -getBitSlice :: TreeIter -> Int -> Int -> Word -getBitSlice (TreeIter _ a b c) off count = - getBitSliceWord a off count - .|. getBitSliceWord b (off-32) count - .|. getBitSliceWord c (off-64) count - - where getBitSliceWord :: Word -> Int -> Int -> Word - getBitSliceWord word off count = - word `shiftR` off .&. (1 `shiftL` count - 1) - -setBitSlice :: TreeIter -> Int -> Int -> Word -> TreeIter -setBitSlice (TreeIter stamp a b c) off count value = - assert (value < 1 `shiftL` count) $ - TreeIter stamp - (setBitSliceWord a off count value) - (setBitSliceWord b (off-32) count value) - (setBitSliceWord c (off-64) count value) - - where setBitSliceWord :: Word -> Int -> Int -> Word -> Word - setBitSliceWord word off count value = - let mask = (1 `shiftL` count - 1) `shiftL` off - in (word .&. complement mask) .|. (value `shiftL` off) - -------------------- --- testing --- - -aforest :: ArrForest String -aforest = - let leafNode a = Tree.Node a [] - trees = - [Tree.Node "A" [leafNode "AA", leafNode "AB"], - Tree.Node "B" [leafNode "BA", leafNode "BB"], - Tree.Node "C" [leafNode "CA", leafNode "CB"], - leafNode "D"] - in mkArrForest trees - -instance Show TreeIter where - show (TreeIter _ a b c) = show (a,b,c) - -showIterBits (TreeIter _ a b c) = [showBits a, showBits b, showBits c] - -showBits :: Bits a => a -> String -showBits a = [ if testBit a i then '1' else '0' | i <- [0..bitSize a - 1] ] - --- property 1: --- forall aforest. forall valid path. iterToPath aforest (pathToIter aforest path) == path - --- property 2: --- forall aforest. forall (node, path). lookup (pathToIter aforest path) == node rmfile ./gtk/Graphics/UI/Gtk/ModelView/TreeStoreStatic.hs |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:53
|
diffing dir... Thu May 17 23:50:52 BST 2012 Daniel Wagner <da...@wa...> * rename the HCAR report per Janis' instructions Ignore-this: f687965d8d6149ff6dfb95e0ae64f55d move ./Gtk2Hs-AG.tex ./Gtk2Hs-DG.tex |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:49
|
diffing dir... Tue Apr 24 00:09:20 BST 2012 Takano Akio <al...@hy...> * Fix a memory leak in customStoreNew (#1251) Ignore-this: 3940fee6a1c17c2a5951a7d9f6a6573b hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 242 - liftM con $ makeNewGObject (CustomStore, objectUnref) $ + liftM con $ wrapNewGObject (CustomStore, objectUnref) $ |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:45
|
diffing dir... Thu Apr 26 17:50:39 BST 2012 Daniel Wagner <da...@wa...> * some "darcs log name -> real world name" translations to remember Ignore-this: db0b53c299aa90ffcad5f1ce4fa9a758 hunk ./RELEASING 34 + juhp is Jens Petersen + as49 is Axel Simon |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:42
|
diffing dir... Mon Apr 23 00:12:12 BST 2012 Daniel Wagner <da...@wa...> * record carefully what I'm supposed to do when it comes time to make a release Ignore-this: 74beca0a3c44929e5db7d03681b7e3ed addfile ./RELEASING hunk ./RELEASING 1 +This file is a collection of notes and reminders of things to do around the +time of a release. None of this is by any means set in stone. + +Before release: + +* Take a look through the bug tracker. + http://hackage.haskell.org/trac/gtk2hs +* Test that it builds! This is supposed to be a cross-platform library, too, + and support for a lot of setups is one of our selling points. There's a lot + of knobs, each with a lot of settings: + 32-bit or 64-bit architecture + Windows, Linux, or Mac + GHC version + GTK library version + It's basically impossible to test that it builds on every combination, but a + representative sampling would be nice. +* Check that the demos still work. There are demo directories in each Hackage + package's directory. +* Bump all the version numbers in tandem. + +At release time: + +* Upload all the new packages. Some shell like this seems reasonable: + for i in tools glib gio cairo pango gtk; do + pushd $i + rm dist/*.tar.gz + cabal sdist && cabal upload dist/*.tar.gz + popd + done +* Make an announcement on the mailing lists. Below is a template email. Once in + a while, you might want to run a command like this to update the + "contributors" section: + darcs log | grep '^[^ ]' | cut -b31- | sort | uniq -c | sort -n + + To: ha...@ha... + Subject: [ANN] gtk2hs-X.X.X + Body: + + Today, we welcome into the world version X.X.X of Gtk2Hs[1], a set of Haskell + bindings to many of the libraries included in the Gtk+/Gnome platform. Gtk+ + is an extensive and mature multi-platform toolkit for creating graphical user + interfaces. + + GUIs written using Gtk2Hs use themes to resemble the native look on Windows. + Gtk is the toolkit used by Gnome, one of the two major GUI toolkits on Linux. + On Mac OS programs written using Gtk2Hs are run by Apple's X11 server but may + also be linked against a native Aqua implementation of Gtk. + + You can look forward to using the following improvements in this release: + + XXX + + This release has been tested on Linux and Windows with a variety of + combinations of Gtk+ and GHC versions. + + Installation + ------------ + Assuming you have the necessary Gtk+ base libraries already installed, you + can get the basic set of Haskell bindings with these two commands: + + cabal install gtk2hs-buildtools + cabal install gtk + + Other available packages include gconf, glade, gnomevfs, gstreamer, gtkglext, + gtksourceview2, soegtk, svgcairo, vte, and webkit. There are longer-winded + instructions that include pointers on getting the Gtk+ base libraries + installed on the website [2]. + + Features + -------- + * Automatic memory management (unlike some other C/C++ GUI libraries, Gtk+ + provides proper support for garbage-collected languages) + * Unicode support + * High quality vector graphics using Cairo + * Extensive reference documentation + * An implementation of the ``Haskell School of Expression'' graphics API + + Community + --------- + You can keep up with the latest developments on the mailing lists: + * gtk2hs-users [3]: discussions about writing code that uses Gtk2Hs + * gtk2hs-devel [4]: discussions about modifying the Gtk2Hs bindings + * gtk2hs-commit [5]: a read-only mailing list with announcements of every + patch to hit the darcs repository + + Check out the latest code via darcs: + darcs get http://code.haskell.org/gtk2hs/ + + Or complain on the bug tracker [6]. + + This code was brought to you by: + Duncan Coutts + Axel Simon + Andy Stewart + Peter Gavin + Jens Petersen + John Obbele + Hans van Thiel + Daniel Wagner + Bertram Felgenhauer + ...and many, many more + + [1] http://projects.haskell.org/gtk2hs/ + [2] http://code.haskell.org/gtk2hs/INSTALL + [3] https://lists.sourceforge.net/lists/listinfo/gtk2hs-users + [4] https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel + [5] https://lists.sourceforge.net/lists/listinfo/gtk2hs-commit + [6] http://hackage.haskell.org/trac/gtk2hs/ +* Make an announcement on the blog via: + http://projects.haskell.org/gtk2hs/wp-admin/post-new.php + Below is a template. + Title: New Gtk2Hs X.X.X release + Tags: + Categories: Announcements, Releases + Body: + Thanks to X, X, and X, we have a bunch of improvements in Gtk2Hs X.X.X: + + XXX + + Thanks to everyone who helped out! + ~d +* Update the documentation links. You can get there directly at + http://projects.haskell.org/gtk2hs/wp-admin/page.php?action=edit&post=5 + or by visiting the admin page at + http://projects.haskell.org/gtk2hs/wp-admin + and clicking "Manage", then "Pages", then "Documentation". |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:36
|
diffing dir... Fri Apr 20 14:35:54 BST 2012 ads...@ya... * Add entryGet/SetBuffer functions. Ignore-this: 5e083fd21fc5e63986fa0bae6a7d5442 hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 81 +#if GTK_CHECK_VERSION (2,18,0) + entryGetBuffer, + entrySetBuffer, +#endif hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 111 +#if GTK_CHECK_VERSION (2,18,0) + entryBuffer, +#endif hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 167 +#if GTK_CHECK_VERSION (2,18,0) +import Graphics.UI.Gtk.Entry.EntryBuffer +#endif hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 442 +#if GTK_CHECK_VERSION(2,18,0) +-- | Get the 'EntryBuffer' object which holds the text for this widget. +entryGetBuffer :: EntryClass self => self + -> IO EntryBuffer +entryGetBuffer self = + makeNewGObject mkEntryBuffer $ + {# call gtk_entry_get_buffer #} + (toEntry self) + +-- | Set the 'EntryBuffer' object which holds the text for this widget. +entrySetBuffer :: (EntryClass self, EntryBufferClass buffer) => self + -> buffer -> IO () +entrySetBuffer self = + {# call gtk_entry_set_buffer #} + (toEntry self) . toEntryBuffer +#endif + hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 653 +#if GTK_CHECK_VERSION(2,18,0) +entryBuffer :: (EntryClass self, EntryBufferClass buffer) => + ReadWriteAttr self EntryBuffer buffer +entryBuffer = newAttr + entryGetBuffer + entrySetBuffer +#endif + + |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:36
|
diffing dir... Sun Apr 22 20:52:06 BST 2012 Daniel Wagner <da...@wa...> * add a surface type for raw data, plus a demo program showing how to use this with SDL (code supplied by Eli Frey) Ignore-this: 254fd58bd2322a9fecb5449741d7a697 hunk ./cairo/Graphics/Rendering/Cairo.hs 200 + , withImageSurfaceForData hunk ./cairo/Graphics/Rendering/Cairo.hs 204 + , createImageSurfaceForData hunk ./cairo/Graphics/Rendering/Cairo.hs 1688 +-- | Like 'withImageSurface' but creating a surface to target external +-- data pointed to by 'PixelData'. +-- +withImageSurfaceForData :: + PixelData -- ^ pointer to pixel data + -> Format -- ^ format of pixels in the surface to create + -> Int -- ^ width of the surface, in pixels + -> Int -- ^ height of the surface, in pixels + -> Int -- ^ size of stride between rows in the surface to create + -> (Surface -> IO a) -- ^ an action that may use the surface. The surface is + -- only valid within this action + -> IO a +withImageSurfaceForData pixels format width height stride f = + bracket (Internal.imageSurfaceCreateForData pixels format width height stride) + (\surface -> do status <- Internal.surfaceStatus surface + Internal.surfaceDestroy surface + unless (status == StatusSuccess) $ + Internal.statusToString status >>= fail) + (\surface -> f surface) + +-- | Like 'createImageSurface' but creating a surface to target external +-- data pointed to by 'PixelData'. +-- +createImageSurfaceForData :: + PixelData -- ^ pointer to pixel data + -> Format -- ^ format of pixels in the surface to create + -> Int -- ^ width of the surface, in pixels + -> Int -- ^ height of the surface, in pixels + -> Int -- ^ size of stride between rows in the surface to create + -> IO Surface +createImageSurfaceForData pixels format width height stride = do + surface <- Internal.imageSurfaceCreateForData pixels format width height stride + Internal.manageSurface surface + return surface + hunk ./cairo/Graphics/Rendering/Cairo/Internal/Surfaces/Image.chs 24 +{#fun image_surface_create_for_data as imageSurfaceCreateForData + { id `Ptr CUChar' + , cFromEnum `Format' + , `Int' + , `Int' + , `Int' + } -> `Surface' mkSurface*#} + hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 17 - Matrix(Matrix), MatrixPtr + PixelData + , Matrix(Matrix), MatrixPtr hunk ./cairo/Graphics/Rendering/Cairo/Types.chs 67 +type PixelData = Ptr CUChar + addfile ./cairo/demo/CairoSDL.hs hunk ./cairo/demo/CairoSDL.hs 1 +import qualified Graphics.UI.SDL as SDL +import Graphics.Rendering.Cairo +import Foreign.Ptr ( castPtr ) + +demo1 :: Render () +demo1 = do + setSourceRGB 0 0 0 + moveTo 100 100 + lineTo 500 500 + stroke + +demo2 :: Render () +demo2 = do + setSourceRGB 0 0 0 + moveTo 500 100 + lineTo 100 500 + stroke + +main = SDL.withInit [ SDL.InitVideo ] $ do + screen <- SDL.setVideoMode 600 600 32 [ SDL.SWSurface ] + + SDL.fillRect screen Nothing (SDL.Pixel maxBound) + + pixels <- fmap castPtr $ SDL.surfaceGetPixels screen + + canvas <- createImageSurfaceForData pixels FormatRGB24 600 600 (600 * 4) + renderWith canvas demo1 + + withImageSurfaceForData pixels FormatRGB24 600 600 (600 * 4) $ \canvas -> + renderWith canvas demo2 + + SDL.flip screen + + idle + where + idle = do + e <- SDL.waitEvent + case e of + SDL.Quit -> return () + otherwise -> idle hunk ./cairo/demo/Makefile 2 -PROGS = drawing drawing2 starandring text clock graph -SOURCES = Drawing.hs Drawing2.hs StarAndRing.hs Text.hs Clock.hs Graph.hs +PROGS = drawing drawing2 starandring text clock graph sdldrawing +SOURCES = Drawing.hs Drawing2.hs StarAndRing.hs Text.hs Clock.hs Graph.hs CairoSDL.hs hunk ./cairo/demo/Makefile 25 +sdldrawing : CairoSDL.hs + $(HC_RULE) + |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:29
|
diffing dir... Tue Mar 20 19:04:11 GMT 2012 bla...@gm... * added pixbufNewFromData Ignore-this: e3bd65acdcad39fbe22258e53ec4ed22 hunk ./gtk/Graphics/UI/Gtk/Gdk/Pixbuf.chs 72 + pixbufNewFromData, hunk ./gtk/Graphics/UI/Gtk/Gdk/Pixbuf.chs 406 +pixbufNewFromData :: Ptr CUChar -> Colorspace -> Bool -> Int -> Int -> Int -> Int -> IO Pixbuf +pixbufNewFromData imData cSpace hasAlpha bitsPerSample width height rowStride + = wrapNewGObject mkPixbuf $ + {#call pixbuf_new_from_data #} + imData + (fromIntegral . fromEnum $ cSpace) + (fromBool hasAlpha) + (fromIntegral bitsPerSample) + (fromIntegral width) + (fromIntegral height) + (fromIntegral rowStride) + nullFunPtr nullPtr + |
From: Daniel W. <dm...@lu...> - 2012-06-03 00:10:29
|
diffing dir... Wed Apr 11 15:05:17 BST 2012 ads...@ya... * Bindings for gtk_menu_item_get_label, gtk_menu_item_get_use_underline, and the associated setters. Ignore-this: cc9d70d06e02b6ae93fe8e39daf96ea7 hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs 79 +#if GTK_CHECK_VERSION(2,16,0) + menuItemSetLabel, + menuItemGetLabel, + menuItemSetUseUnderline, + menuItemGetUseUnderline, +#endif hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs 98 +#if GTK_CHECK_VERSION(2,16,0) + menuItemLabel, + menuItemUseUnderline, +#endif hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs 176 +#if GTK_CHECK_VERSION(2,16,0) +-- | Sets text on the MenuItem label + +menuItemSetLabel :: (MenuItemClass self) => self -> String -> IO () +menuItemSetLabel self label = + withUTFString label $ {# call gtk_menu_item_set_label #} (toMenuItem self) + +-- | Gets text on the MenuItem label +menuItemGetLabel :: (MenuItemClass self) => self -> IO String +menuItemGetLabel self = + {# call gtk_menu_item_get_label #} + (toMenuItem self) + >>= \strPtr -> if strPtr == nullPtr + then return "" + else peekUTFString strPtr + +-- | If True, an underline in the text indicates the next character should be used for the mnemonic accelerator key. +-- +menuItemSetUseUnderline :: (MenuItemClass self) => self -> Bool -> IO () +menuItemSetUseUnderline self = + {# call gtk_menu_item_set_use_underline #} (toMenuItem self) . fromBool hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs 198 +-- | Checks if an underline in the text indicates the next character should be used for the mnemonic accelerator key. +-- +menuItemGetUseUnderline :: (MenuItemClass self) => self -> IO Bool +menuItemGetUseUnderline self = + liftM toBool $ {# call gtk_menu_item_get_use_underline #} + (toMenuItem self) + +#endif hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs 320 +#if GTK_CHECK_VERSION(2,16,0) +-- | \'label\' property. See 'menuItemSetLabel' and 'menuItemGetLabel' +-- +menuItemLabel :: MenuItemClass self => Attr self String +menuItemLabel = newAttr + menuItemGetLabel + menuItemSetLabel + +-- | \'useUnderline\' property. See 'menuItemSetUseUnderline' and [_$_] +-- 'menuItemGetUseEUnderline' +-- +menuItemUseUnderline :: MenuItemClass self => Attr self Bool +menuItemUseUnderline = newAttr + menuItemGetUseUnderline + menuItemSetUseUnderline +#endif |