Skip to content

Commit

Permalink
Works with yosemite GM
Browse files Browse the repository at this point in the history
  • Loading branch information
nate-parrott committed Nov 4, 2014
1 parent 38c2cb4 commit e3b7bcc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions FlashlightApp/EasySIMBL/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ - (void)setSIMBLOn:(BOOL)SIMBLOn {
- (void)checkSpotlightVersion {
NSString *spotlightVersion = [[NSBundle bundleWithPath:[[NSWorkspace sharedWorkspace] fullPathForApplication:@"Spotlight"]] infoDictionary][@"CFBundleVersion"];
NSLog(@"DetectedSpotlightVersion: %@", spotlightVersion);
if (![spotlightVersion isEqualToString:@"911"]) {
if (![@[@"911", @"916"] containsObject:spotlightVersion]) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
NSAlert *alert = [NSAlert alertWithMessageText:@"Flashlight doesn't work with your version of Spotlight." defaultButton:@"Okay" alternateButton:@"Check for updates" otherButton:nil informativeTextWithFormat:@"As a precaution, plugins won't run on unsupported versions of Spotlight, even if you enable them."];
NSAlert *alert = [NSAlert alertWithMessageText:@"Flashlight doesn't work with your version of Spotlight." defaultButton:@"Okay" alternateButton:@"Check for updates" otherButton:nil informativeTextWithFormat:@"As a precaution, plugins won't run on unsupported versions of Spotlight, even if you enable them. (You have Spotlight v%@)", spotlightVersion];
alert.alertStyle = NSCriticalAlertStyle;
NSModalResponse resp = [alert runModal];
if (resp == NSAlertAlternateReturn) {
Expand Down
4 changes: 2 additions & 2 deletions FlashlightApp/SpotlightSIMBL/SpotlightSIMBL/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>3</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Nate Parrott. All rights reserved.</string>
<key>NSPrincipalClass</key>
Expand All @@ -30,7 +30,7 @@
<key>BundleIdentifier</key>
<string>com.apple.Spotlight</string>
<key>MaxBundleVersion</key>
<string>911</string>
<string>916</string>
<key>MinBundleVersion</key>
<string>911</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion FlashlightApp/src/SIMBL.m
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ + (BOOL) shouldApplication:(NSRunningApplication*)runningApp loadBundle:(NSBundl

if ((maxVersion && appVersion > maxVersion) || (minVersion && appVersion < minVersion))
{
[NSAlert errorAlert:NSLocalizedStringFromTableInBundle(@"Error", SIMBLStringTable, [NSBundle bundleForClass:[self class]], @"Error alert primary message") withDetails:NSLocalizedStringFromTableInBundle(@"%@ %@ (v%@) has not been tested with the plugin %@ %@ (v%@). As a precaution, it has not been loaded. Please contact the plugin developer for further information.", SIMBLStringTable, [NSBundle bundleForClass:[self class]], @"Error alert details, substitute application and plugin version strings"), [_appBundle _dt_name], [_appBundle _dt_version], [_appBundle _dt_bundleVersion], [_bundle _dt_name], [_bundle _dt_version], [_bundle _dt_bundleVersion]];
// [NSAlert errorAlert:NSLocalizedStringFromTableInBundle(@"Error", SIMBLStringTable, [NSBundle bundleForClass:[self class]], @"Error alert primary message") withDetails:NSLocalizedStringFromTableInBundle(@"%@ %@ (v%@) has not been tested with the plugin %@ %@ (v%@). As a precaution, it has not been loaded. Please contact the plugin developer for further information.", SIMBLStringTable, [NSBundle bundleForClass:[self class]], @"Error alert details, substitute application and plugin version strings"), [_appBundle _dt_name], [_appBundle _dt_version], [_appBundle _dt_bundleVersion], [_bundle _dt_name], [_bundle _dt_version], [_bundle _dt_bundleVersion]];
continue;
}

Expand Down

0 comments on commit e3b7bcc

Please sign in to comment.