FP8/16: include makeup gain control
[ardour.git] / libs / surfaces / faderport8 / gui.cc
index b9543d12c61d6f2b5d7afaa7fd968ef1d9ab6da3..3a537de028fffc01417ce6d51f0f6d196d1beb26 100644 (file)
 
 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
@@ -95,6 +95,8 @@ FP8GUI::FP8GUI (FaderPort8& p)
        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
@@ -164,7 +166,12 @@ FP8GUI::FP8GUI (FaderPort8& p)
                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;
                }
@@ -177,6 +184,7 @@ FP8GUI::FP8GUI (FaderPort8& p)
 
        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++;
@@ -198,6 +206,7 @@ FP8GUI::FP8GUI (FaderPort8& p)
 
        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 ();