jbdev
jbdev

Reputation: 47

Python Gtk3: "mark-set" signal of a Gtk.Textbuffer

I am trying to understand a strange behaviour of the mark-set signal emitted by a Gtk.Textbuffer in a python program. In fact this signal is emitted (in my case) multiple times for a single user action. This sounds not logical to me and I didn't find any reference to this in the documentation. Well, the only reference I find is an unresolved question on this website.

The question I'm talking about is this one: Gtk3 with Python, TextView rising multiple 'mark-set' signals

I'm trying the same code than in this question and get the same result. Does anyone has an idea about what's going wrong? Thank you very much for any clue or piece of advice.

PS: Gtk3 is used. I've tried to run this under both Linux and OSX and got the same behavior.

Upvotes: 0

Views: 117

Answers (1)

gianmt
gianmt

Reputation: 1182

change the test function to:

def test (buffer, location, mark, user_data=None):
    print(mark.get_name())

so that you can see the names of the marks, most likely are marks builtin in the buffer itself by GTK

Upvotes: 1

Related Questions