fix some layering/display problems with AU GUIs (requires new patches for GDK/Quartz)
[ardour.git] / gtk2_ardour / redirect_box.cc
index f3193d6924b13bc03bea8ce45cd7bc974d8e93bc..bc2d1e63414f812fe3314edcd6541e7c6c0ff49d 100644 (file)
@@ -402,6 +402,7 @@ RedirectBox::insert_plugin_chosen (boost::shared_ptr<Plugin> plugin)
                if (_route->add_redirect (redirect, this, &err_streams)) {
                        weird_plugin_dialog (*plugin, err_streams, _route);
                } else {
+                       redirect->set_active (true, 0);
                        redirect->active_changed.connect (bind (mem_fun (*this, &RedirectBox::show_redirect_active_r), boost::weak_ptr<Redirect>(redirect)));
                }
        }
@@ -415,7 +416,7 @@ RedirectBox::weird_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr
 
        /* i hate this kind of code */
 
-       if (streams > p.get_info()->n_inputs) {
+       if (streams > (unsigned)p.get_info()->n_inputs) {
                label.set_text (string_compose (_(
 "You attempted to add a plugin (%1).\n"
 "The plugin has %2 inputs\n"
@@ -427,7 +428,7 @@ RedirectBox::weird_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr
                                         p.name(),
                                         p.get_info()->n_inputs,
                                         streams));
-       } else if (streams < p.get_info()->n_inputs) {
+       } else if (streams < (unsigned)p.get_info()->n_inputs) {
                label.set_text (string_compose (_(
 "You attempted to add a plugin (%1).\n"
 "The plugin has %2 inputs\n"
@@ -1089,12 +1090,6 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
                                
                                plugin_ui = new PluginUIWindow (plugin_insert);
                                
-                               if (_owner_is_mixer) {
-                                       ARDOUR_UI::instance()->the_mixer()->ensure_float (*plugin_ui);
-                               } else {
-                                       ARDOUR_UI::instance()->the_editor().ensure_float (*plugin_ui);
-                               }
-                               
                                WindowTitle title(Glib::get_application_name());
                                title += generate_redirect_title (plugin_insert);
                                plugin_ui->set_title (title.get_string());
@@ -1379,7 +1374,7 @@ RedirectBox::route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::we
 string 
 RedirectBox::generate_redirect_title (boost::shared_ptr<PluginInsert> pi)
 {
-       string maker = pi->plugin()->maker();
+       string maker = pi->plugin()->maker() ? pi->plugin()->maker() : "";
        string::size_type email_pos;
 
        if ((email_pos = maker.find_first_of ('<')) != string::npos) {