2 Copyright (C) 2000 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <sigc++/retype.h>
24 #include <libgnomecanvas/libgnomecanvas.h>
25 #include <gtkmm2ext/gtk_ui.h>
26 #include <gtkmm2ext/window_title.h>
28 #include <ardour/location.h>
29 #include <pbd/memento_command.h>
33 #include "selection.h"
35 #include "gui_thread.h"
36 #include "simplerect.h"
44 using namespace ARDOUR;
47 using namespace Gtkmm2ext;
50 Editor::clear_marker_display ()
52 for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
56 location_markers.clear ();
60 Editor::add_new_location (Location *location)
62 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::add_new_location), location));
64 LocationMarkers *lam = new LocationMarkers;
67 if (location->is_cd_marker()) {
68 color = location_cd_marker_color;
69 } else if (location->is_mark()) {
70 color = location_marker_color;
71 } else if (location->is_auto_loop()) {
72 color = location_loop_color;
73 } else if (location->is_auto_punch()) {
74 color = location_punch_color;
76 color = location_range_color;
79 if (location->is_mark()) {
80 lam->start = new Marker (*this, *marker_group, color, location->name(), Marker::Mark, location->start());
83 } else if (location->is_auto_loop()) {
85 lam->start = new Marker (*this, *transport_marker_group, color,
86 location->name(), Marker::LoopStart, location->start());
87 lam->end = new Marker (*this, *transport_marker_group, color,
88 location->name(), Marker::LoopEnd, location->end());
90 } else if (location->is_auto_punch()) {
92 lam->start = new Marker (*this, *transport_marker_group, color,
93 location->name(), Marker::PunchIn, location->start());
94 lam->end = new Marker (*this, *transport_marker_group, color,
95 location->name(), Marker::PunchOut, location->end());
100 lam->start = new Marker (*this, *range_marker_group, color,
101 location->name(), Marker::Start, location->start());
102 lam->end = new Marker (*this, *range_marker_group, color,
103 location->name(), Marker::End, location->end());
106 if (location->is_hidden ()) {
112 location->start_changed.connect (mem_fun(*this, &Editor::location_changed));
113 location->end_changed.connect (mem_fun(*this, &Editor::location_changed));
114 location->changed.connect (mem_fun(*this, &Editor::location_changed));
115 location->name_changed.connect (mem_fun(*this, &Editor::location_changed));
116 location->FlagsChanged.connect (mem_fun(*this, &Editor::location_flags_changed));
118 pair<Location*,LocationMarkers*> newpair;
120 newpair.first = location;
121 newpair.second = lam;
123 location_markers.insert (newpair);
127 Editor::location_changed (Location *location)
129 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::location_changed), location));
131 LocationMarkers *lam = find_location_markers (location);
134 /* a location that isn't "marked" with markers */
138 lam->set_name (location->name());
139 lam->set_position (location->start(), location->end());
141 if (location->is_auto_loop()) {
142 update_loop_range_view ();
143 } else if (location->is_auto_punch()) {
144 update_punch_range_view ();
149 Editor::location_flags_changed (Location *location, void *src)
151 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_flags_changed), location, src));
153 LocationMarkers *lam = find_location_markers (location);
156 /* a location that isn't "marked" with markers */
160 if (location->is_cd_marker()) {
161 lam->set_color_rgba (location_cd_marker_color);
162 } else if (location->is_mark()) {
163 lam->set_color_rgba (location_marker_color);
164 } else if (location->is_auto_punch()) {
165 lam->set_color_rgba (location_punch_color);
166 } else if (location->is_auto_loop()) {
167 lam->set_color_rgba (location_loop_color);
169 lam->set_color_rgba (location_range_color);
172 if (location->is_hidden()) {
179 Editor::LocationMarkers::~LocationMarkers ()
190 Editor::LocationMarkers *
191 Editor::find_location_markers (Location *location)
193 LocationMarkerMap::iterator i;
195 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
196 if ((*i).first == location) {
205 Editor::find_location_from_marker (Marker *marker, bool& is_start)
207 LocationMarkerMap::iterator i;
209 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
210 LocationMarkers *lm = (*i).second;
211 if (lm->start == marker) {
214 } else if (lm->end == marker) {
224 Editor::refresh_location_display_internal (Locations::LocationList& locations)
226 clear_marker_display ();
228 for (Locations::LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
229 add_new_location (*i);
234 Editor::refresh_location_display ()
236 ENSURE_GUI_THREAD(mem_fun(*this, &Editor::refresh_location_display));
239 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
244 Editor::refresh_location_display_s (Change ignored)
246 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::refresh_location_display_s), ignored));
249 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
254 Editor::LocationMarkers::hide()
257 if (end) { end->hide(); }
261 Editor::LocationMarkers::show()
264 if (end) { end->show(); }
268 Editor::LocationMarkers::set_name (const string& str)
270 start->set_name (str);
271 if (end) { end->set_name (str); }
275 Editor::LocationMarkers::set_position (nframes_t startf,
278 start->set_position (startf);
279 if (end) { end->set_position (endf); }
283 Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
285 start->set_color_rgba (rgba);
286 if (end) { end->set_color_rgba (rgba); }
290 Editor::mouse_add_new_marker (nframes_t where)
294 session->locations()->next_available_name(markername,"mark");
295 Location *location = new Location (where, where, markername, Location::IsMark);
296 session->begin_reversible_command (_("add marker"));
297 XMLNode &before = session->locations()->get_state();
298 session->locations()->add (location, true);
299 XMLNode &after = session->locations()->get_state();
300 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
301 session->commit_reversible_command ();
306 Editor::remove_marker (ArdourCanvas::Item& item, GdkEvent* event)
311 if ((marker = static_cast<Marker*> (item.get_data ("marker"))) == 0) {
312 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
316 Location* loc = find_location_from_marker (marker, is_start);
318 if (session && loc) {
319 Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::really_remove_marker), loc));
324 Editor::really_remove_marker (Location* loc)
326 session->begin_reversible_command (_("remove marker"));
327 XMLNode &before = session->locations()->get_state();
328 session->locations()->remove (loc);
329 XMLNode &after = session->locations()->get_state();
330 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
331 session->commit_reversible_command ();
336 Editor::location_gone (Location *location)
338 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_gone), location));
340 LocationMarkerMap::iterator i;
342 if (location == transport_loop_location()) {
343 update_loop_range_view (true);
346 if (location == transport_punch_location()) {
347 update_punch_range_view (true);
350 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
351 if ((*i).first == location) {
353 location_markers.erase (i);
360 Editor::tm_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
362 if (tm_marker_menu == 0) {
363 build_tm_marker_menu ();
366 marker_menu_item = item;
367 tm_marker_menu->popup (1, ev->time);
372 Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
375 if ((marker = reinterpret_cast<Marker *> (item->get_data("marker"))) == 0) {
376 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
381 Location * loc = find_location_from_marker (marker, is_start);
382 if (loc == transport_loop_location() || loc == transport_punch_location()) {
383 if (transport_marker_menu == 0) {
384 build_range_marker_menu (true);
386 marker_menu_item = item;
387 transport_marker_menu->popup (1, ev->time);
390 if (loc->is_mark()) {
391 bool start_or_end = loc->is_start() || loc->is_end();
394 if (start_end_marker_menu == 0)
395 build_marker_menu (true);
396 markerMenu = start_end_marker_menu;
398 if (marker_menu == 0)
399 build_marker_menu (false);
400 markerMenu = marker_menu;
404 // GTK2FIX use action group sensitivity
406 if (children.size() >= 3) {
407 MenuItem * loopitem = &children[2];
409 if (loc->is_mark()) {
410 loopitem->set_sensitive(false);
413 loopitem->set_sensitive(true);
418 marker_menu_item = item;
419 markerMenu->popup (1, ev->time);
422 if (loc->is_range_marker()) {
423 if (range_marker_menu == 0){
424 build_range_marker_menu (false);
426 marker_menu_item = item;
427 range_marker_menu->popup (1, ev->time);
433 Editor::new_transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
435 if (new_transport_marker_menu == 0) {
436 build_new_transport_marker_menu ();
439 new_transport_marker_menu->popup (1, ev->time);
444 Editor::transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
446 if (transport_marker_menu == 0) {
447 build_range_marker_menu (true);
450 transport_marker_menu->popup (1, ev->time);
454 Editor::build_marker_menu (bool start_or_end)
456 using namespace Menu_Helpers;
458 Menu *markerMenu = new Menu;
460 start_end_marker_menu = markerMenu;
462 marker_menu = markerMenu;
464 MenuList& items = markerMenu->items();
465 markerMenu->set_name ("ArdourContextMenu");
467 items.push_back (MenuElem (_("Locate to Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
468 items.push_back (MenuElem (_("Play from Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
469 items.push_back (MenuElem (_("Set Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
471 items.push_back (SeparatorElem());
473 items.push_back (MenuElem (_("Hide Mark"), mem_fun(*this, &Editor::marker_menu_hide)));
474 if (start_or_end) return;
475 items.push_back (MenuElem (_("Rename Mark"), mem_fun(*this, &Editor::marker_menu_rename)));
476 items.push_back (MenuElem (_("Remove Mark"), mem_fun(*this, &Editor::marker_menu_remove)));
481 Editor::build_range_marker_menu (bool loop_or_punch)
483 using namespace Menu_Helpers;
485 Menu *markerMenu = new Menu;
487 transport_marker_menu = markerMenu;
489 range_marker_menu = markerMenu;
491 MenuList& items = markerMenu->items();
492 markerMenu->set_name ("ArdourContextMenu");
494 items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
495 items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
496 if (! loop_or_punch) {
497 items.push_back (MenuElem (_("Play Range"), mem_fun(*this, &Editor::marker_menu_play_range)));
498 items.push_back (MenuElem (_("Loop Range"), mem_fun(*this, &Editor::marker_menu_loop_range)));
500 items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
501 items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
503 items.push_back (SeparatorElem());
505 items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
506 if (! loop_or_punch) {
507 items.push_back (MenuElem (_("Rename Range"), mem_fun(*this, &Editor::marker_menu_rename)));
508 items.push_back (MenuElem (_("Remove Range"), mem_fun(*this, &Editor::marker_menu_remove)));
511 items.push_back (SeparatorElem());
513 items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
514 items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
515 items.push_back (MenuElem (_("Select Range"), mem_fun(*this, &Editor::marker_menu_select_using_range)));
520 Editor::build_tm_marker_menu ()
522 using namespace Menu_Helpers;
524 tm_marker_menu = new Menu;
525 MenuList& items = tm_marker_menu->items();
526 tm_marker_menu->set_name ("ArdourContextMenu");
528 items.push_back (MenuElem (_("Edit"), mem_fun(*this, &Editor::marker_menu_edit)));
529 items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::marker_menu_remove)));
533 Editor::build_new_transport_marker_menu ()
535 using namespace Menu_Helpers;
537 new_transport_marker_menu = new Menu;
538 MenuList& items = new_transport_marker_menu->items();
539 new_transport_marker_menu->set_name ("ArdourContextMenu");
541 items.push_back (MenuElem (_("Set Loop Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_loop)));
542 items.push_back (MenuElem (_("Set Punch Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_punch)));
544 new_transport_marker_menu->signal_unmap_event().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
548 Editor::marker_menu_hide ()
552 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
553 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
560 if ((l = find_location_from_marker (marker, is_start)) != 0) {
561 l->set_hidden (true, this);
566 Editor::marker_menu_select_using_range ()
570 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
571 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
578 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
579 set_selection_from_range (*l);
584 Editor::marker_menu_select_all_selectables_using_range ()
588 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
589 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
596 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
597 select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, track_views, Selection::Set);
603 Editor::marker_menu_separate_regions_using_location ()
607 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
608 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
615 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
616 separate_regions_using_location (*l);
622 Editor::marker_menu_play_from ()
626 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
627 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
634 if ((l = find_location_from_marker (marker, is_start)) != 0) {
637 session->request_locate (l->start(), true);
640 //session->request_bounded_roll (l->start(), l->end());
643 session->request_locate (l->start(), true);
645 session->request_locate (l->end(), true);
652 Editor::marker_menu_set_playhead ()
656 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
657 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
664 if ((l = find_location_from_marker (marker, is_start)) != 0) {
667 session->request_locate (l->start(), false);
671 session->request_locate (l->start(), false);
673 session->request_locate (l->end(), false);
680 Editor::marker_menu_set_from_playhead ()
684 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
685 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
692 if ((l = find_location_from_marker (marker, is_start)) != 0) {
695 l->set_start (session->transport_frame ());
699 l->set_start (session->transport_frame ());
701 l->set_end (session->transport_frame ());
708 Editor::marker_menu_set_from_selection ()
712 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
713 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
720 if ((l = find_location_from_marker (marker, is_start)) != 0) {
727 /* if range selection use first to last */
729 if (mouse_mode == Editing::MouseRange) {
730 if (!selection->time.empty()) {
731 l->set_start (selection->time.start());
732 l->set_end (selection->time.end_frame());
736 if (!selection->regions.empty()) {
737 l->set_start (selection->regions.start());
738 l->set_end (selection->regions.end_frame());
747 Editor::marker_menu_play_range ()
751 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
752 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
759 if ((l = find_location_from_marker (marker, is_start)) != 0) {
762 session->request_locate (l->start(), true);
765 session->request_bounded_roll (l->start(), l->end());
772 Editor::marker_menu_loop_range ()
776 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
777 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
784 if ((l = find_location_from_marker (marker, is_start)) != 0) {
786 if ((l2 = transport_loop_location()) != 0) {
787 l2->set (l->start(), l->end());
789 // enable looping, reposition and start rolling
790 session->request_play_loop(true);
791 session->request_locate (l2->start(), true);
797 Editor::marker_menu_edit ()
803 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
804 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
808 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
809 edit_meter_section (&mm->meter());
810 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
811 edit_tempo_section (&tm->tempo());
813 fatal << X_("programming erorr: unhandled marker type in Editor::marker_menu_edit")
820 Editor::marker_menu_remove ()
826 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
827 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
831 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
832 remove_meter_marker (marker_menu_item);
833 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
834 remove_tempo_marker (marker_menu_item);
836 remove_marker (*marker_menu_item, (GdkEvent*) 0);
841 Editor::marker_menu_rename ()
845 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
846 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
853 loc = find_location_from_marker (marker, is_start);
857 ArdourPrompter dialog (true);
860 dialog.set_prompt (_("New Name:"));
862 WindowTitle title(Glib::get_application_name());
863 if (loc->is_mark()) {
864 title += _("Rename Mark");
866 title += _("Rename Range");
869 dialog.set_title(title.get_string());
871 dialog.set_name ("MarkRenameWindow");
872 dialog.set_size_request (250, -1);
873 dialog.set_position (Gtk::WIN_POS_MOUSE);
875 dialog.add_button (_("Rename"), RESPONSE_ACCEPT);
876 dialog.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
877 dialog.set_initial_text (loc->name());
881 switch (dialog.run ()) {
882 case RESPONSE_ACCEPT:
888 begin_reversible_command ( _("rename marker") );
889 XMLNode &before = session->locations()->get_state();
891 dialog.get_result(txt);
894 XMLNode &after = session->locations()->get_state();
895 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
896 commit_reversible_command ();
900 Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
903 transport_bar_drag_rect->hide();
904 range_marker_drag_rect->hide();
910 Editor::new_transport_marker_menu_set_loop ()
912 if (!session) return;
914 begin_reversible_command (_("set loop range"));
918 if ((tll = transport_loop_location()) == 0) {
919 Location* loc = new Location (temp_location->start(), temp_location->end(), _("Loop"), Location::IsAutoLoop);
920 XMLNode &before = session->locations()->get_state();
921 session->locations()->add (loc, true);
922 session->set_auto_loop_location (loc);
923 XMLNode &after = session->locations()->get_state();
924 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
927 XMLNode &before = tll->get_state();
928 tll->set_hidden (false, this);
929 tll->set (temp_location->start(), temp_location->end());
930 XMLNode &after = tll->get_state();
931 session->add_command (new MementoCommand<Location>(*tll, &before, &after));
934 commit_reversible_command ();
938 Editor::new_transport_marker_menu_set_punch ()
940 if (!session) return;
942 begin_reversible_command (_("set punch range"));
946 if ((tpl = transport_punch_location()) == 0) {
947 tpl = new Location (temp_location->start(), temp_location->end(), _("Punch"), Location::IsAutoPunch);
948 XMLNode &before = session->locations()->get_state();
949 session->locations()->add (tpl, true);
950 session->set_auto_punch_location (tpl);
951 XMLNode &after = session->locations()->get_state();
952 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
954 XMLNode &before = tpl->get_state();
955 tpl->set_hidden(false, this);
956 tpl->set(temp_location->start(), temp_location->end());
957 XMLNode &after = tpl->get_state();
958 session->add_command (new MementoCommand<Location>(*tpl, &before, &after));
961 commit_reversible_command ();
965 Editor::update_loop_range_view (bool visibility)
973 if (session->get_play_loop() && ((tll = transport_loop_location()) != 0)) {
975 double x1 = frame_to_pixel (tll->start());
976 double x2 = frame_to_pixel (tll->end());
978 transport_loop_range_rect->property_x1() = x1;
979 transport_loop_range_rect->property_x2() = x2;
982 transport_loop_range_rect->show();
985 } else if (visibility) {
986 transport_loop_range_rect->hide();
991 Editor::update_punch_range_view (bool visibility)
999 if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
1001 double x1 = frame_to_pixel (tpl->start());
1002 double x2 = frame_to_pixel (tpl->end());
1004 transport_punch_range_rect->property_x1() = x1;
1005 transport_punch_range_rect->property_x2() = x2;
1008 transport_punch_range_rect->show();
1011 else if (visibility) {
1012 transport_punch_range_rect->hide();
1015 // if (session->get_punch_in()) {
1016 // double x = frame_to_pixel (transport_punch_location->start());
1017 // gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
1019 // if (visibility) {
1020 // gnome_canvas_item_show (transport_punchin_line);
1023 // else if (visibility) {
1024 // gnome_canvas_item_hide (transport_punchin_line);
1027 // if (session->get_punch_out()) {
1028 // double x = frame_to_pixel (transport_punch_location->end());
1030 // gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
1032 // if (visibility) {
1033 // gnome_canvas_item_show (transport_punchout_line);
1036 // else if (visibility) {
1037 // gnome_canvas_item_hide (transport_punchout_line);