projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Maybe fix assertion crash.
[ardour.git]
/
gtk2_ardour
/
marker_time_axis_view.cc
diff --git
a/gtk2_ardour/marker_time_axis_view.cc
b/gtk2_ardour/marker_time_axis_view.cc
index 53010300b17f5f920ce9b058b355dcc8aa49136c..e9a15fb5a5c732a4dd771b3be35fbe1220217f32 100644
(file)
--- a/
gtk2_ardour/marker_time_axis_view.cc
+++ b/
gtk2_ardour/marker_time_axis_view.cc
@@
-15,7
+15,6
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <algorithm>
*/
#include <algorithm>
@@
-32,6
+31,7
@@
#include "public_editor.h"
#include "rgb_macros.h"
#include "gui_thread.h"
#include "public_editor.h"
#include "rgb_macros.h"
#include "gui_thread.h"
+#include "ardour_ui.h"
#include "i18n.h"
#include "i18n.h"
@@
-50,18
+50,16
@@
MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
: _trackview (tv)
{
region_color = _trackview.color();
: _trackview (tv)
{
region_color = _trackview.color();
- stream_base_color =
color_map[cMarkerTrackBase]
;
+ stream_base_color =
ARDOUR_UI::config()->canvasvar_MarkerTrack.get()
;
- //GTK2FIX -- how to get the group? is the canvas display really a group?
- //canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0);
canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
canvas_rect->property_x1() = 0.0;
canvas_rect->property_y1() = 0.0;
canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
canvas_rect->property_x1() = 0.0;
canvas_rect->property_y1() = 0.0;
- canvas_rect->property_x2() =
1000000.0
;
+ canvas_rect->property_x2() =
max_frames
;
canvas_rect->property_y2() = (double)20;
canvas_rect->property_y2() = (double)20;
- canvas_rect->property_outline_color_rgba() =
color_map[cMarkerTrackOutline]
;
+ canvas_rect->property_outline_color_rgba() =
ARDOUR_UI::config()->canvasvar_MarkerTrack.get()
;
canvas_rect->property_fill_color_rgba() = stream_base_color;
canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
canvas_rect->property_fill_color_rgba() = stream_base_color;
canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
@@
-93,17
+91,11
@@
MarkerTimeAxisView::~MarkerTimeAxisView()
iter = next ;
}
iter = next ;
}
- if(canvas_rect)
- {
- gtk_object_destroy(GTK_OBJECT(canvas_rect)) ;
- canvas_rect = 0 ;
- }
-
- if(canvas_group)
- {
- gtk_object_destroy(GTK_OBJECT(canvas_group)) ;
- canvas_group = 0 ;
- }
+ delete canvas_rect;
+ canvas_rect = 0 ;
+
+ delete canvas_group;
+ canvas_group = 0 ;
}
}
@@
-118,16
+110,14
@@
MarkerTimeAxisView::~MarkerTimeAxisView()
int
MarkerTimeAxisView::set_height(gdouble h)
{
int
MarkerTimeAxisView::set_height(gdouble h)
{
- if (h < 10.0 || h > 1000.0)
- {
- return -1 ;
+ if (h < 10.0 || h > 1000.0) {
+ return -1;
}
}
-
gtk_object_set (GTK_OBJECT(canvas_rect), "y2", h, NULL)
;
+
canvas_rect->property_y2() = h
;
- for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
- {
- (*i)->set_height(h) ;
+ for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i) {
+ (*i)->set_y_position_and_height(0, h);
}
return 0;
}
return 0;
@@
-201,7
+191,7
@@
MarkerTimeAxisView::apply_color(Gdk::Color& color)
* @param src the identity of the object that initiated the change
*/
MarkerView*
* @param src the identity of the object that initiated the change
*/
MarkerView*
-MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id,
jack_nframes_t start, jack_
nframes_t dur, void* src)
+MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id,
nframes_t start,
nframes_t dur, void* src)
{
if(ifv->has_marker_view_item(mark_id))
{
{
if(ifv->has_marker_view_item(mark_id))
{
@@
-347,7
+337,7
@@
MarkerTimeAxisView::set_marker_duration_sec(double sec)
{
if(get_selected_time_axis_item() != 0)
{
{
if(get_selected_time_axis_item() != 0)
{
- get_selected_time_axis_item()->set_duration((
jack_
nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
+ get_selected_time_axis_item()->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
}
}
}
}