Revision: 4262
http://skim-app.svn.sourceforge.net/skim-app/?rev=4262&view=rev
Author: hofman
Date: 2008-07-21 10:58:54 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
Reduce dependency of skimnotes tool on AppKit, only use header in one place
where it is relevant.
Modified Paths:
--------------
trunk/SkimNotes/NSFileManager_SKNToolExtensions.h
trunk/SkimNotes/NSFileManager_SKNToolExtensions.m
trunk/SkimNotes/SKNAgentListener.h
trunk/SkimNotes/SKNAgentListener.m
trunk/SkimNotes/SKNExtendedAttributeManager.h
Modified: trunk/SkimNotes/NSFileManager_SKNToolExtensions.h
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNToolExtensions.h 2008-07-21 00:16:43 UTC
(rev 4261)
+++ trunk/SkimNotes/NSFileManager_SKNToolExtensions.h 2008-07-21 10:58:54 UTC
(rev 4262)
@@ -36,7 +36,7 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <Cocoa/Cocoa.h>
+#import <Foundation/Foundation.h>
@interface NSFileManager (SKNToolExtensions)
Modified: trunk/SkimNotes/NSFileManager_SKNToolExtensions.m
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNToolExtensions.m 2008-07-21 00:16:43 UTC
(rev 4261)
+++ trunk/SkimNotes/NSFileManager_SKNToolExtensions.m 2008-07-21 10:58:54 UTC
(rev 4262)
@@ -39,6 +39,7 @@
#import "NSFileManager_SKNToolExtensions.h"
#import "SKNExtendedAttributeManager.h"
#import "SKNUtilities.h"
+#import <AppKit/AppKit.h>
#define BUNDLE_DATA_FILENAME @"data"
@@ -153,12 +154,14 @@
[self removeSkimNotesAtPath:path error:NULL];
if ([notesData length]) {
- NSArray *notes = [NSKeyedUnarchiver unarchiveObjectWithData:notesData];
- if ([notes count]) {
- if (textNotes == nil)
- textNotes = SKNTextNotes(notes);
- if (rtfNotesData == nil)
- rtfNotesData = SKNRTFNotes(notes);
+ if (textNotes == nil || rtfNotesData == nil) {
+ NSArray *notes = [NSKeyedUnarchiver
unarchiveObjectWithData:notesData];
+ if ([notes count]) {
+ if (textNotes == nil)
+ textNotes = SKNTextNotes(notes);
+ if (rtfNotesData == nil)
+ rtfNotesData = SKNRTFNotes(notes);
+ }
}
NSData *textNotesData = [textNotes
dataUsingEncoding:NSUTF8StringEncoding];
if ([extension caseInsensitiveCompare:PDFD_EXTENSION] ==
NSOrderedSame) {
@@ -209,10 +212,10 @@
success1 = [eam removeExtendedAttribute:SKIM_NOTES_KEY atPath:path
traverseLink:YES error:&error1];
if (success1 == NO && [error1 code] == ENOATTR)
success1 = YES;
- success2 = [eam removeExtendedAttribute:SKIM_RTF_NOTES_KEY atPath:path
traverseLink:YES error:&error2];
+ success2 = [eam removeExtendedAttribute:SKIM_TEXT_NOTES_KEY
atPath:path traverseLink:YES error:&error2];
if (success2 == NO && [error2 code] == ENOATTR)
success2 = YES;
- success3 = [eam removeExtendedAttribute:SKIM_TEXT_NOTES_KEY
atPath:path traverseLink:YES error:&error3];
+ success3 = [eam removeExtendedAttribute:SKIM_RTF_NOTES_KEY atPath:path
traverseLink:YES error:&error3];
if (success3 == NO && [error3 code] == ENOATTR)
success3 = YES;
}
Modified: trunk/SkimNotes/SKNAgentListener.h
===================================================================
--- trunk/SkimNotes/SKNAgentListener.h 2008-07-21 00:16:43 UTC (rev 4261)
+++ trunk/SkimNotes/SKNAgentListener.h 2008-07-21 10:58:54 UTC (rev 4262)
@@ -35,7 +35,7 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <Cocoa/Cocoa.h>
+#import <Foundation/Foundation.h>
@interface SKNAgentListener : NSObject {
Modified: trunk/SkimNotes/SKNAgentListener.m
===================================================================
--- trunk/SkimNotes/SKNAgentListener.m 2008-07-21 00:16:43 UTC (rev 4261)
+++ trunk/SkimNotes/SKNAgentListener.m 2008-07-21 10:58:54 UTC (rev 4262)
@@ -37,7 +37,6 @@
#import "SKNAgentListener.h"
#import "SKNAgentListenerProtocol.h"
-#import <AppKit/AppKit.h>
#import "NSFileManager_SKNToolExtensions.h"
@implementation SKNAgentListener
Modified: trunk/SkimNotes/SKNExtendedAttributeManager.h
===================================================================
--- trunk/SkimNotes/SKNExtendedAttributeManager.h 2008-07-21 00:16:43 UTC
(rev 4261)
+++ trunk/SkimNotes/SKNExtendedAttributeManager.h 2008-07-21 10:58:54 UTC
(rev 4262)
@@ -33,7 +33,7 @@
@abstract An singleton class to read and write extended attributes.
@discussion This header file declares API for a singleton class to read
and write extended attributes in the format expected for Skim notes.
*/
-#import <Cocoa/Cocoa.h>
+#import <Foundation/Foundation.h>
/*!
@enum SKNXattrFlags
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit