+void
+RedirectBox::route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::weak_ptr<PluginInsert> wpi)
+{
+ ENSURE_GUI_THREAD(bind (mem_fun (*this, &RedirectBox::route_name_changed), src, plugin_ui, wpi));
+ boost::shared_ptr<PluginInsert> pi (wpi.lock());
+ if (pi) {
+ plugin_ui->set_title (generate_redirect_title (pi));
+ }
+}
+
+string
+RedirectBox::generate_redirect_title (boost::shared_ptr<PluginInsert> pi)
+{
+ string maker = pi->plugin()->maker();
+ string::size_type email_pos;
+
+ if ((email_pos = maker.find_first_of ('<')) != string::npos) {
+ maker = maker.substr (0, email_pos - 1);
+ }
+
+ if (maker.length() > 32) {
+ maker = maker.substr (0, 32);
+ maker += " ...";
+ }
+
+ return string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), pi->name(), maker);
+}
+