Revision: 6851
http://skim-app.svn.sourceforge.net/skim-app/?rev=6851&view=rev
Author: hofman
Date: 2010-09-29 23:17:39 +0000 (Wed, 29 Sep 2010)
Log Message:
-----------
use local variable to avoid repeating accessor
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2010-09-29 10:19:37 UTC (rev 6850)
+++ trunk/SKMainWindowController.m 2010-09-29 23:17:39 UTC (rev 6851)
@@ -1983,22 +1983,24 @@
- (void)registerForDocumentNotifications {
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
+ PDFDocument *pdfDoc = [pdfView document];
[nc addObserver:self selector:@selector(handleDocumentBeginWrite:)
- name:PDFDocumentDidBeginWriteNotification
object:[pdfView document]];
+ name:PDFDocumentDidBeginWriteNotification
object:pdfDoc];
[nc addObserver:self selector:@selector(handleDocumentEndWrite:)
- name:PDFDocumentDidEndWriteNotification
object:[pdfView document]];
+ name:PDFDocumentDidEndWriteNotification
object:pdfDoc];
[nc addObserver:self selector:@selector(handleDocumentEndPageWrite:)
- name:PDFDocumentDidEndPageWriteNotification
object:[pdfView document]];
+ name:PDFDocumentDidEndPageWriteNotification
object:pdfDoc];
[nc addObserver:self
selector:@selector(handlePageBoundsDidChangeNotification:)
- name:SKPDFPageBoundsDidChangeNotification
object:[pdfView document]];
+ name:SKPDFPageBoundsDidChangeNotification
object:pdfDoc];
}
- (void)unregisterForDocumentNotifications {
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
- [nc removeObserver:self name:PDFDocumentDidBeginWriteNotification
object:[pdfView document]];
- [nc removeObserver:self name:PDFDocumentDidEndWriteNotification
object:[pdfView document]];
- [nc removeObserver:self name:PDFDocumentDidEndPageWriteNotification
object:[pdfView document]];
- [nc removeObserver:self name:SKPDFPageBoundsDidChangeNotification
object:[pdfView document]];
+ PDFDocument *pdfDoc = [pdfView document];
+ [nc removeObserver:self name:PDFDocumentDidBeginWriteNotification
object:pdfDoc];
+ [nc removeObserver:self name:PDFDocumentDidEndWriteNotification
object:pdfDoc];
+ [nc removeObserver:self name:PDFDocumentDidEndPageWriteNotification
object:pdfDoc];
+ [nc removeObserver:self name:SKPDFPageBoundsDidChangeNotification
object:pdfDoc];
}
#pragma mark Subwindows
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