mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-28 01:17:42 +01:00
handle disconnected-from-JACK state a little better (i.e. don't crash and be helpful
git-svn-id: svn://localhost/ardour2/trunk@1123 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
40ee34e43e
commit
71ad6a13cb
5 changed files with 19 additions and 20 deletions
|
|
@ -1231,7 +1231,6 @@ ARDOUR_UI::engine_stopped ()
|
|||
ActionManager::set_sensitive (ActionManager::jack_opposite_sensitive_actions, true);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ARDOUR_UI::engine_running ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -294,8 +294,6 @@ IOSelector::rescan ()
|
|||
|
||||
current_page = notebook.get_current_page ();
|
||||
|
||||
cerr << "clear notebook\n";
|
||||
|
||||
pages.clear ();
|
||||
|
||||
/* get relevant current JACK ports */
|
||||
|
|
@ -303,7 +301,6 @@ IOSelector::rescan ()
|
|||
ports = session.engine().get_ports ("", JACK_DEFAULT_AUDIO_TYPE, for_input ? JackPortIsOutput : JackPortIsInput);
|
||||
|
||||
if (ports == 0) {
|
||||
cerr << "no ports\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -369,8 +366,6 @@ IOSelector::rescan ()
|
|||
pages.push_back (TabElem (*client_box, *tab_label));
|
||||
}
|
||||
|
||||
cerr << "notebook should have " << portmap.size() << " pages\n";
|
||||
|
||||
notebook.set_current_page (current_page);
|
||||
page_selection_connection = notebook.signal_show().connect (bind (mem_fun (notebook, &Notebook::set_current_page), current_page));
|
||||
selector_box.show_all ();
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ MixerStrip::output_press (GdkEventButton *ev)
|
|||
citems.push_back (SeparatorElem());
|
||||
|
||||
_session.foreach_connection (this, &MixerStrip::add_connection_to_output_menu);
|
||||
|
||||
|
||||
output_menu.popup (1, ev->time);
|
||||
break;
|
||||
|
||||
|
|
@ -556,13 +556,13 @@ MixerStrip::input_press (GdkEventButton *ev)
|
|||
switch (ev->button) {
|
||||
|
||||
case 1:
|
||||
|
||||
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;
|
||||
|
||||
|
|
@ -1177,21 +1177,11 @@ MixerStrip::mix_group() const
|
|||
void
|
||||
MixerStrip::engine_stopped ()
|
||||
{
|
||||
input_button.set_sensitive (false);
|
||||
if (rec_enable_button) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
}
|
||||
output_button.set_sensitive (false);
|
||||
}
|
||||
|
||||
void
|
||||
MixerStrip::engine_running ()
|
||||
{
|
||||
input_button.set_sensitive (true);
|
||||
if (rec_enable_button) {
|
||||
rec_enable_button->set_sensitive (true);
|
||||
}
|
||||
output_button.set_sensitive (true);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1058,8 +1058,12 @@ RedirectBox::register_actions ()
|
|||
|
||||
/* new stuff */
|
||||
ActionManager::register_action (popup_act_grp, X_("newplugin"), _("New Plugin ..."), sigc::ptr_fun (RedirectBox::rb_choose_plugin));
|
||||
ActionManager::register_action (popup_act_grp, X_("newinsert"), _("New Insert"), sigc::ptr_fun (RedirectBox::rb_choose_insert));
|
||||
ActionManager::register_action (popup_act_grp, X_("newsend"), _("New Send ..."), sigc::ptr_fun (RedirectBox::rb_choose_send));
|
||||
|
||||
act = ActionManager::register_action (popup_act_grp, X_("newinsert"), _("New Insert"), sigc::ptr_fun (RedirectBox::rb_choose_insert));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (popup_act_grp, X_("newsend"), _("New Send ..."), sigc::ptr_fun (RedirectBox::rb_choose_send));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
|
||||
ActionManager::register_action (popup_act_grp, X_("clear"), _("Clear"), sigc::ptr_fun (RedirectBox::rb_clear));
|
||||
|
||||
/* standard editing stuff */
|
||||
|
|
@ -1086,6 +1090,8 @@ RedirectBox::register_actions ()
|
|||
ActionManager::plugin_selection_sensitive_actions.push_back(act);
|
||||
|
||||
ActionManager::add_action_group (popup_act_grp);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1256,3 +1262,4 @@ RedirectBox::generate_redirect_title (boost::shared_ptr<PluginInsert> pi)
|
|||
|
||||
return string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), pi->name(), maker);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#include "gui_thread.h"
|
||||
|
||||
#include <ardour/route.h>
|
||||
#include <ardour/session.h>
|
||||
#include <ardour/audioengine.h>
|
||||
#include <ardour/audio_track.h>
|
||||
#include <ardour/audio_diskstream.h>
|
||||
|
||||
|
|
@ -281,6 +283,12 @@ RouteUI::solo_release(GdkEventButton* ev)
|
|||
bool
|
||||
RouteUI::rec_enable_press(GdkEventButton* ev)
|
||||
{
|
||||
if (!_session.engine().connected()) {
|
||||
MessageDialog msg (_("Not connected to JACK - cannot engage record"));
|
||||
msg.run ();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!ignore_toggle && is_track() && rec_enable_button) {
|
||||
|
||||
if (ev->button == 2 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue