I’m trying to do the equivalent of connect_changed
from GtkEntry, but for GtkTextView. Looking at the signals, only connect_preedit_changed
seems to be related, but it doesn’t get emitted when I type inside a GtkTextView.
Code that works for GtkEntry, for reference:
self.connect_changed(move |entry| {
let content = entry.buffer().text().to_string();
// ...
});
What’s the proper way of running code when the user is typing in a GtkTextView?