advanced_table->attach(*m_control_bus_channel_count, 1, 2, 2, 3, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
advanced_table->attach(*m_master_bus_channel_count, 1, 2, 1, 2, Gtk::AttachOptions(), Gtk::AttachOptions(), 0, 0);
advanced_table->attach(*m_create_master_bus, 0, 1, 1, 2, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
+
m_connect_inputs->set_flags(Gtk::CAN_FOCUS);
m_connect_inputs->set_relief(Gtk::RELIEF_NORMAL);
m_connect_inputs->set_mode(true);
- m_connect_inputs->set_active(false);
+ m_connect_inputs->set_active(true);
m_connect_inputs->set_border_width(0);
+
m_limit_input_ports->set_flags(Gtk::CAN_FOCUS);
m_limit_input_ports->set_relief(Gtk::RELIEF_NORMAL);
m_limit_input_ports->set_mode(true);
- m_limit_input_ports->set_sensitive(false);
+ m_limit_input_ports->set_sensitive(true);
m_limit_input_ports->set_border_width(0);
m_input_limit_count->set_flags(Gtk::CAN_FOCUS);
m_input_limit_count->set_update_policy(Gtk::UPDATE_ALWAYS);
m_input_limit_count->set_digits(0);
m_input_limit_count->set_wrap(false);
m_input_limit_count->set_sensitive(false);
+
input_port_limit_hbox->pack_start(*m_limit_input_ports, Gtk::PACK_SHRINK, 6);
input_port_limit_hbox->pack_start(*m_input_limit_count, Gtk::PACK_EXPAND_PADDING, 0);
input_port_vbox->pack_start(*m_connect_inputs, Gtk::PACK_SHRINK, 0);
m_connect_outputs->set_flags(Gtk::CAN_FOCUS);
m_connect_outputs->set_relief(Gtk::RELIEF_NORMAL);
m_connect_outputs->set_mode(true);
- m_connect_outputs->set_active(false);
+ m_connect_outputs->set_active(true);
m_connect_outputs->set_border_width(0);
m_limit_output_ports->set_flags(Gtk::CAN_FOCUS);
m_limit_output_ports->set_relief(Gtk::RELIEF_NORMAL);
m_limit_output_ports->set_mode(true);
- m_limit_output_ports->set_sensitive(false);
+ m_limit_output_ports->set_sensitive(true);
m_limit_output_ports->set_border_width(0);
m_output_limit_count->set_flags(Gtk::CAN_FOCUS);
m_output_limit_count->set_update_policy(Gtk::UPDATE_ALWAYS);
NewSessionDialog::connect_inputs_clicked ()
{
m_limit_input_ports->set_sensitive(m_connect_inputs->get_active());
+
+ if (m_connect_inputs->get_active() && m_limit_input_ports->get_active()) {
+ m_input_limit_count->set_sensitive(true);
+ } else {
+ m_input_limit_count->set_sensitive(false);
+ }
}
void
NewSessionDialog::connect_outputs_clicked ()
{
m_limit_output_ports->set_sensitive(m_connect_outputs->get_active());
+
+ if (m_connect_outputs->get_active() && m_limit_output_ports->get_active()) {
+ m_output_limit_count->set_sensitive(true);
+ } else {
+ m_output_limit_count->set_sensitive(false);
+ }
}
void
set_response_sensitive (RESPONSE_APPLY, false);
get_vbox()->pack_start (*table);
+ // Notebook tab order must be the same in here as in set_correct_focus()
using namespace Gtk::Notebook_Helpers;
notebook.pages().push_back (TabElem (lscroller, _("LADSPA")));
ladspa_display.signal_button_press_event().connect_notify (mem_fun(*this, &PluginSelector::row_clicked));
ladspa_display.get_selection()->signal_changed().connect (mem_fun(*this, &PluginSelector::ladspa_display_selection_changed));
+ ladspa_display.grab_focus();
#ifdef VST_SUPPORT
if (Config->get_use_vst()) {
#ifdef HAVE_COREAUDIO
au_refiller ();
#endif
+
+ signal_show().connect (mem_fun (*this, &PluginSelector::set_correct_focus));
+}
+
+/**
+ * Makes sure keyboard focus is always in the plugin list
+ * of the selected notebook tab.
+ **/
+void
+PluginSelector::set_correct_focus()
+{
+ int cp = notebook.get_current_page();
+
+ if (cp == 0) {
+ ladspa_display.grab_focus();
+ return;
+ }
+
+#ifdef VST_SUPPORT
+ if (Config->get_use_vst()) {
+ cp--;
+
+ if (cp == 0) {
+ vst_display.grab_focus();
+ return;
+ }
+ }
+#endif
+
+#ifdef HAVE_COREAUDIO
+ cp--;
+
+ if (cp == 0) {
+ au_display.grab_focus();
+ return;
+ }
+#endif;
}
void
#include <pbd/xml++.h>
#include <pbd/failed_constructor.h>
+#include <gtkmm/widget.h>
#include <gtkmm2ext/click_box.h>
#include <gtkmm2ext/fastmeter.h>
#include <gtkmm2ext/barcontroller.h>
#include "plugin_ui.h"
#include "utils.h"
#include "gui_thread.h"
+#include "public_editor.h"
#include "i18n.h"
if (h > 600) h = 600;
set_default_size (450, h);
}
+
}
PluginUIWindow::~PluginUIWindow ()
{
}
+bool
+PluginUIWindow::on_key_press_event (GdkEventKey* event)
+{
+ return PublicEditor::instance().on_key_press_event(event);
+}
+
+bool
+PluginUIWindow::on_key_release_event (GdkEventKey* event)
+{
+ return PublicEditor::instance().on_key_release_event(event);
+}
void
PluginUIWindow::plugin_going_away (ARDOUR::Redirect* ignored)