Add setLocation method, rename existing setLocation to setButtonClicked.

Subversion-branch: /launcher
Subversion-revision: 1758
This commit is contained in:
Simon Howard 2009-12-25 21:10:02 +00:00
parent 72a6aabd37
commit 8ed93836ae
4 changed files with 11 additions and 7 deletions

View file

@ -27,8 +27,9 @@
id locationConfigBox;
}
- (void) setLocation: (id)sender;
- (void) setButtonClicked: (id)sender;
- (NSString *) getLocation;
- (void) setLocation: (NSString *) value;
@end

View file

@ -30,11 +30,10 @@ static id WAD_TYPES[] =
@implementation IWADLocation
- (void) setLocation: (id)sender
- (void) setButtonClicked: (id)sender
{
NSArray *wadTypes = [NSArray arrayWithObjects: WAD_TYPES count: 2];
NSOpenPanel *openPanel;
NSString *filename;
NSArray *filenames;
int result;
@ -54,8 +53,7 @@ static id WAD_TYPES[] =
if (result == NSOKButton)
{
filenames = [openPanel filenames];
filename = [filenames lastObject];
[self->locationConfigBox setStringValue: filename];
[self setLocation: [filenames lastObject]];
}
}
@ -64,5 +62,10 @@ static id WAD_TYPES[] =
return [self->locationConfigBox stringValue];
}
- (void) setLocation: (NSString *) filename
{
[self->locationConfigBox setStringValue: filename];
}
@end

View file

@ -17,7 +17,7 @@
"openConfigWindow:",
"orderFrontFontPanel:",
"runSetup:",
"setLocation:",
"setButtonClicked:",
"showPrefPanel:"
);
Super = NSObject;
@ -40,7 +40,7 @@
};
IWADLocation = {
Actions = (
"setLocation:"
"setButtonClicked:"
);
Outlets = (
locationConfigBox

Binary file not shown.