Ticket #1252: gtksourceview2-mark-activation-signal-fix.patch

File gtksourceview2-mark-activation-signal-fix.patch, 4.8 kB (added by guest, 2 years ago)

Proposed fix

  • Graphics/UI/Gtk/SourceView/Signals.chs

    diff -u -r gtksourceview2-0.12.3/Graphics/UI/Gtk/SourceView/Signals.chs gtksourceview2-0.12.3-mod/Graphics/UI/Gtk/SourceView/Signals.chs
    old new  
    4444  connect_OBJECT__NONE, 
    4545  connect_BOXED_BOXED__NONE, 
    4646  connect_BOOL_INT__NONE, 
    47   connect_PTR_BOXED__NONE, 
    48   connect_OBJECT_PTR_BOXED__NONE, 
     47  connect_BOXED_PTR__NONE, 
     48  connect_OBJECT_BOXED_PTR__NONE, 
    4949  connect_OBJECT_BOXED_OBJECT__BOOL, 
    5050  connect_ENUM_INT__NONE, 
    5151   
     
    120120          failOnGError $ 
    121121          user bool1 int2 
    122122 
    123 connect_PTR_BOXED__NONE ::  
     123connect_BOXED_PTR__NONE ::  
    124124  GObjectClass obj => SignalName -> 
    125   (Ptr b' -> IO b) ->  
     125  (Ptr a' -> IO a) ->  
    126126  ConnectAfter -> obj -> 
    127   (Ptr a -> b -> IO ()) -> 
     127  (a -> Ptr b -> IO ()) -> 
    128128  IO (ConnectId obj) 
    129 connect_PTR_BOXED__NONE signal boxedPre2 after obj user = 
     129connect_BOXED_PTR__NONE signal boxedPre1 after obj user = 
    130130  connectGeneric signal after obj action 
    131131  where action :: Ptr GObject -> Ptr () -> Ptr () -> IO () 
    132         action _ ptr1 box2 = 
     132        action _ box1 ptr2 = 
    133133          failOnGError $ 
    134           boxedPre2 (castPtr box2) >>= \box2' -> 
    135           user (castPtr ptr1) box2' 
     134          boxedPre1 (castPtr box1) >>= \box1' -> 
     135          user box1' (castPtr ptr2) 
    136136 
    137 connect_OBJECT_PTR_BOXED__NONE ::  
     137connect_OBJECT_BOXED_PTR__NONE ::  
    138138  (GObjectClass a', GObjectClass obj) => SignalName -> 
    139   (Ptr c' -> IO c) ->  
     139  (Ptr b' -> IO b) ->  
    140140  ConnectAfter -> obj -> 
    141   (a' -> Ptr b -> c -> IO ()) -> 
     141  (a' -> b -> Ptr c -> IO ()) -> 
    142142  IO (ConnectId obj) 
    143 connect_OBJECT_PTR_BOXED__NONE signal boxedPre3 after obj user = 
     143connect_OBJECT_BOXED_PTR__NONE signal boxedPre2 after obj user = 
    144144  connectGeneric signal after obj action 
    145145  where action :: Ptr GObject -> Ptr GObject -> Ptr () -> Ptr () -> IO () 
    146         action _ obj1 ptr2 box3 = 
     146        action _ obj1 box2 ptr3 = 
    147147          failOnGError $ 
    148           boxedPre3 (castPtr box3) >>= \box3' -> 
     148          boxedPre2 (castPtr box2) >>= \box2' -> 
    149149          makeNewGObject (GObject, objectUnref) (return obj1) >>= \obj1' -> 
    150           user (unsafeCastGObject obj1') (castPtr ptr2) box3' 
     150          user (unsafeCastGObject obj1') box2' (castPtr ptr3) 
    151151 
    152152connect_OBJECT_BOXED_OBJECT__BOOL ::  
    153153  (GObjectClass a', GObjectClass c', GObjectClass obj) => SignalName -> 
  • Graphics/UI/Gtk/SourceView/SourceGutter.chs

    diff -u -r gtksourceview2-0.12.3/Graphics/UI/Gtk/SourceView/SourceGutter.chs gtksourceview2-0.12.3-mod/Graphics/UI/Gtk/SourceView/SourceGutter.chs
    old new  
    191191sourceGutterCellActivated :: SourceGutterClass sg => Signal sg (CellRenderer -> TextIter -> EventM EAny ())                          
    192192sourceGutterCellActivated = 
    193193  Signal (\after obj fun ->  
    194            connect_OBJECT_PTR_BOXED__NONE "cell-activated" mkTextIterCopy after obj 
    195                                    (\cr eventPtr iter -> runReaderT (fun cr iter) eventPtr) 
     194           connect_OBJECT_BOXED_PTR__NONE "cell-activated" mkTextIterCopy after obj 
     195                                   (\cr iter eventPtr -> runReaderT (fun cr iter) eventPtr) 
    196196         ) 
    197197 
    198198-- | Emitted when a tooltip is requested for a specific cell. Signal handlers can return 'True' to notify 
  • Graphics/UI/Gtk/SourceView/SourceView.chs

    diff -u -r gtksourceview2-0.12.3/Graphics/UI/Gtk/SourceView/SourceView.chs gtksourceview2-0.12.3-mod/Graphics/UI/Gtk/SourceView/SourceView.chs
    old new  
    546546sourceViewLineMarkActivated :: SourceViewClass sv => Signal sv (TextIter -> EventM EAny ()) 
    547547sourceViewLineMarkActivated =  
    548548  Signal (\after obj fun ->  
    549            connect_PTR_BOXED__NONE "line-mark-activated" mkTextIterCopy after obj 
    550                                    (\eventPtr iter -> runReaderT (fun iter) eventPtr) 
     549           connect_BOXED_PTR__NONE "line-mark-activated" mkTextIterCopy after obj 
     550                                   (\iter eventPtr -> runReaderT (fun iter) eventPtr) 
    551551         ) 
    552552 
    553553-- * Deprecated 
  • gtksourceview2-0.12.

    diff -u -r gtksourceview2-0.12.3/marshal.list gtksourceview2-0.12.3-mod/marshal.list
    old new  
    4646NONE:OBJECT 
    4747NONE:BOXED,BOXED 
    4848NONE:BOOL,INT 
    49 NONE:POINTER,BOXED 
    50 NONE:OBJECT,POINTER,BOXED 
     49NONE:BOXED,POINTER 
     50NONE:OBJECT,BOXED,POINTER 
    5151BOOL:OBJECT,BOXED,OBJECT 
    5252NONE:ENUM,INT