One fix.
[ardour.git] / gtk2_ardour / location_ui.cc
index 842d5cb1fb10db7d9f8aca6f970eb632cdce8191..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;
@@ -256,7 +256,7 @@ LocationEditRow::set_location (Location *loc)
                remove_button.hide ();
 
                if (!name_label.get_parent()) {
-                       item_table.attach (name_label, 2, 3, 0, 1, FILL, FILL, 4, 0);
+                       item_table.attach (name_label, 2, 3, 0, 1, EXPAND|FILL, FILL, 4, 0);
                }
 
                name_label.show();
@@ -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;
        }
@@ -761,6 +770,7 @@ LocationUI::LocationUI ()
        loop_edit_row.set_clock_group (*_clock_group);
        punch_edit_row.set_clock_group (*_clock_group);
 
+       loop_punch_box.set_border_width (6); // 5 + 1 px framebox-border
        loop_punch_box.pack_start (loop_edit_row, false, false);
        loop_punch_box.pack_start (punch_edit_row, false, false);
 
@@ -802,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);
@@ -834,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);
@@ -1142,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();
        }
@@ -1154,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");