Skip to content

Instantly share code, notes, and snippets.

@uranusjr
Created August 22, 2011 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uranusjr/1163042 to your computer and use it in GitHub Desktop.
Save uranusjr/1163042 to your computer and use it in GitHub Desktop.
SVN Patch for Nally to add Option-click "Open in background"
Index: YLView.mm
===================================================================
--- YLView.mm (revision 318)
+++ YLView.mm (working copy)
@@ -685,7 +685,16 @@
{
[[YLImagePreviewer alloc] initWithURL: [NSURL URLWithString: url]];
} else
- [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: url]];
+ {
+ if ([e modifierFlags] & NSAlternateKeyMask)
+ [[NSWorkspace sharedWorkspace] openURLs: [NSArray arrayWithObject:[NSURL URLWithString: url]]
+ withAppBundleIdentifier:nil
+ options:NSWorkspaceLaunchWithoutActivation
+ additionalEventParamDescriptor:nil
+ launchIdentifiers:nil];
+ else
+ [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: url]];
+ }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment