using namespace PBD;
using namespace ARDOUR;
-using namespace ArdourSurface;
using namespace std;
using namespace Gtk;
using namespace Gtkmm2ext;
+using namespace ArdourSurface::FP_NAMESPACE;
void*
FaderPort8::get_gui () const
: fp (p)
, table (2, 3)
, ignore_active_change (false)
- , two_line_text (_("Two Line Trackname"))
+ , two_line_text_cb (_("Two Line Trackname"))
+ , auto_pluginui_cb (_("Auto Show/Hide Plugin GUIs"))
{
set_border_width (12);
table.set_homogeneous (false);
std::string data_file_path;
+#ifdef FADERPORT16
+ string name = "faderport16-small.png";
+#elif defined FADERPORT2
+ string name = "faderport2018-small.png";
+#else
string name = "faderport8-small.png";
+#endif
Searchpath spath(ARDOUR::ardour_data_search_path());
spath.add_subdirectory_to_paths ("icons");
find_file (spath, name, data_file_path);
clock_combo.signal_changed().connect (sigc::mem_fun (*this, &FP8GUI::clock_mode_changed));
scribble_combo.signal_changed().connect (sigc::mem_fun (*this, &FP8GUI::scribble_mode_changed));
- two_line_text.signal_toggled().connect(sigc::mem_fun (*this, &FP8GUI::twolinetext_toggled));
+ two_line_text_cb.signal_toggled().connect(sigc::mem_fun (*this, &FP8GUI::twolinetext_toggled));
+ auto_pluginui_cb.signal_toggled().connect(sigc::mem_fun (*this, &FP8GUI::auto_pluginui_toggled));
l = manage (new Gtk::Label);
l->set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Incoming MIDI on:")));
align->add (*user_combo);
table.attach (*align, 3 * action_col + 1, 3 * action_col + 2, row + action_row, row + action_row + 1, AttachOptions(FILL|EXPAND), AttachOptions (0));
- if (++action_row == 4) {
+#ifdef FADERPORT2
+ if (++action_row == 2)
+#else
+ if (++action_row == 4)
+#endif
+ {
action_row = 0;
++action_col;
}
row += 4;
+#ifndef FADERPORT2
hsep = manage(new Gtk::HSeparator);
table.attach (*hsep, 0, 8, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 6);
row++;
l->set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Clock:")));
l->set_alignment (1.0, 0.5);
table.attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
- table.attach (clock_combo, 1, 5, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
+ table.attach (clock_combo, 1, 4, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
- table.attach (two_line_text, 5, 8, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
+ table.attach (two_line_text_cb, 4, 8, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
row++;
l = manage (new Gtk::Label);
l->set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Display:")));
l->set_alignment (1.0, 0.5);
table.attach (*l, 0, 1, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
- table.attach (scribble_combo, 1, 5, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
+ table.attach (scribble_combo, 1, 4, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
+
+ table.attach (auto_pluginui_cb, 4, 8, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
row++;
+#endif
/* update the port connection combos */
update_port_combos ();
scribble_combo.set_active_text (_("Meter + Pan"));
break;
}
- two_line_text.set_active (fp.twolinetext ());
+ two_line_text_cb.set_active (fp.twolinetext ());
+ auto_pluginui_cb.set_active (fp.auto_pluginui ());
}
void
void
FP8GUI::twolinetext_toggled ()
{
- fp.set_two_line_text (two_line_text.get_active ());
+ fp.set_two_line_text (two_line_text_cb.get_active ());
+}
+
+
+void
+FP8GUI::auto_pluginui_toggled ()
+{
+ fp.set_auto_pluginui (auto_pluginui_cb.get_active ());
}