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
This commit is contained in:
Taybin Rutkin 2006-01-18 21:05:59 +00:00
parent fe49c8de18
commit 2a25079173
2 changed files with 21 additions and 2 deletions

View File

@ -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)
:

View File

@ -99,6 +99,7 @@ class SoundFileBox : public Gtk::VBox
void stop_btn_clicked ();
void add_field_clicked ();
void remove_field_clicked ();
void delete_row (const Gtk::TreeModel::iterator& iter);
void field_selected ();
void audition_status_changed (bool state);