minor UI fixes for clocks and Locations dialog. Prevent tape tracks from skewing the session extents
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3448 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6468d722a9
commit
570454f23a
|
@ -828,13 +828,15 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_Tab:
|
case GDK_Tab:
|
||||||
|
case GDK_Return:
|
||||||
|
case GDK_KP_Enter:
|
||||||
move_on = true;
|
move_on = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_Escape:
|
case GDK_Escape:
|
||||||
case GDK_Return:
|
key_entry_state = 0;
|
||||||
case GDK_KP_Enter:
|
|
||||||
clock_base.grab_focus ();
|
clock_base.grab_focus ();
|
||||||
|
ChangeAborted(); /* EMIT SIGNAL */
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -960,6 +962,13 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if user hit Enter, lose focus
|
||||||
|
switch (ev->keyval) {
|
||||||
|
case GDK_Return:
|
||||||
|
case GDK_KP_Enter:
|
||||||
|
clock_base.grab_focus ();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ class AudioClock : public Gtk::HBox
|
||||||
void set_session (ARDOUR::Session *s);
|
void set_session (ARDOUR::Session *s);
|
||||||
|
|
||||||
sigc::signal<void> ValueChanged;
|
sigc::signal<void> ValueChanged;
|
||||||
|
sigc::signal<void> ChangeAborted;
|
||||||
|
|
||||||
static sigc::signal<void> ModeChanged;
|
static sigc::signal<void> ModeChanged;
|
||||||
static std::vector<AudioClock*> clocks;
|
static std::vector<AudioClock*> clocks;
|
||||||
|
|
|
@ -46,10 +46,10 @@ using namespace Gtkmm2ext;
|
||||||
LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
: location(0), session(0),
|
: location(0), session(0),
|
||||||
item_table (1, 7, false),
|
item_table (1, 7, false),
|
||||||
start_set_button (_("Set")),
|
start_set_button (_("Use PH")),
|
||||||
start_go_button (_("Go")),
|
start_go_button (_("Go")),
|
||||||
start_clock (X_("locationstart"), true, X_("LocationEditRowClock"), true),
|
start_clock (X_("locationstart"), true, X_("LocationEditRowClock"), true),
|
||||||
end_set_button (_("Set")),
|
end_set_button (_("Use PH")),
|
||||||
end_go_button (_("Go")),
|
end_go_button (_("Go")),
|
||||||
end_clock (X_("locationend"), true, X_("LocationEditRowClock"), true),
|
end_clock (X_("locationend"), true, X_("LocationEditRowClock"), true),
|
||||||
length_clock (X_("locationlength"), true, X_("LocationEditRowClock"), true, true),
|
length_clock (X_("locationlength"), true, X_("LocationEditRowClock"), true, true),
|
||||||
|
@ -82,7 +82,9 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
composer_label.set_name ("LocationEditNumberLabel");
|
composer_label.set_name ("LocationEditNumberLabel");
|
||||||
composer_entry.set_name ("LocationEditNameEntry");
|
composer_entry.set_name ("LocationEditNameEntry");
|
||||||
|
|
||||||
|
ARDOUR_UI::instance()->tooltips().set_tip(start_set_button, _("Set value to Playhead"));
|
||||||
|
ARDOUR_UI::instance()->tooltips().set_tip(end_set_button, _("Set value to Playhead"));
|
||||||
|
|
||||||
isrc_label.set_text ("ISRC: ");
|
isrc_label.set_text ("ISRC: ");
|
||||||
isrc_label.set_size_request (30, -1);
|
isrc_label.set_size_request (30, -1);
|
||||||
performer_label.set_text ("Performer: ");
|
performer_label.set_text ("Performer: ");
|
||||||
|
@ -131,6 +133,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
start_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), 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_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_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocStart));
|
||||||
|
start_clock.ChangeAborted.connect (bind (mem_fun (*this, &LocationEditRow::change_aborted), LocStart));
|
||||||
|
|
||||||
|
|
||||||
end_hbox.pack_start (end_go_button, false, false);
|
end_hbox.pack_start (end_go_button, false, false);
|
||||||
|
@ -142,9 +145,11 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
end_set_button.signal_clicked().connect(bind (mem_fun (*this, &LocationEditRow::set_button_pressed), 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_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_clock.ValueChanged.connect (bind (mem_fun (*this, &LocationEditRow::clock_changed), LocEnd));
|
||||||
|
end_clock.ChangeAborted.connect (bind (mem_fun (*this, &LocationEditRow::change_aborted), LocEnd));
|
||||||
|
|
||||||
// item_table.attach (length_clock, 3, 4, 0, 1, 0, 0, 4, 0);
|
// 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));
|
length_clock.ValueChanged.connect (bind ( mem_fun(*this, &LocationEditRow::clock_changed), LocLength));
|
||||||
|
length_clock.ChangeAborted.connect (bind (mem_fun (*this, &LocationEditRow::change_aborted), LocLength));
|
||||||
|
|
||||||
// item_table.attach (cd_check_button, 4, 5, 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);
|
// item_table.attach (hide_check_button, 5, 6, 0, 1, 0, Gtk::FILL, 4, 0);
|
||||||
|
@ -414,6 +419,14 @@ LocationEditRow::clock_changed (LocationPart part)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LocationEditRow::change_aborted (LocationPart part)
|
||||||
|
{
|
||||||
|
if (i_am_the_modifier || !location) return;
|
||||||
|
|
||||||
|
set_location(location);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LocationEditRow::cd_toggled ()
|
LocationEditRow::cd_toggled ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,6 +115,7 @@ class LocationEditRow : public Gtk::HBox
|
||||||
void go_button_pressed (LocationPart part);
|
void go_button_pressed (LocationPart part);
|
||||||
|
|
||||||
void clock_changed (LocationPart part);
|
void clock_changed (LocationPart part);
|
||||||
|
void change_aborted (LocationPart part);
|
||||||
|
|
||||||
void cd_toggled ();
|
void cd_toggled ();
|
||||||
void hide_toggled ();
|
void hide_toggled ();
|
||||||
|
|
|
@ -100,6 +100,7 @@ Location::set_start (nframes_t s)
|
||||||
_end = s;
|
_end = s;
|
||||||
|
|
||||||
start_changed(this); /* EMIT SIGNAL */
|
start_changed(this); /* EMIT SIGNAL */
|
||||||
|
end_changed(this); /* EMIT SIGNAL */
|
||||||
|
|
||||||
if ( is_start() ) {
|
if ( is_start() ) {
|
||||||
|
|
||||||
|
@ -137,7 +138,17 @@ Location::set_end (nframes_t e)
|
||||||
if (_start != e) {
|
if (_start != e) {
|
||||||
_start = e;
|
_start = e;
|
||||||
_end = e;
|
_end = e;
|
||||||
|
start_changed(this); /* EMIT SIGNAL */
|
||||||
end_changed(this); /* EMIT SIGNAL */
|
end_changed(this); /* EMIT SIGNAL */
|
||||||
|
|
||||||
|
if ( is_start() ) {
|
||||||
|
Session::StartTimeChanged (); /* EMIT SIGNAL */
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( is_end() ) {
|
||||||
|
Session::EndTimeChanged (); /* EMIT SIGNAL */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2447,6 +2447,8 @@ Session::get_maximum_extent () const
|
||||||
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
|
boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
|
||||||
|
|
||||||
for (DiskstreamList::const_iterator i = dsl->begin(); i != dsl->end(); ++i) {
|
for (DiskstreamList::const_iterator i = dsl->begin(); i != dsl->end(); ++i) {
|
||||||
|
if ((*i)->destructive()) //ignore tape tracks when getting max extents
|
||||||
|
continue;
|
||||||
boost::shared_ptr<Playlist> pl = (*i)->playlist();
|
boost::shared_ptr<Playlist> pl = (*i)->playlist();
|
||||||
if ((me = pl->get_maximum_extent()) > max) {
|
if ((me = pl->get_maximum_extent()) > max) {
|
||||||
max = me;
|
max = me;
|
||||||
|
|
Loading…
Reference in New Issue