-#include <ardour/utils.h>
-#include <ardour/configuration.h>
-#include <ardour/session.h>
-#include <pbd/memento_command.h>
+#include "ardour/utils.h"
+#include "ardour/configuration.h"
+#include "ardour/session.h"
+#include "pbd/memento_command.h"
LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
: location(0), session(0),
item_table (1, 7, false),
LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
: location(0), session(0),
item_table (1, 7, false),
start_go_button (_("Go")),
start_clock (X_("locationstart"), true, X_("LocationEditRowClock"), true),
start_go_button (_("Go")),
start_clock (X_("locationstart"), true, X_("LocationEditRowClock"), true),
end_go_button (_("Go")),
end_clock (X_("locationend"), true, X_("LocationEditRowClock"), true),
length_clock (X_("locationlength"), true, X_("LocationEditRowClock"), true, true),
end_go_button (_("Go")),
end_clock (X_("locationend"), true, X_("LocationEditRowClock"), true),
length_clock (X_("locationlength"), true, X_("LocationEditRowClock"), true, true),
composer_label.set_name ("LocationEditNumberLabel");
composer_entry.set_name ("LocationEditNameEntry");
composer_label.set_name ("LocationEditNumberLabel");
composer_entry.set_name ("LocationEditNameEntry");
isrc_label.set_text ("ISRC: ");
isrc_label.set_size_request (30, -1);
performer_label.set_text ("Performer: ");
isrc_label.set_text ("ISRC: ");
isrc_label.set_size_request (30, -1);
performer_label.set_text ("Performer: ");
start_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), LocStart));
start_go_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::go_button_pressed), LocStart));
start_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocStart));
start_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), LocStart));
start_go_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::go_button_pressed), LocStart));
start_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocStart));
end_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), LocEnd));
end_go_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::go_button_pressed), LocEnd));
end_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocEnd));
end_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), LocEnd));
end_go_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::go_button_pressed), LocEnd));
end_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocEnd));
// item_table.attach (length_clock, 3, 4, 0, 1, 0, 0, 4, 0);
length_clock.ValueChanged.connect (bind ( mem_fun(*this, &LocationEditRow::clock_changed), LocLength));
// item_table.attach (length_clock, 3, 4, 0, 1, 0, 0, 4, 0);
length_clock.ValueChanged.connect (bind ( mem_fun(*this, &LocationEditRow::clock_changed), LocLength));
// item_table.attach (cd_check_button, 4, 5, 0, 1, 0, Gtk::FILL, 4, 0);
// item_table.attach (hide_check_button, 5, 6, 0, 1, 0, Gtk::FILL, 4, 0);
// item_table.attach (cd_check_button, 4, 5, 0, 1, 0, Gtk::FILL, 4, 0);
// item_table.attach (hide_check_button, 5, 6, 0, 1, 0, Gtk::FILL, 4, 0);
name_label.set_size_request (80, -1);
if (!name_label.get_parent()) {
name_label.set_size_request (80, -1);
if (!name_label.get_parent()) {
- item_table.attach (name_label, 1, 2, 0, 1, FILL, Gtk::FILL, 4, 0);
+ item_table.attach (name_label, 1, 2, 0, 1, FILL, FILL, 4, 0);
- item_table.attach (cd_check_button, 5, 6, 0, 1, FILL, Gtk::FILL, 4, 0);
+ item_table.attach (cd_check_button, 5, 6, 0, 1, FILL, FILL, 4, 0);
- item_table.attach (remove_button, 7, 8, 0, 1, FILL, Gtk::FILL, 4, 0);
+ item_table.attach (remove_button, 7, 8, 0, 1, FILL, FILL, 4, 0);
LocationUI::LocationUI ()
: ArdourDialog ("locations dialog"),
add_location_button (_("Add New Location")),
LocationUI::LocationUI ()
: ArdourDialog ("locations dialog"),
add_location_button (_("Add New Location")),
location_vpacker.set_spacing (5);
location_vpacker.pack_start (loop_edit_row, false, false);
location_vpacker.set_spacing (5);
location_vpacker.pack_start (loop_edit_row, false, false);
location_rows_scroller.set_name ("LocationLocRowsScroller");
location_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
location_rows_scroller.set_size_request (-1, 130);
location_rows_scroller.set_name ("LocationLocRowsScroller");
location_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
location_rows_scroller.set_size_request (-1, 130);
loc_frame_box.pack_start (add_location_button, false, false);
loc_frame.set_name ("LocationLocEditorFrame");
loc_frame_box.pack_start (add_location_button, false, false);
loc_frame.set_name ("LocationLocEditorFrame");
loc_frame.add (loc_frame_box);
loc_range_panes.pack1(loc_frame, true, false);
loc_frame.add (loc_frame_box);
loc_range_panes.pack1(loc_frame, true, false);
range_frame_box.pack_start (add_range_button, false, false);
range_frame.set_name ("LocationRangeEditorFrame");
range_frame_box.pack_start (add_range_button, false, false);
range_frame.set_name ("LocationRangeEditorFrame");
range_frame.add (range_frame_box);
loc_range_panes.pack2(range_frame, true, false);
location_vpacker.pack_start (loc_range_panes, true, true);
range_frame.add (range_frame_box);
loc_range_panes.pack2(range_frame, true, false);
location_vpacker.pack_start (loc_range_panes, true, true);
erow->remove_requested.connect (mem_fun(*this, &LocationUI::location_remove_requested));
erow->redraw_ranges.connect (mem_fun(*this, &LocationUI::location_redraw_ranges));
loc_children.push_back(Box_Helpers::Element(*erow, PACK_SHRINK, 1, PACK_START));
erow->remove_requested.connect (mem_fun(*this, &LocationUI::location_remove_requested));
erow->redraw_ranges.connect (mem_fun(*this, &LocationUI::location_redraw_ranges));
loc_children.push_back(Box_Helpers::Element(*erow, PACK_SHRINK, 1, PACK_START));
}
else if (location->is_auto_punch()) {
punch_edit_row.set_session (session);
punch_edit_row.set_location (location);
}
else if (location->is_auto_punch()) {
punch_edit_row.set_session (session);
punch_edit_row.set_location (location);
}
else if (location->is_auto_loop()) {
loop_edit_row.set_session (session);
loop_edit_row.set_location (location);
}
else if (location->is_auto_loop()) {
loop_edit_row.set_session (session);
loop_edit_row.set_location (location);
nframes_t where = session->audible_frame();
session->locations()->next_available_name(markername,"mark");
Location *location = new Location (where, where, markername, Location::IsMark);
nframes_t where = session->audible_frame();
session->locations()->next_available_name(markername,"mark");
Location *location = new Location (where, where, markername, Location::IsMark);
session->begin_reversible_command (_("add marker"));
XMLNode &before = session->locations()->get_state();
session->locations()->add (location, true);
session->begin_reversible_command (_("add marker"));
XMLNode &before = session->locations()->get_state();
session->locations()->add (location, true);