Revision: 3269
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3269&view=rev
Author:   amaxwell
Date:     2007-11-26 09:13:11 -0800 (Mon, 26 Nov 2007)

Log Message:
-----------
Various compilation and other fixes.
Sadly, RTFD isn't supported; degrade to RTF for now, since I don't have
time to change it.

Modified Paths:
--------------
    trunk/QuickLook-Skim/GeneratePreviewForURL.m
    trunk/QuickLook-Skim/GenerateThumbnailForURL.m
    trunk/QuickLook-Skim/QuickLook-Skim.xcodeproj/project.pbxproj
    trunk/QuickLook-Skim/SKQLConverter.h
    trunk/QuickLook-Skim/SKQLConverter.m

Modified: trunk/QuickLook-Skim/GeneratePreviewForURL.m
===================================================================
--- trunk/QuickLook-Skim/GeneratePreviewForURL.m        2007-11-26 16:04:22 UTC 
(rev 3268)
+++ trunk/QuickLook-Skim/GeneratePreviewForURL.m        2007-11-26 17:13:11 UTC 
(rev 3269)
@@ -38,7 +38,7 @@
 #import <Cocoa/Cocoa.h>
 #import "SKQLConverter.h"
 
-static const _fontSize 12.0;
+static const CGFloat _fontSize = 12.0;
 
 /* 
-----------------------------------------------------------------------------
    Generate a preview for file
@@ -68,9 +68,9 @@
         if (data) {
             NSAttributedString *attrString = [SKQLConverter 
attributedStringWithNotes:[NSKeyedUnarchiver unarchiveObjectWithData:data] 
fontSize:_fontSize];
             [data release];
-            
-            if (attrString && (data = [attrString RTFDFromRange:NSMakeRange(0, 
[attrString length]) documentAttributes:nil])) {
-                QLPreviewRequestSetDataRepresentation(preview, (CFDateRef 
*)data, kUTTypeRTFD, NULL);
+#warning kUTTypeRTFD not supported
+            if (attrString && (data = [attrString RTFFromRange:NSMakeRange(0, 
[attrString length]) documentAttributes:nil])) {
+                QLPreviewRequestSetDataRepresentation(preview, 
(CFDataRef)data, kUTTypeRTF, NULL);
                 err = noErr;
             }
         }

Modified: trunk/QuickLook-Skim/GenerateThumbnailForURL.m
===================================================================
--- trunk/QuickLook-Skim/GenerateThumbnailForURL.m      2007-11-26 16:04:22 UTC 
(rev 3268)
+++ trunk/QuickLook-Skim/GenerateThumbnailForURL.m      2007-11-26 17:13:11 UTC 
(rev 3269)
@@ -50,7 +50,7 @@
 static const NSRect _iconRect = (NSRect) { 50, 140, 512, 512 };
 
 // readable in Cover Flow view, and distinguishable as text in icon view
-static const _fontSize 20.0;
+static const CGFloat _fontSize = 20.0;
 
 // wash the app icon over a white page background
 static void drawBackgroundAndApplicationIconInCurrentContext()
@@ -143,7 +143,6 @@
         
         if (pdfFile) {
             // sadly, we can't use the system's QL generator from inside 
quicklookd, so we don't get the fancy binder on the left edge
-            pdfFile = [filePath stringByAppendingPathComponent:pdfFile];
             CGPDFDocumentRef pdfDoc = 
CGPDFDocumentCreateWithURL((CFURLRef)[NSURL fileURLWithPath:pdfFile]);
             CGPDFPageRef pdfPage = NULL;
             if (pdfDoc && CGPDFDocumentGetNumberOfPages(pdfDoc) > 0)
@@ -188,7 +187,6 @@
                 CGContextRelease(ctxt);
                 
                 [NSGraphicsContext restoreGraphicsState];    
-                [attrString release];
                 didGenerate = true;
             }
         }
@@ -219,7 +217,7 @@
             ReleaseIconRef(iconRef);
         }
     }
-    
+    [pool release];
     return noErr;
 }
 

Modified: trunk/QuickLook-Skim/QuickLook-Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/QuickLook-Skim/QuickLook-Skim.xcodeproj/project.pbxproj       
2007-11-26 16:04:22 UTC (rev 3268)
+++ trunk/QuickLook-Skim/QuickLook-Skim.xcodeproj/project.pbxproj       
2007-11-26 17:13:11 UTC (rev 3269)
@@ -3,7 +3,7 @@
        archiveVersion = 1;
        classes = {
        };
-       objectVersion = 42;
+       objectVersion = 44;
        objects = {
 
 /* Begin PBXBuildFile section */

Modified: trunk/QuickLook-Skim/SKQLConverter.h
===================================================================
--- trunk/QuickLook-Skim/SKQLConverter.h        2007-11-26 16:04:22 UTC (rev 
3268)
+++ trunk/QuickLook-Skim/SKQLConverter.h        2007-11-26 17:13:11 UTC (rev 
3269)
@@ -37,5 +37,5 @@
 extern NSString *SKQLPDFPathForPDFBundleURL(NSURL *url);
 
 @interface SKQLConverter : NSObject
-- (NSAttributedString *)attributedStringWithNotes:(NSArray *)notes 
fontSize:(CGFloat)fontSize;
++ (NSAttributedString *)attributedStringWithNotes:(NSArray *)notes 
fontSize:(CGFloat)fontSize;
 @end

Modified: trunk/QuickLook-Skim/SKQLConverter.m
===================================================================
--- trunk/QuickLook-Skim/SKQLConverter.m        2007-11-26 16:04:22 UTC (rev 
3268)
+++ trunk/QuickLook-Skim/SKQLConverter.m        2007-11-26 17:13:11 UTC (rev 
3269)
@@ -35,6 +35,7 @@
 
 static NSString *_noteFont = @"LucidaHandwriting-Italic";
 static const CGFloat _fontSize = 20.0;
+static const CGFloat _noteIndent = 20.0;
 
 NSBundle *SKQLGetMainBundle() { return [NSBundle 
bundleWithIdentifier:@"net.sourceforge.skim-app.quicklookgenerator"]; }
 
@@ -52,7 +53,7 @@
         if (index != NSNotFound)
             pdfFile = [files objectAtIndex:index];
     }
-    returns pdfFile ? [filePath stringByAppendingPathComponent:pdfFile] : nil;
+    return pdfFile ? [filePath stringByAppendingPathComponent:pdfFile] : nil;
 }
 
 static NSAttributedString *imageAttachmentForType(NSString *type)
@@ -73,7 +74,7 @@
 
 @implementation SKQLConverter
 
-- (NSAttributedString *)attributedStringWithNotes:(NSArray *)notes 
fontSize:(CGFloat)fontSize;
++ (NSAttributedString *)attributedStringWithNotes:(NSArray *)notes 
fontSize:(CGFloat)fontSize;
 {
     NSMutableAttributedString *attrString = [[[NSMutableAttributedString 
alloc] init] autorelease];
     NSFont *font = [NSFont userFontOfSize:_fontSize];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to