libraries['core'] = LibraryInfo (CCFLAGS = '-Ilibs')
-#libraries['sndfile'] = LibraryInfo()
-#libraries['sndfile'].ParseConfig('pkg-config --cflags --libs sndfile')
-
-libraries['lrdf'] = LibraryInfo()
-libraries['lrdf'].ParseConfig('pkg-config --cflags --libs lrdf')
-
-libraries['raptor'] = LibraryInfo()
-libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor')
-
-libraries['samplerate'] = LibraryInfo()
-libraries['samplerate'].ParseConfig('pkg-config --cflags --libs samplerate')
-
conf = env.Configure (custom_tests = { 'CheckPKGExists' : CheckPKGExists } )
if conf.CheckPKGExists ('fftw3f'):
libraries['xslt'] = LibraryInfo()
libraries['xslt'].ParseConfig('pkg-config --cflags --libs libxslt')
+libraries['lrdf'] = LibraryInfo()
+libraries['lrdf'].ParseConfig('pkg-config --cflags --libs lrdf')
+
+libraries['raptor'] = LibraryInfo()
+libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor')
+
+libraries['samplerate'] = LibraryInfo()
+libraries['samplerate'].ParseConfig('pkg-config --cflags --libs samplerate')
+
libraries['glib2'] = LibraryInfo()
libraries['glib2'].ParseConfig ('pkg-config --cflags --libs glib-2.0')
libraries['glib2'].ParseConfig ('pkg-config --cflags --libs gobject-2.0')
return;
}
- unload_session (true);
+ if (unload_session (true)) {
+ return;
+ }
get_session_parameters (true, false);
}
/* Cocoa */
NSWindow* cocoa_window;
- NSScrollView* scroll_view;
NSView* au_view;
/* Carbon */
DisposeWindow (carbon_window);
}
- if (packView && packView != au_view) {
- [packView release];
+ if (packView) {
+ /* remove whatever we packed into low_box so that GTK doesn't
+ mess with it.
+ */
+
+ [packView removeFromSuperview];
}
}
[(AUGenericView *)au_view setShowsExpertParameters:YES];
}
- NSRect packFrame;
+ packView = au_view;
// Get the size of the new AU View's frame
+
+ NSRect packFrame;
packFrame = [au_view frame];
-
- packFrame.origin.x = 0;
- packFrame.origin.y = 0;
-
- if (packFrame.size.width > 500 || packFrame.size.height > 500) {
-
- /* its too big - use a scrollview */
-
- NSRect frameRect = [[cocoa_window contentView] frame];
- scroll_view = [[[NSScrollView alloc] initWithFrame:frameRect] autorelease];
- [scroll_view setDrawsBackground:NO];
- [scroll_view setHasHorizontalScroller:YES];
- [scroll_view setHasVerticalScroller:YES];
-
- packFrame.size = [NSScrollView frameSizeForContentSize:packFrame.size
- hasHorizontalScroller:[scroll_view hasHorizontalScroller]
- hasVerticalScroller:[scroll_view hasVerticalScroller]
- borderType:[scroll_view borderType]];
-
- // Create a new frame with same origin as current
- // frame but size equal to the size of the new view
- NSRect newFrame;
- newFrame.origin = [scroll_view frame].origin;
- newFrame.size = packFrame.size;
-
- // Set the new frame and document views on the scroll view
- [scroll_view setFrame:newFrame];
- [scroll_view setDocumentView:au_view];
-
- packView = scroll_view;
-
- } else {
-
- packView = au_view;
- }
-
prefwidth = packFrame.size.width;
prefheight = packFrame.size.height;
packFrame = [au_view frame];
NSView* view = gdk_quartz_window_get_nsview (low_box.get_window()->gobj());
-
[view setFrame:packFrame];
[view addSubview:packView];
}
death_connection.disconnect ();
-
delete_when_idle (this);
}
ARDOUR_UI::instance()->set_tip (&focus_button, _("Click to allow the plugin to receive keyboard events that Ardour would normally use as a shortcut"), "");
ARDOUR_UI::instance()->set_tip (&bypass_button, _("Click to enable/disable this plugin"), "");
+
+ insert->GoingAway.connect (mem_fun (*this, &PlugUIBase::plugin_going_away));
}
PlugUIBase::~PlugUIBase ()
{
}
+void
+PlugUIBase::plugin_going_away ()
+{
+ /* drop references to the plugin/insert */
+ insert.reset ();
+ plugin.reset ();
+}
+
void
PlugUIBase::redirect_active_changed (Redirect* r, void* src)
{
bool focus_toggled(GdkEventButton*);
void bypass_toggled();
void redirect_active_changed (ARDOUR::Redirect* r, void* src);
+
+ void plugin_going_away ();
};
class GenericPluginUI : public PlugUIBase, public Gtk::VBox
}
}
+ if (plugcnt == 1) {
+ break;
+ }
+
}
- /* no fit */
return plugcnt;
}
if (cached_io_configuration (info->unique_id, info->version, cacomp, info->cache, info->name)) {
/* here we have to map apple's wildcard system to a simple pair
- of values.
+ of values. in ::can_do() we use the whole system, but here
+ we need a single pair of values. XXX probably means we should
+ remove any use of these values.
*/
info->n_inputs = info->cache.io_configs.front().first;
}
std::string id = prop->value();
-
+ AUPluginCachedInfo cinfo;
+
for (XMLNodeConstIterator giter = gchildren.begin(); giter != gchildren.end(); giter++) {
gchild = *giter;
in = atoi (iprop->value());
out = atoi (iprop->value());
- AUPluginCachedInfo cinfo;
cinfo.io_configs.push_back (pair<int,int> (in, out));
- add_cached_info (id, cinfo);
}
}
}
+
+ if (cinfo.io_configs.size()) {
+ add_cached_info (id, cinfo);
+ }
}
}