summaryrefslogtreecommitdiff
path: root/gtk2_ardour/au_pluginui.mm
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-07-13 00:26:28 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-07-13 00:26:28 +0000
commit88beef2e93d26d28467fe151f5ef2972d0ca9169 (patch)
treeca2460f7e8fa7dd87d2ba79301d8aa8fc7314479 /gtk2_ardour/au_pluginui.mm
parent402cc384ced6cb152c8abe4294009fe0de0a6dea (diff)
merge pre- and post-fader processor boxes; start removing Placement (not finished) ; add -DWAF_BUILD and use per-directory foobar-config.h to correctly pick up configure-time settings like HAVE_OGG ; check for libgiomm (part of upgrade to newer gtk stack); 32 bit marker reload fix from 2.X; audiounit IO config cache fix from 2.X; multi-add route template fix from 2.X; plugin GUI delete fix from 2.X; solo button labels are A or P for listen mode
git-svn-id: svn://localhost/ardour2/branches/3.0@5344 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/au_pluginui.mm')
-rw-r--r--gtk2_ardour/au_pluginui.mm49
1 files changed, 9 insertions, 40 deletions
diff --git a/gtk2_ardour/au_pluginui.mm b/gtk2_ardour/au_pluginui.mm
index a46021f66f..248f9d62dd 100644
--- a/gtk2_ardour/au_pluginui.mm
+++ b/gtk2_ardour/au_pluginui.mm
@@ -129,8 +129,12 @@ AUPluginUI::~AUPluginUI ()
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];
}
}
@@ -284,46 +288,11 @@ AUPluginUI::create_cocoa_view ()
[(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;