mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
Fix #2931; redundant menu items on main clocks.
git-svn-id: svn://localhost/ardour2/branches/3.0@6184 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c07f42b9f4
commit
7664d86dc5
9 changed files with 29 additions and 24 deletions
|
|
@ -117,10 +117,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
||||||
|
|
||||||
: Gtkmm2ext::UI (X_("Ardour"), argcp, argvp),
|
: Gtkmm2ext::UI (X_("Ardour"), argcp, argvp),
|
||||||
|
|
||||||
primary_clock (X_("primary"), false, X_("TransportClockDisplay"), true, false, true),
|
primary_clock (X_("primary"), false, X_("TransportClockDisplay"), true, true, false, true),
|
||||||
secondary_clock (X_("secondary"), false, X_("SecondaryClockDisplay"), true, false, true),
|
secondary_clock (X_("secondary"), false, X_("SecondaryClockDisplay"), true, true, false, true),
|
||||||
preroll_clock (X_("preroll"), false, X_("PreRollClock"), true, true),
|
preroll_clock (X_("preroll"), false, X_("PreRollClock"), true, false, true),
|
||||||
postroll_clock (X_("postroll"), false, X_("PostRollClock"), true, true),
|
postroll_clock (X_("postroll"), false, X_("PostRollClock"), true, false, true),
|
||||||
|
|
||||||
/* preroll stuff */
|
/* preroll stuff */
|
||||||
|
|
||||||
|
|
@ -129,7 +129,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
||||||
|
|
||||||
/* big clock */
|
/* big clock */
|
||||||
|
|
||||||
big_clock (X_("bigclock"), false, "BigClockNonRecording", true, false, true),
|
big_clock (X_("bigclock"), false, "BigClockNonRecording", true, true, false, true),
|
||||||
|
|
||||||
/* transport */
|
/* transport */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,14 @@ const uint32_t AudioClock::field_length[(int) AudioClock::AudioFrames+1] = {
|
||||||
10 /* Audio Frame */
|
10 /* Audio Frame */
|
||||||
};
|
};
|
||||||
|
|
||||||
AudioClock::AudioClock (std::string clock_name, bool transient, std::string widget_name, bool allow_edit, bool duration, bool with_info)
|
AudioClock::AudioClock (
|
||||||
|
std::string clock_name, bool transient, std::string widget_name, bool allow_edit, bool follows_playhead, bool duration, bool with_info
|
||||||
|
)
|
||||||
: _name (clock_name),
|
: _name (clock_name),
|
||||||
is_transient (transient),
|
is_transient (transient),
|
||||||
is_duration (duration),
|
is_duration (duration),
|
||||||
editable (allow_edit),
|
editable (allow_edit),
|
||||||
|
_follows_playhead (follows_playhead),
|
||||||
colon1 (":"),
|
colon1 (":"),
|
||||||
colon2 (":"),
|
colon2 (":"),
|
||||||
colon3 (":"),
|
colon3 (":"),
|
||||||
|
|
@ -1957,7 +1960,7 @@ AudioClock::build_ops_menu ()
|
||||||
ops_items.push_back (MenuElem (_("Samples"), bind (mem_fun(*this, &AudioClock::set_mode), Frames)));
|
ops_items.push_back (MenuElem (_("Samples"), bind (mem_fun(*this, &AudioClock::set_mode), Frames)));
|
||||||
ops_items.push_back (MenuElem (_("Off"), bind (mem_fun(*this, &AudioClock::set_mode), Off)));
|
ops_items.push_back (MenuElem (_("Off"), bind (mem_fun(*this, &AudioClock::set_mode), Off)));
|
||||||
|
|
||||||
if (editable && !is_duration) {
|
if (editable && !is_duration && !_follows_playhead) {
|
||||||
ops_items.push_back (SeparatorElem());
|
ops_items.push_back (SeparatorElem());
|
||||||
ops_items.push_back (MenuElem (_("Set From Playhead"), mem_fun(*this, &AudioClock::set_from_playhead)));
|
ops_items.push_back (MenuElem (_("Set From Playhead"), mem_fun(*this, &AudioClock::set_from_playhead)));
|
||||||
ops_items.push_back (MenuElem (_("Locate to this time"), mem_fun(*this, &AudioClock::locate)));
|
ops_items.push_back (MenuElem (_("Locate to this time"), mem_fun(*this, &AudioClock::locate)));
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class AudioClock : public Gtk::HBox
|
||||||
Off
|
Off
|
||||||
};
|
};
|
||||||
|
|
||||||
AudioClock (std::string clock_name, bool transient, std::string widget_name, bool editable, bool is_duration = false, bool with_info = false);
|
AudioClock (std::string, bool, std::string, bool, bool, bool duration = false, bool with_info = false);
|
||||||
|
|
||||||
Mode mode() const { return _mode; }
|
Mode mode() const { return _mode; }
|
||||||
|
|
||||||
|
|
@ -79,6 +79,8 @@ class AudioClock : public Gtk::HBox
|
||||||
bool is_transient;
|
bool is_transient;
|
||||||
bool is_duration;
|
bool is_duration;
|
||||||
bool editable;
|
bool editable;
|
||||||
|
/** true if this clock follows the playhead, meaning that certain operations are redundant */
|
||||||
|
bool _follows_playhead;
|
||||||
|
|
||||||
Gtk::Menu *ops_menu;
|
Gtk::Menu *ops_menu;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,13 +49,13 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
|
||||||
name_label (_("Name:")),
|
name_label (_("Name:")),
|
||||||
audition_button (_("Play")),
|
audition_button (_("Play")),
|
||||||
time_table (6, 2),
|
time_table (6, 2),
|
||||||
position_clock (X_("regionposition"), true, X_("AudioRegionEditorClock"), true),
|
position_clock (X_("regionposition"), true, X_("AudioRegionEditorClock"), true, false),
|
||||||
end_clock (X_("regionend"), true, X_("AudioRegionEditorClock"), true),
|
end_clock (X_("regionend"), true, X_("AudioRegionEditorClock"), true, false),
|
||||||
length_clock (X_("regionlength"), true, X_("AudioRegionEditorClock"), true, true),
|
length_clock (X_("regionlength"), true, X_("AudioRegionEditorClock"), true, false, true),
|
||||||
sync_offset_relative_clock (X_("regionsyncoffsetrelative"), true, X_("AudioRegionEditorClock"), true),
|
sync_offset_relative_clock (X_("regionsyncoffsetrelative"), true, X_("AudioRegionEditorClock"), true, false),
|
||||||
sync_offset_absolute_clock (X_("regionsyncoffsetabsolute"), true, X_("AudioRegionEditorClock"), true),
|
sync_offset_absolute_clock (X_("regionsyncoffsetabsolute"), true, X_("AudioRegionEditorClock"), true, false),
|
||||||
/* XXX cannot file start yet */
|
/* XXX cannot file start yet */
|
||||||
start_clock (X_("regionstart"), true, X_("AudioRegionEditorClock"), false),
|
start_clock (X_("regionstart"), true, X_("AudioRegionEditorClock"), false, false),
|
||||||
gain_adjustment(accurate_coefficient_to_dB(_region->scale_amplitude()), -40.0, +40.0, 0.1, 1.0, 0)
|
gain_adjustment(accurate_coefficient_to_dB(_region->scale_amplitude()), -40.0, +40.0, 0.1, 1.0, 0)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ Editor::Editor ()
|
||||||
|
|
||||||
/* tool bar related */
|
/* tool bar related */
|
||||||
|
|
||||||
, zoom_range_clock (X_("zoomrange"), false, X_("ZoomRangeClock"), true, true)
|
, zoom_range_clock (X_("zoomrange"), false, X_("ZoomRangeClock"), true, false, true)
|
||||||
|
|
||||||
, toolbar_selection_clock_table (2,3)
|
, toolbar_selection_clock_table (2,3)
|
||||||
|
|
||||||
|
|
@ -250,7 +250,7 @@ Editor::Editor ()
|
||||||
|
|
||||||
/* nudge */
|
/* nudge */
|
||||||
|
|
||||||
, nudge_clock (X_("nudge"), false, X_("NudgeClock"), true, true)
|
, nudge_clock (X_("nudge"), false, X_("NudgeClock"), true, false, true)
|
||||||
, meters_running(false)
|
, meters_running(false)
|
||||||
, _pending_locate_request (false)
|
, _pending_locate_request (false)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6245,7 +6245,7 @@ Editor::do_insert_time ()
|
||||||
Label time_label (_("Time to insert:"));
|
Label time_label (_("Time to insert:"));
|
||||||
time_label.set_alignment (1, 0.5);
|
time_label.set_alignment (1, 0.5);
|
||||||
table.attach (time_label, 0, 1, 0, 1, FILL | EXPAND);
|
table.attach (time_label, 0, 1, 0, 1, FILL | EXPAND);
|
||||||
AudioClock clock ("insertTimeClock", true, X_("InsertTimeClock"), true, true, true);
|
AudioClock clock ("insertTimeClock", true, X_("InsertTimeClock"), true, false, true, true);
|
||||||
clock.set (0);
|
clock.set (0);
|
||||||
clock.set_session (session);
|
clock.set_session (session);
|
||||||
clock.set_bbt_reference (pos);
|
clock.set_bbt_reference (pos);
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,11 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) :
|
||||||
silence_table (2, 4),
|
silence_table (2, 4),
|
||||||
trim_start_checkbox (_("Trim silence at start")),
|
trim_start_checkbox (_("Trim silence at start")),
|
||||||
silence_start_checkbox (_("Add silence at start:")),
|
silence_start_checkbox (_("Add silence at start:")),
|
||||||
silence_start_clock ("silence_start", true, "PreRollClock", true, true),
|
silence_start_clock ("silence_start", true, "PreRollClock", true, false, true),
|
||||||
|
|
||||||
trim_end_checkbox (_("Trim silence at end")),
|
trim_end_checkbox (_("Trim silence at end")),
|
||||||
silence_end_checkbox (_("Add silence at end:")),
|
silence_end_checkbox (_("Add silence at end:")),
|
||||||
silence_end_clock ("silence_end", true, "PreRollClock", true, true),
|
silence_end_clock ("silence_end", true, "PreRollClock", true, false, true),
|
||||||
|
|
||||||
format_table (3, 4),
|
format_table (3, 4),
|
||||||
compatibility_label (_("Compatibility"), Gtk::ALIGN_LEFT),
|
compatibility_label (_("Compatibility"), Gtk::ALIGN_LEFT),
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@ 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, 6, false),
|
item_table (1, 6, false),
|
||||||
start_clock (X_("locationstart"), true, X_("LocationEditRowClock"), true),
|
start_clock (X_("locationstart"), true, X_("LocationEditRowClock"), true, false),
|
||||||
end_clock (X_("locationend"), true, X_("LocationEditRowClock"), true),
|
end_clock (X_("locationend"), true, X_("LocationEditRowClock"), true, false),
|
||||||
length_clock (X_("locationlength"), true, X_("LocationEditRowClock"), true, true),
|
length_clock (X_("locationlength"), true, X_("LocationEditRowClock"), true, false, true),
|
||||||
cd_check_button (_("CD")),
|
cd_check_button (_("CD")),
|
||||||
hide_check_button (_("Hide")),
|
hide_check_button (_("Hide")),
|
||||||
scms_check_button (_("SCMS")),
|
scms_check_button (_("SCMS")),
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,8 @@ importmode2string (ImportMode mode)
|
||||||
SoundFileBox::SoundFileBox (bool persistent)
|
SoundFileBox::SoundFileBox (bool persistent)
|
||||||
: _session(0),
|
: _session(0),
|
||||||
table (6, 2),
|
table (6, 2),
|
||||||
length_clock ("sfboxLengthClock", !persistent, "EditCursorClock", false, true, false),
|
length_clock ("sfboxLengthClock", !persistent, "EditCursorClock", false, false, true, false),
|
||||||
timecode_clock ("sfboxTimecodeClock", !persistent, "EditCursorClock", false, false, false),
|
timecode_clock ("sfboxTimecodeClock", !persistent, "EditCursorClock", false, false, false, false),
|
||||||
main_box (false, 6),
|
main_box (false, 6),
|
||||||
autoplay_btn (_("Auto-play"))
|
autoplay_btn (_("Auto-play"))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue