Revision: 6659
http://skim-app.svn.sourceforge.net/skim-app/?rev=6659&view=rev
Author: hofman
Date: 2010-07-27 11:48:10 +0000 (Tue, 27 Jul 2010)
Log Message:
-----------
pass the main window in method to update presentation options because [NSApp
mainWindow] often is not set yet when the notification is send.
Modified Paths:
--------------
trunk/SKApplication.h
trunk/SKApplication.m
trunk/SKApplicationController.m
trunk/SKMainWindowController.m
Modified: trunk/SKApplication.h
===================================================================
--- trunk/SKApplication.h 2010-07-27 11:26:11 UTC (rev 6658)
+++ trunk/SKApplication.h 2010-07-27 11:48:10 UTC (rev 6659)
@@ -48,7 +48,7 @@
@property (nonatomic, getter=isUserAttentionDisabled) BOOL
userAttentionDisabled;
-- (void)updatePresentationOptions;
+- (void)updatePresentationOptionsForWindow:(NSWindow *)aWindow;
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
- (id <SKApplicationDelegate>)delegate;
Modified: trunk/SKApplication.m
===================================================================
--- trunk/SKApplication.m 2010-07-27 11:26:11 UTC (rev 6658)
+++ trunk/SKApplication.m 2010-07-27 11:48:10 UTC (rev 6659)
@@ -87,11 +87,11 @@
[super terminate:sender];
}
-- (void)updatePresentationOptions {
+- (void)updatePresentationOptionsForWindow:(NSWindow *)aWindow {
SystemUIMode currentMode, mode;
SystemUIOptions currentOptions, options;
GetSystemUIMode(¤tMode, ¤tOptions);
- switch ([[[[self mainWindow] windowController] document]
systemInteractionMode]) {
+ switch ([[[aWindow windowController] document] systemInteractionMode]) {
case SKPresentationMode:
mode = kUIModeAllHidden;
options = kUIOptionDisableProcessSwitch;
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2010-07-27 11:26:11 UTC (rev 6658)
+++ trunk/SKApplicationController.m 2010-07-27 11:48:10 UTC (rev 6659)
@@ -156,7 +156,7 @@
}
- (void)handleWindowDidBecomeMainNotification:(NSNotification *)aNotification {
- [NSApp updatePresentationOptions];
+ [NSApp updatePresentationOptionsForWindow:[aNotification object]];
}
#pragma mark NSApplication delegate
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2010-07-27 11:26:11 UTC (rev 6658)
+++ trunk/SKMainWindowController.m 2010-07-27 11:48:10 UTC (rev 6659)
@@ -1416,7 +1416,7 @@
if (wasInteractionMode == SKPresentationMode) {
[self exitPresentationMode];
- [NSApp updatePresentationOptions];
+ [NSApp updatePresentationOptionsForWindow:[self window]];
[pdfView setFrame:[pdfContentView bounds]];
[pdfContentView addSubview:pdfView];
@@ -1448,7 +1448,7 @@
interactionMode = SKPresentationMode;
if (wasInteractionMode == SKFullScreenMode) {
- [NSApp updatePresentationOptions];
+ [NSApp updatePresentationOptionsForWindow:[self window]];
[pdfSplitView setFrame:[centerContentView bounds]];
[centerContentView addSubview:pdfSplitView];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit