Ticket #1252 (closed defect: fixed)

Opened 3 years ago

Last modified 19 months 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:

Description

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.

Attachments

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

Change History

Changed 3 years ago by guest

Proposed fix

Changed 19 months ago by dmwit

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

applied, thanks

Note: See TracTickets for help on using tickets.