X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fau_pluginui.mm;h=00bbcbda1bc5f61ec7ce6a0b99792648617941bd;hb=9971e718fed4a1126d97bad69f2608638d5a5464;hp=7af4b8dd9785bcbf74a7daf62f78d0e1204ea193;hpb=bd461fe2023f7542006d74db2e17598340ebbeaf;p=ardour.git diff --git a/gtk2_ardour/au_pluginui.mm b/gtk2_ardour/au_pluginui.mm index 7af4b8dd97..00bbcbda1b 100644 --- a/gtk2_ardour/au_pluginui.mm +++ b/gtk2_ardour/au_pluginui.mm @@ -3,6 +3,7 @@ #include #include +#include #include #include "pbd/convert.h" @@ -37,14 +38,17 @@ #import #import #import + +#ifndef __ppc__ #include +#endif #undef Marker #include "keyboard.h" #include "utils.h" #include "public_editor.h" -#include "i18n.h" +#include "pbd/i18n.h" #include "gtk2ardour-config.h" @@ -206,12 +210,25 @@ dump_view_tree (NSView* view, int depth, int maxdepth) * certainly be possible to make it work for Ardour. */ -static IMP original_nsview_drawIfNeeded; -static std::vector 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 plugin_views; + static void add_plugin_view (id view) { if (plugin_views.empty()) { @@ -264,6 +281,8 @@ static void interposed_drawIfNeeded (id receiver, SEL selector, NSRect rect) @end +#endif /* __ppc__ */ + /* END OF THE PLUGIN REDRAW HACK */ @implementation NotificationObject @@ -385,6 +404,7 @@ AUPluginUI::AUPluginUI (boost::shared_ptr insert) 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); @@ -400,7 +420,9 @@ AUPluginUI::AUPluginUI (boost::shared_ptr insert) 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);