Minor updates for PathList and OptionEditor.
authorTaybin Rutkin <taybin@taybin.com>
Wed, 26 Jul 2006 22:18:55 +0000 (22:18 +0000)
committerTaybin Rutkin <taybin@taybin.com>
Wed, 26 Jul 2006 22:18:55 +0000 (22:18 +0000)
git-svn-id: svn://localhost/ardour2/trunk@694 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/option_editor.cc
gtk2_ardour/option_editor.h
libs/gtkmm2ext/gtkmm2ext/pathlist.h
libs/gtkmm2ext/pathlist.cc

index fc4a412f9b303f21d48c6e45290472efb5a74748..b7fc7e746e539fc097f795d9d7175892c5560d4f 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <pbd/whitespace.h>
 
+#include <ardour/audio_library.h>
 #include <ardour/session.h>
 #include <ardour/audioengine.h>
 #include <ardour/configuration.h>
@@ -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 ()
 {
index 68407246e04f272ad25ac8538abf0e7eb7abd1c0..1331d3126efee35f14fff43c51973988cfb0fdfd 100644 (file)
@@ -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 */
 
index 7b86e016f7e54372748e09aa8eda1f5197093eda..f4a5973d5ae380a794dfd76c400ad6fe0bc8d7ed 100644 (file)
@@ -36,7 +36,7 @@ class PathList : public Gtk::VBox
        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;
index 500cb8c23ed71122710992a99df18f5108de25f0..7b3448ed5fa29fc5d0a7b27dbb496acbce720752 100644 (file)
@@ -72,7 +72,7 @@ PathList::get_paths ()
 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();
@@ -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