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:
Simon Howard 2009-12-25 21:18:59 +00:00
parent 8ed93836ae
commit 306b3e7c13

View file

@ -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