Permalink
Browse files

update device information

  • Loading branch information...
1 parent fe6ffa2 commit 1e3e2b9dc61d4ac39e1a483e299b13d6906da56a @aharren committed Apr 15, 2012
Showing with 23 additions and 9 deletions.
  1. +11 −9 Classes/Models/CDXAppAboutSettings.m
  2. +12 −0 Template.html
@@ -174,17 +174,19 @@ - (NSString *)htmlTextValueForSettingWithTag:(NSUInteger)tag {
NSString *path = [folder stringByAppendingPathComponent:@"Template.html"];
NSString *text = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:NULL];
+ text = [text stringByReplacingOccurrencesOfString:@"$title$" withString:@"Device Information"];
+
CDXDevice *device = [CDXDevice sharedDevice];
NSMutableString *content = [[[NSMutableString alloc] init] autorelease];
- [content appendString:@"<table>"];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"model", [device deviceModel]];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"machine", [device deviceMachine]];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"type", [device deviceTypeString]];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"ui idiom", [device deviceUIIdiomString]];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%.1f</td></tr>\n", @"screen scale", [device deviceScreenScale]];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"graphics effects", [device useReducedGraphicsEffects] ? @"reduced" : @"full"];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"rendering mode", [device useImageBasedRendering] ? @"image" : @"direct"];
- [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"twitter integration", [device hasTwitterIntegration] ? @"yes" : @"no"];
+ [content appendString:@"<table style=\"border-spacing:0px\">"];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"Model", [device deviceModel]];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"Machine", [device deviceMachine]];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"Type", [device deviceTypeString]];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"UI idiom", [device deviceUIIdiomString]];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%.1f</td></tr>\n", @"Screen scale", [device deviceScreenScale]];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"Graphics effects", [device useReducedGraphicsEffects] ? @"reduced" : @"full"];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"Rendering mode", [device useImageBasedRendering] ? @"image" : @"direct"];
+ [content appendFormat:@"<tr><td>%@</td><td>:</td><td>%@</td></tr>\n", @"Twitter integration", [device hasTwitterIntegration] ? @"yes" : @"no"];
[content appendString:@"</table>"];
text = [text stringByReplacingOccurrencesOfString:@"$content$" withString:content];
View
@@ -6,6 +6,18 @@
</head>
<body style="font-family:Helvetica,sans-serif;font-size:12px;font-weight:700;color:#999999;background-color:#ffffff">
+<p>
+Card Decks<br />
+0xc0.de/CardDecks
+</p>
+<p>
+Copyright (c) 2009-2012 Arne Harren &lt;ah@0xc0.de&gt;
+</p>
+
+<p>
+$title$
+</p>
+
$content$
</body>

0 comments on commit 1e3e2b9

Please sign in to comment.