Only show user-presets in favorite sidebar
[ardour.git] / gtk2_ardour / editor_locations.cc
index 7031be410e9690817fbbf2967acd1e5e892832f1..328cb65cca101c76d94b97c0f7d5b03390e861c2 100644 (file)
@@ -20,7 +20,7 @@
 #include "editor_locations.h"
 #include "location_ui.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace Gtk;
@@ -28,18 +28,32 @@ using namespace Gtk;
 EditorLocations::EditorLocations (Editor* e)
        : EditorComponent (e)
 {
-       locations = new LocationUI;
+       _locations = new LocationUI (X_("EditorLocations"));
+       _scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER);
+       _scroller.add (*_locations);
 }
 
 void
-EditorLocations::connect_to_session (ARDOUR::Session* s)
+EditorLocations::set_session (ARDOUR::Session* s)
 {
-       EditorComponent::connect_to_session (s);
-       locations->set_session (s);
+       SessionHandlePtr::set_session (s);
+       _locations->set_session (s);
 }
 
 Widget&
-EditorLocations::widget() 
+EditorLocations::widget()
 {
-       return *locations;
+       return _scroller;
+}
+
+XMLNode&
+EditorLocations::get_state () const
+{
+       return _locations->get_state();
+}
+
+int
+EditorLocations::set_state (const XMLNode& node)
+{
+       return _locations->set_state(node);
 }