mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-22 11:21:29 +00:00
Fix methods calling according to the changes in build and run panels
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@16609 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cc32102067
commit
f0eaa2048a
1 changed files with 47 additions and 8 deletions
|
@ -82,11 +82,12 @@
|
||||||
NSPanel *panel;
|
NSPanel *panel;
|
||||||
NSRect panelFrame;
|
NSRect panelFrame;
|
||||||
|
|
||||||
panel = [projectBuilder buildPanelCreate: YES];
|
panel = [projectBuilder createBuildPanel];
|
||||||
panelFrame = [NSPanel contentRectForFrameRect: [panel frame]
|
panelFrame = [NSPanel contentRectForFrameRect: [panel frame]
|
||||||
styleMask: [panel styleMask]];
|
styleMask: [panel styleMask]];
|
||||||
panelFrame.origin.x = 8;
|
panelFrame.origin.x = 8;
|
||||||
panelFrame.origin.y = -2;
|
panelFrame.origin.y = -2;
|
||||||
|
panelFrame.size.height += 2;
|
||||||
panelFrame.size.width -= 16;
|
panelFrame.size.width -= 16;
|
||||||
[view setFrame: panelFrame];
|
[view setFrame: panelFrame];
|
||||||
|
|
||||||
|
@ -99,7 +100,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSPanel *panel = [projectBuilder buildPanelCreate: NO];
|
NSPanel *panel = [projectBuilder buildPanel];
|
||||||
|
|
||||||
if (panel)
|
if (panel)
|
||||||
{
|
{
|
||||||
|
@ -113,19 +114,57 @@
|
||||||
- (void)showRunView:(id)sender
|
- (void)showRunView:(id)sender
|
||||||
{
|
{
|
||||||
NSView *view = nil;
|
NSView *view = nil;
|
||||||
|
BOOL separate = NO;
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:PCEditorDidResignKeyNotification object:self];
|
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
|
||||||
|
objectForKey: SeparateLauncher] isEqualToString: @"YES"])
|
||||||
|
{
|
||||||
|
separate = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName: PCEditorDidResignKeyNotification
|
||||||
|
object: self];
|
||||||
|
|
||||||
editorIsActive = NO;
|
editorIsActive = NO;
|
||||||
|
|
||||||
if (!projectDebugger) {
|
if (!projectDebugger)
|
||||||
|
{
|
||||||
projectDebugger = [[PCProjectDebugger alloc] initWithProject:self];
|
projectDebugger = [[PCProjectDebugger alloc] initWithProject:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
view = [[projectDebugger componentView] retain];
|
view = [[projectDebugger componentView] retain];
|
||||||
|
|
||||||
[box setContentView:view];
|
if (separate)
|
||||||
|
{
|
||||||
|
NSPanel *panel = [projectDebugger createLaunchPanel];;
|
||||||
|
NSRect frame = [NSPanel contentRectForFrameRect: [panel frame]
|
||||||
|
styleMask: [panel styleMask]];
|
||||||
|
|
||||||
|
frame.origin.x = 8;
|
||||||
|
frame.origin.y = -2;
|
||||||
|
frame.size.height += 2;
|
||||||
|
frame.size.width -= 16;
|
||||||
|
[view setFrame: frame];
|
||||||
|
|
||||||
|
if ([box contentView] == view)
|
||||||
|
{
|
||||||
|
[self showEditorView: self];
|
||||||
|
}
|
||||||
|
[[panel contentView] addSubview: view];
|
||||||
|
[panel orderFront: nil];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSPanel *panel = [projectDebugger launchPanel];
|
||||||
|
|
||||||
|
if (panel)
|
||||||
|
{
|
||||||
|
[panel close];
|
||||||
|
}
|
||||||
|
[box setContentView: view];
|
||||||
[box display];
|
[box display];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)showEditorView:(id)sender
|
- (void)showEditorView:(id)sender
|
||||||
|
|
Loading…
Reference in a new issue