+/*
+ * 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"
#import <AudioUnit/AUCocoaUIView.h>
#import <CoreAudioKit/AUGenericView.h>
#import <objc/runtime.h>
+
+#ifndef __ppc__
#include <dispatch/dispatch.h>
+#endif
#undef Marker
#include "keyboard.h"
#include "utils.h"
#include "public_editor.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
#include "gtk2ardour-config.h"
* certainly be possible to make it work for Ardour.
*/
-static IMP original_nsview_drawIfNeeded;
-static std::vector<id> plugin_views;
static uint32_t block_plugin_redraws = 0;
static const uint32_t minimum_redraw_rate = 30; /* frames per second */
static const uint32_t block_plugin_redraw_count = 15; /* number of combined plugin redraws to block, if blocking */
+#ifdef __ppc__
+
+/* PowerPC versions of OS X do not support libdispatch, which we use below when swizzling objective C. But they also don't have Retina
+ * which is the underlying reason for this code. So just skip it on those CPUs.
+ */
+
+
+static void add_plugin_view (id view) {}
+static void remove_plugin_view (id view) {}
+
+#else
+
+static IMP original_nsview_drawIfNeeded;
+static std::vector<id> plugin_views;
+
static void add_plugin_view (id view)
{
if (plugin_views.empty()) {
@end
+#endif /* __ppc__ */
+
/* END OF THE PLUGIN REDRAW HACK */
@implementation NotificationObject
HBox* smaller_hbox = manage (new HBox);
smaller_hbox->set_spacing (6);
+ smaller_hbox->pack_start (pin_management_button, false, false, 4);
smaller_hbox->pack_start (preset_label, false, false, 4);
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);