Revision: 6822
http://skim-app.svn.sourceforge.net/skim-app/?rev=6822&view=rev
Author: hofman
Date: 2010-09-19 11:58:51 +0000 (Sun, 19 Sep 2010)
Log Message:
-----------
bind textview in window for anchored note in code instead of nib
Modified Paths:
--------------
trunk/NoteWindow.xib
trunk/SKNoteWindowController.m
Modified: trunk/NoteWindow.xib
===================================================================
--- trunk/NoteWindow.xib 2010-09-19 11:13:34 UTC (rev 6821)
+++ trunk/NoteWindow.xib 2010-09-19 11:58:51 UTC (rev 6822)
@@ -67,29 +67,6 @@
<object class="NSTextView" id="315707833">
<reference key="NSNextResponder" ref="470158365"/>
<int key="NSvFlags">2322</int>
-
<object class="NSMutableSet" key="NSDragTypes">
-
<bool key="EncodedWithXMLCoder">YES</bool>
-
<object class="NSArray" key="set.sortedObjects">
-
<bool key="EncodedWithXMLCoder">YES</bool>
-
<string>Apple HTML pasteboard type</string>
-
<string>Apple PDF pasteboard type</string>
-
<string>Apple PICT pasteboard type</string>
-
<string>Apple PNG pasteboard type</string>
-
<string>Apple URL pasteboard type</string>
-
<string>CorePasteboardFlavorType 0x6D6F6F76</string>
-
<string>NSColor pasteboard type</string>
-
<string>NSFilenamesPboardType</string>
-
<string>NSStringPboardType</string>
-
<string>NeXT Encapsulated PostScript v1.2 pasteboard
type</string>
-
<string>NeXT RTFD pasteboard type</string>
-
<string>NeXT Rich Text Format v1.0 pasteboard
type</string>
-
<string>NeXT TIFF v4.0 pasteboard type</string>
-
<string>NeXT font pasteboard type</string>
-
<string>NeXT ruler pasteboard type</string>
-
<string>WebURLsWithTitlesPboardType</string>
-
<string>public.url</string>
-
</object>
-
</object>
<string key="NSFrameSize">{331, 14}</string>
<reference key="NSSuperview" ref="470158365"/>
<object class="NSTextContainer" key="NSTextContainer" id="335718065">
@@ -175,7 +152,6 @@
</object>
<string
key="NSFrameSize">{331, 173}</string>
<reference key="NSSuperview" ref="740348933"/>
-
<reference key="NSNextKeyView" ref="315707833"/>
<reference key="NSDocView" ref="315707833"/>
<reference key="NSBGColor" ref="814770805"/>
<object
class="NSCursor" key="NSCursor">
@@ -208,7 +184,6 @@
</object>
<string
key="NSFrame">{{0, 22}, {342, 173}}</string>
<reference
key="NSSuperview" ref="123586400"/>
- <reference
key="NSNextKeyView" ref="470158365"/>
<int
key="NSsFlags">16</int>
<reference
key="NSVScroller" ref="17499870"/>
<reference
key="NSHScroller" ref="375396715"/>
@@ -641,35 +616,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection"
key="connection">
- <string
key="label">attributedString: selection.text</string>
- <reference key="source"
ref="315707833"/>
- <reference key="destination"
ref="1033251953"/>
- <object
class="NSNibBindingConnector" key="connector">
- <reference
key="NSSource" ref="315707833"/>
- <reference
key="NSDestination" ref="1033251953"/>
- <string
key="NSLabel">attributedString: selection.text</string>
- <string
key="NSBinding">attributedString</string>
- <string
key="NSKeyPath">selection.text</string>
- <object
class="NSDictionary" key="NSOptions">
- <bool
key="EncodedWithXMLCoder">YES</bool>
- <object
class="NSArray" key="dict.sortedKeys">
- <bool
key="EncodedWithXMLCoder">YES</bool>
-
<string>NSAllowsEditingMultipleValuesSelection</string>
-
<string>NSConditionallySetsEditable</string>
- </object>
- <object
class="NSMutableArray" key="dict.values">
- <bool
key="EncodedWithXMLCoder">YES</bool>
-
<boolean value="NO"/>
-
<boolean value="NO"/>
- </object>
- </object>
- <int
key="NSNibBindingConnectorVersion">2</int>
- </object>
- </object>
- <int key="connectionID">182</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBBindingConnection"
key="connection">
<string key="label">value:
keepOnTop</string>
<reference key="source"
ref="216923650"/>
<reference key="destination"
ref="327308518"/>
Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m 2010-09-19 11:13:34 UTC (rev 6821)
+++ trunk/SKNoteWindowController.m 2010-09-19 11:58:51 UTC (rev 6822)
@@ -159,13 +159,12 @@
if ([self isNoteType]) {
[gradientView setEdges:SKMinYEdgeMask];
- if ([[textView string] length] == 0) {
- NSString *fontName = [[NSUserDefaults standardUserDefaults]
stringForKey:SKAnchoredNoteFontNameKey];
- CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:SKAnchoredNoteFontSizeKey];
- NSFont *font = fontName ? [NSFont fontWithName:fontName
size:fontSize] : nil;
- if (font)
- [textView setFont:font];
- }
+ NSString *fontName = [[NSUserDefaults standardUserDefaults]
stringForKey:SKAnchoredNoteFontNameKey];
+ CGFloat fontSize = [[NSUserDefaults standardUserDefaults]
floatForKey:SKAnchoredNoteFontSizeKey];
+ NSFont *font = fontName ? [NSFont fontWithName:fontName size:fontSize]
: nil;
+ if (font)
+ [textView setFont:font];
+ [textView bind:@"attributedString" toObject:noteController
withKeyPath:@"selection.text" options:nil];
for (NSMenuItem *item in [iconTypePopUpButton itemArray])
[item setImage:noteIcons[[item tag]]];
@@ -177,7 +176,6 @@
NSRect frame = NSUnionRect([[textView enclosingScrollView] frame],
[gradientView frame]);
[[textView enclosingScrollView] setFrame:frame];
- [textView unbind:@"attributedString"];
[textView setRichText:NO];
[textView setUsesDefaultFontSize:YES];
[textView bind:@"value" toObject:noteController
withKeyPath:@"selection.string" options:nil];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit