- return Keyboard::the_keyboard().focus_out_handler (ev);
-}
-
-void
-OptionEditor::setup_misc_options()
-{
- Gtk::Table* table = manage (new Table (4, 2));
- table->set_homogeneous (true);
-
- misc_packer.set_border_width (8);
- misc_packer.set_spacing (3);
- misc_packer.pack_start (*table, true, true);
-
- table->attach (hw_monitor_button, 0, 1, 0, 1, Gtk::FILL, 0, 8, 0);
- table->attach (sw_monitor_button, 0, 1, 1, 2, Gtk::FILL, 0, 8, 0);
- table->attach (plugins_stop_button, 0, 1, 2, 3, Gtk::FILL, 0, 8, 0);
- table->attach (plugins_on_rec_button, 0, 1, 3, 4, Gtk::FILL, 0, 8, 0);
- table->attach (verify_remove_last_capture_button, 0, 1, 4, 5, Gtk::FILL, 0, 8, 0);
-
- table->attach (stop_rec_on_xrun_button, 1, 2, 0, 1, Gtk::FILL, 0, 8, 0);
- table->attach (stop_at_end_button, 1, 2, 1, 2, Gtk::FILL, 0, 8, 0);
- table->attach (debug_keyboard_button, 1, 2, 2, 3, Gtk::FILL, 0, 8, 0);
- table->attach (speed_quieten_button, 1, 2, 3, 4, Gtk::FILL, 0, 8, 0);
-
- Gtk::VBox* connect_box = manage (new VBox);
- connect_box->set_spacing (3);
- connect_box->set_border_width (8);
-
- auto_connect_output_manual_button.set_group (auto_connect_output_master_button.get_group());
- auto_connect_output_physical_button.set_group (auto_connect_output_master_button.get_group());
-
- Gtk::HBox* useless_box = manage (new HBox);
- useless_box->pack_start (auto_connect_inputs_button, false, false);
- connect_box->pack_start (*useless_box, false, false);
- connect_box->pack_start (auto_connect_output_master_button, false, false);
- connect_box->pack_start (auto_connect_output_physical_button, false, false);
- connect_box->pack_start (auto_connect_output_manual_button, false);
-
- misc_packer.pack_start (*connect_box, false, false);
-
- hw_monitor_button.set_name ("OptionEditorToggleButton");
- sw_monitor_button.set_name ("OptionEditorToggleButton");
- plugins_stop_button.set_name ("OptionEditorToggleButton");
- plugins_on_rec_button.set_name ("OptionEditorToggleButton");
- verify_remove_last_capture_button.set_name ("OptionEditorToggleButton");
- auto_connect_inputs_button.set_name ("OptionEditorToggleButton");
- auto_connect_output_physical_button.set_name ("OptionEditorToggleButton");
- auto_connect_output_master_button.set_name ("OptionEditorToggleButton");
- auto_connect_output_manual_button.set_name ("OptionEditorToggleButton");
- stop_rec_on_xrun_button.set_name ("OptionEditorToggleButton");
- stop_at_end_button.set_name ("OptionEditorToggleButton");
- debug_keyboard_button.set_name ("OptionEditorToggleButton");
- speed_quieten_button.set_name ("OptionEditorToggleButton");
-
- hw_monitor_button.set_active (Config->get_use_hardware_monitoring());
- sw_monitor_button.set_active (!Config->get_no_sw_monitoring());
- plugins_stop_button.set_active (Config->get_plugins_stop_with_transport());
- stop_rec_on_xrun_button.set_active (Config->get_stop_recording_on_xrun());
- stop_at_end_button.set_active (Config->get_stop_at_session_end());
- debug_keyboard_button.set_active (false);
- speed_quieten_button.set_active (Config->get_quieten_at_speed() != 1.0f);
-
- hw_monitor_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::hw_monitor_clicked));
- sw_monitor_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::sw_monitor_clicked));
- plugins_stop_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::plugins_stop_with_transport_clicked));
- plugins_on_rec_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::plugins_on_while_recording_clicked));
- verify_remove_last_capture_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::verify_remove_last_capture_clicked));
- auto_connect_inputs_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_inputs_clicked));
- auto_connect_output_physical_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_physical_clicked));
- auto_connect_output_master_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_master_clicked));
- auto_connect_output_manual_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_manual_clicked));
- stop_rec_on_xrun_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::stop_rec_on_xrun_clicked));
- stop_at_end_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::stop_at_end_clicked));
- debug_keyboard_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::debug_keyboard_clicked));
- speed_quieten_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::speed_quieten_clicked));
-}
-
-void
-OptionEditor::speed_quieten_clicked ()
-{
- if (speed_quieten_button.get_active()) {
- Config->set_quieten_at_speed (0.251189); // -12dB reduction for ffwd or rewind
- } else {
- Config->set_quieten_at_speed (1.0); /* no change */
- }
-}
-
-void
-OptionEditor::debug_keyboard_clicked ()
-{
- extern bool debug_keyboard;
- debug_keyboard = debug_keyboard_button.get_active ();
-}
-
-void
-OptionEditor::auto_connect_inputs_clicked ()
-{
- if (session) {
- session->set_input_auto_connect (auto_connect_inputs_button.get_active());
- }
-}
-
-void
-OptionEditor::auto_connect_output_master_clicked ()
-{
- if (session) {
- if (auto_connect_output_master_button.get_active()) {
- session->set_output_auto_connect (Session::AutoConnectMaster);
- }
- }
-}
-
-void
-OptionEditor::auto_connect_output_physical_clicked ()
-{
- if (session) {
- if (auto_connect_output_physical_button.get_active()) {
- session->set_output_auto_connect (Session::AutoConnectPhysical);
- }
- }
-}
-
-void
-OptionEditor::auto_connect_output_manual_clicked ()
-{
- if (session) {
- if (auto_connect_output_manual_button.get_active()) {
- session->set_output_auto_connect (Session::AutoConnectOption (0));
- }
- }
-}
-
-void
-OptionEditor::hw_monitor_clicked ()
-{
- Config->set_use_hardware_monitoring (hw_monitor_button.get_active());
-}
-
-void
-OptionEditor::sw_monitor_clicked ()
-{
- Config->set_no_sw_monitoring (!sw_monitor_button.get_active());
-}
-
-void
-OptionEditor::plugins_stop_with_transport_clicked ()
-{
- Config->set_plugins_stop_with_transport (plugins_stop_button.get_active());
-}
-
-void
-OptionEditor::plugins_on_while_recording_clicked ()
-{
- if (session) {
- session->set_recording_plugins (plugins_on_rec_button.get_active());
- }
-}
-
-void
-OptionEditor::verify_remove_last_capture_clicked ()
-{
- Config->set_verify_remove_last_capture(verify_remove_last_capture_button.get_active());
-}
-
-void
-OptionEditor::stop_rec_on_xrun_clicked ()
-{
- Config->set_stop_recording_on_xrun (stop_rec_on_xrun_button.get_active());