fix up indentation caused by lack of .emacs
[ardour.git] / gtk2_ardour / generic_pluginui.cc
index 764500749c503d99ff801b1bde3499b37c2e41ad..a5bfc3853183ab23cda0f0cc09d67306fceb060d 100644 (file)
@@ -38,7 +38,9 @@
 #include <ardour/plugin.h>
 #include <ardour/insert.h>
 #include <ardour/ladspa_plugin.h>
+#ifdef HAVE_LV2
 #include <ardour/lv2_plugin.h>
+#endif
 
 #include <lrdf.h>
 
@@ -71,24 +73,29 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
        set_border_width (10);
        set_homogeneous (false);
 
-       settings_box.set_homogeneous (false);
-
        HBox* constraint_hbox = manage (new HBox);
        HBox* smaller_hbox = manage (new HBox);
        Label* combo_label = manage (new Label (_("<span size=\"large\">Presets</span>")));
        combo_label->set_use_markup (true);
 
        smaller_hbox->pack_start (*combo_label, false, false, 10);
-       smaller_hbox->pack_start (combo, false, false);
+       smaller_hbox->pack_start (preset_combo, false, false);
        smaller_hbox->pack_start (save_button, false, false);
+       smaller_hbox->pack_start (bypass_button, false, true);
 
        constraint_hbox->set_spacing (5);
-       constraint_hbox->pack_start (*smaller_hbox, true, false);
-       constraint_hbox->pack_end (bypass_button, false, false);
+       constraint_hbox->set_homogeneous (false);
+       
+       VBox* v1_box = manage (new VBox);
+       VBox* v2_box = manage (new VBox);
+
+       v1_box->pack_start (*smaller_hbox, false, true);
+       v2_box->pack_start (focus_button, false, true);
 
-       settings_box.pack_end (*constraint_hbox, false, false);
+       constraint_hbox->pack_end (*v2_box, false, false);
+       constraint_hbox->pack_end (*v1_box, false, false);
 
-       pack_start (settings_box, false, false);
+       pack_start (*constraint_hbox, false, false);
 
        if ( is_scrollable ) {
                scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
@@ -104,9 +111,6 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
                pack_start (hpacker, false, false);
        }
 
-       insert->active_changed.connect (mem_fun(*this, &GenericPluginUI::redirect_active_changed));
-       bypass_button.set_active (!insert->active());
-       
        build ();
 }
 
@@ -187,7 +191,7 @@ GenericPluginUI::build ()
                        /* if we are scrollable, just use one long column */
 
                        if (!is_scrollable) {
-                               if (x++ > 7){
+                               if (x++ > 20){
                                        frame = manage (new Frame);
                                        frame->set_name ("BaseFrame");
                                        box = manage (new VBox);
@@ -385,8 +389,9 @@ GenericPluginUI::build_control_ui (guint32 port_index, PBD::Controllable* mcontr
        if (plugin->parameter_is_input (port_index)) {
 
                boost::shared_ptr<LadspaPlugin> lp;
+#ifdef HAVE_LV2
                boost::shared_ptr<LV2Plugin> lv2p;
-
+#endif
                if ((lp = boost::dynamic_pointer_cast<LadspaPlugin>(plugin)) != 0) {
 
                        // all LADPSA plugins have a numeric unique ID
@@ -410,6 +415,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, PBD::Controllable* mcontr
                                return control_ui;
                        }
 
+#ifdef HAVE_LV2
                } else if ((lv2p = boost::dynamic_pointer_cast<LV2Plugin>(plugin)) != 0) {
 
                        SLV2Port port = lv2p->slv2_port(port_index);
@@ -429,6 +435,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, PBD::Controllable* mcontr
                                slv2_scale_points_free(points);
                                return control_ui;
                        }
+#endif
                }
                        
                if (desc.toggled) {
@@ -699,14 +706,6 @@ GenericPluginUI::control_combo_changed (ControlUI* cui)
 
 }
 
-void
-GenericPluginUI::redirect_active_changed (Redirect* r, void* src)
-{
-       ENSURE_GUI_THREAD(bind (mem_fun(*this, &GenericPluginUI::redirect_active_changed), r, src));
-       
-       bypass_button.set_active (!r->active());
-}
-
 bool
 GenericPluginUI::start_updating (GdkEventAny* ignored)
 {
@@ -766,7 +765,9 @@ GenericPluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
 {
        vector<string> enums;
        boost::shared_ptr<LadspaPlugin> lp;
+#ifdef HAVE_LV2
        boost::shared_ptr<LV2Plugin> lv2p;
+#endif
 
        if ((lp = boost::dynamic_pointer_cast<LadspaPlugin>(plugin)) != 0) {
                // all LADPSA plugins have a numeric unique ID
@@ -786,6 +787,7 @@ GenericPluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
                        lrdf_free_setting_values(defaults);
                }
 
+#ifdef HAVE_LV2
        } else if ((lv2p = boost::dynamic_pointer_cast<LV2Plugin>(plugin)) != 0) {
 
                SLV2Port port = lv2p->slv2_port(port_index);
@@ -806,6 +808,7 @@ GenericPluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
                }
 
                slv2_scale_points_free(points);
+#endif
        }