Skip to content

Commit

Permalink
Category icons
Browse files Browse the repository at this point in the history
  • Loading branch information
nate-parrott committed Nov 13, 2014
1 parent 04ad687 commit e626f9d
Show file tree
Hide file tree
Showing 27 changed files with 501 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "cloud.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions FlashlightApp/EasySIMBL/Icons.xcassets/cog.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "cog.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "download.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions FlashlightApp/EasySIMBL/Icons.xcassets/info.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "info.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "newspaper.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "plugin.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "search.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions FlashlightApp/EasySIMBL/Icons.xcassets/star.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "star.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "translate.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "wrench.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions FlashlightApp/EasySIMBL/PluginListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,22 @@ - (NSArray *)categoriesForDisplay {
[ordered addObject:@"Unknown"];
return ordered;
}
- (NSImage *)iconForCategory:(NSString *)category {
NSDictionary *imageNamesForCategories = @{
@"Installed": @"download",
@"Featured": @"star",
@"Information": @"info",
@"Language": @"translate",
@"Search": @"search",
@"System": @"cog",
@"Utilities": @"wrench",
@"Weather": @"cloud",
@"News": @"newspaper",
@"Unknown": @"plugin"
};
NSString *imageName = imageNamesForCategories[category] ? : @"plugin";
return [NSImage imageNamed:imageName];
}
- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item {
if (item==nil) {
return [self categoriesForDisplay].count;
Expand All @@ -324,6 +340,8 @@ - (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTable
} else {
NSTableCellView *view = [outlineView makeViewWithIdentifier:@"DataCell" owner:self];
view.textField.stringValue = item;
view.imageView.image = [self iconForCategory:item];
view.imageView.alphaValue = 0.47;
return view;
}
}
Expand Down
9 changes: 7 additions & 2 deletions FlashlightApp/Flashlight.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
5F63270E1A0939A900CE241E /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F63270D1A0939A900CE241E /* libz.dylib */; };
5F97AD421A0ACA0100838C7C /* NaturalCommands in Resources */ = {isa = PBXBuildFile; fileRef = 5F97AD411A0ACA0100838C7C /* NaturalCommands */; };
5FBEC9B01A1539C0007FEC54 /* ConvenienceCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FBEC9AF1A1539C0007FEC54 /* ConvenienceCategories.m */; };
5FBEC9B61A154DEA007FEC54 /* Icons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5FBEC9B51A154DEA007FEC54 /* Icons.xcassets */; };
6C3A4C44159EADF900985CCD /* FlashlightSIMBLAgent.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6C3A4C35159E7E7000985CCD /* FlashlightSIMBLAgent.app */; };
6C564485159E7C0800215467 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C564484159E7C0800215467 /* Cocoa.framework */; };
6C56448F159E7C0800215467 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6C56448D159E7C0800215467 /* InfoPlist.strings */; };
Expand Down Expand Up @@ -147,6 +148,7 @@
5F97AD411A0ACA0100838C7C /* NaturalCommands */ = {isa = PBXFileReference; lastKnownFileType = folder; name = NaturalCommands; path = ../../NaturalCommands; sourceTree = "<group>"; };
5FBEC9AE1A1539BF007FEC54 /* ConvenienceCategories.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConvenienceCategories.h; sourceTree = "<group>"; };
5FBEC9AF1A1539C0007FEC54 /* ConvenienceCategories.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConvenienceCategories.m; sourceTree = "<group>"; };
5FBEC9B51A154DEA007FEC54 /* Icons.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Icons.xcassets; sourceTree = "<group>"; };
6C3A4C2B159E7E6F00985CCD /* SIMBL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = SIMBL.xcodeproj; sourceTree = "<group>"; };
6C564480159E7C0800215467 /* Flashlight.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Flashlight.app; sourceTree = BUILT_PRODUCTS_DIR; };
6C564484159E7C0800215467 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -255,7 +257,7 @@
isa = PBXGroup;
children = (
6C6AF45E1842DE3700E2ACBB /* README.md */,
6C56448A159E7C0800215467 /* EasySIMBL */,
6C56448A159E7C0800215467 /* FlashlightApp */,
6C3A4C2B159E7E6F00985CCD /* SIMBL.xcodeproj */,
6C564483159E7C0800215467 /* Frameworks */,
6C564481159E7C0800215467 /* Products */,
Expand Down Expand Up @@ -292,7 +294,7 @@
name = "Other Frameworks";
sourceTree = "<group>";
};
6C56448A159E7C0800215467 /* EasySIMBL */ = {
6C56448A159E7C0800215467 /* FlashlightApp */ = {
isa = PBXGroup;
children = (
6CCA2AEE15AAB8670085ABB4 /* SIMBL.h */,
Expand All @@ -312,11 +314,13 @@
5F6326C71A08538B00CE241E /* PluginCellView.h */,
5F6326C81A08538B00CE241E /* PluginCellView.m */,
6C564499159E7C0900215467 /* MainMenu.xib */,
5FBEC9B51A154DEA007FEC54 /* Icons.xcassets */,
5F97AD411A0ACA0100838C7C /* NaturalCommands */,
5F6326CE1A0933E800CE241E /* zipzap */,
5F6326B61A082FA900CE241E /* ITSwitch */,
6C56448B159E7C0800215467 /* Supporting Files */,
);
name = FlashlightApp;
path = EasySIMBL;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -412,6 +416,7 @@
5F6326C41A083E1F00CE241E /* Icon.icns in Resources */,
5F97AD421A0ACA0100838C7C /* NaturalCommands in Resources */,
6C564495159E7C0900215467 /* Credits.rtf in Resources */,
5FBEC9B61A154DEA007FEC54 /* Icons.xcassets in Resources */,
6C56449B159E7C0900215467 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions FlashlightApp/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
xcodeproj 'Flashlight.xcodeproj/'

# Uncomment this line to define a global platform for your project
# platform :ios, "6.0"

target "Flashlight" do

end

1 change: 1 addition & 0 deletions FlashlightApp/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COCOAPODS: 0.33.1
1 change: 1 addition & 0 deletions FlashlightApp/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e626f9d

Please sign in to comment.