Revision: 5648
http://skim-app.svn.sourceforge.net/skim-app/?rev=5648&view=rev
Author: hofman
Date: 2009-09-03 22:09:10 +0000 (Thu, 03 Sep 2009)
Log Message:
-----------
Use IOKit constant for null identifier and reset identifier
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2009-09-03 21:50:05 UTC (rev 5647)
+++ trunk/SKMainWindowController.m 2009-09-03 22:09:10 UTC (rev 5648)
@@ -236,7 +236,7 @@
mwcFlags.updatingFont = 0;
mwcFlags.updatingLine = 0;
mwcFlags.usesDrawers = [[NSUserDefaults standardUserDefaults]
boolForKey:SKUsesDrawersKey];
- activityAssertionID = 0;
+ activityAssertionID = kIOPMNullAssertionID;
}
return self;
@@ -1482,15 +1482,15 @@
[notesPdfView goToPage:[[notesPdfView document] pageAtIndex:[[pdfView
currentPage] pageIndex]]];
// prevent sleep
- if (activityAssertionID == 0 && kIOReturnSuccess !=
IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep,
kIOPMAssertionLevelOn, CFSTR("Skim Presentation"), &activityAssertionID))
- activityAssertionID = 0;
+ if (activityAssertionID == kIOPMNullAssertionID && kIOReturnSuccess !=
IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep,
kIOPMAssertionLevelOn, CFSTR("Skim Presentation"), &activityAssertionID))
+ activityAssertionID = kIOPMNullAssertionID;
mwcFlags.isPresentation = 1;
}
- (void)exitPresentationMode {
- if (activityAssertionID != 0)
- IOPMAssertionRelease(activityAssertionID);
+ if (activityAssertionID != kIOPMNullAssertionID && kIOReturnSuccess ==
IOPMAssertionRelease(activityAssertionID))
+ activityAssertionID = kIOPMNullAssertionID;
NSScrollView *scrollView = [[pdfView documentView] enclosingScrollView];
[self applyPDFSettings:savedNormalSetup];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit