mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-20 18:32:17 +00:00
Removed unneeded buttons, added a title to the remaining ones and introduced
a splitview between the project browser and component view. In the build view a popup button is now used for build targets. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@12225 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4b984a8357
commit
5adf8da156
4 changed files with 164 additions and 135 deletions
|
@ -51,6 +51,7 @@
|
||||||
NSButtonCell* buttonCell = [[[NSButtonCell alloc] init] autorelease];
|
NSButtonCell* buttonCell = [[[NSButtonCell alloc] init] autorelease];
|
||||||
id textField;
|
id textField;
|
||||||
id button;
|
id button;
|
||||||
|
NSSplitView *split;
|
||||||
|
|
||||||
browserController = [[PCBrowserController alloc] init];
|
browserController = [[PCBrowserController alloc] init];
|
||||||
|
|
||||||
|
@ -67,18 +68,20 @@
|
||||||
[projectWindow setDelegate:self];
|
[projectWindow setDelegate:self];
|
||||||
[projectWindow setMinSize:NSMakeSize(560,448)];
|
[projectWindow setMinSize:NSMakeSize(560,448)];
|
||||||
|
|
||||||
browser = [[NSBrowser alloc] initWithFrame:NSMakeRect(8,251,544,128)];
|
browser = [[NSBrowser alloc] initWithFrame:NSMakeRect(-1,251,562,128)];
|
||||||
[browser setDelegate:browserController];
|
[browser setDelegate:browserController];
|
||||||
[browser setMaxVisibleColumns:3];
|
[browser setMaxVisibleColumns:3];
|
||||||
[browser setAllowsMultipleSelection:NO];
|
[browser setAllowsMultipleSelection:NO];
|
||||||
[browser setAutoresizingMask: NSViewWidthSizable | NSViewMinYMargin];
|
[browser setAutoresizingMask: NSViewWidthSizable | NSViewMinYMargin];
|
||||||
|
|
||||||
[browserController setBrowser:browser];
|
[browserController setBrowser:browser];
|
||||||
|
_w_frame.size.height -= 64;
|
||||||
[browserController setProject:self];
|
[browserController setProject:self];
|
||||||
|
|
||||||
box = [[NSBox alloc] initWithFrame:NSMakeRect (0,-1,560,252)];
|
box = [[NSBox alloc] initWithFrame:NSMakeRect (-1,-1,562,252)];
|
||||||
[box setTitlePosition:NSNoTitle];
|
[box setTitlePosition:NSNoTitle];
|
||||||
[box setBorderType:NSNoBorder];
|
[box setBorderType:NSNoBorder];
|
||||||
|
[box setContentViewMargins: NSMakeSize(0.0,0.0)];
|
||||||
[box setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
[box setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
|
||||||
|
|
||||||
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(16,200,500,21)];
|
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(16,200,500,21)];
|
||||||
|
@ -97,13 +100,27 @@
|
||||||
[textField setEditable: NO];
|
[textField setEditable: NO];
|
||||||
[textField setBezeled: NO];
|
[textField setBezeled: NO];
|
||||||
[textField setDrawsBackground: NO];
|
[textField setDrawsBackground: NO];
|
||||||
[textField setStringValue:@"\tPlease report all bugs or other issues you don't like to phr@3dkit.org!"];
|
[textField setStringValue:@"\tPlease send your feedback to phr@3dkit.org!"];
|
||||||
[box addSubview:textField];
|
[box addSubview:textField];
|
||||||
RELEASE(textField);
|
RELEASE(textField);
|
||||||
|
|
||||||
|
_w_frame = [[projectWindow contentView] frame];
|
||||||
|
_w_frame.size.height -= 76;
|
||||||
|
_w_frame.size.width -= 16;
|
||||||
|
_w_frame.origin.x += 8;
|
||||||
|
split = [[NSSplitView alloc] initWithFrame:_w_frame];
|
||||||
|
[split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
|
||||||
|
|
||||||
_c_view = [projectWindow contentView];
|
_c_view = [projectWindow contentView];
|
||||||
[_c_view addSubview:browser];
|
|
||||||
[_c_view addSubview:box];
|
//[_c_view addSubview:browser];
|
||||||
|
//[_c_view addSubview:box];
|
||||||
|
|
||||||
|
[split addSubview:browser];
|
||||||
|
[split addSubview:box];
|
||||||
|
[split adjustSubviews];
|
||||||
|
[_c_view addSubview:split];
|
||||||
|
RELEASE(split);
|
||||||
|
|
||||||
RELEASE(browser);
|
RELEASE(browser);
|
||||||
|
|
||||||
|
@ -111,12 +128,12 @@
|
||||||
* Left button matrix
|
* Left button matrix
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_w_frame = NSMakeRect(8,388,330,48);
|
_w_frame = NSMakeRect(8,376,240,60);
|
||||||
matrix = [[NSMatrix alloc] initWithFrame: _w_frame
|
matrix = [[NSMatrix alloc] initWithFrame: _w_frame
|
||||||
mode: NSHighlightModeMatrix
|
mode: NSHighlightModeMatrix
|
||||||
prototype: buttonCell
|
prototype: buttonCell
|
||||||
numberOfRows: 1
|
numberOfRows: 1
|
||||||
numberOfColumns: 7];
|
numberOfColumns: 4];
|
||||||
[matrix sizeToCells];
|
[matrix sizeToCells];
|
||||||
[matrix setTarget:self];
|
[matrix setTarget:self];
|
||||||
[matrix setAction:@selector(topButtonsPressed:)];
|
[matrix setAction:@selector(topButtonsPressed:)];
|
||||||
|
@ -127,46 +144,32 @@
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:0];
|
button = [matrix cellAtRow:0 column:0];
|
||||||
[button setTag:0];
|
[button setTag:0];
|
||||||
[button setImagePosition:NSImageOnly];
|
[button setImagePosition:NSImageAbove];
|
||||||
|
[button setTitle:@"Build"];
|
||||||
[button setImage:IMAGE(@"ProjectCentre_build")];
|
[button setImage:IMAGE(@"ProjectCentre_build")];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[button setButtonType:NSMomentaryPushButton];
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:1];
|
button = [matrix cellAtRow:0 column:1];
|
||||||
[button setTag:1];
|
[button setTag:1];
|
||||||
[button setImagePosition:NSImageOnly];
|
[button setImagePosition:NSImageAbove];
|
||||||
|
[button setTitle:@"Settings"];
|
||||||
[button setImage:IMAGE(@"ProjectCentre_settings.tiff")];
|
[button setImage:IMAGE(@"ProjectCentre_settings.tiff")];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[button setButtonType:NSMomentaryPushButton];
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:2];
|
button = [matrix cellAtRow:0 column:2];
|
||||||
[button setTag:2];
|
[button setTag:2];
|
||||||
[button setImagePosition:NSImageOnly];
|
[button setImagePosition:NSImageAbove];
|
||||||
|
[button setTitle:@"Options"];
|
||||||
[button setImage:IMAGE(@"ProjectCentre_prefs.tiff")];
|
[button setImage:IMAGE(@"ProjectCentre_prefs.tiff")];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[button setButtonType:NSMomentaryPushButton];
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:3];
|
button = [matrix cellAtRow:0 column:3];
|
||||||
[button setTag:3];
|
[button setTag:3];
|
||||||
[button setImagePosition:NSImageOnly];
|
[button setImagePosition:NSImageAbove];
|
||||||
|
[button setTitle:@"Run"];
|
||||||
[button setImage:IMAGE(@"ProjectCentre_run.tiff")];
|
[button setImage:IMAGE(@"ProjectCentre_run.tiff")];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[button setButtonType:NSMomentaryPushButton];
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:4];
|
|
||||||
[button setTag:4];
|
|
||||||
[button setImagePosition:NSImageOnly];
|
|
||||||
[button setImage:IMAGE(@"ProjectCentre_uml.tiff")];
|
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:5];
|
|
||||||
[button setTag:5];
|
|
||||||
[button setImagePosition:NSImageOnly];
|
|
||||||
[button setImage:IMAGE(@"ProjectCentre_documentation.tiff")];
|
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:6];
|
|
||||||
[button setTag:6];
|
|
||||||
[button setImagePosition:NSImageOnly];
|
|
||||||
[button setImage:IMAGE(@"ProjectCentre_find.tiff")];
|
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Build Options Panel
|
* Build Options Panel
|
||||||
*
|
*
|
||||||
|
@ -1109,6 +1112,7 @@
|
||||||
view = [[projectBuilder componentView] retain];
|
view = [[projectBuilder componentView] retain];
|
||||||
|
|
||||||
[box setContentView:view];
|
[box setContentView:view];
|
||||||
|
[box sizeToFit];
|
||||||
[box display];
|
[box display];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
@interface PCProjectBuilder : NSObject
|
@interface PCProjectBuilder : NSObject
|
||||||
{
|
{
|
||||||
NSBox *componentView;
|
NSBox *componentView;
|
||||||
|
NSPopUpButton *popup;
|
||||||
|
|
||||||
NSTextView *logOutput;
|
NSTextView *logOutput;
|
||||||
NSTextView *errorOutput;
|
NSTextView *errorOutput;
|
||||||
|
@ -53,6 +54,7 @@
|
||||||
- (NSView *)componentView;
|
- (NSView *)componentView;
|
||||||
|
|
||||||
- (void)build:(id)sender;
|
- (void)build:(id)sender;
|
||||||
|
- (void)popupChanged:(id)sender;
|
||||||
|
|
||||||
- (void)logStdOut:(NSNotification *)aNotif;
|
- (void)logStdOut:(NSNotification *)aNotif;
|
||||||
- (void)logErrOut:(NSNotification *)aNotif;
|
- (void)logErrOut:(NSNotification *)aNotif;
|
||||||
|
|
|
@ -56,18 +56,20 @@
|
||||||
NSMatrix* matrix;
|
NSMatrix* matrix;
|
||||||
NSRect _w_frame;
|
NSRect _w_frame;
|
||||||
NSButtonCell* buttonCell = [[[NSButtonCell alloc] init] autorelease];
|
NSButtonCell* buttonCell = [[[NSButtonCell alloc] init] autorelease];
|
||||||
|
NSBox *box;
|
||||||
id button;
|
id button;
|
||||||
id textField;
|
id textField;
|
||||||
|
|
||||||
componentView = [[NSBox alloc] initWithFrame:NSMakeRect(0,0,544,248)];
|
componentView = [[NSBox alloc] initWithFrame:NSMakeRect(-1,-1,562,248)];
|
||||||
[componentView setTitlePosition:NSNoTitle];
|
[componentView setTitlePosition:NSNoTitle];
|
||||||
[componentView setBorderType:NSNoBorder];
|
[componentView setBorderType:NSNoBorder];
|
||||||
[componentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
[componentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||||
|
[componentView setContentViewMargins: NSMakeSize(0.0,0.0)];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scrollView1 = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,540,46)];
|
scrollView1 = [[NSScrollView alloc] initWithFrame:NSMakeRect (-1,0,562,46)];
|
||||||
|
|
||||||
[scrollView1 setHasHorizontalScroller: NO];
|
[scrollView1 setHasHorizontalScroller: NO];
|
||||||
[scrollView1 setHasVerticalScroller: YES];
|
[scrollView1 setHasVerticalScroller: YES];
|
||||||
|
@ -97,7 +99,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scrollView2 = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,540,92)];
|
scrollView2 = [[NSScrollView alloc] initWithFrame:NSMakeRect (-1,0,562,92)];
|
||||||
|
|
||||||
[scrollView2 setHasHorizontalScroller:NO];
|
[scrollView2 setHasHorizontalScroller:NO];
|
||||||
[scrollView2 setHasVerticalScroller:YES];
|
[scrollView2 setHasVerticalScroller:YES];
|
||||||
|
@ -123,7 +125,7 @@
|
||||||
|
|
||||||
[scrollView2 setDocumentView:errorOutput];
|
[scrollView2 setDocumentView:errorOutput];
|
||||||
|
|
||||||
split = [[NSSplitView alloc] initWithFrame:NSMakeRect(0,0,540,188)];
|
split = [[NSSplitView alloc] initWithFrame:NSMakeRect(-1,-1,562,152)];
|
||||||
[split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
|
[split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
|
||||||
[split addSubview: scrollView1];
|
[split addSubview: scrollView1];
|
||||||
[split addSubview: scrollView2];
|
[split addSubview: scrollView2];
|
||||||
|
@ -136,15 +138,15 @@
|
||||||
RELEASE(split);
|
RELEASE(split);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 6 build Buttons
|
* 2 build Buttons
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_w_frame = NSMakeRect(0,194,318,44);
|
_w_frame = NSMakeRect(-1,160,120,60);
|
||||||
matrix = [[NSMatrix alloc] initWithFrame: _w_frame
|
matrix = [[NSMatrix alloc] initWithFrame: _w_frame
|
||||||
mode: NSHighlightModeMatrix
|
mode: NSHighlightModeMatrix
|
||||||
prototype: buttonCell
|
prototype: buttonCell
|
||||||
numberOfRows:1
|
numberOfRows:1
|
||||||
numberOfColumns:7];
|
numberOfColumns:2];
|
||||||
[matrix sizeToCells];
|
[matrix sizeToCells];
|
||||||
[matrix setSelectionByRect:YES];
|
[matrix setSelectionByRect:YES];
|
||||||
[matrix setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
|
[matrix setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
|
||||||
|
@ -156,58 +158,42 @@
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:0];
|
button = [matrix cellAtRow:0 column:0];
|
||||||
[button setTag:0];
|
[button setTag:0];
|
||||||
[button setImagePosition:NSImageOnly];
|
[button setImagePosition:NSImageAbove];
|
||||||
[button setImage:IMAGE(@"ProjectCenter_make")];
|
[button setImage:IMAGE(@"ProjectCenter_make")];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[button setButtonType:NSMomentaryPushButton];
|
||||||
[button setTitle:@"Build"];
|
[button setTitle:@"Build"];
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:1];
|
button = [matrix cellAtRow:0 column:1];
|
||||||
[button setTag:1];
|
[button setTag:1];
|
||||||
[button setImagePosition:NSImageOnly];
|
[button setImagePosition:NSImageAbove];
|
||||||
[button setImage:IMAGE(@"ProjectCenter_clean")];
|
[button setImage:IMAGE(@"ProjectCenter_clean")];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[button setButtonType:NSMomentaryPushButton];
|
||||||
[button setTitle:@"Clean"];
|
[button setTitle:@"Clean"];
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:2];
|
box = [[NSBox alloc] initWithFrame:NSMakeRect(128,160,204,60)];
|
||||||
[button setTag:2];
|
[box setTitle:@"Build Target"];
|
||||||
[button setImagePosition:NSImageOnly];
|
[box setBorderType:NSBezelBorder];
|
||||||
[button setImage:IMAGE(@"ProjectCenter_debug")];
|
[box setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[componentView addSubview:box];
|
||||||
[button setTitle:@"Debug"];
|
RELEASE(box);
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:3];
|
popup = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(8,6,172,21)];
|
||||||
[button setTag:3];
|
[popup addItemWithTitle:@"Default"];
|
||||||
[button setImagePosition:NSImageOnly];
|
[popup addItemWithTitle:@"Debug"];
|
||||||
[button setImage:IMAGE(@"ProjectCenter_profile")];
|
[popup addItemWithTitle:@"Profile"];
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
[popup addItemWithTitle:@"Install"];
|
||||||
[button setTitle:@"Profile"];
|
[popup addItemWithTitle:@"Tarball"];
|
||||||
|
[popup addItemWithTitle:@"RPM"];
|
||||||
button = [matrix cellAtRow:0 column:4];
|
[popup setTarget:self];
|
||||||
[button setTag:4];
|
[popup setAction:@selector(popupChanged:)];
|
||||||
[button setImagePosition:NSImageOnly];
|
[box addSubview:popup];
|
||||||
[button setImage:IMAGE(@"ProjectCenter_install")];
|
RELEASE(popup);
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
|
||||||
[button setTitle:@"Install"];
|
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:5];
|
|
||||||
[button setTag:5];
|
|
||||||
[button setImagePosition:NSImageOnly];
|
|
||||||
[button setImage:IMAGE(@"ProjectCenter_rpm")];
|
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
|
||||||
[button setTitle:@"Packaging"];
|
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:6];
|
|
||||||
[button setTag:6];
|
|
||||||
[button setImagePosition:NSImageOnly];
|
|
||||||
[button setImage:IMAGE(@"ProjectCenter_dist")];
|
|
||||||
[button setButtonType:NSMomentaryPushButton];
|
|
||||||
[button setTitle:@"Packaging"];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Status
|
* Status
|
||||||
*/
|
*/
|
||||||
|
|
||||||
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(334,220,48,15)];
|
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(334,192,48,15)];
|
||||||
[textField setAlignment: NSRightTextAlignment];
|
[textField setAlignment: NSRightTextAlignment];
|
||||||
[textField setBordered: NO];
|
[textField setBordered: NO];
|
||||||
[textField setEditable: NO];
|
[textField setEditable: NO];
|
||||||
|
@ -224,7 +210,7 @@
|
||||||
* Status message
|
* Status message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buildStatusField = [[NSTextField alloc] initWithFrame:NSMakeRect(386,220,104,15)];
|
buildStatusField = [[NSTextField alloc] initWithFrame:NSMakeRect(386,192,104,15)];
|
||||||
[buildStatusField setAlignment: NSLeftTextAlignment];
|
[buildStatusField setAlignment: NSLeftTextAlignment];
|
||||||
[buildStatusField setBordered: NO];
|
[buildStatusField setBordered: NO];
|
||||||
[buildStatusField setEditable: NO];
|
[buildStatusField setEditable: NO];
|
||||||
|
@ -242,7 +228,7 @@
|
||||||
* Target
|
* Target
|
||||||
*/
|
*/
|
||||||
|
|
||||||
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(334,196,48,15)];
|
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(334,172,48,15)];
|
||||||
[textField setAlignment: NSRightTextAlignment];
|
[textField setAlignment: NSRightTextAlignment];
|
||||||
[textField setBordered: NO];
|
[textField setBordered: NO];
|
||||||
[textField setBezeled: NO];
|
[textField setBezeled: NO];
|
||||||
|
@ -259,7 +245,7 @@
|
||||||
* Target message
|
* Target message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
targetField = [[NSTextField alloc] initWithFrame:NSMakeRect(386,196,104,15)];
|
targetField = [[NSTextField alloc] initWithFrame:NSMakeRect(386,172,104,15)];
|
||||||
[targetField setAlignment: NSLeftTextAlignment];
|
[targetField setAlignment: NSLeftTextAlignment];
|
||||||
[targetField setBordered: NO];
|
[targetField setBordered: NO];
|
||||||
[targetField setEditable: NO];
|
[targetField setEditable: NO];
|
||||||
|
@ -271,6 +257,7 @@
|
||||||
NSViewMinYMargin)];
|
NSViewMinYMargin)];
|
||||||
[componentView addSubview:targetField];
|
[componentView addSubview:targetField];
|
||||||
|
|
||||||
|
[componentView sizeToFit];
|
||||||
RELEASE(targetField);
|
RELEASE(targetField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +309,6 @@
|
||||||
NSPipe *errorPipe;
|
NSPipe *errorPipe;
|
||||||
NSDictionary *optionDict;
|
NSDictionary *optionDict;
|
||||||
NSString *status;
|
NSString *status;
|
||||||
NSString *target;
|
|
||||||
SEL postProcess = NULL;
|
SEL postProcess = NULL;
|
||||||
NSDictionary *env = [[NSProcessInfo processInfo] environment];
|
NSDictionary *env = [[NSProcessInfo processInfo] environment];
|
||||||
|
|
||||||
|
@ -347,64 +333,69 @@
|
||||||
optionDict = [currentProject buildOptions];
|
optionDict = [currentProject buildOptions];
|
||||||
args = [NSMutableArray array];
|
args = [NSMutableArray array];
|
||||||
|
|
||||||
switch ([[sender selectedCell] tag]) {
|
switch ([[sender selectedCell] tag])
|
||||||
case 0:
|
{
|
||||||
status = [NSString stringWithString:@"Building..."];
|
case 0:
|
||||||
target = [NSString stringWithString:@"Default"];
|
status = [NSString stringWithString:@"Building..."];
|
||||||
break;
|
switch( [popup indexOfSelectedItem] )
|
||||||
case 1:
|
{
|
||||||
if (NSRunAlertPanel(@"Clean Project?",@"Really clean %@?",@"Yes",@"No",nil,[currentProject projectName]) == NSAlertAlternateReturn) {
|
case 0:
|
||||||
return;
|
break;
|
||||||
}
|
|
||||||
status = [NSString stringWithString:@"Cleaning..."];
|
|
||||||
target = [NSString stringWithString:@"Clean"];
|
|
||||||
[args addObject:@"distclean"];
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
status = [NSString stringWithString:@"Building..."];
|
|
||||||
target = [NSString stringWithString:@"Debug"];
|
|
||||||
[args addObject:@"debug=yes"];
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
status = [NSString stringWithString:@"Building..."];
|
|
||||||
target = [NSString stringWithString:@"Profile"];
|
|
||||||
[args addObject:@"profile=yes"];
|
|
||||||
[args addObject:@"static=yes"];
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
status = [NSString stringWithString:@"Installing..."];
|
|
||||||
target = [NSString stringWithString:@"Install"];
|
|
||||||
[args addObject:@"install"];
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
status = [NSString stringWithString:@"Packaging..."];
|
|
||||||
target = [NSString stringWithString:@"Making RPM"];
|
|
||||||
[args addObject:@"rpm"];
|
|
||||||
postProcess = @selector(copyPackageTo:);
|
|
||||||
|
|
||||||
if ( [currentProject writeSpecFile] == NO )
|
case 1:
|
||||||
{
|
[args addObject:@"debug=yes"];
|
||||||
return;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if( [env objectForKey:@"RPM_TOPDIR"] == nil )
|
case 2:
|
||||||
{
|
[args addObject:@"profile=yes"];
|
||||||
NSRunAlertPanel(@"Attention!",
|
[args addObject:@"static=yes"];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
[args addObject:@"install"];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
[args addObject:@"dist"];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
[args addObject:@"rpm"];
|
||||||
|
postProcess = @selector(copyPackageTo:);
|
||||||
|
|
||||||
|
if ( [currentProject writeSpecFile] == NO )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( [env objectForKey:@"RPM_TOPDIR"] == nil )
|
||||||
|
{
|
||||||
|
NSRunAlertPanel(@"Attention!",
|
||||||
@"First set the environment variable 'RPM_TOPDIR'!",
|
@"First set the environment variable 'RPM_TOPDIR'!",
|
||||||
@"OK",nil,nil);
|
@"OK",nil,nil);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
break;
|
default:
|
||||||
case 6:
|
break;
|
||||||
status = [NSString stringWithString:@"Packaging..."];
|
}
|
||||||
target = [NSString stringWithString:@"Making TGZ"];
|
break;
|
||||||
[args addObject:@"dist"];
|
case 1:
|
||||||
break;
|
if (NSRunAlertPanel(@"Clean Project?",
|
||||||
|
@"Do you really want to clean project '%@'?",
|
||||||
|
@"Yes",
|
||||||
|
@"No",
|
||||||
|
nil,
|
||||||
|
[currentProject projectName]) == NSAlertAlternateReturn) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
status = [NSString stringWithString:@"Cleaning..."];
|
||||||
|
[args addObject:@"distclean"];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
[buildStatusField setStringValue:status];
|
[buildStatusField setStringValue:status];
|
||||||
[targetField setStringValue:target];
|
|
||||||
|
|
||||||
[NOTIFICATION_CENTER addObserver:self
|
[NOTIFICATION_CENTER addObserver:self
|
||||||
selector:@selector(logStdOut:)
|
selector:@selector(logStdOut:)
|
||||||
|
@ -443,7 +434,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
[buildStatusField setStringValue:@"Waiting..."];
|
[buildStatusField setStringValue:@"Waiting..."];
|
||||||
[targetField setStringValue:@""];
|
|
||||||
|
|
||||||
[NOTIFICATION_CENTER removeObserver:self
|
[NOTIFICATION_CENTER removeObserver:self
|
||||||
name:NSFileHandleDataAvailableNotification
|
name:NSFileHandleDataAvailableNotification
|
||||||
|
@ -462,6 +452,36 @@
|
||||||
AUTORELEASE(makeTask);
|
AUTORELEASE(makeTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)popupChanged:(id)sender
|
||||||
|
{
|
||||||
|
NSString *target = [targetField stringValue];
|
||||||
|
|
||||||
|
switch ([sender indexOfSelectedItem])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
target = [NSString stringWithString:@"Default"];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
target = [NSString stringWithString:@"Debug"];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
target = [NSString stringWithString:@"Profile"];
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
target = [NSString stringWithString:@"Install"];
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
target = [NSString stringWithString:@"Tarball"];
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
target = [NSString stringWithString:@"RPM"];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
[targetField setStringValue:target];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)logStdOut:(NSNotification *)aNotif
|
- (void)logStdOut:(NSNotification *)aNotif
|
||||||
{
|
{
|
||||||
NSData *data;
|
NSData *data;
|
||||||
|
|
|
@ -57,16 +57,17 @@
|
||||||
id button;
|
id button;
|
||||||
id textField;
|
id textField;
|
||||||
|
|
||||||
componentView = [[NSBox alloc] initWithFrame:NSMakeRect(0,0,544,248)];
|
componentView = [[NSBox alloc] initWithFrame:NSMakeRect(-1,-1,562,248)];
|
||||||
[componentView setTitlePosition:NSNoTitle];
|
[componentView setTitlePosition:NSNoTitle];
|
||||||
[componentView setBorderType:NSNoBorder];
|
[componentView setBorderType:NSNoBorder];
|
||||||
[componentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
[componentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
|
||||||
|
[componentView setContentViewMargins: NSMakeSize(0.0,0.0)];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scrollView1 = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,540,92)];
|
scrollView1 = [[NSScrollView alloc] initWithFrame:NSMakeRect (-1,0,562,40)];
|
||||||
|
|
||||||
[scrollView1 setHasHorizontalScroller: NO];
|
[scrollView1 setHasHorizontalScroller: NO];
|
||||||
[scrollView1 setHasVerticalScroller: YES];
|
[scrollView1 setHasVerticalScroller: YES];
|
||||||
|
@ -91,7 +92,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
scrollView2 = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,0,540,276)];
|
scrollView2 = [[NSScrollView alloc] initWithFrame:NSMakeRect (-1,0,562,92)];
|
||||||
|
|
||||||
[scrollView2 setHasHorizontalScroller:NO];
|
[scrollView2 setHasHorizontalScroller:NO];
|
||||||
[scrollView2 setHasVerticalScroller:YES];
|
[scrollView2 setHasVerticalScroller:YES];
|
||||||
|
@ -109,11 +110,10 @@
|
||||||
|
|
||||||
[scrollView2 setDocumentView:stdError];
|
[scrollView2 setDocumentView:stdError];
|
||||||
|
|
||||||
split = [[NSSplitView alloc] initWithFrame:NSMakeRect(0,0,540,188)];
|
split = [[NSSplitView alloc] initWithFrame:NSMakeRect(-1,-1,562,136)];
|
||||||
[split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
|
[split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
|
||||||
[split addSubview: scrollView1];
|
[split addSubview: scrollView1];
|
||||||
[split addSubview: scrollView2];
|
[split addSubview: scrollView2];
|
||||||
[split adjustSubviews];
|
|
||||||
|
|
||||||
[componentView addSubview:split];
|
[componentView addSubview:split];
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
/*
|
/*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_w_frame = NSMakeRect(0,194,88,44);
|
_w_frame = NSMakeRect(-1,144,120,60);
|
||||||
matrix = [[NSMatrix alloc] initWithFrame: _w_frame
|
matrix = [[NSMatrix alloc] initWithFrame: _w_frame
|
||||||
mode: NSHighlightModeMatrix
|
mode: NSHighlightModeMatrix
|
||||||
prototype: buttonCell
|
prototype: buttonCell
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
|
|
||||||
runButton = [matrix cellAtRow:0 column:0];
|
runButton = [matrix cellAtRow:0 column:0];
|
||||||
[runButton setTag:0];
|
[runButton setTag:0];
|
||||||
[runButton setImagePosition:NSImageOnly];
|
[runButton setImagePosition:NSImageAbove];
|
||||||
[runButton setImage:IMAGE(@"ProjectCentre_run")];
|
[runButton setImage:IMAGE(@"ProjectCentre_run")];
|
||||||
[runButton setAlternateImage:IMAGE(@"ProjectCentre_run")];
|
[runButton setAlternateImage:IMAGE(@"ProjectCentre_run")];
|
||||||
[runButton setButtonType:NSOnOffButton];
|
[runButton setButtonType:NSOnOffButton];
|
||||||
|
@ -149,12 +149,15 @@
|
||||||
|
|
||||||
button = [matrix cellAtRow:0 column:1];
|
button = [matrix cellAtRow:0 column:1];
|
||||||
[button setTag:1];
|
[button setTag:1];
|
||||||
[button setImagePosition:NSImageOnly];
|
[button setImagePosition:NSImageAbove];
|
||||||
[button setImage:IMAGE(@"ProjectCenter_debug")];
|
[button setImage:IMAGE(@"ProjectCenter_debug")];
|
||||||
[button setAlternateImage:IMAGE(@"ProjectCenter_debug")];
|
[button setAlternateImage:IMAGE(@"ProjectCenter_debug")];
|
||||||
[button setButtonType:NSOnOffButton];
|
[button setButtonType:NSOnOffButton];
|
||||||
[button setTitle:@"Clean"];
|
[button setTitle:@"Clean"];
|
||||||
[button setAction:@selector(debug:)];
|
[button setAction:@selector(debug:)];
|
||||||
|
|
||||||
|
[componentView sizeToFit];
|
||||||
|
[split adjustSubviews];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in a new issue