Rename the route in a route template when renaming the template
[ardour.git] / gtk2_ardour / plugin_selector.cc
index 7b8e2b4ace071a75e70b18cdd8d4a24130a794b4..0a609eb9cda85bcf3834d45b7bc49bc508c69d69 100644 (file)
 
 #include <algorithm>
 
-#include <gtkmm/table.h>
-#include <gtkmm/stock.h>
 #include <gtkmm/button.h>
+#include <gtkmm/comboboxtext.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/messagedialog.h>
 #include <gtkmm/notebook.h>
+#include <gtkmm/stock.h>
+#include <gtkmm/table.h>
 
-#include <gtkmm2ext/utils.h>
-
+#include "gtkmm2ext/utils.h"
 #include "pbd/convert.h"
+#include "widgets/tooltips.h"
 
 #include "ardour/plugin_manager.h"
 #include "ardour/plugin.h"
@@ -40,7 +43,6 @@
 
 #include "plugin_selector.h"
 #include "gui_thread.h"
-#include "tooltips.h"
 
 #include "pbd/i18n.h"
 
@@ -48,7 +50,7 @@ using namespace ARDOUR;
 using namespace PBD;
 using namespace Gtk;
 using namespace std;
-using namespace ARDOUR_UI_UTILS;
+using namespace ArdourWidgets;
 
 static const char* _filter_mode_strings[] = {
        N_("Name contains"),
@@ -620,14 +622,14 @@ PluginSelector::run ()
                                PluginPtr p = load_plugin (pp);
                                if (p) {
                                        plugins.push_back (p);
-                                } else {
-                                        MessageDialog msg (string_compose (_("The plugin \"%1\" could not be loaded\n\nSee the Log window for more details (maybe)"), pp->name));
-                                        msg.run ();
-                                }
+                               } else {
+                                       MessageDialog msg (string_compose (_("The plugin \"%1\" could not be loaded\n\nSee the Log window for more details (maybe)"), pp->name));
+                                       msg.run ();
+                               }
                        }
                        if (interested_object && !plugins.empty()) {
                                finish = !interested_object->use_plugins (plugins);
-                        }
+                       }
 
                        break;
 
@@ -689,57 +691,57 @@ PluginSelector::on_show ()
 }
 
 struct PluginMenuCompareByCreator {
-    bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
-           int cmp;
-
-           cmp = cmp_nocase_utf8 (a->creator, b->creator);
-
-           if (cmp < 0) {
-                   return true;
-           } else if (cmp == 0) {
-                   /* same creator ... compare names */
-                   if (cmp_nocase_utf8 (a->name, b->name) < 0) {
-                           return true;
-                   }
-           }
-           return false;
-    }
+       bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
+               int cmp;
+
+               cmp = cmp_nocase_utf8 (a->creator, b->creator);
+
+               if (cmp < 0) {
+                       return true;
+               } else if (cmp == 0) {
+                       /* same creator ... compare names */
+                       if (cmp_nocase_utf8 (a->name, b->name) < 0) {
+                               return true;
+                       }
+               }
+               return false;
+       }
 };
 
 struct PluginMenuCompareByName {
-    bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
-           int cmp;
-
-           cmp = cmp_nocase_utf8 (a->name, b->name);
-
-           if (cmp < 0) {
-                   return true;
-           } else if (cmp == 0) {
-                   /* same name ... compare type */
-                   if (a->type < b->type) {
-                           return true;
-                   }
-           }
-           return false;
-    }
+       bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
+               int cmp;
+
+               cmp = cmp_nocase_utf8 (a->name, b->name);
+
+               if (cmp < 0) {
+                       return true;
+               } else if (cmp == 0) {
+                       /* same name ... compare type */
+                       if (a->type < b->type) {
+                               return true;
+                       }
+               }
+               return false;
+       }
 };
 
 struct PluginMenuCompareByCategory {
-    bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
-           int cmp;
-
-           cmp = cmp_nocase_utf8 (a->category, b->category);
-
-           if (cmp < 0) {
-                   return true;
-           } else if (cmp == 0) {
-                   /* same category ... compare names */
-                   if (cmp_nocase_utf8 (a->name, b->name) < 0) {
-                           return true;
-                   }
-           }
-           return false;
-    }
+       bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
+               int cmp;
+
+               cmp = cmp_nocase_utf8 (a->category, b->category);
+
+               if (cmp < 0) {
+                       return true;
+               } else if (cmp == 0) {
+                       /* same category ... compare names */
+                       if (cmp_nocase_utf8 (a->name, b->name) < 0) {
+                               return true;
+                       }
+               }
+               return false;
+       }
 };
 
 /** @return Plugin menu. The caller should not delete it */