diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2005-11-22 05:10:12 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2005-11-22 05:10:12 +0000 |
commit | bac3c6bc0f36623e200fe30fc8cc4137ab96fba7 (patch) | |
tree | c8ffc7a6c6a0bc875b38cfd896f369dac45ce673 /gtk2_ardour/ghostregion.cc | |
parent | 46cbbae4eecd0d568f056a46745cd59ee8619c29 (diff) |
plugin selector from doug; lots and lots of fixes from karsten
git-svn-id: svn://localhost/trunk/ardour2@105 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ghostregion.cc')
-rw-r--r-- | gtk2_ardour/ghostregion.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc index f6a081ca35..c8a89ca5b6 100644 --- a/gtk2_ardour/ghostregion.cc +++ b/gtk2_ardour/ghostregion.cc @@ -1,9 +1,11 @@ -#include "canvas-simplerect.h" +#include "simplerect.h" +#include "waveview.h" #include "ghostregion.h" #include "automation_time_axis.h" #include "rgb_macros.h" using namespace Editing; +using namespace ArdourCanvas; GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos) : trackview (atv) @@ -32,14 +34,15 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos) GhostRegion::~GhostRegion () { GoingAway (this); - gtk_object_destroy (GTK_OBJECT(group)); + delete base_rect; + delete group; } void GhostRegion::set_samples_per_unit (double spu) { - for (vector<GnomeCanvasItem*>::iterator i = waves.begin(); i != waves.end(); ++i) { - gnome_canvas_item_set ((*i), "samples_per_unit", spu, NULL); + for (vector<WaveView*>::iterator i = waves.begin(); i != waves.end(); ++i) { + (*i)->property_samples_per_unit().set_value(spu); } } @@ -53,7 +56,7 @@ void GhostRegion::set_height () { gdouble ht; - vector<GnomeCanvasItem*>::iterator i; + vector<WaveView*>::iterator i; uint32_t n; base_rect->set_property ("y2", (double) trackview.height); @@ -61,7 +64,8 @@ GhostRegion::set_height () for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) { gdouble yoff = n * ht; - gnome_canvas_item_set ((*i), "height", ht, "y", yoff, NULL); + (*i)->property_height().set_value(ht); + (*i)->property_y().set_value(yoff); } } |