Remove use of invalidated iterator (#4826).
[ardour.git] / gtk2_ardour / plugin_ui.cc
index c71fd1980d2525bfb9f5f8f33a4f4eb10ed97461..b4a412aa3f6e60ec5ffdb1c1ded371ebee9efd90 100644 (file)
@@ -156,14 +156,10 @@ PluginUIWindow::PluginUIWindow (
 
        if (scrollable) {
                if (h > 600) h = 600;
-               if (w > 600) w = 600;
-
-               if (w < 0) {
-                       w = 450;
-               }
        }
 
        set_default_size (w, h);
+       set_resizable (_pluginui->resizable());
 }
 
 PluginUIWindow::~PluginUIWindow ()
@@ -313,13 +309,13 @@ PluginUIWindow::create_lxvst_editor(boost::shared_ptr<PluginInsert>)
 }
 
 bool
-#ifdef GTKOSX
+#ifdef AUDIOUNIT_SUPPORT
 PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert> insert)
 #else
 PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert>)
 #endif
 {
-#ifndef GTKOSX
+#ifndef AUDIOUNIT_SUPPORT
        return false;
 #else
        VBox* box;
@@ -340,7 +336,7 @@ PluginUIWindow::app_activated (bool yn)
 PluginUIWindow::app_activated (bool)
 #endif
 {
-#ifdef GTKOSX
+#ifdef AUDIOUNIT_SUPPORT
        if (_pluginui) {
                if (yn) {
                        if (was_visible) {
@@ -486,13 +482,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
 
        bypass_button.set_name ("plugin bypass button");
        bypass_button.set_text (_("Bypass"));
-
-       if (!pi->active()) {
-               bypass_button.set_active_state (Gtkmm2ext::Active);
-       } else {
-               bypass_button.unset_active_state ();
-       }
-
+       bypass_button.set_active (!pi->active());
        bypass_button.signal_button_release_event().connect (sigc::mem_fun(*this, &PlugUIBase::bypass_button_release));
        focus_button.add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
 
@@ -572,11 +562,7 @@ PlugUIBase::processor_active_changed (boost::weak_ptr<Processor> weak_p)
        boost::shared_ptr<Processor> p (weak_p.lock());
 
        if (p) {
-               if (!p->active()) {
-                       bypass_button.set_active_state (Gtkmm2ext::Active);
-               } else {
-                       bypass_button.unset_active_state ();
-               }
+               bypass_button.set_active (!p->active());
        }
 }