From e642704c3a41e9ce948a0b78a6173b79abef382b Mon Sep 17 00:00:00 2001 From: Colin Fletcher Date: Mon, 1 Jul 2013 18:56:10 +0100 Subject: Make CD track details visible whenever CD range is ticked. Make the CD track details visible whenever the CD range box has been ticked, rather than only when the user toggles the box on. --- gtk2_ardour/location_ui.cc | 54 ++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 21 deletions(-) (limited to 'gtk2_ardour/location_ui.cc') diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 9b9f3bfa22..d30327ad78 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -307,6 +307,10 @@ LocationEditRow::set_location (Location *loc) end_clock.show(); length_clock.show(); + if (location->is_cd_marker()) { + show_cd_track_details (); + } + ARDOUR_UI::instance()->set_tip (remove_button, _("Remove this range")); ARDOUR_UI::instance()->set_tip (start_clock, _("Start time - middle click to locate here")); ARDOUR_UI::instance()->set_tip (end_clock, _("End time - middle click to locate here")); @@ -446,6 +450,34 @@ LocationEditRow::clock_changed (LocationPart part) } } +void +LocationEditRow::show_cd_track_details () +{ + + if (location->cd_info.find("isrc") != location->cd_info.end()) { + isrc_entry.set_text(location->cd_info["isrc"]); + } + if (location->cd_info.find("performer") != location->cd_info.end()) { + performer_entry.set_text(location->cd_info["performer"]); + } + if (location->cd_info.find("composer") != location->cd_info.end()) { + composer_entry.set_text(location->cd_info["composer"]); + } + if (location->cd_info.find("scms") != location->cd_info.end()) { + scms_check_button.set_active(true); + } + if (location->cd_info.find("preemph") != location->cd_info.end()) { + preemph_check_button.set_active(true); + } + + + if (!cd_track_details_hbox.get_parent()) { + item_table.attach (cd_track_details_hbox, 0, 7, 1, 2, FILL | EXPAND, FILL, 4, 0); + } + // item_table.resize(2, 7); + cd_track_details_hbox.show_all(); +} + void LocationEditRow::cd_toggled () { @@ -469,27 +501,7 @@ LocationEditRow::cd_toggled () if (location->is_cd_marker() && !(location->is_mark())) { - if (location->cd_info.find("isrc") != location->cd_info.end()) { - isrc_entry.set_text(location->cd_info["isrc"]); - } - if (location->cd_info.find("performer") != location->cd_info.end()) { - performer_entry.set_text(location->cd_info["performer"]); - } - if (location->cd_info.find("composer") != location->cd_info.end()) { - composer_entry.set_text(location->cd_info["composer"]); - } - if (location->cd_info.find("scms") != location->cd_info.end()) { - scms_check_button.set_active(true); - } - if (location->cd_info.find("preemph") != location->cd_info.end()) { - preemph_check_button.set_active(true); - } - - if (!cd_track_details_hbox.get_parent()) { - item_table.attach (cd_track_details_hbox, 0, 7, 1, 2, FILL | EXPAND, FILL, 4, 0); - } - // item_table.resize(2, 7); - cd_track_details_hbox.show_all(); + show_cd_track_details (); } else if (cd_track_details_hbox.get_parent()){ -- cgit v1.2.3