13
0

add a simple status indicator to the Engine Dialog

This commit is contained in:
Robin Gareus 2015-01-25 10:19:46 +01:00
parent e6bb75cf01
commit 031f68fb9d
2 changed files with 10 additions and 2 deletions

View File

@ -68,6 +68,7 @@ static const char* results_markup = X_("<span weight=\"bold\" size=\"larger\">%1
EngineControl::EngineControl () EngineControl::EngineControl ()
: ArdourDialog (_("Audio/MIDI Setup")) : ArdourDialog (_("Audio/MIDI Setup"))
, engine_status ("")
, basic_packer (9, 4) , basic_packer (9, 4)
, input_latency_adjustment (0, 0, 99999, 1) , input_latency_adjustment (0, 0, 99999, 1)
, input_latency (input_latency_adjustment) , input_latency (input_latency_adjustment)
@ -248,6 +249,9 @@ EngineControl::EngineControl ()
get_vbox()->set_border_width (12); get_vbox()->set_border_width (12);
get_vbox()->pack_start (notebook); get_vbox()->pack_start (notebook);
get_action_area()->pack_start (engine_status);
engine_status.show();
/* need a special function to print "all available channels" when the /* need a special function to print "all available channels" when the
* channel counts hit zero. * channel counts hit zero.
*/ */
@ -263,9 +267,9 @@ EngineControl::EngineControl ()
control_app_button.signal_clicked().connect (mem_fun (*this, &EngineControl::control_app_button_clicked)); control_app_button.signal_clicked().connect (mem_fun (*this, &EngineControl::control_app_button_clicked));
manage_control_app_sensitivity (); manage_control_app_sensitivity ();
cancel_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); cancel_button = add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CANCEL);
ok_button = add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
apply_button = add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_APPLY); apply_button = add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_APPLY);
ok_button = add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
/* Pick up any existing audio setup configuration, if appropriate */ /* Pick up any existing audio setup configuration, if appropriate */
@ -2146,6 +2150,7 @@ EngineControl::engine_running ()
connect_disconnect_button.show(); connect_disconnect_button.show();
started_at_least_once = true; started_at_least_once = true;
engine_status.set_markup(string_compose ("<span foreground=\"green\">%1</span>", _("Active")));
} }
void void
@ -2160,6 +2165,7 @@ EngineControl::engine_stopped ()
sample_rate_combo.set_sensitive (true); sample_rate_combo.set_sensitive (true);
buffer_size_combo.set_sensitive (true); buffer_size_combo.set_sensitive (true);
engine_status.set_markup(string_compose ("<span foreground=\"red\">%1</span>", _("Inactive")));
} }
void void

View File

@ -53,6 +53,8 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
private: private:
Gtk::Notebook notebook; Gtk::Notebook notebook;
Gtk::Label engine_status;
/* core fields used by all backends */ /* core fields used by all backends */
Gtk::Table basic_packer; Gtk::Table basic_packer;