From: Axel S. <as...@us...> - 2005-11-26 16:00:41
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29345/gtk/Graphics/UI/Gtk/Multiline Modified Files: TextBuffer.chs.pp TextTag.chs.pp TextTagTable.chs TextView.chs.pp Log Message: Replaced occurrences of makeNewGObject with constructNewGObject if the function does pass the reference count to the caller. Index: TextTag.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TextTag.chs.pp 12 Nov 2005 11:47:43 -0000 1.13 +++ TextTag.chs.pp 26 Nov 2005 16:00:22 -0000 1.14 @@ -114,7 +114,7 @@ import System.Glib.FFI import System.Glib.Attributes import System.Glib.Properties -import System.Glib.GObject (makeNewGObject) +import System.Glib.GObject (constructNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} import Graphics.UI.Gtk.Pango.Enums (FontStyle, Variant, Stretch, Underline) @@ -135,12 +135,12 @@ -- textTagNew :: Maybe TagName -> IO TextTag textTagNew (Just name) = - makeNewGObject mkTextTag $ + constructNewGObject mkTextTag $ withCString name $ \namePtr -> {# call unsafe text_tag_new #} namePtr textTagNew Nothing = - makeNewGObject mkTextTag $ {# call unsafe text_tag_new #} nullPtr + constructNewGObject mkTextTag $ {# call unsafe text_tag_new #} nullPtr -------------------- Index: TextTagTable.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextTagTable.chs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TextTagTable.chs 19 Oct 2005 12:57:37 -0000 1.5 +++ TextTagTable.chs 26 Nov 2005 16:00:22 -0000 1.6 @@ -60,7 +60,7 @@ import Monad (liftM) import System.Glib.FFI -import System.Glib.GObject (makeNewGObject) +import System.Glib.GObject (constructNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} @@ -73,7 +73,7 @@ -- textTagTableNew :: IO TextTagTable textTagTableNew = - makeNewGObject mkTextTagTable $ + constructNewGObject mkTextTagTable $ {# call unsafe text_tag_table_new #} -------------------- Index: TextBuffer.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- TextBuffer.chs.pp 12 Nov 2005 11:47:43 -0000 1.11 +++ TextBuffer.chs.pp 26 Nov 2005 16:00:22 -0000 1.12 @@ -181,7 +181,8 @@ import System.Glib.UTFString import System.Glib.Attributes import System.Glib.Properties -import System.Glib.GObject (makeNewGObject) +import System.Glib.GObject (constructNewGObject, + makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Multiline.TextIter#} @@ -199,7 +200,7 @@ Maybe tt -- ^ @table@ - a tag table, or @Nothing@ to create a new one -> IO TextBuffer textBufferNew table = - makeNewGObject mkTextBuffer $ + constructNewGObject mkTextBuffer $ {# call unsafe text_buffer_new #} (maybe (TextTagTable nullForeignPtr) toTextTagTable table) @@ -467,7 +468,7 @@ -> Bool -- ^ @leftGravity@ - whether the mark has left gravity -> IO TextMark -- ^ returns the new 'TextMark' object textBufferCreateMark self markName where_ leftGravity = - makeNewGObject mkTextMark $ + constructNewGObject mkTextMark $ maybeWith withUTFString markName $ \markNamePtr -> {# call text_buffer_create_mark #} (toTextBuffer self) Index: TextView.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- TextView.chs.pp 12 Nov 2005 11:47:43 -0000 1.7 +++ TextView.chs.pp 26 Nov 2005 16:00:22 -0000 1.8 @@ -187,7 +187,7 @@ import System.Glib.UTFString import System.Glib.Attributes import Graphics.UI.Gtk.Abstract.Object (makeNewObject) -import System.Glib.GObject (makeNewGObject) +import System.Glib.GObject (constructNewGObject, makeNewGObject) {#import Graphics.UI.Gtk.Types#} {#import Graphics.UI.Gtk.Signals#} {#import Graphics.UI.Gtk.Multiline.TextIter#} @@ -662,7 +662,7 @@ -- textChildAnchorNew :: IO TextChildAnchor textChildAnchorNew = - makeNewGObject mkTextChildAnchor + constructNewGObject mkTextChildAnchor {# call unsafe text_child_anchor_new #} -- | Retrieve all 'Widget's at this |