Remove CannotRecordNoInput signal (allowing recording without input connections), provide visual indication of phase reverse, change e.g. 'gain automation' to 'fader automation', enforce mouse button 1 use in mixer strip, make button labels more consistent in mixer strip, disable io change/record enable when disconnected from jack on mixer strip, remove duplicated signal connections and typo in audio_time_axis.cc.

git-svn-id: svn://localhost/trunk/ardour2@505 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2006-05-17 12:07:16 +00:00
parent 1242d9595c
commit b3b383faa5
10 changed files with 182 additions and 165 deletions

View File

@ -185,7 +185,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
gettimeofday (&last_peak_grab, 0);
gettimeofday (&last_shuttle_request, 0);
ARDOUR::DiskStream::CannotRecordNoInput.connect (mem_fun(*this, &ARDOUR_UI::cannot_record_no_input));
ARDOUR::DiskStream::DeleteSources.connect (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread));
ARDOUR::DiskStream::DiskOverrun.connect (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
ARDOUR::DiskStream::DiskUnderrun.connect (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
@ -197,22 +196,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
/* have to wait for AudioEngine and Configuration before proceeding */
}
void
ARDOUR_UI::cannot_record_no_input (DiskStream* ds)
{
ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::cannot_record_no_input), ds));
string msg = string_compose (_("\
You cannot record-enable\n\
track %1\n\
because it has no input connections.\n\
You would be wasting space recording silence."),
ds->name());
MessageDialog message (*editor, msg);
message.run ();
}
void
ARDOUR_UI::set_engine (AudioEngine& e)
{

View File

@ -649,8 +649,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
struct timeval last_peak_grab;
struct timeval last_shuttle_request;
void cannot_record_no_input (ARDOUR::DiskStream*);
void delete_sources_in_the_right_thread (list<ARDOUR::Source*>*);
void editor_display_control_changed (Editing::DisplayControl c);

View File

@ -134,12 +134,6 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
hide_button.set_name ("TrackRemoveButton");
hide_button.add (*(manage (new Image (get_xpm("small_x.xpm")))));
_route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
_route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
_route.solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
_route.panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
solo_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
mute_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
@ -218,8 +212,9 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
_route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
_route.solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
_route.redirects_changed.connect (mem_fun(*this, &AudioTimeAxisView::redirects_changed));
_route.name_changed.connect (mem_fun(*this, &AudioTimeAxisView::route_name_changed));
_route.solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed));
_route.panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
if (is_audio_track()) {
@ -717,23 +712,23 @@ AudioTimeAxisView::build_display_menu ()
MenuList& automation_items = automation_action_menu->items();
automation_action_menu->set_name ("ArdourContextMenu");
automation_items.push_back (MenuElem (_("show all automation"),
automation_items.push_back (MenuElem (_("Show all automation"),
mem_fun(*this, &AudioTimeAxisView::show_all_automation)));
automation_items.push_back (MenuElem (_("show existing automation"),
automation_items.push_back (MenuElem (_("Show existing automation"),
mem_fun(*this, &AudioTimeAxisView::show_existing_automation)));
automation_items.push_back (MenuElem (_("hide all automation"),
automation_items.push_back (MenuElem (_("Hide all automation"),
mem_fun(*this, &AudioTimeAxisView::hide_all_automation)));
automation_items.push_back (SeparatorElem());
automation_items.push_back (CheckMenuElem (_("gain"),
automation_items.push_back (CheckMenuElem (_("Fader"),
mem_fun(*this, &AudioTimeAxisView::toggle_gain_track)));
gain_automation_item = static_cast<CheckMenuItem*> (&automation_items.back());
gain_automation_item->set_active(show_gain_automation);
automation_items.push_back (CheckMenuElem (_("pan"),
automation_items.push_back (CheckMenuElem (_("Pan"),
mem_fun(*this, &AudioTimeAxisView::toggle_pan_track)));
pan_automation_item = static_cast<CheckMenuItem*> (&automation_items.back());
pan_automation_item->set_active(show_pan_automation);
@ -770,12 +765,12 @@ AudioTimeAxisView::build_display_menu ()
RadioMenuItem::Group align_group;
alignment_items.push_back (RadioMenuElem (align_group, _("align with existing material"), bind (mem_fun(*this, &AudioTimeAxisView::set_align_style), ExistingMaterial)));
alignment_items.push_back (RadioMenuElem (align_group, _("Align with existing material"), bind (mem_fun(*this, &AudioTimeAxisView::set_align_style), ExistingMaterial)));
align_existing_item = dynamic_cast<RadioMenuItem*>(&alignment_items.back());
if (get_diskstream()->alignment_style() == ExistingMaterial) {
align_existing_item->set_active();
}
alignment_items.push_back (RadioMenuElem (align_group, _("align with capture time"), bind (mem_fun(*this, &AudioTimeAxisView::set_align_style), CaptureTime)));
alignment_items.push_back (RadioMenuElem (align_group, _("Align with capture time"), bind (mem_fun(*this, &AudioTimeAxisView::set_align_style), CaptureTime)));
align_capture_item = dynamic_cast<RadioMenuItem*>(&alignment_items.back());
if (get_diskstream()->alignment_style() == CaptureTime) {
align_capture_item->set_active();

View File

@ -180,13 +180,13 @@ AutomationTimeAxisView::auto_clicked ()
automation_menu->set_name ("ArdourContextMenu");
MenuList& items (automation_menu->items());
items.push_back (MenuElem (_("off"),
items.push_back (MenuElem (_("Isolate"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off)));
items.push_back (MenuElem (_("play"),
items.push_back (MenuElem (_("Play"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
items.push_back (MenuElem (_("write"),
items.push_back (MenuElem (_("Write"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write)));
items.push_back (MenuElem (_("touch"),
items.push_back (MenuElem (_("Touch"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch)));
}
@ -209,7 +209,7 @@ AutomationTimeAxisView::automation_state_changed ()
switch (state & (Off|Play|Touch|Write)) {
case Off:
auto_button.set_label (_("off"));
auto_button.set_label (_("Isolate"));
if (auto_off_item) {
ignore_state_request = true;
auto_off_item->set_active (true);
@ -220,7 +220,7 @@ AutomationTimeAxisView::automation_state_changed ()
}
break;
case Play:
auto_button.set_label (_("play"));
auto_button.set_label (_("Play"));
if (auto_play_item) {
ignore_state_request = true;
auto_play_item->set_active (true);
@ -231,7 +231,7 @@ AutomationTimeAxisView::automation_state_changed ()
}
break;
case Write:
auto_button.set_label (_("write"));
auto_button.set_label (_("Write"));
if (auto_write_item) {
ignore_state_request = true;
auto_write_item->set_active (true);
@ -242,7 +242,7 @@ AutomationTimeAxisView::automation_state_changed ()
}
break;
case Touch:
auto_button.set_label (_("touch"));
auto_button.set_label (_("Touch"));
if (auto_touch_item) {
ignore_state_request = true;
auto_touch_item->set_active (true);
@ -457,19 +457,19 @@ AutomationTimeAxisView::build_display_menu ()
auto_state_menu->set_name ("ArdourContextMenu");
MenuList& as_items = auto_state_menu->items();
as_items.push_back (CheckMenuElem (_("off"),
as_items.push_back (CheckMenuElem (_("Isolate"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off)));
auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
as_items.push_back (CheckMenuElem (_("play"),
as_items.push_back (CheckMenuElem (_("Play"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
auto_play_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
as_items.push_back (CheckMenuElem (_("write"),
as_items.push_back (CheckMenuElem (_("Write"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write)));
auto_write_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
as_items.push_back (CheckMenuElem (_("touch"),
as_items.push_back (CheckMenuElem (_("Touch"),
bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch)));
auto_touch_item = dynamic_cast<CheckMenuItem*>(&as_items.back());

View File

@ -82,7 +82,7 @@ speed_printer (char buf[32], Gtk::Adjustment& adj, void* arg)
MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
: AxisView(sess),
RouteUI (rt, sess, _("mute"), _("solo"), _("RECORD")),
RouteUI (rt, sess, _("Mute"), _("Solo"), _("Record")),
_mixer(mx),
pre_redirect_box (PreFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
post_redirect_box (PostFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
@ -116,13 +116,12 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
width_button.add (*(manage (new Gtk::Image (get_xpm("lr.xpm")))));
hide_button.add (*(manage (new Gtk::Image (get_xpm("small_x.xpm")))));
input_label.set_text (_("INPUT"));
input_label.set_text (_("Input"));
input_button.add (input_label);
input_button.set_name ("MixerIOButton");
input_label.set_name ("MixerIOButtonLabel");
output_label.set_text (_("OUTPUT"));
output_label.set_text (_("Output"));
output_button.add (output_label);
output_button.set_name ("MixerIOButton");
output_label.set_name ("MixerIOButtonLabel");
@ -138,10 +137,10 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
pan_automation_state_button.set_name ("MixerAutomationPlaybackButton");
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_state_button, _("Pan automation mode"));
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("Gain automation mode"));
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("Fader automation mode"));
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_style_button, _("Pan automation type"));
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Gain automation type"));
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Fader automation type"));
hide_button.set_events (hide_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
@ -171,39 +170,39 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
using namespace Menu_Helpers;
gain_astate_menu.items().push_back (MenuElem (_("off"),
gain_astate_menu.items().push_back (MenuElem (_("Isolate"),
bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Off)));
gain_astate_menu.items().push_back (MenuElem (_("play"),
gain_astate_menu.items().push_back (MenuElem (_("Play"),
bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Play)));
gain_astate_menu.items().push_back (MenuElem (_("write"),
gain_astate_menu.items().push_back (MenuElem (_("Write"),
bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Write)));
gain_astate_menu.items().push_back (MenuElem (_("touch"),
gain_astate_menu.items().push_back (MenuElem (_("Touch"),
bind (mem_fun (_route, &IO::set_gain_automation_state), (AutoState) Touch)));
gain_astyle_menu.items().push_back (MenuElem (_("trim")));
gain_astyle_menu.items().push_back (MenuElem (_("abs")));
gain_astyle_menu.items().push_back (MenuElem (_("Trim")));
gain_astyle_menu.items().push_back (MenuElem (_("Abs")));
pan_astate_menu.items().push_back (MenuElem (_("off"),
pan_astate_menu.items().push_back (MenuElem (_("Isolate"),
bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Off)));
pan_astate_menu.items().push_back (MenuElem (_("play"),
pan_astate_menu.items().push_back (MenuElem (_("Play"),
bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Play)));
pan_astate_menu.items().push_back (MenuElem (_("write"),
pan_astate_menu.items().push_back (MenuElem (_("Write"),
bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Write)));
pan_astate_menu.items().push_back (MenuElem (_("touch"),
pan_astate_menu.items().push_back (MenuElem (_("Touch"),
bind (mem_fun (_route.panner(), &Panner::set_automation_state), (AutoState) Touch)));
pan_astyle_menu.items().push_back (MenuElem (_("trim")));
pan_astyle_menu.items().push_back (MenuElem (_("abs")));
pan_astyle_menu.items().push_back (MenuElem (_("Trim")));
pan_astyle_menu.items().push_back (MenuElem (_("Abs")));
gain_astate_menu.set_name ("ArdourContextMenu");
gain_astyle_menu.set_name ("ArdourContextMenu");
pan_astate_menu.set_name ("ArdourContextMenu");
pan_astyle_menu.set_name ("ArdourContextMenu");
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("gain automation mode"));
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_style_button, _("pan automation mode"));
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("gain automation state"));
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_state_button, _("pan automation state"));
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_style_button, _("Fader automation mode"));
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_style_button, _("Pan automation mode"));
ARDOUR_UI::instance()->tooltips().set_tip (gain_automation_state_button, _("Fader automation state"));
ARDOUR_UI::instance()->tooltips().set_tip (pan_automation_state_button, _("Pan automation state"));
if (is_audio_track()) {
@ -220,7 +219,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
speed_spinner.set_print_func (speed_printer, 0);
ARDOUR_UI::instance()->tooltips().set_tip (speed_spinner, _("varispeed"));
ARDOUR_UI::instance()->tooltips().set_tip (speed_spinner, _("Varispeed"));
button_table.attach (speed_frame, 0, 2, 5, 6);
#endif /* VARISPEED_IN_MIXER_STRIP */
@ -233,7 +232,11 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
name_label.set_name ("MixerNameButtonLabel");
name_label.set_text (_route.name());
if (_route.phase_invert()) {
name_label.set_text (X_("Ø ") + name_label.get_text());
} else {
name_label.set_text (_route.name());
}
group_button.add (group_label);
group_button.set_name ("MixerGroupButton");
@ -286,6 +289,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
_packed = false;
_embedded = false;
_session.engine().Stopped.connect (mem_fun(*this, &MixerStrip::engine_stopped));
_session.engine().Running.connect (mem_fun(*this, &MixerStrip::engine_running));
_route.input_changed.connect (mem_fun(*this, &MixerStrip::input_changed));
_route.output_changed.connect (mem_fun(*this, &MixerStrip::output_changed));
_route.mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed));
@ -315,9 +320,8 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer)
mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release), false);
gain_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event), false);
gain_automation_style_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event), false);
pan_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event), false);
pan_automation_style_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event), false);
gain_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::gain_automation_state_button_event), false);
pan_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event), false);
@ -431,9 +435,9 @@ MixerStrip::set_width (Width w)
set_size_request (-1, -1);
xml_node->add_property ("strip_width", "wide");
rec_enable_button->set_label (_("RECORD"));
mute_button->set_label (_("mute"));
solo_button->set_label (_("solo"));
rec_enable_button->set_label (_("Record"));
mute_button->set_label (_("Mute"));
solo_button->set_label (_("Solo"));
if (_route.comment() == "") {
comment_button.set_label (_("Comments"));
@ -441,10 +445,10 @@ MixerStrip::set_width (Width w)
comment_button.set_label (_("*Comments*"));
}
gain_automation_style_button.set_label (astyle_string(_route.gain_automation_curve().automation_style()));
gain_automation_state_button.set_label (astate_string(_route.gain_automation_curve().automation_state()));
pan_automation_style_button.set_label (astyle_string(_route.panner().automation_style()));
pan_automation_state_button.set_label (astate_string(_route.panner().automation_state()));
gain_automation_style_button.set_label (_("F:") + astyle_string(_route.gain_automation_curve().automation_style()));
gain_automation_state_button.set_label (_("F:") + astate_string(_route.gain_automation_curve().automation_state()));
pan_automation_style_button.set_label (_("P:") + astyle_string(_route.panner().automation_style()));
pan_automation_state_button.set_label (_("P:") + astate_string(_route.panner().automation_state()));
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2);
break;
@ -452,9 +456,9 @@ MixerStrip::set_width (Width w)
set_size_request (50, -1);
xml_node->add_property ("strip_width", "narrow");
rec_enable_button->set_label (_("REC"));
mute_button->set_label (_("m"));
solo_button->set_label (_("s"));
rec_enable_button->set_label (_("Rec"));
mute_button->set_label (_("M"));
solo_button->set_label (_("S"));
if (_route.comment() == "") {
comment_button.set_label (_("Cmt"));
@ -462,10 +466,10 @@ MixerStrip::set_width (Width w)
comment_button.set_label (_("*Cmt*"));
}
gain_automation_style_button.set_label (short_astyle_string(_route.gain_automation_curve().automation_style()));
gain_automation_state_button.set_label (short_astate_string(_route.gain_automation_curve().automation_state()));
pan_automation_style_button.set_label (short_astyle_string(_route.panner().automation_style()));
pan_automation_state_button.set_label (short_astate_string(_route.panner().automation_state()));
gain_automation_style_button.set_label (_("F:") + short_astyle_string(_route.gain_automation_curve().automation_style()));
gain_automation_state_button.set_label (_("F:") + short_astate_string(_route.gain_automation_curve().automation_state()));
pan_automation_style_button.set_label (_("P:") + short_astyle_string(_route.panner().automation_style()));
pan_automation_state_button.set_label (_("P:") + short_astate_string(_route.panner().automation_state()));
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
break;
}
@ -495,27 +499,33 @@ MixerStrip::set_packed (bool yn)
gint
MixerStrip::output_press (GdkEventButton *ev)
{
using namespace Menu_Helpers;
using namespace Menu_Helpers;
if (!_session.engine().connected()) {
MessageDialog msg (_("Not connected to JACK - no I/O changes are possible"));
MessageDialog msg (_("Not connected to JACK - no I/O changes are possible"));
msg.run ();
return true;
}
MenuList& citems = output_menu.items();
output_menu.set_name ("ArdourContextMenu");
citems.clear();
citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_output_configuration)));
citems.push_back (SeparatorElem());
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_output)));
citems.push_back (SeparatorElem());
_session.foreach_connection (this, &MixerStrip::add_connection_to_output_menu);
output_menu.popup (1, ev->time);
switch (ev->button) {
case 1:
output_menu.set_name ("ArdourContextMenu");
citems.clear();
citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_output_configuration)));
citems.push_back (SeparatorElem());
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_output)));
citems.push_back (SeparatorElem());
_session.foreach_connection (this, &MixerStrip::add_connection_to_output_menu);
output_menu.popup (1, ev->time);
break;
default:
break;
}
return TRUE;
}
@ -555,26 +565,34 @@ MixerStrip::input_press (GdkEventButton *ev)
MenuList& citems = input_menu.items();
input_menu.set_name ("ArdourContextMenu");
citems.clear();
if (!_session.engine().connected()) {
MessageDialog msg (_("Not connected to JACK - no I/O changes are possible"));
MessageDialog msg (_("Not connected to JACK - no I/O changes are possible"));
msg.run ();
return true;
}
switch (ev->button) {
case 1:
#if ADVANCED_ROUTE_DISKSTREAM_CONNECTIVITY
if (is_audio_track()) {
citems.push_back (MenuElem (_("Track"), mem_fun(*this, &MixerStrip::select_stream_input)));
}
if (is_audio_track()) {
citems.push_back (MenuElem (_("Track"), mem_fun(*this, &MixerStrip::select_stream_input)));
}
#endif
citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_input_configuration)));
citems.push_back (SeparatorElem());
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_input)));
citems.push_back (SeparatorElem());
_session.foreach_connection (this, &MixerStrip::add_connection_to_input_menu);
input_menu.popup (1, ev->time);
citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_input_configuration)));
citems.push_back (SeparatorElem());
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_input)));
citems.push_back (SeparatorElem());
_session.foreach_connection (this, &MixerStrip::add_connection_to_input_menu);
input_menu.popup (1, ev->time);
break;
default:
break;
}
return TRUE;
}
@ -747,14 +765,13 @@ MixerStrip::update_input_display ()
} else {
switch (_width) {
case Wide:
input_label.set_text (_("INPUT"));
input_label.set_text (_(" Input"));
break;
case Narrow:
input_label.set_text (_("IN"));
input_label.set_text (_("I"));
break;
}
}
panners.setup_pan ();
}
@ -768,14 +785,13 @@ MixerStrip::update_output_display ()
} else {
switch (_width) {
case Wide:
output_label.set_text (_("OUTPUT"));
output_label.set_text (_("Output"));
break;
case Narrow:
output_label.set_text (_("OUT"));
output_label.set_text (_("O"));
break;
}
}
gpm.setup_meters ();
panners.setup_pan ();
}
@ -794,14 +810,11 @@ MixerStrip::gain_automation_state_button_event (GdkEventButton *ev)
}
switch (ev->button) {
case 1:
switch (ev->button) {
case 1:
gain_astate_menu.popup (1, ev->time);
break;
default:
break;
}
}
return TRUE;
@ -810,7 +823,7 @@ MixerStrip::gain_automation_state_button_event (GdkEventButton *ev)
gint
MixerStrip::gain_automation_style_button_event (GdkEventButton *ev)
{
if (ev->type == GDK_BUTTON_PRESS || ev->type == GDK_2BUTTON_PRESS) {
if (ev->type == GDK_BUTTON_RELEASE) {
return TRUE;
}
@ -847,6 +860,10 @@ MixerStrip::pan_automation_state_button_event (GdkEventButton *ev)
gint
MixerStrip::pan_automation_style_button_event (GdkEventButton *ev)
{
if (ev->type == GDK_BUTTON_RELEASE) {
return TRUE;
}
switch (ev->button) {
case 1:
pan_astyle_menu.popup (1, ev->time);
@ -876,16 +893,16 @@ MixerStrip::_astate_string (AutoState state, bool shrt)
switch (state) {
case Off:
sstr = (shrt ? "--" : _("off"));
sstr = (shrt ? "I" : _("Iso"));
break;
case Play:
sstr = (shrt ? "P" : _("aplay"));
sstr = (shrt ? "P" : _("Ply"));
break;
case Touch:
sstr = (shrt ? "T" : _("touch"));
sstr = (shrt ? "T" : _("Tch"));
break;
case Write:
sstr = (shrt ? "W" : _("awrite"));
sstr = (shrt ? "W" : _("Wri"));
break;
}
@ -908,11 +925,11 @@ string
MixerStrip::_astyle_string (AutoStyle style, bool shrt)
{
if (style & Trim) {
return _("trim");
return _("Trim");
} else {
/* XXX it might different in different languages */
return (shrt ? _("abs") : _("abs"));
return (shrt ? _("Abs") : _("Abs"));
}
}
@ -927,10 +944,10 @@ MixerStrip::gain_automation_style_changed ()
{
switch (_width) {
case Wide:
gain_automation_style_button.set_label (astyle_string(_route.gain_automation_curve().automation_style()));
gain_automation_style_button.set_label (_("F:") + astyle_string(_route.gain_automation_curve().automation_style()));
break;
case Narrow:
gain_automation_style_button.set_label (short_astyle_string(_route.gain_automation_curve().automation_style()));
gain_automation_style_button.set_label (_("F:") + short_astyle_string(_route.gain_automation_curve().automation_style()));
break;
}
}
@ -944,10 +961,10 @@ MixerStrip::gain_automation_state_changed ()
switch (_width) {
case Wide:
gain_automation_state_button.set_label (astate_string(_route.gain_automation_curve().automation_state()));
gain_automation_state_button.set_label (_("F:") + astate_string(_route.gain_automation_curve().automation_state()));
break;
case Narrow:
gain_automation_state_button.set_label (short_astate_string(_route.gain_automation_curve().automation_state()));
gain_automation_state_button.set_label (_("F:") + short_astate_string(_route.gain_automation_curve().automation_state()));
break;
}
@ -977,10 +994,10 @@ MixerStrip::pan_automation_style_changed ()
switch (_width) {
case Wide:
pan_automation_style_button.set_label (astyle_string(_route.panner().automation_style()));
pan_automation_style_button.set_label (_("P:") + astyle_string(_route.panner().automation_style()));
break;
case Narrow:
pan_automation_style_button.set_label (short_astyle_string(_route.panner().automation_style()));
pan_automation_style_button.set_label (_("P:") + short_astyle_string(_route.panner().automation_style()));
break;
}
}
@ -994,10 +1011,10 @@ MixerStrip::pan_automation_state_changed ()
switch (_width) {
case Wide:
pan_automation_state_button.set_label (astate_string(_route.panner().automation_state()));
pan_automation_state_button.set_label (_("P:") + astate_string(_route.panner().automation_state()));
break;
case Narrow:
pan_automation_state_button.set_label (short_astate_string(_route.panner().automation_state()));
pan_automation_state_button.set_label (_("P:") + short_astate_string(_route.panner().automation_state()));
break;
}
@ -1156,19 +1173,27 @@ MixerStrip::select_mix_group (GdkEventButton *ev)
using namespace Menu_Helpers;
if (group_menu == 0) {
group_menu = new Menu;
group_menu = new Menu;
}
group_menu->set_name ("ArdourContextMenu");
MenuList& items = group_menu->items();
RadioMenuItem::Group group;
items.clear ();
items.push_back (RadioMenuElem (group, _("no group"), bind (mem_fun(*this, &MixerStrip::set_mix_group), (RouteGroup *) 0)));
switch (ev->button) {
case 1:
_session.foreach_mix_group (bind (mem_fun (*this, &MixerStrip::add_mix_group_to_menu), &group));
items.clear ();
items.push_back (RadioMenuElem (group, _("No group"), bind (mem_fun(*this, &MixerStrip::set_mix_group), (RouteGroup *) 0)));
_session.foreach_mix_group (bind (mem_fun (*this, &MixerStrip::add_mix_group_to_menu), &group));
group_menu->popup (1, ev->time);
break;
default:
break;
}
group_menu->popup (1, ev->time);
return true;
}
@ -1184,7 +1209,7 @@ MixerStrip::mix_group_changed (void *ignored)
} else {
switch (_width) {
case Wide:
group_label.set_text (_("no group"));
group_label.set_text (_("No group"));
break;
case Narrow:
group_label.set_text (_("~G"));
@ -1327,9 +1352,12 @@ MixerStrip::name_changed (void *src)
RouteUI::name_changed (src);
break;
case Narrow:
name_label.set_text (PBD::short_version (_route.name(), 5));
name_label.set_text (PBD::short_version (_route.name(), 5));
break;
}
if (_route.phase_invert()) {
name_label.set_text (X_("Ø ") + name_label.get_text());
}
}
void
@ -1426,3 +1454,19 @@ MixerStrip::mix_group() const
{
return _route.mix_group();
}
void
MixerStrip::engine_stopped ()
{
input_button.set_sensitive (false);
rec_enable_button->set_sensitive (false);
output_button.set_sensitive (false);
}
void
MixerStrip::engine_running ()
{
input_button.set_sensitive (true);
rec_enable_button->set_sensitive (true);
output_button.set_sensitive (true);
}

View File

@ -267,6 +267,9 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
string solo_button_name () const { return "MixerSoloButton"; }
string safe_solo_button_name () const { return "MixerSafeSoloButton"; }
void engine_running();
void engine_stopped();
};
#endif /* __ardour_mixer_strip__ */

View File

@ -354,7 +354,7 @@ PluginUI::ControlUI::ControlUI ()
{
automate_button.set_name ("PluginAutomateButton");
ARDOUR_UI::instance()->tooltips().set_tip (automate_button,
_("automation control"));
_("Automation control"));
/* don't fix the height, it messes up the bar controllers */
@ -388,16 +388,16 @@ PluginUI::automation_state_changed (ControlUI* cui)
switch (insert.get_port_automation_state (cui->port_index) & (Off|Play|Touch|Write)) {
case Off:
cui->automate_button.set_label (_("off"));
cui->automate_button.set_label (_("Isolate"));
break;
case Play:
cui->automate_button.set_label (_("play"));
cui->automate_button.set_label (_("Play"));
break;
case Write:
cui->automate_button.set_label (_("write"));
cui->automate_button.set_label (_("Write"));
break;
case Touch:
cui->automate_button.set_label (_("touch"));
cui->automate_button.set_label (_("Touch"));
break;
default:
cui->automate_button.set_label (_("???"));
@ -631,13 +631,13 @@ PluginUI::astate_clicked (ControlUI* cui, uint32_t port)
MenuList& items (automation_menu->items());
items.clear ();
items.push_back (MenuElem (_("off"),
items.push_back (MenuElem (_("Isolate"),
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Off, cui)));
items.push_back (MenuElem (_("play"),
items.push_back (MenuElem (_("Play"),
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Play, cui)));
items.push_back (MenuElem (_("write"),
items.push_back (MenuElem (_("Write"),
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Write, cui)));
items.push_back (MenuElem (_("touch"),
items.push_back (MenuElem (_("Touch"),
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Touch, cui)));
automation_menu->popup (1, 0);

View File

@ -751,7 +751,7 @@ void
RouteUI::name_changed (void *src)
{
ENSURE_GUI_THREAD(bind (mem_fun (*this, &RouteUI::name_changed), src));
name_label.set_text (_route.name());
}
@ -786,6 +786,11 @@ RouteUI::toggle_polarity ()
if ((x = polarity_menu_item->get_active()) != _route.phase_invert()) {
_route.set_phase_invert (x, this);
if (x) {
name_label.set_text (X_("Ø ") + name_label.get_text());
} else {
name_label.set_text (_route.name());
}
}
}
}
@ -908,4 +913,3 @@ RouteUI::map_frozen ()
}
}
}

View File

@ -185,7 +185,6 @@ class DiskStream : public Stateful, public sigc::trackable
static sigc::signal<void> DiskOverrun;
static sigc::signal<void> DiskUnderrun;
static sigc::signal<void,DiskStream*> DiskStreamCreated; // XXX use a ref with sigc2
static sigc::signal<void,DiskStream*> CannotRecordNoInput; // XXX use a ref with sigc2
static sigc::signal<void,list<Source*>*> DeleteSources;
/* stateful */

View File

@ -57,7 +57,6 @@ using namespace ARDOUR;
jack_nframes_t DiskStream::disk_io_chunk_frames;
sigc::signal<void,DiskStream*> DiskStream::DiskStreamCreated;
sigc::signal<void,DiskStream*> DiskStream::CannotRecordNoInput;
sigc::signal<void,list<Source*>*> DiskStream::DeleteSources;
sigc::signal<void> DiskStream::DiskOverrun;
sigc::signal<void> DiskStream::DiskUnderrun;
@ -1918,14 +1917,6 @@ DiskStream::set_record_enabled (bool yn, void* src)
*/
get_input_sources ();
if (channels[0].source == 0) {
if (yn) {
CannotRecordNoInput (this); /* emit signal */
}
return;
}
}
/* yes, i know that this not proof against race conditions, but its