Skip to content

Commit

Permalink
Merge pull request #22 from kolinkrewinkel/polychromatic-v1.0.1
Browse files Browse the repository at this point in the history
Polychromatic v1.0.1.
  • Loading branch information
kolinkrewinkel committed Apr 12, 2014
2 parents 189f15b + af60825 commit ca4d832
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Polychromatic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@
DSTROOT = "$(HOME)";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Frameworks",
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/SharedFrameworks",
"$(DEVELOPER_DIR)/../Frameworks",
"$(DEVELOPER_DIR)/../SharedFrameworks",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Polychromatic/Polychromatic-Prefix.pch";
Expand All @@ -386,8 +386,8 @@
DSTROOT = "$(HOME)";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Frameworks",
"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/SharedFrameworks",
"$(DEVELOPER_DIR)/../Frameworks",
"$(DEVELOPER_DIR)/../SharedFrameworks",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Polychromatic/Polychromatic-Prefix.pch";
Expand Down
1 change: 0 additions & 1 deletion Polychromatic/Polychromatic-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<array>
<string>A2E4D43F-41F4-4FB9-BB94-7177011C9AED</string>
<string>640F884E-CE55-4B40-87C0-8869546CAB7A</string>
<string>37B30044-3B14-46BA-ABAA-F01000C27B63</string>
</array>
<key>NSPrincipalClass</key>
<string>Polychromatic</string>
Expand Down
6 changes: 5 additions & 1 deletion Polychromatic/Polychromatic.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ - (void)showInstallWindow:(id)sender

[themes enumerateObjectsUsingBlock:^(NSString *themePath, NSUInteger idx, BOOL *stop) {
NSString *replacementName = [themePath.lastPathComponent stringByReplacingOccurrencesOfString:@".dvtcolortheme" withString:@" (Polychromatic).dvtcolortheme"];
[[NSFileManager defaultManager] copyItemAtPath:[NSString stringWithFormat:@"%@/%@", basePath, themePath] toPath:[NSString stringWithFormat:@"%@/Library/Developer/Xcode/UserData/FontAndColorThemes/%@", NSHomeDirectory(), replacementName] error:&error];
NSString *destinationDirectory = [NSString stringWithFormat:@"%@/Library/Developer/Xcode/UserData/FontAndColorThemes", NSHomeDirectory()];
NSString *destinationPath = [NSString stringWithFormat:@"%@/%@", destinationDirectory, replacementName];

[[NSFileManager defaultManager] createDirectoryAtPath:destinationDirectory withIntermediateDirectories:YES attributes:nil error:NULL];
[[NSFileManager defaultManager] copyItemAtPath:[NSString stringWithFormat:@"%@/%@", basePath, themePath] toPath:destinationPath error:&error];
}];
}
}
Expand Down
2 changes: 1 addition & 1 deletion Polychromatic/Utilities/PLYVariableManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ - (NSColor *)colorForVariable:(NSString *)variable inWorkspace:(IDEWorkspace *)w
{
NSMutableOrderedSet *variables = [self variableSetForWorkspace:workspace];

if (!variables)
if (!variables && workspace.filePath.pathString)
{
variables = [[NSMutableOrderedSet alloc] init];
[self.workspaces setObject:variables forKey:workspace.filePath.pathString];
Expand Down

0 comments on commit ca4d832

Please sign in to comment.