}
items.push_back (SeparatorElem());
- items.push_back (MenuElem (_("Export Range"), mem_fun(*this, &Editor::marker_menu_export_range)));
+ items.push_back (MenuElem (_("Export Range"), mem_fun(*this, &Editor::export_range)));
items.push_back (SeparatorElem());
if (!loop_or_punch) {
items.push_back (MenuElem (_("Set Loop Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_loop)));
items.push_back (MenuElem (_("Set Punch Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_punch)));
- new_transport_marker_menu->signal_unmap_event().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
+ new_transport_marker_menu->signal_unmap().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
}
void
}
}
-void
-Editor::marker_menu_export_range ()
-{
- Marker* marker;
-
- if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
- fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
- /*NOTREACHED*/
- }
-
- Location* l;
- bool is_start;
-
- if ((l = find_location_from_marker (marker, is_start)) != 0) {
- if (l->is_range_marker()) {
- export_range (l->start(), l->end());
- }
- }
-}
-
void
Editor::marker_menu_range_to_next ()
{
commit_reversible_command ();
}
-gint
-Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
+void
+Editor::new_transport_marker_menu_popdown ()
{
// hide rects
transport_bar_drag_rect->hide();
range_marker_drag_rect->hide();
-
- return FALSE;
}
void
Location* tpl;
if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
-
- double x1 = frame_to_pixel (tpl->start());
- double x2 = frame_to_pixel (tpl->end());
-
guint track_canvas_width,track_canvas_height;
track_canvas->get_size(track_canvas_width,track_canvas_height);
-
- transport_punch_range_rect->property_x1() = x1;
- transport_punch_range_rect->property_x2() = x2;
-
- transport_punch_range_rect->property_x1() = (Config->get_punch_in() ? x1 : 0);
- transport_punch_range_rect->property_x2() = (Config->get_punch_out() ? x2 : track_canvas_width);
+ if (Config->get_punch_in()) {
+ transport_punch_range_rect->property_x1() = frame_to_pixel (tpl->start());
+ transport_punch_range_rect->property_x2() = (Config->get_punch_out() ? frame_to_pixel (tpl->end()) : frame_to_pixel (JACK_MAX_FRAMES));
+ } else {
+ transport_punch_range_rect->property_x1() = 0;
+ transport_punch_range_rect->property_x2() = (Config->get_punch_out() ? frame_to_pixel (tpl->end()) : track_canvas_width);
+ }
if (visibility) {
transport_punch_range_rect->show();
}
- }
- else if (visibility) {
+ } else if (visibility) {
transport_punch_range_rect->hide();
}
-
-// if (session->get_punch_in()) {
-// double x = frame_to_pixel (transport_punch_location->start());
-// gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
-
-// if (visibility) {
-// gnome_canvas_item_show (transport_punchin_line);
-// }
-// }
-// else if (visibility) {
-// gnome_canvas_item_hide (transport_punchin_line);
-// }
-
-// if (session->get_punch_out()) {
-// double x = frame_to_pixel (transport_punch_location->end());
-
-// gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
-
-// if (visibility) {
-// gnome_canvas_item_show (transport_punchout_line);
-// }
-// }
-// else if (visibility) {
-// gnome_canvas_item_hide (transport_punchout_line);
-// }
}
void