Revision: 12581
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12581&view=rev
Author: hofman
Date: 2008-01-19 08:29:51 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Make Skim notes and Finder label of linked file scriptable.
Modified Paths:
--------------
trunk/bibdesk/NSURL_BDSKExtensions.m
trunk/bibdesk/Scripting/BibDesk.sdef
Modified: trunk/bibdesk/NSURL_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSURL_BDSKExtensions.m 2008-01-19 16:14:56 UTC (rev
12580)
+++ trunk/bibdesk/NSURL_BDSKExtensions.m 2008-01-19 16:29:51 UTC (rev
12581)
@@ -40,6 +40,7 @@
#import "CFString_BDSKExtensions.h"
#import "NSImage_BDSKExtensions.h"
#import "BDSKSkimReader.h"
+#import <FileView/FVFinderLabel.h>
@implementation NSURL (BDSKExtensions)
@@ -321,4 +322,17 @@
return data ? [[[NSAttributedString alloc] initWithRTF:data
documentAttributes:NULL] autorelease] : nil;
}
+- (NSTextStorage *)styledTextSkimNotes {
+ NSAttributedString *richTextSkimNotes = [self richTextSkimNotes];
+ return richTextSkimNotes ? [[[NSTextStorage alloc]
initWithAttributedString:richTextSkimNotes] autorelease] : nil;
+}
+
+- (int)finderLabel{
+ return [FVFinderLabel finderLabelForURL:self];
+}
+
+- (void)setFinderLabel:(int)label{
+ [FVFinderLabel setFinderLabel:label forURL:self];
+}
+
@end
\ No newline at end of file
Modified: trunk/bibdesk/Scripting/BibDesk.sdef
===================================================================
--- trunk/bibdesk/Scripting/BibDesk.sdef 2008-01-19 16:14:56 UTC (rev
12580)
+++ trunk/bibdesk/Scripting/BibDesk.sdef 2008-01-19 16:29:51 UTC (rev
12581)
@@ -624,9 +624,25 @@
<cocoa class="NSURL"/>
<type type="file"/>
<property name="URL" code="rURL" type="text" access="r"
- description="URL for the file.">
+ description="The URL of the file.">
<cocoa key="absoluteString"/>
</property>
+ <property name="path" code="ppth" type="text" access="r"
+ description="The path of the file.">
+ <cocoa key="path"/>
+ </property>
+ <property name="label index" code="labi" type="integer"
+ description="The Finder label of the file.">
+ <cocoa key="finderLabel"/>
+ </property>
+ <property name="Skim notes" code="SKnt" type="text" access="r"
+ description="The Skim notes for the file.">
+ <cocoa key="textSkimNotes"/>
+ </property>
+ <property name="rich Skim notes" code="rSKn" type="rich text"
access="r"
+ description="The rich text Skim notes for the file.">
+ <cocoa key="styledTextSkimNotes"/>
+ </property>
</class>
<class name="publication" plural="publications" code="bibi"
inherits="item"
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 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit