Revision: 5363
http://skim-app.svn.sourceforge.net/skim-app/?rev=5363&view=rev
Author: hofman
Date: 2009-05-07 14:47:30 +0000 (Thu, 07 May 2009)
Log Message:
-----------
pass editor registration for note window to the document, so committing before
a save will be automatic
Modified Paths:
--------------
trunk/SKNoteWindowController.h
trunk/SKNoteWindowController.m
Modified: trunk/SKNoteWindowController.h
===================================================================
--- trunk/SKNoteWindowController.h 2009-05-07 11:57:32 UTC (rev 5362)
+++ trunk/SKNoteWindowController.h 2009-05-07 14:47:30 UTC (rev 5363)
@@ -71,6 +71,4 @@
- (void)statusBarClicked:(id)sender;
-- (void)handleDocumentWillSaveNotification:(NSNotification *)notification;
-
@end
Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m 2009-05-07 11:57:32 UTC (rev 5362)
+++ trunk/SKNoteWindowController.m 2009-05-07 14:47:30 UTC (rev 5363)
@@ -195,9 +195,6 @@
[self updateStatusMessage];
[self setWindowFrameAutosaveNameOrCascade:[self isNoteType] ?
SKNoteWindowFrameAutosaveName : SKGenericNoteWindowFrameAutosaveName];
-
- [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleDocumentWillSaveNotification:)
-
name:SKPDFDocumentWillSaveNotification object:[self document]];
}
- (void)windowWillClose:(NSNotification *)aNotification {
@@ -269,16 +266,22 @@
[pdfView setActiveAnnotation:note];
}
-- (void)handleDocumentWillSaveNotification:(NSNotification *)notification {
- [noteController commitEditing];
-}
-
- (NSUndoManager *)undoManagerForTextView:(NSTextView *)aTextView {
if (textViewUndoManager == nil)
textViewUndoManager = [[NSUndoManager alloc] init];
return textViewUndoManager;
}
+#pragma mark NSEditorRegistration protocol
+
+- (void)objectDidBeginEditing:(id)editor {
+ [[self document] objectDidBeginEditing:editor];
+}
+
+- (void)objectDidEndEditing:(id)editor {
+ [[self document] objectDidEndEditing:editor];
+}
+
#pragma mark BDSKDragImageView delegate protocol
- (BOOL)dragImageView:(BDSKDragImageView *)view
writeDataToPasteboard:(NSPasteboard *)pasteboard {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit