summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-25 20:11:42 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-25 20:11:42 +0000
commitbcd511aa3fec59e1527c8b7ab80dabda4db1a6f9 (patch)
tree0e704409baaaa22a43b918adc126c76990208f5f /gtk2_ardour
parent1b39adc4ce8566fd731cf433094b1faf4fe63205 (diff)
fixes for endemic (compiler?) issues with virtual inheritance of sigc::trackable. NOTE: automation list undo/redo no longer operational, fix to follow
git-svn-id: svn://localhost/ardour2/trunk@1007 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/audio_regionview.cc5
-rw-r--r--gtk2_ardour/audio_streamview.cc1
-rw-r--r--gtk2_ardour/automation_line.cc2
-rw-r--r--gtk2_ardour/automation_line.h4
-rw-r--r--gtk2_ardour/crossfade_view.cc2
-rw-r--r--gtk2_ardour/editor_ops.cc2
-rw-r--r--gtk2_ardour/public_editor.h3
-rw-r--r--gtk2_ardour/region_gain_line.cc2
-rw-r--r--gtk2_ardour/region_gain_line.h2
-rw-r--r--gtk2_ardour/route_ui.cc2
10 files changed, 19 insertions, 6 deletions
diff --git a/gtk2_ardour/audio_regionview.cc b/gtk2_ardour/audio_regionview.cc
index fdbb961ab6..b50ea72be2 100644
--- a/gtk2_ardour/audio_regionview.cc
+++ b/gtk2_ardour/audio_regionview.cc
@@ -1143,9 +1143,10 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
gain_line->view_to_model_y (y);
+#ifdef FIX_ME_TO_NOT_USE_STATE_MANAGER
trackview.session().begin_reversible_command (_("add gain control point"));
trackview.session().add_undo (region.envelope().get_memento());
-
+#endif
if (!region.envelope_active()) {
trackview.session().add_undo( bind( mem_fun(region, &AudioRegion::set_envelope_active), false) );
@@ -1155,8 +1156,10 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
region.envelope().add (fx, y);
+#ifdef FIX_ME_TO_NOT_USE_STATE_MANAGER
trackview.session().add_redo_no_execute (region.envelope().get_memento());
trackview.session().commit_reversible_command ();
+#endif
}
void
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index 24924fec4f..75eb28e7d5 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -202,6 +202,7 @@ AudioStreamView::remove_region_view (boost::weak_ptr<Region> weak_r)
}
}
+
StreamView::remove_region_view(r);
}
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index ee74fabfa4..371552fbfc 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -1169,12 +1169,14 @@ AutomationLine::hide_selection ()
}
+#ifdef STATE_MANAGER
// This is copied into AudioRegionGainLine
UndoAction
AutomationLine::get_memento ()
{
return alist.get_memento();
}
+#endif
void
AutomationLine::list_changed (Change ignored)
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index eb2d204513..0e44c95a33 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -96,7 +96,7 @@ class ControlPoint
ShapeType _shape;
};
-class AutomationLine : public PBD::StatefulDestructible
+class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoingAway
{
public:
AutomationLine (const string & name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&);
@@ -206,7 +206,9 @@ class AutomationLine : public PBD::StatefulDestructible
void reset_callback (const ARDOUR::AutomationList&);
void list_changed (ARDOUR::Change);
+#ifdef STATE_MANAGER
UndoAction get_memento();
+#endif
virtual bool event_handler (GdkEvent*);
diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc
index 42a1a47227..e8a97c4cf4 100644
--- a/gtk2_ardour/crossfade_view.cc
+++ b/gtk2_ardour/crossfade_view.cc
@@ -89,7 +89,7 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
CrossfadeView::~CrossfadeView ()
{
- GoingAway (this) ; /* EMIT_SIGNAL */
+ GoingAway (this) ; /* EMIT_SIGNAL */
}
void
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index c7a10df5a0..280804c94f 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -3340,7 +3340,7 @@ Editor::normalize_region ()
continue;
XMLNode &before = arv->region()->get_state();
arv->audio_region()->normalize_to (0.0f);
- // session->add_command (new MementoCommand<Region>(*(arv->region().get()), &before, &arv->region()->get_state()));
+ session->add_command (new MementoCommand<Region>(*(arv->region().get()), &before, &arv->region()->get_state()));
}
commit_reversible_command ();
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index 189e2100bb..0c68eb6221 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -53,7 +53,7 @@ class ImageFrameView;
class ImageFrameTimeAxis;
class MarkerView;
-class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
+class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway {
public:
PublicEditor();
virtual ~PublicEditor();
@@ -135,6 +135,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
sigc::signal<void> ZoomChanged;
sigc::signal<void> Resized;
sigc::signal<void> Realized;
+ sigc::signal<void> GoingAway;
Glib::RefPtr<Gtk::ActionGroup> editor_actions;
diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc
index 467f24bd94..58a8a9acad 100644
--- a/gtk2_ardour/region_gain_line.cc
+++ b/gtk2_ardour/region_gain_line.cc
@@ -89,9 +89,11 @@ AudioRegionGainLine::end_drag (ControlPoint* cp)
}
+#ifdef STATE_MANAGER
// This is a copy from AutomationList
UndoAction
AudioRegionGainLine::get_memento ()
{
return alist.get_memento();
}
+#endif
diff --git a/gtk2_ardour/region_gain_line.h b/gtk2_ardour/region_gain_line.h
index 3781fe60bb..916bf78a78 100644
--- a/gtk2_ardour/region_gain_line.h
+++ b/gtk2_ardour/region_gain_line.h
@@ -31,7 +31,9 @@ class AudioRegionGainLine : public AutomationLine
ARDOUR::Session& session;
AudioRegionView& rv;
+#ifdef STATE_MANAGER
UndoAction get_memento();
+#endif
};
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 482f5df22f..bb24dcc426 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -66,7 +66,7 @@ RouteUI::RouteUI (boost::shared_ptr<ARDOUR::Route> rt, ARDOUR::Session& sess, co
set_color (unique_random_color());
}
- new Shiva<Route,RouteUI> (*_route, *this);
+ new PairedShiva<Route,RouteUI> (*_route, *this);
_route->active_changed.connect (mem_fun (*this, &RouteUI::route_active_changed));