diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/sfdb_ui.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/sfdb_ui.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 79546880de..5cca008dc0 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -97,6 +97,9 @@ SoundFileBox::SoundFileBox () (mem_fun (*this, &SoundFileBox::add_field_clicked)); remove_field_btn.signal_clicked().connect (mem_fun (*this, &SoundFileBox::remove_field_clicked)); + + Gtk::CellRendererText* cell(static_cast<Gtk::CellRendererText*>(field_view.get_column_cell_renderer(1))); + cell->signal_edited().connect (mem_fun (*this, &SoundFileBox::field_edited)); field_view.get_selection()->signal_changed().connect (mem_fun (*this, &SoundFileBox::field_selected)); Library->fields_changed.connect (mem_fun (*this, &SoundFileBox::setup_fields)); @@ -260,6 +263,13 @@ SoundFileBox::remove_field_clicked () } void +SoundFileBox::field_edited (const Glib::ustring& str1, const Glib::ustring& str2) +{ + cout << "field_edited" << endl; + Library->save_changes (); +} + +void SoundFileBox::delete_row (const Gtk::TreeModel::iterator& iter) { Gtk::TreeModel::Row row = *iter; diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index 79c73b97ac..8ef57d7b9f 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -100,6 +100,7 @@ class SoundFileBox : public Gtk::VBox void stop_btn_clicked (); void add_field_clicked (); void remove_field_clicked (); + void field_edited (const Glib::ustring&, const Glib::ustring&); void delete_row (const Gtk::TreeModel::iterator& iter); void field_selected (); |