Skip to content

Commit

Permalink
Satisfy compiler warnings. Update CSS.
Browse files Browse the repository at this point in the history
  • Loading branch information
p2 committed Oct 24, 2012
1 parent 9c0c0f3 commit 1d4a210
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CSVDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ - (NSUInteger) numRowsFromCSVString:(NSString *)string maxRows:(NSUInteger)maxRo
isNewColumn = NO;
}
else {
colKey = [NSString stringWithFormat:@"col_%i", colIndex];
colKey = [NSString stringWithFormat:@"col_%lu", colIndex];
isNewColumn = YES;
}

Expand Down
6 changes: 3 additions & 3 deletions GeneratePreviewForURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
NSString *css = [[NSString alloc] initWithContentsOfFile:cssPath encoding:NSUTF8StringEncoding error:NULL];

NSString *path = [myURL path];
NSDictionary *fileAttributes = [[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES];
NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil];

// compose the html
NSMutableString *html = [[NSMutableString alloc] initWithString:@"<!DOCTYPE html>\n"];
Expand All @@ -82,8 +82,8 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
([@"|" isEqualToString:csvDoc.separator] ? @"Pipe" : csvDoc.separator));
NSString *numRows = (numRowsParsed > MAX_ROWS) ?
[NSString stringWithFormat:@"%i+", MAX_ROWS] :
[NSString stringWithFormat:@"%i", numRowsParsed];
[html appendFormat:@"</style></head><body><div class=\"file_info\"><b>%i</b> %@, <b>%@</b> %@</div>",
[NSString stringWithFormat:@"%lu", numRowsParsed];
[html appendFormat:@"</style></head><body><div class=\"file_info\"><b>%lu</b> %@, <b>%@</b> %@</div>",
[csvDoc.columnKeys count],
(1 == [csvDoc.columnKeys count]) ? NSLocalizedString(@"column", nil) : NSLocalizedString(@"columns", nil),
numRows,
Expand Down
2 changes: 1 addition & 1 deletion QuickLookCSV.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
EEB3EDCE0FFE38D800B7462F /* CSVDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSVDocument.m; sourceTree = "<group>"; };
EEB3EDD30FFE3B7F00B7462F /* CSVRowObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSVRowObject.h; sourceTree = "<group>"; };
EEB3EDD40FFE3B7F00B7462F /* CSVRowObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSVRowObject.m; sourceTree = "<group>"; };
EEB3EE850FFE513200B7462F /* Style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; };
EEB3EE850FFE513200B7462F /* Style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.css; };
F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = /System/Library/Frameworks/QuickLook.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
Expand Down
25 changes: 22 additions & 3 deletions Style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,29 @@
http://www.apache.org/licenses/LICENSE-2.0.html
*/

body { margin:20px; font:small normal 'Helvetica Neue', sans-serif; background-color:rgb(242,242,242); background-color:rgb(205,205,205); }
table { min-width:100%; border:1px solid rgb(170,170,170); border-collapse:collapse; }
body {
margin: 20px;
font: small normal 'Lucida Grande', 'Helvetica Neue', sans-serif;
background-color: rgb(242,242,242);
}
table {
min-width: 100%;
border: 1px solid rgb(170,170,170); border-collapse: separate; border-spacing: 0; -webkit-border-radius: 3px;
box-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
tr { background-color:white; }
td { padding:0.2em 0.4em; vertical-align:top; font-size:small; border:1px solid rgb(170,170,170); border-width:0 1px; }
td {
margin: 0; padding: 0.2em 0.4em;
vertical-align: top;
font-size: small;
border-left: 1px solid rgb(170,170,170);
}
td:first-child { border-left: none; }
tr:first-child td:first-child { -webkit-border-top-left-radius: 3px; }
tr:first-child td:last-child { -webkit-border-top-right-radius: 3px; }
tr:last-child td:first-child { -webkit-border-bottom-left-radius: 3px; }
tr:last-child td:last-child { -webkit-border-bottom-right-radius: 3px; }

.file_info { margin:0.5em 2px; color:rgb(20,20,20); text-shadow:rgba(255,255,255,0.8) 0 1px 0; }
.alt_row { background-color:rgb(230,230,230); }
.truncated_rows { margin:0.5em 2px; color:rgb(20,20,20); text-shadow:rgba(255,255,255,0.8) 0 1px 0; }

0 comments on commit 1d4a210

Please sign in to comment.