Ticket #1252 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Source View: sourceViewLineMarkActivated and sourceGutterCellActivated signals wrong

Reported by: guest Owned by: duncan
Priority: normal Milestone: 0.11.0
Component: SourceView bindings Version: 0.11.0
Keywords: Cc:


Both return an invalid text iterator. The reason is that the signature of the signal handler is supposed to be:

void                user_function                      (GtkSourceView *view,
                                                        GtkTextIter   *iter,
                                                        GdkEvent      *event,
                                                        gpointer       user_data)

Yet gtksourceview2 declares it as:

           connect_PTR_BOXED__NONE "line-mark-activated" mkTextIterCopy after obj
                                   (\eventPtr iter -> runReaderT (fun iter) eventPtr)

Meaning that it will actually expect the event as second parameter and the iterator as third. The "cell-activated" signal for the gutter has the exact same problem, which sadly makes it impossible right now to react to mark events.

I have attached a patch that fixes the problem for me by swapping the two parameters.


gtksourceview2-mark-activation-signal-fix.patch (4.8 kB) - added by guest 5 years ago.
Proposed fix

Change History

Changed 5 years ago by guest

Proposed fix

Changed 4 years ago by dmwit

  • status changed from new to closed
  • resolution set to fixed

applied, thanks

Note: See TracTickets for help on using tickets.