mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 07:59:27 +00:00
Fixed #29 Application now stores the last open database by itself. If window restoration in OS X is disabled, the app also reopens the last db.
This commit is contained in:
@@ -33,6 +33,7 @@ NSString *const MPGeneralSetingsIdentifier = @"GeneralSettingsTab";
|
||||
- (void)didLoadView {
|
||||
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
|
||||
NSString *reopenLastFilePath = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyReopenLastDatabaseOnLaunch];
|
||||
NSString *createUntitledOnActivatePaht = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyOpenEmptyDatabaseOnLaunch];
|
||||
NSString *clearPasteboardKeyPath = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyClearPasteboardOnQuit];
|
||||
NSString *clearPasteboardTimeOutKeyPath = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyPasteboardClearTimeout];
|
||||
NSString *idleTimeOutKeyPath = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyIdleLockTimeOut];
|
||||
@@ -42,5 +43,6 @@ NSString *const MPGeneralSetingsIdentifier = @"GeneralSettingsTab";
|
||||
[self.lockOnSleepCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:lockOnSleepKeyPath options:nil];
|
||||
[self.idleTimeOutPopup bind:NSSelectedTagBinding toObject:defaultsController withKeyPath:idleTimeOutKeyPath options:nil];
|
||||
[self.reopenLastDatabase bind:NSValueBinding toObject:defaultsController withKeyPath:reopenLastFilePath options:nil];
|
||||
[self.createUntitledOnActivation bind:NSValueBinding toObject:defaultsController withKeyPath:createUntitledOnActivatePaht options:nil];
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user