make config-window suitable for small[er] screens
[ardour.git] / gtk2_ardour / location_ui.cc
index 9b9f3bfa2289632e63346a74aa0671294fdcf398..92f11da019cda195170a4cbbd19775b73a1230b5 100644 (file)
@@ -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()){
 
@@ -1153,8 +1165,7 @@ LocationUIWindow::on_map ()
 bool
 LocationUIWindow::on_delete_event (GdkEventAny*)
 {
-       hide ();
-       return true;
+       return false;
 }
 
 void