diff options
author | Taybin Rutkin <taybin@taybin.com> | 2006-01-18 21:05:59 +0000 |
---|---|---|
committer | Taybin Rutkin <taybin@taybin.com> | 2006-01-18 21:05:59 +0000 |
commit | 2a25079173c9614049457ec28cd2ed260f503b3f (patch) | |
tree | 96a079728bdf73a0c64d64d0e27184ae9ca141aa /gtk2_ardour/sfdb_ui.cc | |
parent | fe49c8de182d40528a27b84d5530698f438de51d (diff) |
Removing fields from the sfdb works. Dialog is fully functional as presented.
git-svn-id: svn://localhost/trunk/ardour2@276 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r-- | gtk2_ardour/sfdb_ui.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index d737d409fd..0ad46946bf 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -264,7 +264,19 @@ SoundFileBox::add_field_clicked () void SoundFileBox::remove_field_clicked () -{} +{ + field_view.get_selection()->selected_foreach_iter(mem_fun(*this, &SoundFileBox::delete_row)); + + Library->save_changes (); +} + +void +SoundFileBox::delete_row (const Gtk::TreeModel::iterator& iter) +{ + Gtk::TreeModel::Row row = *iter; + + Library->remove_field(row[label_columns.field]); +} void SoundFileBox::audition_status_changed (bool active) @@ -278,7 +290,13 @@ SoundFileBox::audition_status_changed (bool active) void SoundFileBox::field_selected () -{} +{ + if (field_view.get_selection()->count_selected_rows()) { + remove_field_btn.set_sensitive(true); + } else { + remove_field_btn.set_sensitive(false); + } +} SoundFileBrowser::SoundFileBrowser (std::string title) : |