mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Change 'NSApplicationMain' to load storyboard if it is present.
This commit is contained in:
parent
dc8b036378
commit
b88bff5ddb
1 changed files with 15 additions and 0 deletions
|
@ -85,6 +85,21 @@ NSApplicationMain(int argc, const char **argv)
|
|||
NSLog (_(@"Cannot load the main model file '%@'"), mainModelFile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mainModelFile = [infoDict objectForKey: @"NSMainStoryboardFile"];
|
||||
if (mainModelFile != nil && [mainModelFile isEqual: @""] == NO)
|
||||
{
|
||||
if ([NSBundle loadNibNamed: mainModelFile owner: NSApp] == NO)
|
||||
{
|
||||
NSLog (_(@"Cannot load the main storyboard file '%@'"), mainModelFile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(_(@"Could not find model to load %@"), mainModelFile);
|
||||
}
|
||||
}
|
||||
|
||||
RECREATE_AUTORELEASE_POOL(pool);
|
||||
|
||||
|
|
Loading…
Reference in a new issue