mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
fix crash when unconditionally using null env var; tweak packing of control app button
This commit is contained in:
parent
f06bab1fa3
commit
3633892eaa
2 changed files with 16 additions and 10 deletions
|
|
@ -71,12 +71,6 @@ EngineControl::EngineControl ()
|
||||||
get_vbox()->set_border_width (12);
|
get_vbox()->set_border_width (12);
|
||||||
get_vbox()->pack_start (notebook);
|
get_vbox()->pack_start (notebook);
|
||||||
|
|
||||||
Gtk::HBox* hpacker = manage (new HBox);
|
|
||||||
hpacker->pack_start (control_app_button, false, false);
|
|
||||||
hpacker->show ();
|
|
||||||
control_app_button.show();
|
|
||||||
get_vbox()->pack_start (*hpacker);
|
|
||||||
|
|
||||||
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 ();
|
||||||
|
|
||||||
|
|
@ -201,10 +195,18 @@ EngineControl::build_notebook ()
|
||||||
device_combo.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::device_changed));
|
device_combo.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::device_changed));
|
||||||
|
|
||||||
basic_hbox.pack_start (basic_packer, false, false);
|
basic_hbox.pack_start (basic_packer, false, false);
|
||||||
|
basic_vbox.pack_start (basic_hbox, false, false);
|
||||||
|
|
||||||
|
Gtk::HBox* hpacker = manage (new HBox);
|
||||||
|
hpacker->set_border_width (12);
|
||||||
|
hpacker->pack_start (control_app_button, false, false);
|
||||||
|
hpacker->show ();
|
||||||
|
control_app_button.show();
|
||||||
|
basic_vbox.pack_start (*hpacker);
|
||||||
|
|
||||||
midi_packer.set_border_width (12);
|
midi_packer.set_border_width (12);
|
||||||
|
|
||||||
notebook.pages().push_back (TabElem (basic_hbox, _("Audio")));
|
notebook.pages().push_back (TabElem (basic_vbox, _("Audio")));
|
||||||
notebook.pages().push_back (TabElem (midi_hbox, _("MIDI")));
|
notebook.pages().push_back (TabElem (midi_hbox, _("MIDI")));
|
||||||
notebook.set_border_width (12);
|
notebook.set_border_width (12);
|
||||||
|
|
||||||
|
|
@ -815,9 +817,10 @@ EngineControl::control_app_button_clicked ()
|
||||||
void
|
void
|
||||||
EngineControl::manage_control_app_sensitivity ()
|
EngineControl::manage_control_app_sensitivity ()
|
||||||
{
|
{
|
||||||
const string appname = g_getenv ("ARDOUR_DEVICE_CONTROL_APP");
|
const char* env_value = g_getenv ("ARDOUR_DEVICE_CONTROL_APP");
|
||||||
|
string appname;
|
||||||
|
|
||||||
if (appname.empty()) {
|
if (!env_value) {
|
||||||
boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
|
boost::shared_ptr<ARDOUR::AudioBackend> backend = ARDOUR::AudioEngine::instance()->current_backend();
|
||||||
|
|
||||||
if (!backend) {
|
if (!backend) {
|
||||||
|
|
@ -825,6 +828,8 @@ EngineControl::manage_control_app_sensitivity ()
|
||||||
}
|
}
|
||||||
|
|
||||||
string appname = backend->control_app_name();
|
string appname = backend->control_app_name();
|
||||||
|
} else {
|
||||||
|
appname = env_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appname.empty()) {
|
if (appname.empty()) {
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ class EngineControl : public ArdourDialog {
|
||||||
Gtk::Table basic_packer;
|
Gtk::Table basic_packer;
|
||||||
Gtk::Table midi_packer;
|
Gtk::Table midi_packer;
|
||||||
Gtk::HBox basic_hbox;
|
Gtk::HBox basic_hbox;
|
||||||
|
Gtk::VBox basic_vbox;
|
||||||
Gtk::HBox midi_hbox;
|
Gtk::HBox midi_hbox;
|
||||||
|
|
||||||
sigc::connection sr_connection;
|
sigc::connection sr_connection;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue