Skip to content
Snippets Groups Projects
Commit 3a1e2b2f authored by George Nachman's avatar George Nachman
Browse files

Fix bug where the default window is opened on <10.7 or 10.7+lion restore set...

Fix bug where the default window is opened on <10.7 or 10.7+lion restore set to off, even if a default window arrangement is loaded
parent a8735efe
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -95,6 +95,9 @@ void DebugLog(NSString* value);
// Cross app request forgery prevention token. Get this with applescript and then include
// in a URI request.
NSString *token_;
// Set to YES when applicationDidFinishLaunching: is called.
BOOL finishedLaunching_;
}
 
- (void)awakeFromNib;
Loading
Loading
Loading
Loading
@@ -263,6 +263,7 @@ static BOOL hasBecomeActive = NO;
 
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
finishedLaunching_ = YES;
// Create the app support directory
[self _createFlag];
 
Loading
Loading
@@ -457,6 +458,13 @@ static BOOL hasBecomeActive = NO;
 
- (BOOL)applicationOpenUntitledFile:(NSApplication *)theApplication
{
if (!finishedLaunching_ &&
[[PreferencePanel sharedInstance] openArrangementAtStartup]) {
// This happens if the OS is pre 10.7 or restore windows is off in
// 10.7's prefs->general, and the window arrangement has no windows,
// and it's set to load the arrangement on startup.
return NO;
}
[self newWindow:nil];
return YES;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment