Created
January 13, 2016 05:52
-
-
Save gnachman/d16ad74dfec628a9817b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/sources/iTermProfilePreferences.m b/sources/iTermProfilePreferences.m | |
| index 2561f5b..a74debb 100644 | |
| --- a/sources/iTermProfilePreferences.m | |
| +++ b/sources/iTermProfilePreferences.m | |
| @@ -12,6 +12,8 @@ | |
| #import "NSColor+iTerm.h" | |
| #import "PreferencePanel.h" | |
| +#define BLOCK(x) [[^id() { return [self x]; } copy] autorelease] | |
| + | |
| NSString *const kProfilePreferenceCommandTypeCustomValue = @"Yes"; | |
| NSString *const kProfilePreferenceCommandTypeLoginShellValue = @"No"; | |
| @@ -283,7 +285,7 @@ NSString *const kProfilePreferenceInitialDirectoryAdvancedValue = @"Advanced"; | |
| + (NSDictionary *)computedObjectDictionary { | |
| static NSDictionary *dict; | |
| if (!dict) { | |
| - dict = @{ }; | |
| + dict = @{ KEY_IDLE_PERIOD: BLOCK(computedIdlePeriod) }; | |
| [dict retain]; | |
| } | |
| return dict; | |
| @@ -306,4 +308,9 @@ NSString *const kProfilePreferenceInitialDirectoryAdvancedValue = @"Advanced"; | |
| return object; | |
| } | |
| ++ (NSNumber *)computedIdlePeriod { | |
| + static NSString *const kLegacyIdlePeriodKey = @"IdleTimeSeconds"; | |
| + return [[NSUserDefaults standardUserDefaults] objectForKey:kLegacyIdlePeriodKey]; | |
| +} | |
| + | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This resulted in: