0

Which signal does a GtkTreeView emit when an editable column is edited? I want to catch edits with a callback function.

gpoo
  • 8,408
  • 3
  • 38
  • 53
Tim
  • 13,904
  • 10
  • 69
  • 101

1 Answers1

1

I catch edits in my treeview with the following code (c++):

treeview.get_column_cell_renderer(col_index)->signal_editing_started().connect(
    sigc::mem_fun(*this, &YourClass::onEditingStarted));

And the callback is:

void YourClass::onEditingStarted(Gtk::CellEditable* editable, const Glib::ustring& path) {
    // here I'll connect an event to catch when the edition ends
    // YourClass::onEditingEnded has no parameters
    editable->signal_editing_done().connect(
        sigc::mem_fun(*this, &YourClass::onEditingEnded));
}
gpoo
  • 8,408
  • 3
  • 38
  • 53
Jong Bor Lee
  • 3,805
  • 1
  • 24
  • 27