From 690e04ed42c7f4f29feb53f54c759dbb7c64884c Mon Sep 17 00:00:00 2001 From: Taybin Rutkin Date: Wed, 26 Jul 2006 22:18:55 +0000 Subject: Minor updates for PathList and OptionEditor. git-svn-id: svn://localhost/ardour2/trunk@694 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/option_editor.cc | 11 ++++++++++- gtk2_ardour/option_editor.h | 1 + libs/gtkmm2ext/gtkmm2ext/pathlist.h | 2 +- libs/gtkmm2ext/pathlist.cc | 6 +++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index fc4a412f9b..b7fc7e746e 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -161,7 +162,6 @@ OptionEditor::set_session (Session *s) return; } - click_path_entry.set_sensitive (true); click_emphasis_path_entry.set_sensitive (true); session_raid_entry.set_sensitive (true); @@ -249,9 +249,18 @@ OptionEditor::setup_path_options() 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 () { diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index 68407246e0..1331d3126e 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -81,6 +81,7 @@ class OptionEditor : public Gtk::Dialog void add_session_paths (); void remove_session_paths (); void raid_path_changed (); + void sfdb_paths_changed (); /* fades */ diff --git a/libs/gtkmm2ext/gtkmm2ext/pathlist.h b/libs/gtkmm2ext/gtkmm2ext/pathlist.h index 7b86e016f7..f4a5973d5a 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pathlist.h +++ b/libs/gtkmm2ext/gtkmm2ext/pathlist.h @@ -36,7 +36,7 @@ class PathList : public Gtk::VBox std::vector get_paths (); void set_paths (std::vector paths); - sigc::signal paths_updated; + sigc::signal PathsUpdated; protected: Gtk::Button add_btn; diff --git a/libs/gtkmm2ext/pathlist.cc b/libs/gtkmm2ext/pathlist.cc index 500cb8c23e..7b3448ed5f 100644 --- a/libs/gtkmm2ext/pathlist.cc +++ b/libs/gtkmm2ext/pathlist.cc @@ -72,7 +72,7 @@ PathList::get_paths () void PathList::set_paths (vector paths) { - _store.clear(); + _store->clear(); for (vector::iterator i = paths.begin(); i != paths.end(); ++i) { Gtk::ListStore::iterator iter = _store->append(); @@ -99,7 +99,7 @@ PathList::add_btn_clicked () Gtk::ListStore::Row row = *iter; row[path_columns.paths] = pathname; - paths_updated (); // EMIT_SIGNAL + PathsUpdated (); // EMIT_SIGNAL } } } @@ -110,7 +110,7 @@ PathList::subtract_btn_clicked () Gtk::ListStore::iterator iter = _view.get_selection()->get_selected(); _store->erase (iter); - paths_updated (); // EMIT_SIGNAL + PathsUpdated (); // EMIT_SIGNAL } void -- cgit v1.2.3