Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release/EasySIMBL-1.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Nov 26, 2014
2 parents 4a7742d + 0c7e9c2 commit fad667f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 42 deletions.
4 changes: 2 additions & 2 deletions EasySIMBL/EasySIMBL-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.7</string>
<string>1.7.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>10</string>
<string>11</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Changes from [original SIMBL](http://www.culater.net/software/SIMBL/SIMBL.php)

How to install
--------------
1. Download [EasySIMBL-1.7.zip](http://github.com/norio-nomura/EasySIMBL/releases/download/EasySIMBL-1.7/EasySIMBL-1.7.zip) (2014/11/25 updated)
1. Download [EasySIMBL-1.7.1.zip](http://github.com/norio-nomura/EasySIMBL/releases/download/EasySIMBL-1.7.1/EasySIMBL-1.7.1.zip) (2014/11/26 updated)
2. Extract and move `EasySIMBL.app` into `/Applications` or `~/Applications`.
3. Launch `EasySIMBL.app` and check `Use SIMBL`, then quit `EasySIMBL.app`.

Expand All @@ -37,20 +37,22 @@ Tested combinations of OS X and applications
*This list includes combinations which I tested on my Mac.*

- OS X 10.10.1 (14B25)
- Launchpad & [SpringboardSearchInRomanOnly 0.1](https://github.com/norio-nomura/SpringboardSearchInRomanOnly)
- Maps 2.0 & [CopyLatLngOnMaps 0.1](https://github.com/norio-nomura/CopyLatLngOnMaps)
- Safari 8.0 & [SafariStand 8.0.208](https://github.com/hetima/SafariStand)
- Google Chrome 38.0.2125.122(32-bit) & [NoFavicons 1.2](https://github.com/michaelphines/NoFavicons)
- [Twitter for Mac 3.1.0](https://itunes.apple.com/jp/app/twitter/id409789998?mt=12) & [SimblPluginsForTwitter 1.5](https://github.com/norio-nomura/SimblPluginsForTwitter)
- OS X 10.9.5 (13F34)
- Dock & [BlackDock 0.8.0](http://cooviewerzoom.web.fc2.com/blackdock.html) (without InjectIntoDock.scpt)
- Finder & [ColorfulSidebar 1.1.2](http://cooviewerzoom.web.fc2.com/colorfulsidebar.html) (without PowerboxInjector)
- Safari 7.0.1 & [SafariStand 6.0.200](https://github.com/hetima/SafariStand)
- Finder & [ColorfulSidebar 1.1.2](http://cooviewerzoom.web.fc2.com/colorfulsidebar.html) (without PowerboxInjector)
- Launchpad & [SpringboardSearchInRomanOnly 0.1](https://github.com/norio-nomura/SpringboardSearchInRomanOnly)
- Safari 7.0.1 & [SafariStand 6.0.200](https://github.com/hetima/SafariStand)
- [Twitter for Mac 3.1.0](https://itunes.apple.com/jp/app/twitter/id409789998?mt=12) & [SimblPluginsForTwitter 1.5](https://github.com/norio-nomura/SimblPluginsForTwitter)
- OS X 10.8.5 (12F45)
- Finder & [ColorfulSidebar 1.1.2](http://cooviewerzoom.web.fc2.com/colorfulsidebar.html) (without PowerboxInjector)
- Safari 6.1 & [SafariStand 6.0.200](https://github.com/hetima/SafariStand)
- Finder & [ColorfulSidebar 1.1.2](http://cooviewerzoom.web.fc2.com/colorfulsidebar.html) (without PowerboxInjector)
- Safari 6.1 & [SafariStand 6.0.200](https://github.com/hetima/SafariStand)
- OS X 10.7.5 (11G63)
- Finder & [ColorfulSidebar 1.1.2](http://cooviewerzoom.web.fc2.com/colorfulsidebar.html) (without PowerboxInjector)
- Finder & [ColorfulSidebar 1.1.2](http://cooviewerzoom.web.fc2.com/colorfulsidebar.html) (without PowerboxInjector)

_PowerboxInjector is not compatible with EasySIMBL. Sorry, the reason exists on EasySIMBL side._

Expand Down
41 changes: 9 additions & 32 deletions SIMBL Agent/SIMBLAgent.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,9 @@ - (void) applicationDidFinishLaunching:(NSNotification*)notificaion
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
[workspace addObserver:self
forKeyPath:@"runningApplications"
options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld
options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld|NSKeyValueObservingOptionInitial
context:NULL];

// inject into resumed applications
for (NSRunningApplication *runningApp in [workspace runningApplications]) {
[self injectSIMBL:runningApp];
}

// previous minus running, it should be uninject
[previousInjectedSandboxBundleIdentifierSet minusSet:[NSMutableSet setWithArray:[defaults objectForKey:kInjectedSandboxBundleIdentifiers]]];
if ([previousInjectedSandboxBundleIdentifierSet count]) {
Expand All @@ -90,34 +85,19 @@ - (id) eventDidFail:(const AppleEvent *)event withError:(NSError *)error;

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if ([keyPath isEqualToString:@"isTerminated"]) {
SIMBLLogDebug(@"runningApp %@ isTerminated.", object);
[object removeObserver:self forKeyPath:keyPath];

[self injectContainerForApplication:(NSRunningApplication*)object enabled:NO];
} else if ([keyPath isEqualToString:@"runningApplications"]) {
// for apps which will be terminated without called @"isFinishedLaunching"
static NSMutableSet *appsObservingFinishedLaunching = nil;
if (!appsObservingFinishedLaunching) {
appsObservingFinishedLaunching = [NSMutableSet set];
}

if ([keyPath isEqualToString:@"runningApplications"]) {
for (NSRunningApplication *app in [change objectForKey:NSKeyValueChangeNewKey]) {
if (app.isFinishedLaunching) {
SIMBLLogDebug(@"runningApp %@ is already isFinishedLaunching", app);
[self injectSIMBL:app];
} else {
[app addObserver:self forKeyPath:@"isFinishedLaunching" options:NSKeyValueObservingOptionNew context:NULL];
[appsObservingFinishedLaunching addObject:app];
}
SIMBLLogDebug(@"add runningApp %@.", app);
[app addObserver:self forKeyPath:@"isFinishedLaunching" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionInitial context:NULL];
}
for (NSRunningApplication *app in [change objectForKey:NSKeyValueChangeOldKey]) {
if ([appsObservingFinishedLaunching containsObject:app]) {
[app removeObserver:self forKeyPath:@"isFinishedLaunching"];
[appsObservingFinishedLaunching removeObject:app];
SIMBLLogDebug(@"remove runningApp %@.", app);
[app removeObserver:self forKeyPath:@"isFinishedLaunching"];
if ([self.runningSandboxedApplications containsObject:app]) {
[self injectContainerForApplication:app enabled:NO];
}
}
} else if ([keyPath isEqualToString:@"isFinishedLaunching"]) {
} else if ([keyPath isEqualToString:@"isFinishedLaunching"] && [change[NSKeyValueChangeNewKey]boolValue]) {
SIMBLLogDebug(@"runningApp %@ isFinishedLaunching.", object);
[self injectSIMBL:(NSRunningApplication*)object];
}
Expand Down Expand Up @@ -275,9 +255,6 @@ - (void)injectContainerForApplication:(NSRunningApplication*)runningApp enabled:
NSString *identifier = [runningApp bundleIdentifier];
if (bEnabled) {
if ([self injectContainerBundleIdentifier:identifier enabled:YES]) {
SIMBLLogDebug(@"Start observing %@'s 'isTerminated'.", identifier);

[runningApp addObserver:self forKeyPath:@"isTerminated" options:NSKeyValueObservingOptionNew context:NULL];
[self.runningSandboxedApplications addObject:runningApp];

NSMutableSet *injectedSandboxBundleIdentifierSet = [NSMutableSet set];
Expand Down
4 changes: 2 additions & 2 deletions SIMBL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_VERSION = 0.10.9;
PRODUCT_VERSION = 0.10.10;
SDKROOT = macosx;
};
name = Debug;
Expand All @@ -394,7 +394,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_VERSION = 0.10.9;
PRODUCT_VERSION = 0.10.10;
SDKROOT = macosx;
};
name = Release;
Expand Down

0 comments on commit fad667f

Please sign in to comment.