#include <pbd/whitespace.h>
+#include <ardour/audio_library.h>
#include <ardour/session.h>
#include <ardour/audioengine.h>
#include <ardour/configuration.h>
return;
}
-
click_path_entry.set_sensitive (true);
click_emphasis_path_entry.set_sensitive (true);
session_raid_entry.set_sensitive (true);
path_table.attach(*label, 0, 1, 2, 3, FILL|EXPAND, FILL);
path_table.attach(sfdb_path_view, 1, 3, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
+ sfdb_path_view.set_paths(Library->get_paths());
+ sfdb_path_view.PathsUpdated.connect (mem_fun(*this, &OptionEditor::sfdb_paths_changed));
+
path_table.show_all();
}
+void
+OptionEditor::sfdb_paths_changed ()
+{
+ Library->set_paths (sfdb_path_view.get_paths());
+}
+
void
OptionEditor::add_session_paths ()
{
std::vector<std::string> get_paths ();
void set_paths (std::vector<std::string> paths);
- sigc::signal<void> paths_updated;
+ sigc::signal<void> PathsUpdated;
protected:
Gtk::Button add_btn;
void
PathList::set_paths (vector<string> paths)
{
- _store.clear();
+ _store->clear();
for (vector<string>::iterator i = paths.begin(); i != paths.end(); ++i) {
Gtk::ListStore::iterator iter = _store->append();
Gtk::ListStore::Row row = *iter;
row[path_columns.paths] = pathname;
- paths_updated (); // EMIT_SIGNAL
+ PathsUpdated (); // EMIT_SIGNAL
}
}
}
Gtk::ListStore::iterator iter = _view.get_selection()->get_selected();
_store->erase (iter);
- paths_updated (); // EMIT_SIGNAL
+ PathsUpdated (); // EMIT_SIGNAL
}
void