Changeset 13425


Ignore:
Timestamp:
Aug 12, 2012, 2:05:55 PM (9 years ago)
Author:
livings124
Message:

don't use the convenient accessor functionality in the Quick Look plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/QuickLookPlugin/GeneratePreviewForURL.m

    r13423 r13425  
    1010    NSString * iconFileName = [NSString stringWithFormat: @"%ldx%@.tiff", width, rawFilename]; //we need to do this once per file extension, per size
    1111   
    12     if (!allImgProps[iconFileName])
     12    if (![allImgProps objectForKey: iconFileName])
    1313    {
    1414        NSImage * icon = [[NSWorkspace sharedWorkspace] iconForFileType: fileExtension];
     
    7272    }
    7373    [htmlString appendFormat: @"<p>%@</p>", fileSizeString];
     74   
     75    NSString * dateCreatedString = inf.dateCreated > 0 ? [NSDateFormatter localizedStringFromDate: [NSDate dateWithTimeIntervalSince1970: inf.dateCreated] dateStyle: NSDateFormatterLongStyle timeStyle: NSDateFormatterShortStyle] : nil;
     76    NSString * creatorString = inf.creator ? [NSString stringWithUTF8String: inf.creator] : nil;
     77    if ([creatorString isEqualToString: @""]) creatorString = nil;
     78    NSString * creationString = nil;
     79    if (dateCreatedString && creatorString)
     80        creationString = [NSString stringWithFormat: NSLocalizedString(@"Created on %@ with %@", "quicklook creation info"), dateCreatedString, creatorString];
     81    else if (dateCreatedString)
     82        creationString = [NSString stringWithFormat: NSLocalizedString(@"Created on %@", "quicklook creation info"), dateCreatedString];
     83    else if (creatorString)
     84        creationString = [NSString stringWithFormat: NSLocalizedString(@"Created with %@", "quicklook creation info"), creatorString];
     85    if (creationString)
     86        [htmlString appendFormat: @"<p>%@</p>", creationString];
     87   
    7488    if (inf.comment)
    7589    {
Note: See TracChangeset for help on using the changeset viewer.