]> granicus.if.org Git - transmission/commitdiff
modify the Quick Look plugin's main.c
authorMitchell Livingston <livings124@transmissionbt.com>
Sun, 12 Aug 2012 16:19:06 +0000 (16:19 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sun, 12 Aug 2012 16:19:06 +0000 (16:19 +0000)
Transmission.xcodeproj/project.pbxproj
macosx/QuickLookPlugin/main.c

index 022d6c5fee81d0e27ac5d9369375e3683f9aec81..143e777c2a59dcc13246c7f910c02d1368fea9f0 100644 (file)
                A2F35BC715C5A0A100EBF632 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
                A2F35BC915C5A0A100EBF632 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = GenerateThumbnailForURL.m; path = macosx/QuickLookPlugin/GenerateThumbnailForURL.m; sourceTree = SOURCE_ROOT; };
                A2F35BCB15C5A0A100EBF632 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = GeneratePreviewForURL.m; path = macosx/QuickLookPlugin/GeneratePreviewForURL.m; sourceTree = SOURCE_ROOT; };
-               A2F35BCD15C5A0A100EBF632 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = main.c; path = macosx/QuickLookPlugin/main.c; sourceTree = SOURCE_ROOT; };
+               A2F35BCD15C5A0A100EBF632 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = main.c; path = macosx/QuickLookPlugin/main.c; sourceTree = "<group>"; };
                A2F35BCF15C5A0A100EBF632 /* QuickLookPlugin-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "QuickLookPlugin-Prefix.pch"; path = "macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch"; sourceTree = SOURCE_ROOT; };
                A2F35BE015C5A7ED00EBF632 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
                A2F35BE215C5A7F900EBF632 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
index 7345f8fc2e01aed441da857866a15811c9d33613..5f23c216125f00e4537f83e17245b898f764a150 100644 (file)
@@ -92,19 +92,19 @@ static QLGeneratorInterfaceStruct myInterfaceFtbl = {
 QuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID)
 {
     QuickLookGeneratorPluginType *theNewInstance;
-
+    
     theNewInstance = (QuickLookGeneratorPluginType *)malloc(sizeof(QuickLookGeneratorPluginType));
     memset(theNewInstance,0,sizeof(QuickLookGeneratorPluginType));
-
-        /* Point to the function table Malloc enough to store the stuff and copy the filler from myInterfaceFtbl over */
+    
+    /* Point to the function table Malloc enough to store the stuff and copy the filler from myInterfaceFtbl over */
     theNewInstance->conduitInterface = malloc(sizeof(QLGeneratorInterfaceStruct));
     memcpy(theNewInstance->conduitInterface,&myInterfaceFtbl,sizeof(QLGeneratorInterfaceStruct));
-
-        /*  Retain and keep an open instance refcount for each factory. */
+    
+    /*  Retain and keep an open instance refcount for each factory. */
     theNewInstance->factoryID = CFRetain(inFactoryID);
     CFPlugInAddInstanceForFactory(inFactoryID);
-
-        /* This function returns the IUnknown interface so set the refCount to one. */
+    
+    /* This function returns the IUnknown interface so set the refCount to one. */
     theNewInstance->refCount = 1;
     return theNewInstance;
 }
@@ -120,12 +120,12 @@ QuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRef inFact
 void DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInstance)
 {
     CFUUIDRef theFactoryID;
-
+    
     theFactoryID = thisInstance->factoryID;
-        /* Free the conduitInterface table up */
+    /* Free the conduitInterface table up */
     free(thisInstance->conduitInterface);
-
-        /* Free the instance structure */
+    
+    /* Free the instance structure */
     free(thisInstance);
     if (theFactoryID){
         CFPlugInRemoveInstanceForFactory(theFactoryID);
@@ -141,14 +141,14 @@ void DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInsta
 HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv)
 {
     CFUUIDRef interfaceID;
-
+    
     interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault,iid);
-
+    
     if (CFEqual(interfaceID,kQLGeneratorCallbacksInterfaceID)){
-            /* If the Right interface was requested, bump the ref count,
-             * set the ppv parameter equal to the instance, and
-             * return good status.
-             */
+        /* If the Right interface was requested, bump the ref count,
+         * set the ppv parameter equal to the instance, and
+         * return good status.
+         */
         ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GenerateThumbnailForURL = GenerateThumbnailForURL;
         ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->CancelThumbnailGeneration = CancelThumbnailGeneration;
         ((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GeneratePreviewForURL = GeneratePreviewForURL;
@@ -202,17 +202,17 @@ void *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID)
 {
     QuickLookGeneratorPluginType *result;
     CFUUIDRef                 uuid;
-
-        /* If correct type is being requested, allocate an
-         * instance of kQLGeneratorTypeID and return the IUnknown interface.
-         */
+    
+    /* If correct type is being requested, allocate an
+     * instance of kQLGeneratorTypeID and return the IUnknown interface.
+     */
     if (CFEqual(typeID,kQLGeneratorTypeID)){
         uuid = CFUUIDCreateFromString(kCFAllocatorDefault,CFSTR(PLUGIN_ID));
         result = AllocQuickLookGeneratorPluginType(uuid);
         CFRelease(uuid);
         return result;
     }
-        /* If the requested type is incorrect, return NULL. */
+    /* If the requested type is incorrect, return NULL. */
     return NULL;
 }