Reenable the correct sort column and type when redisplaying regions
[ardour.git] / gtk2_ardour / au_pluginui.mm
index fc73b9b74877c8b0a5229d450249aa2a8dab7007..d4003550b5cdf27f66054cf1822fec0f6e2df1b4 100644 (file)
@@ -1,8 +1,29 @@
+/*
+ * Copyright (C) 2008-2014 David Robillard <d@drobilla.net>
+ * Copyright (C) 2008-2016 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2014-2019 Robin Gareus <robin@gareus.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
 #undef  Marker
 #define Marker FuckYouAppleAndYourLackOfNameSpaces
 
 #include <sys/time.h>
 #include <gtkmm/button.h>
+#include <gtkmm/comboboxtext.h>
 #include <gdk/gdkquartz.h>
 
 #include "pbd/convert.h"
@@ -408,18 +429,19 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
        smaller_hbox->pack_start (_preset_modified, false, false);
        smaller_hbox->pack_start (_preset_combo, false, false);
        smaller_hbox->pack_start (add_button, false, false);
-#if 0
-       /* Ardour does not currently allow to overwrite existing presets
-        * see save_property_list() in audio_unit.cc
-        */
        smaller_hbox->pack_start (save_button, false, false);
-#endif
+       smaller_hbox->pack_start (delete_button, false, false);
+       if (has_descriptive_presets ()) {
+               smaller_hbox->pack_start (preset_browser_button, false, false);
+       }
 #if 0
        /* one day these might be useful with an AU plugin, but not yet */
        smaller_hbox->pack_start (automation_mode_label, false, false);
        smaller_hbox->pack_start (automation_mode_selector, false, false);
 #endif
-       smaller_hbox->pack_start (reset_button, false, false);
+       if (insert->controls().size() > 0) {
+               smaller_hbox->pack_start (reset_button, false, false);
+       }
        smaller_hbox->pack_start (bypass_button, false, true);
 
        VBox* v1_box = manage (new VBox);