Month: June 2007

  • Selection in GtkTextBuffer

    I’ve recently played around with GtkTextBuffer. It’s a rather nice text editing widget (or rather widget part). Unfortunately it misses one functionality, which is also missing from GtkEditable derived widgets: A signal for selection changes. There are two workarounds: You can setup a notification on the “has-selection” property like this: buffer.connect(“notify”, on_buffer_notify) def on_buffer_notify(buffer, prop): if prop.name ==…