headless-chicken: ensure new sources are empty, misc renaming.
[ardour.git] / gtk2_ardour / location_ui.cc
index 1d54622c9357be74e3cac0931aae30264e0d8486..76111a49e767b8d779e5537beee4a3c4184c73bb 100644 (file)
@@ -37,7 +37,7 @@
 #include "tooltips.h"
 #include "ui_config.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -420,6 +420,9 @@ LocationEditRow::to_playhead_button_pressed (LocationPart part)
                        break;
                case LocEnd:
                        location->set_end (_session->transport_frame ());
+                       if (location->is_session_range()) {
+                               _session->set_end_is_free (false);
+                       }
                        break;
                default:
                        break;
@@ -464,9 +467,15 @@ LocationEditRow::clock_changed (LocationPart part)
                        break;
                case LocEnd:
                        location->set_end (end_clock.current_time());
+                       if (location->is_session_range()) {
+                               _session->set_end_is_free (false);
+                       }
                        break;
                case LocLength:
                        location->set_end (location->start() + length_clock.current_duration());
+                       if (location->is_session_range()) {
+                               _session->set_end_is_free (false);
+                       }
                default:
                        break;
        }
@@ -803,7 +812,7 @@ LocationUI::LocationUI ()
        table->attach (loc_frame_box, 0, 2, table_row, table_row + 1);
        ++table_row;
 
-       loc_range_panes.pack1 (*table, true, false);
+       loc_range_panes.add (*table);
 
        table = manage (new Table (3, 2));
        table->set_spacings (2);
@@ -835,7 +844,7 @@ LocationUI::LocationUI ()
        table->attach (range_frame_box, 0, 2, table_row, table_row + 1);
        ++table_row;
 
-       loc_range_panes.pack2 (*table, true, false);
+       loc_range_panes.add (*table);
 
        HBox* add_button_box = manage (new HBox);
        add_button_box->pack_start (add_location_button, true, true);
@@ -1143,7 +1152,7 @@ LocationUI::clock_mode_from_session_instant_xml () const
                return AudioClock::Frames;
        }
 
-       XMLProperty* p = node->property (X_("clock-mode"));
+       XMLProperty const * p = node->property (X_("clock-mode"));
        if (!p) {
                return ARDOUR_UI::instance()->secondary_clock->mode();
        }
@@ -1155,7 +1164,7 @@ LocationUI::clock_mode_from_session_instant_xml () const
 /*------------------------*/
 
 LocationUIWindow::LocationUIWindow ()
-       : ArdourWindow (_("Locations"))
+       : ArdourWindow (S_("Ranges|Locations"))
 {
        set_wmclass(X_("ardour_locations"), PROGRAM_NAME);
        set_name ("LocationWindow");