Skip to content

Commit 1d4a210

Browse files
committed
Satisfy compiler warnings. Update CSS.
1 parent 9c0c0f3 commit 1d4a210

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

CSVDocument.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ - (NSUInteger) numRowsFromCSVString:(NSString *)string maxRows:(NSUInteger)maxRo
114114
isNewColumn = NO;
115115
}
116116
else {
117-
colKey = [NSString stringWithFormat:@"col_%i", colIndex];
117+
colKey = [NSString stringWithFormat:@"col_%lu", colIndex];
118118
isNewColumn = YES;
119119
}
120120

GeneratePreviewForURL.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
6464
NSString *css = [[NSString alloc] initWithContentsOfFile:cssPath encoding:NSUTF8StringEncoding error:NULL];
6565

6666
NSString *path = [myURL path];
67-
NSDictionary *fileAttributes = [[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES];
67+
NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil];
6868

6969
// compose the html
7070
NSMutableString *html = [[NSMutableString alloc] initWithString:@"<!DOCTYPE html>\n"];
@@ -82,8 +82,8 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
8282
([@"|" isEqualToString:csvDoc.separator] ? @"Pipe" : csvDoc.separator));
8383
NSString *numRows = (numRowsParsed > MAX_ROWS) ?
8484
[NSString stringWithFormat:@"%i+", MAX_ROWS] :
85-
[NSString stringWithFormat:@"%i", numRowsParsed];
86-
[html appendFormat:@"</style></head><body><div class=\"file_info\"><b>%i</b> %@, <b>%@</b> %@</div>",
85+
[NSString stringWithFormat:@"%lu", numRowsParsed];
86+
[html appendFormat:@"</style></head><body><div class=\"file_info\"><b>%lu</b> %@, <b>%@</b> %@</div>",
8787
[csvDoc.columnKeys count],
8888
(1 == [csvDoc.columnKeys count]) ? NSLocalizedString(@"column", nil) : NSLocalizedString(@"columns", nil),
8989
numRows,

QuickLookCSV.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
EEB3EDCE0FFE38D800B7462F /* CSVDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSVDocument.m; sourceTree = "<group>"; };
4848
EEB3EDD30FFE3B7F00B7462F /* CSVRowObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSVRowObject.h; sourceTree = "<group>"; };
4949
EEB3EDD40FFE3B7F00B7462F /* CSVRowObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSVRowObject.m; sourceTree = "<group>"; };
50-
EEB3EE850FFE513200B7462F /* Style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; };
50+
EEB3EE850FFE513200B7462F /* Style.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.css; };
5151
F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
5252
F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = /System/Library/Frameworks/QuickLook.framework; sourceTree = "<absolute>"; };
5353
/* End PBXFileReference section */

Style.css

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,29 @@
77
http://www.apache.org/licenses/LICENSE-2.0.html
88
*/
99

10-
body { margin:20px; font:small normal 'Helvetica Neue', sans-serif; background-color:rgb(242,242,242); background-color:rgb(205,205,205); }
11-
table { min-width:100%; border:1px solid rgb(170,170,170); border-collapse:collapse; }
10+
body {
11+
margin: 20px;
12+
font: small normal 'Lucida Grande', 'Helvetica Neue', sans-serif;
13+
background-color: rgb(242,242,242);
14+
}
15+
table {
16+
min-width: 100%;
17+
border: 1px solid rgb(170,170,170); border-collapse: separate; border-spacing: 0; -webkit-border-radius: 3px;
18+
box-shadow: 0 1px 0 rgba(255,255,255,0.8);
19+
}
1220
tr { background-color:white; }
13-
td { padding:0.2em 0.4em; vertical-align:top; font-size:small; border:1px solid rgb(170,170,170); border-width:0 1px; }
21+
td {
22+
margin: 0; padding: 0.2em 0.4em;
23+
vertical-align: top;
24+
font-size: small;
25+
border-left: 1px solid rgb(170,170,170);
26+
}
27+
td:first-child { border-left: none; }
28+
tr:first-child td:first-child { -webkit-border-top-left-radius: 3px; }
29+
tr:first-child td:last-child { -webkit-border-top-right-radius: 3px; }
30+
tr:last-child td:first-child { -webkit-border-bottom-left-radius: 3px; }
31+
tr:last-child td:last-child { -webkit-border-bottom-right-radius: 3px; }
32+
1433
.file_info { margin:0.5em 2px; color:rgb(20,20,20); text-shadow:rgba(255,255,255,0.8) 0 1px 0; }
1534
.alt_row { background-color:rgb(230,230,230); }
1635
.truncated_rows { margin:0.5em 2px; color:rgb(20,20,20); text-shadow:rgba(255,255,255,0.8) 0 1px 0; }

0 commit comments

Comments
 (0)