mirror of
https://github.com/chocolate-doom/launcher.git
synced 2024-11-10 07:12:06 +00:00
Add setLocation method, rename existing setLocation to setButtonClicked.
Subversion-branch: /launcher Subversion-revision: 1758
This commit is contained in:
parent
72a6aabd37
commit
8ed93836ae
4 changed files with 11 additions and 7 deletions
|
@ -27,8 +27,9 @@
|
|||
id locationConfigBox;
|
||||
}
|
||||
|
||||
- (void) setLocation: (id)sender;
|
||||
- (void) setButtonClicked: (id)sender;
|
||||
- (NSString *) getLocation;
|
||||
- (void) setLocation: (NSString *) value;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
Loading…
Reference in a new issue