mirror of
https://github.com/chocolate-doom/launcher.git
synced 2024-11-25 13:51:28 +00:00
Open the configuration dialog on first startup so that the user can
configure IWADs. Subversion-branch: /launcher Subversion-revision: 1759
This commit is contained in:
parent
8ed93836ae
commit
306b3e7c13
1 changed files with 18 additions and 3 deletions
|
@ -55,11 +55,12 @@ static NSString *IWADLabels[NUM_IWAD_TYPES] =
|
|||
}
|
||||
|
||||
// Set the dropdown list to include an entry for each IWAD that has
|
||||
// been configured.
|
||||
// been configured. Returns true if at least one IWAD is configured.
|
||||
|
||||
- (void) setDropdownList
|
||||
- (BOOL) setDropdownList
|
||||
{
|
||||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
BOOL have_wads;
|
||||
id location;
|
||||
unsigned int i;
|
||||
unsigned int enabled_wads;
|
||||
|
@ -80,7 +81,10 @@ static NSString *IWADLabels[NUM_IWAD_TYPES] =
|
|||
}
|
||||
}
|
||||
|
||||
[self->iwadSelector setEnabled: (enabled_wads > 0)];
|
||||
have_wads = enabled_wads > 0;
|
||||
[self->iwadSelector setEnabled: have_wads];
|
||||
|
||||
return have_wads;
|
||||
}
|
||||
|
||||
- (IWAD) getSelectedIWAD
|
||||
|
@ -138,5 +142,16 @@ static NSString *IWADLabels[NUM_IWAD_TYPES] =
|
|||
[self setDropdownList];
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
// Populate the dropdown IWAD list, and open the configuration
|
||||
// dialog if not yet configured.
|
||||
|
||||
if (![self setDropdownList])
|
||||
{
|
||||
[self openConfigWindow: nil];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue