Skip to content

Commit

Permalink
Fix to issue preventing hotkey being set on new installs
Browse files Browse the repository at this point in the history
There was a typo in the default user preferences, causing the
Control-Option-V hotkey not to be set on new installs. We've tweaked the
behavior slightly, setting explicitly only for users who haven't run
Jumpcut before. (This enables the hotkey to be disabled entirely if
users want that.)
  • Loading branch information
Steve Cook committed Feb 19, 2020
1 parent 286a1c6 commit 5d2d97e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Expand Up @@ -5,6 +5,8 @@ pre-1.0 releases are numbered as 0.XX.

## Unreleased
### Fixed
- Fix issue preventing default hotkey (Control-Option-V) from being set
on new installations of Jumpcut.
- "Bezel selection pastes" and "menu selection pastes" are once again
separate items in the general preferences.
- Jumpcut has updated to use the most recent ShortcutRecorder code
Expand Down
8 changes: 5 additions & 3 deletions Jumpcut/AppDelegate.m
Expand Up @@ -53,7 +53,11 @@ - (id)init
// If we're coming in from a pre-0.7 Jumpcut, set a flag to fire an alert the first time we run explaining
// that manually updating Accessibility may be required
self.showManualAccessibilityWarning = [[NSUserDefaults standardUserDefaults] floatForKey:@"lastRun"] && [[NSUserDefaults standardUserDefaults] floatForKey:@"lastRun"] < 0.6999;
[[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithFloat:0.7] forKey:@"lastRun"];
if (![[NSUserDefaults standardUserDefaults] floatForKey:@"lastRun"]) {
// Control-Option-V for new installs.
[[NSUserDefaults standardUserDefaults] setValue:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithInt:9],[NSNumber numberWithInt:786432],nil] forKeys:[NSArray arrayWithObjects:@"keyCode",@"modifierFlags",nil]] forKey:@"mainHotkey"];
}
[[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithFloat:0.72] forKey:@"lastRun"];
[self registerDefaultPreferences];
self.veeCode = findVeeCode();
[[NSNotificationCenter defaultCenter] addObserver:self
Expand Down Expand Up @@ -832,8 +836,6 @@ -(void) registerDefaultPreferences {
@"displayNum",
[NSNumber numberWithInt:80],
@"rememberNum",
[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithInt:9],[NSNumber numberWithInt:786432],nil] forKeys:[NSArray arrayWithObjects:@"keyCode",@"modifierFlags",nil]],
@"ShortcutRecorder mainHotkey",
[NSNumber numberWithInt:1],
@"savePreference",
[NSNumber numberWithInt:0],
Expand Down
4 changes: 2 additions & 2 deletions Jumpcut/Info.plist
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.72b2</string>
<string>0.72b3</string>
<key>CFBundleVersion</key>
<string>20200216</string>
<string>20200218</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit 5d2d97e

Please sign in to comment.