(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));
Library->save_changes ();
}
+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)
{
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 ();
AudioLibrary ();
~AudioLibrary ();
+ static string state_node_name;
+
XMLNode& get_state (void);
int set_state (const XMLNode&);
static char* SOUNDFILE = "http://ardour.org/ontology/Soundfile";
+string AudioLibrary::state_node_name = "AudioLibrary";
+
AudioLibrary::AudioLibrary ()
{
// sfdb_paths.push_back("/Users/taybin/sounds");
}
lrdf_free_statements(matches);
-
- XMLNode* state = instant_xml(X_("AudioLibrary"), get_user_ardour_path());
- if (state) {
- set_state(*state);
- }
- scan_paths();
}
AudioLibrary::~AudioLibrary ()
{
sfdb_paths = paths;
- add_instant_xml(get_state(), get_user_ardour_path());
+ scan_paths ();
}
vector<string>
}
}
- sfdb_paths = paths;
+ set_paths (paths);
return 0;
}
#include <pbd/xml++.h>
#include <ardour/ardour.h>
+#include <ardour/audio_library.h>
#include <ardour/configuration.h>
#include <ardour/audio_diskstream.h>
#include <ardour/destructive_filesource.h>
}
root->add_child_nocopy (ControlProtocolManager::instance().get_state());
+ root->add_child_nocopy (Library->get_state());
return *root;
}
} else if (node->name() == ControlProtocolManager::state_node_name) {
_control_protocol_state = new XMLNode (*node);
+ } else if (node->name() == AudioLibrary::state_node_name) {
+ Library->set_state (*node);
}
}
PBD::ID::init ();
+ lrdf_init();
+ Library = new AudioLibrary;
+
Config = new Configuration;
if (Config->load_state ()) {
info << "No H/W specific optimizations in use" << endmsg;
}
- lrdf_init();
- Library = new AudioLibrary;
-
/* singleton - first object is "it" */
new PluginManager (engine);