Revision: 15207
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15207&view=rev
Author: hofman
Date: 2009-04-27 10:31:39 +0000 (Mon, 27 Apr 2009)
Log Message:
-----------
Rename BDSKOverlay to BDSKOverlayPanel, as we have both a panel and window
version.
Modified Paths:
--------------
trunk/bibdesk/BDSKPreferenceController.m
trunk/bibdesk/BDSKPreviewer.h
trunk/bibdesk/BDSKPreviewer.m
trunk/bibdesk/BibDocument.m
trunk/bibdesk/BibDocument_Search.m
trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj
trunk/bibdesk/English.lproj/Previewer.nib/classes.nib
trunk/bibdesk/English.lproj/Previewer.nib/info.nib
trunk/bibdesk/English.lproj/Previewer.nib/keyedobjects.nib
trunk/bibdesk/French.lproj/Previewer.nib/classes.nib
trunk/bibdesk/French.lproj/Previewer.nib/info.nib
trunk/bibdesk/French.lproj/Previewer.nib/keyedobjects.nib
Added Paths:
-----------
trunk/bibdesk/BDSKOverlayWindow.h
trunk/bibdesk/BDSKOverlayWindow.m
Removed Paths:
-------------
trunk/bibdesk/BDSKOverlay.h
trunk/bibdesk/BDSKOverlay.m
Deleted: trunk/bibdesk/BDSKOverlay.h
===================================================================
--- trunk/bibdesk/BDSKOverlay.h 2009-04-27 09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/BDSKOverlay.h 2009-04-27 10:31:39 UTC (rev 15207)
@@ -1,70 +0,0 @@
-//
-// BDSKOverlay.h
-// Bibdesk
-//
-// Created by Christiaan Hofman on 9/8/05.
-//
-/*
- This software is Copyright (c) 2005-2009
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
-
-...@interface BDSKOverlay : NSPanel {
- NSView *parentView;
-}
-
-/*!
- @method overlayView:
- @abstract Overlay aView with the receiver, automatically resizing
itself to the frame of aView.
- @discussion Removes itself from a previous parent view first. The
parent view should be in a window and should not be removed from its window
while the overlay is in place.
- @param aView The parent view to be overlayed.
-*/
-- (void)overlayView:(NSView *)aView;
-/*!
- @method remove
- @abstract Remove the receiver as an overlay from its parent view and
release its parent view.
- @discussion (discussion)
-*/
-- (void)remove;
-
-...@end
-
-// this implementation is for use with NSWindows, since the NSPanel subclass
has unwanted behavior when the parent window loses key status
-
-...@interface BDSKOverlayWindow : NSWindow {
- NSView *parentView;
-}
-- (void)overlayView:(NSView *)aView;
-- (void)remove;
-...@end
Deleted: trunk/bibdesk/BDSKOverlay.m
===================================================================
--- trunk/bibdesk/BDSKOverlay.m 2009-04-27 09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/BDSKOverlay.m 2009-04-27 10:31:39 UTC (rev 15207)
@@ -1,241 +0,0 @@
-//
-// BDSKOverlay.m
-// Bibdesk
-//
-// Created by Christiaan Hofman on 9/8/05.
-//
-/*
- This software is Copyright (c) 2005-2009
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "BDSKOverlay.h"
-
-...@implementation BDSKOverlay
-
-// designated initializer of NSWindow
-- (id)initWithContentRect:(NSRect)contentRect
- styleMask:(NSUInteger)aStyle
- backing:(NSBackingStoreType)bufferingType
- defer:(BOOL)flag {
-
- if (self = [super initWithContentRect:contentRect
-
styleMask:NSBorderlessWindowMask
-
backing:bufferingType
-
defer:flag]) {
- parentView = nil;
- // we are transparent and ignore mouse events
- [self setBackgroundColor:[NSColor clearColor]];
- [self setOpaque:NO];
- [self setAlphaValue:.999];
- [self setIgnoresMouseEvents:YES];
- }
- return self;
-}
-
-- (void)dealloc {
- [self remove];
- [super dealloc];
-}
-
-- (void)parentViewFrameChanged:(NSNotification *)notification {
- NSRect viewRect = [parentView convertRect:[parentView bounds]
toView:nil];
- NSPoint windowOrigin = [[parentView window] frame].origin;
-
- viewRect.origin.x += windowOrigin.x;
- viewRect.origin.y += windowOrigin.y;
-
- [self setFrame:viewRect display:YES];
-}
-
-- (void)parentWindowWillClose:(NSNotification *)notification {
- [self orderOut:nil];
-}
-
-- (void)overlayView:(NSView *)aView {
- if ([aView window] == nil)
- return; // we don't support overlay if the view is not in a
window
- if (parentView)
- [self remove]; // first remove from the old parentView
-
- parentView = [aView retain];
-
- NSWindow *parentWindow = [parentView window];
-
- // if the parent is a floating panel, we also should be. Otherwise we
won't get on top.
- [self setFloatingPanel:([parentWindow isKindOfClass:[NSPanel class]] &&
[(NSPanel *)parentWindow isFloatingPanel])];
- [self setHidesOnDeactivate:[parentWindow hidesOnDeactivate]];
- [self setLevel:[parentWindow level]];
- [parentWindow addChildWindow:self ordered:NSWindowAbove];
-
- // resize ourselves to cover the view, and observe future frame changes
- [self parentViewFrameChanged:nil];
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(parentViewFrameChanged:)
- name:NSViewFrameDidChangeNotification
- object:parentView];
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(parentWindowWillClose:)
- name:NSWindowWillCloseNotification
- object:parentWindow];
-
- if ([parentWindow isVisible])
- [self orderFront:nil];
-}
-
-- (void)remove {
- if (parentView == nil)
- return;
-
- // stop observing our old parentView
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-
- [[self parentWindow] removeChildWindow:self];
- // we were on top, so it needs to redisplay
-
- [parentView setNeedsDisplay:YES];
- [parentView release];
- parentView = nil;
-
- [self orderOut:nil];
-}
-
-- (BOOL)accessiblityIsIgnored {
- return YES;
-}
-
-...@end
-
-//
-// This is identical to the NSPanel version, except that it accounts for a
toolbar in the height calculation, and won't hide when the application is in
the background.
-//
-
-...@implementation BDSKOverlayWindow
-
-// designated initializer of NSWindow
-- (id)initWithContentRect:(NSRect)contentRect
- styleMask:(NSUInteger)aStyle
- backing:(NSBackingStoreType)bufferingType
- defer:(BOOL)flag {
-
- if (self = [super initWithContentRect:contentRect
-
styleMask:NSBorderlessWindowMask
-
backing:bufferingType
-
defer:flag]) {
- parentView = nil;
- // we are transparent and ignore mouse events
- [self setBackgroundColor:[NSColor clearColor]];
- [self setOpaque:NO];
- [self setAlphaValue:.999];
- [self setIgnoresMouseEvents:YES];
- }
- return self;
-}
-
-- (void)dealloc {
- [self remove];
- [super dealloc];
-}
-
-- (void)parentViewFrameChanged:(NSNotification *)notification {
- NSRect viewRect = [parentView convertRect:[parentView bounds]
toView:nil];
- NSPoint windowOrigin = [[parentView window] frame].origin;
-
- viewRect.origin.x += windowOrigin.x;
- viewRect.origin.y += windowOrigin.y;
-
- [self setFrame:viewRect display:YES];
-}
-
-- (void)parentWindowWillClose:(NSNotification *)notification {
- [self orderOut:nil];
-}
-
-- (void)orderFront:(id)sender{
- [super orderFront:sender];
- [self parentViewFrameChanged:nil];
-}
-
-- (void)overlayView:(NSView *)aView {
- if ([aView window] == nil)
- return; // we don't support overlay if the view is not in a
window
- if (parentView)
- [self remove]; // first remove from the old parentView
-
- parentView = [aView retain];
-
- NSWindow *parentWindow = [parentView window];
-
- [self setLevel:[parentWindow level]];
- [parentWindow addChildWindow:self ordered:NSWindowAbove];
-
- // resize ourselves to cover the view, and observe future frame changes
- [self parentViewFrameChanged:nil];
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(parentViewFrameChanged:)
- name:NSViewFrameDidChangeNotification
- object:parentView];
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(parentWindowWillClose:)
- name:NSWindowWillCloseNotification
- object:parentWindow];
-
- if ([parentWindow isVisible])
- [self orderFront:nil];
-}
-
-- (void)remove {
- if (parentView == nil)
- return;
-
- // stop observing our old parentView
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-
- [[self parentWindow] removeChildWindow:self];
- // we were on top, so it needs to redisplay
-
- [parentView setNeedsDisplay:YES];
- [parentView release];
- parentView = nil;
-
- [self orderOut:nil];
-}
-
-- (BOOL)accessiblityIsIgnored {
- return YES;
-}
-
-...@end
-
Copied: trunk/bibdesk/BDSKOverlayWindow.h (from rev 15203,
trunk/bibdesk/BDSKOverlay.h)
===================================================================
--- trunk/bibdesk/BDSKOverlayWindow.h (rev 0)
+++ trunk/bibdesk/BDSKOverlayWindow.h 2009-04-27 10:31:39 UTC (rev 15207)
@@ -0,0 +1,78 @@
+//
+// BDSKOverlayWindow.h
+// Bibdesk
+//
+// Created by Christiaan Hofman on 9/8/05.
+//
+/*
+ This software is Copyright (c) 2005-2009
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+...@interface BDSKOverlayWindow : NSWindow {
+ NSView *parentView;
+}
+/*!
+ @method overlayView:
+ @abstract Overlay aView with the receiver, automatically resizing
itself to the frame of aView.
+ @discussion Removes itself from a previous parent view first. The
parent view should be in a window and should not be removed from its window
while the overlay is in place.
+ @param aView The parent view to be overlayed.
+*/
+- (void)overlayView:(NSView *)aView;
+/*!
+ @method remove
+ @abstract Remove the receiver as an overlay from its parent view and
release its parent view.
+ @discussion (discussion)
+*/
+- (void)remove;
+...@end
+
+
+...@interface BDSKOverlayPanel : NSPanel {
+ NSView *parentView;
+}
+/*!
+ @method overlayView:
+ @abstract Overlay aView with the receiver, automatically resizing
itself to the frame of aView.
+ @discussion Removes itself from a previous parent view first. The
parent view should be in a window and should not be removed from its window
while the overlay is in place.
+ @param aView The parent view to be overlayed.
+*/
+- (void)overlayView:(NSView *)aView;
+/*!
+ @method remove
+ @abstract Remove the receiver as an overlay from its parent view and
release its parent view.
+ @discussion (discussion)
+*/
+- (void)remove;
+...@end
Copied: trunk/bibdesk/BDSKOverlayWindow.m (from rev 15203,
trunk/bibdesk/BDSKOverlay.m)
===================================================================
--- trunk/bibdesk/BDSKOverlayWindow.m (rev 0)
+++ trunk/bibdesk/BDSKOverlayWindow.m 2009-04-27 10:31:39 UTC (rev 15207)
@@ -0,0 +1,235 @@
+//
+// BDSKOverlayWindow.m
+// Bibdesk
+//
+// Created by Christiaan Hofman on 9/8/05.
+//
+/*
+ This software is Copyright (c) 2005-2009
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "BDSKOverlayWindow.h"
+
+
+...@implementation BDSKOverlayWindow
+
+// designated initializer of NSWindow
+- (id)initWithContentRect:(NSRect)contentRect
+ styleMask:(NSUInteger)aStyle
+ backing:(NSBackingStoreType)bufferingType
+ defer:(BOOL)flag {
+
+ if (self = [super initWithContentRect:contentRect
+
styleMask:NSBorderlessWindowMask
+
backing:bufferingType
+
defer:flag]) {
+ parentView = nil;
+ // we are transparent and ignore mouse events
+ [self setBackgroundColor:[NSColor clearColor]];
+ [self setOpaque:NO];
+ [self setAlphaValue:.999];
+ [self setIgnoresMouseEvents:YES];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [self remove];
+ [super dealloc];
+}
+
+- (void)parentViewFrameChanged:(NSNotification *)notification {
+ NSRect viewRect = [parentView convertRect:[parentView bounds]
toView:nil];
+ NSPoint windowOrigin = [[parentView window] frame].origin;
+
+ viewRect.origin.x += windowOrigin.x;
+ viewRect.origin.y += windowOrigin.y;
+
+ [self setFrame:viewRect display:YES];
+}
+
+- (void)parentWindowWillClose:(NSNotification *)notification {
+ [self orderOut:nil];
+}
+
+- (void)orderFront:(id)sender{
+ [super orderFront:sender];
+ [self parentViewFrameChanged:nil];
+}
+
+- (void)overlayView:(NSView *)aView {
+ if ([aView window] == nil)
+ return; // we don't support overlay if the view is not in a
window
+ if (parentView)
+ [self remove]; // first remove from the old parentView
+
+ parentView = [aView retain];
+
+ NSWindow *parentWindow = [parentView window];
+
+ [self setLevel:[parentWindow level]];
+ [parentWindow addChildWindow:self ordered:NSWindowAbove];
+
+ // resize ourselves to cover the view, and observe future frame changes
+ [self parentViewFrameChanged:nil];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(parentViewFrameChanged:)
+ name:NSViewFrameDidChangeNotification
+ object:parentView];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(parentWindowWillClose:)
+ name:NSWindowWillCloseNotification
+ object:parentWindow];
+
+ if ([parentWindow isVisible])
+ [self orderFront:nil];
+}
+
+- (void)remove {
+ if (parentView == nil)
+ return;
+
+ // stop observing our old parentView
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+ [[self parentWindow] removeChildWindow:self];
+ // we were on top, so it needs to redisplay
+
+ [parentView setNeedsDisplay:YES];
+ [parentView release];
+ parentView = nil;
+
+ [self orderOut:nil];
+}
+
+- (BOOL)accessiblityIsIgnored { return YES; }
+
+...@end
+
+#pragma mark -
+
+...@implementation BDSKOverlayPanel
+
+// designated initializer of NSWindow
+- (id)initWithContentRect:(NSRect)contentRect
+ styleMask:(NSUInteger)aStyle
+ backing:(NSBackingStoreType)bufferingType
+ defer:(BOOL)flag {
+
+ if (self = [super initWithContentRect:contentRect
+
styleMask:NSBorderlessWindowMask
+
backing:bufferingType
+
defer:flag]) {
+ parentView = nil;
+ // we are transparent and ignore mouse events
+ [self setBackgroundColor:[NSColor clearColor]];
+ [self setOpaque:NO];
+ [self setAlphaValue:.999];
+ [self setIgnoresMouseEvents:YES];
+ }
+ return self;
+}
+
+- (void)dealloc {
+ [self remove];
+ [super dealloc];
+}
+
+- (void)parentViewFrameChanged:(NSNotification *)notification {
+ NSRect viewRect = [parentView convertRect:[parentView bounds]
toView:nil];
+ NSPoint windowOrigin = [[parentView window] frame].origin;
+
+ viewRect.origin.x += windowOrigin.x;
+ viewRect.origin.y += windowOrigin.y;
+
+ [self setFrame:viewRect display:YES];
+}
+
+- (void)parentWindowWillClose:(NSNotification *)notification {
+ [self orderOut:nil];
+}
+
+- (void)overlayView:(NSView *)aView {
+ if ([aView window] == nil)
+ return; // we don't support overlay if the view is not in a
window
+ if (parentView)
+ [self remove]; // first remove from the old parentView
+
+ parentView = [aView retain];
+
+ NSWindow *parentWindow = [parentView window];
+
+ // if the parent is a floating panel, we also should be. Otherwise we
won't get on top.
+ [self setFloatingPanel:([parentWindow isKindOfClass:[NSPanel class]] &&
[(NSPanel *)parentWindow isFloatingPanel])];
+ [self setHidesOnDeactivate:[parentWindow hidesOnDeactivate]];
+ [self setLevel:[parentWindow level]];
+ [parentWindow addChildWindow:self ordered:NSWindowAbove];
+
+ // resize ourselves to cover the view, and observe future frame changes
+ [self parentViewFrameChanged:nil];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(parentViewFrameChanged:)
+ name:NSViewFrameDidChangeNotification
+ object:parentView];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(parentWindowWillClose:)
+ name:NSWindowWillCloseNotification
+ object:parentWindow];
+
+ if ([parentWindow isVisible])
+ [self orderFront:nil];
+}
+
+- (void)remove {
+ if (parentView == nil)
+ return;
+
+ // stop observing our old parentView
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
+ [[self parentWindow] removeChildWindow:self];
+ // we were on top, so it needs to redisplay
+
+ [parentView setNeedsDisplay:YES];
+ [parentView release];
+ parentView = nil;
+
+ [self orderOut:nil];
+}
+
+- (BOOL)accessiblityIsIgnored { return YES; }
+
+...@end
Modified: trunk/bibdesk/BDSKPreferenceController.m
===================================================================
--- trunk/bibdesk/BDSKPreferenceController.m 2009-04-27 09:55:33 UTC (rev
15206)
+++ trunk/bibdesk/BDSKPreferenceController.m 2009-04-27 10:31:39 UTC (rev
15207)
@@ -40,7 +40,7 @@
#import "BDSKPreferenceRecord.h"
#import "BDSKPreferencePane.h"
#import "BDSKPreferenceIconView.h"
-#import "BDSKOverlay.h"
+#import "BDSKOverlayWindow.h"
#import "BDSKSpotlightView.h"
#import "BDSKVersionNumber.h"
#import <Sparkle/Sparkle.h>
Modified: trunk/bibdesk/BDSKPreviewer.h
===================================================================
--- trunk/bibdesk/BDSKPreviewer.h 2009-04-27 09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/BDSKPreviewer.h 2009-04-27 10:31:39 UTC (rev 15207)
@@ -40,7 +40,7 @@
#import <Cocoa/Cocoa.h>
-...@class PDFView, BDSKZoomablePDFView, BDSKTeXTask, BDSKOverlay,
BDSKPreviewerServer;
+...@class PDFView, BDSKZoomablePDFView, BDSKTeXTask, BDSKOverlayPanel,
BDSKPreviewerServer;
enum {
BDSKUnknownPreviewState = -1,
@@ -61,7 +61,7 @@
IBOutlet NSTextView *logView;
IBOutlet NSTabView *tabView;
IBOutlet NSProgressIndicator *progressIndicator;
- IBOutlet BDSKOverlay *progressOverlay;
+ IBOutlet BDSKOverlayPanel *progressOverlay;
IBOutlet NSImageView *warningImageView;
IBOutlet NSView *warningView;
@@ -79,7 +79,7 @@
- (PDFView *)pdfView;
- (NSTextView *)textView;
-- (BDSKOverlay *)progressOverlay;
+- (BDSKOverlayPanel *)progressOverlay;
- (CGFloat)PDFScaleFactor;
- (void)setPDFScaleFactor:(CGFloat)scaleFactor;
Modified: trunk/bibdesk/BDSKPreviewer.m
===================================================================
--- trunk/bibdesk/BDSKPreviewer.m 2009-04-27 09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/BDSKPreviewer.m 2009-04-27 10:31:39 UTC (rev 15207)
@@ -37,7 +37,7 @@
#import "BDSKPreviewer.h"
#import "BDSKStringConstants.h"
#import "BDSKTeXTask.h"
-#import "BDSKOverlay.h"
+#import "BDSKOverlayWindow.h"
#import "BDSKAppController.h"
#import "BDSKZoomableTextView.h"
#import "BDSKZoomablePDFView.h"
@@ -221,7 +221,7 @@
return rtfPreviewView;
}
-- (BDSKOverlay *)progressOverlay;
+- (BDSKOverlayPanel *)progressOverlay;
{
[self window];
return progressOverlay;
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2009-04-27 09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/BibDocument.m 2009-04-27 10:31:39 UTC (rev 15207)
@@ -68,7 +68,7 @@
#import "BDSKFieldSheetController.h"
#import "BDSKPreviewer.h"
#import "BDSKTeXTask.h"
-#import "BDSKOverlay.h"
+#import "BDSKOverlayWindow.h"
#import "BDSKEditor.h"
#import "BDSKItemPasteboardHelper.h"
Modified: trunk/bibdesk/BibDocument_Search.m
===================================================================
--- trunk/bibdesk/BibDocument_Search.m 2009-04-27 09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/BibDocument_Search.m 2009-04-27 10:31:39 UTC (rev 15207)
@@ -49,7 +49,7 @@
#import "BDSKPublicationsArray.h"
#import "BDSKZoomablePDFView.h"
#import "BDSKPreviewer.h"
-#import "BDSKOverlay.h"
+#import "BDSKOverlayWindow.h"
#import "BibDocument_Groups.h"
#import "BDSKMainTableView.h"
#import "BDSKFindController.h"
Modified: trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj
===================================================================
--- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2009-04-27 09:55:33 UTC
(rev 15206)
+++ trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2009-04-27 10:31:39 UTC
(rev 15207)
@@ -426,7 +426,7 @@
F938408A0906DD1F00FC37F2 /* scripthook.tiff in Resources */ =
{isa = PBXBuildFile; fileRef = F93840890906DD1F00FC37F2 /* scripthook.tiff */;
};
F940D10A0B5568E400B5917A /* BDSKReferParser.m in Sources */ =
{isa = PBXBuildFile; fileRef = F940D1080B5568E400B5917A /* BDSKReferParser.m
*/; };
F941135509B549BF00EE8463 /* BDSKEditorTextView.m in Sources */
= {isa = PBXBuildFile; fileRef = F941135309B549BF00EE8463 /*
BDSKEditorTextView.m */; };
- F941B7EB08AA574200F04ECD /* BDSKOverlay.m in Sources */ = {isa
= PBXBuildFile; fileRef = F941B7E908AA574200F04ECD /* BDSKOverlay.m */; };
+ F941B7EB08AA574200F04ECD /* BDSKOverlayWindow.m in Sources */ =
{isa = PBXBuildFile; fileRef = F941B7E908AA574200F04ECD /* BDSKOverlayWindow.m
*/; };
F945240C0B4B15A6000A5E12 /* searchDocIcon.icns in Resources */
= {isa = PBXBuildFile; fileRef = F945240B0B4B15A6000A5E12 /* searchDocIcon.icns
*/; };
F9463F4609436F7500CC4549 /* NSSet_BDSKExtensions.m in Sources
*/ = {isa = PBXBuildFile; fileRef = F9463F4409436F7500CC4549 /*
NSSet_BDSKExtensions.m */; };
F946DCE909FDC4B600D471DF /* BDSKAsynchronousDOServer.m in
Sources */ = {isa = PBXBuildFile; fileRef = F946DCE709FDC4B600D471DF /*
BDSKAsynchronousDOServer.m */; };
@@ -1535,8 +1535,8 @@
F940D1080B5568E400B5917A /* BDSKReferParser.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= BDSKReferParser.m; sourceTree = "<group>"; };
F941135209B549BF00EE8463 /* BDSKEditorTextView.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
BDSKEditorTextView.h; sourceTree = "<group>"; };
F941135309B549BF00EE8463 /* BDSKEditorTextView.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= BDSKEditorTextView.m; sourceTree = "<group>"; };
- F941B7E808AA574200F04ECD /* BDSKOverlay.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
BDSKOverlay.h; sourceTree = "<group>"; };
- F941B7E908AA574200F04ECD /* BDSKOverlay.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= BDSKOverlay.m; sourceTree = "<group>"; };
+ F941B7E808AA574200F04ECD /* BDSKOverlayWindow.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
BDSKOverlayWindow.h; sourceTree = "<group>"; };
+ F941B7E908AA574200F04ECD /* BDSKOverlayWindow.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= BDSKOverlayWindow.m; sourceTree = "<group>"; };
F945240B0B4B15A6000A5E12 /* searchDocIcon.icns */ = {isa =
PBXFileReference; lastKnownFileType = image.icns; path = searchDocIcon.icns;
sourceTree = "<group>"; };
F9463F4309436F7500CC4549 /* NSSet_BDSKExtensions.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
NSSet_BDSKExtensions.h; sourceTree = "<group>"; };
F9463F4409436F7500CC4549 /* NSSet_BDSKExtensions.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= NSSet_BDSKExtensions.m; sourceTree = "<group>"; };
@@ -2090,7 +2090,7 @@
CE3B682909D1B0190017D339 /*
BDSKImagePopUpButtonCell.m */,
F92405010BC5856900672839 /*
BDSKLevelIndicatorCell.m */,
CE62E0BE0F4C4A5500BDF01E /* BDSKOutlineView.m
*/,
- F941B7E908AA574200F04ECD /* BDSKOverlay.m */,
+ F941B7E908AA574200F04ECD /* BDSKOverlayWindow.m
*/,
CE62DE490F4B788800BDF01E /*
BDSKPreferenceIconCell.m */,
CE62DE410F4B77D600BDF01E /*
BDSKPreferenceIconView.m */,
CE62DE3A0F4B777800BDF01E /*
BDSKPreferenceWindow.m */,
@@ -2696,7 +2696,7 @@
CE22E1CB0A8CCF9C002CEFB8 /*
BDSKOrphanedFilesFinder.h */,
F9CEFCB90A90090B00A0E54E /*
BDSKOrphanedFileServer.h */,
CE62E0BD0F4C4A5500BDF01E /* BDSKOutlineView.h
*/,
- F941B7E808AA574200F04ECD /* BDSKOverlay.h */,
+ F941B7E808AA574200F04ECD /* BDSKOverlayWindow.h
*/,
CE1EF2910F8E0D54004E7AE8 /* BDSKParentGroup.h
*/,
CED65DC60907A2FD003EED90 /*
BDSKParseFormatCommand.h */,
F92ECBF209DF09DA00A244D0 /*
BDSKPasswordController.h */,
@@ -3712,7 +3712,7 @@
F9E0BCB40895ACC9005E5FAA /* BibPref_Display.m
in Sources */,
F923501A089A813E00EFEB06 /*
NSDate_BDSKExtensions.m in Sources */,
F9DB895D08A54BBA00CB3D53 /* BDSKTeXTask.m in
Sources */,
- F941B7EB08AA574200F04ECD /* BDSKOverlay.m in
Sources */,
+ F941B7EB08AA574200F04ECD /* BDSKOverlayWindow.m
in Sources */,
F9E43AD808AD8BDB00A0354B /*
BDSKErrorObjectController.m in Sources */,
F9EF21B708B1572600AAC9A9 /*
BDSKScrollableTextField.m in Sources */,
F9EF21B908B1572600AAC9A9 /*
BDSKScrollableTextFieldCell.m in Sources */,
Modified: trunk/bibdesk/English.lproj/Previewer.nib/classes.nib
===================================================================
--- trunk/bibdesk/English.lproj/Previewer.nib/classes.nib 2009-04-27
09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/English.lproj/Previewer.nib/classes.nib 2009-04-27
10:31:39 UTC (rev 15207)
@@ -6,6 +6,14 @@
<array>
<dict>
<key>CLASS</key>
+ <string>NSApplication</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSResponder</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
<string>NSMenu</string>
<key>LANGUAGE</key>
<string>ObjC</string>
@@ -43,27 +51,27 @@
</dict>
<dict>
<key>CLASS</key>
- <string>BDSKOverlay</string>
+ <string>NSWindow</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSPanel</string>
+ <string>NSResponder</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSWindow</string>
+ <string>NSScrollView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSResponder</string>
+ <string>NSView</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSScrollView</string>
+ <string>BDSKOverlayPanel</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSView</string>
+ <string>NSPanel</string>
</dict>
<dict>
<key>CLASS</key>
@@ -74,6 +82,14 @@
<string>BDSKContainerView</string>
</dict>
<dict>
+ <key>CLASS</key>
+ <string>NSView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSResponder</string>
+ </dict>
+ <dict>
<key>ACTIONS</key>
<dict>
<key></key>
@@ -87,6 +103,14 @@
<string>NSObject</string>
</dict>
<dict>
+ <key>CLASS</key>
+ <string>NSCell</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
<key>ACTIONS</key>
<dict>
<key>scalePopUpAction</key>
@@ -132,7 +156,7 @@
<key>progressIndicator</key>
<string>NSProgressIndicator</string>
<key>progressOverlay</key>
- <string>BDSKOverlay</string>
+ <string>BDSKOverlayPanel</string>
<key>rtfPreviewView</key>
<string>NSTextView</string>
<key>tabView</key>
Modified: trunk/bibdesk/English.lproj/Previewer.nib/info.nib
===================================================================
--- trunk/bibdesk/English.lproj/Previewer.nib/info.nib 2009-04-27 09:55:33 UTC
(rev 15206)
+++ trunk/bibdesk/English.lproj/Previewer.nib/info.nib 2009-04-27 10:31:39 UTC
(rev 15207)
@@ -3,7 +3,9 @@
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
- <string>672</string>
+ <string>677</string>
+ <key>IBLastKnownRelativeProjectPath</key>
+ <string>../Bibdesk.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
@@ -12,7 +14,7 @@
<integer>5</integer>
</array>
<key>IBSystem Version</key>
- <string>9E17</string>
+ <string>9G55</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
Modified: trunk/bibdesk/English.lproj/Previewer.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/bibdesk/French.lproj/Previewer.nib/classes.nib
===================================================================
--- trunk/bibdesk/French.lproj/Previewer.nib/classes.nib 2009-04-27
09:55:33 UTC (rev 15206)
+++ trunk/bibdesk/French.lproj/Previewer.nib/classes.nib 2009-04-27
10:31:39 UTC (rev 15207)
@@ -6,62 +6,87 @@
<array>
<dict>
<key>CLASS</key>
- <string>BDSKCollapsibleView</string>
+ <string>NSApplication</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>BDSKContainerView</string>
+ <string>NSResponder</string>
</dict>
<dict>
+ <key>CLASS</key>
+ <string>NSControl</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSView</string>
+ </dict>
+ <dict>
<key>ACTIONS</key>
<dict>
- <key>scalePopUpAction</key>
+ <key>hideWindow</key>
<string>id</string>
+ <key>toggleShowingWindow</key>
+ <string>id</string>
</dict>
<key>CLASS</key>
- <string>BDSKZoomablePDFView</string>
+ <string>NSWindowController</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>PDFView</string>
+ <string>NSResponder</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSTextView</string>
+ <string>NSMenu</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSText</string>
+ <string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSMenu</string>
+ <string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSWindow</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSObject</string>
+ <string>NSResponder</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSControl</string>
+ <string>NSScrollView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
<dict>
- <key>ACTIONS</key>
- <dict>
- <key>hideWindow</key>
- <string>id</string>
- <key>toggleShowingWindow</key>
- <string>id</string>
- </dict>
<key>CLASS</key>
- <string>NSWindowController</string>
+ <string>BDSKOverlayPanel</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
+ <string>NSPanel</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>BDSKCollapsibleView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>BDSKContainerView</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>NSView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
<string>NSResponder</string>
</dict>
<dict>
@@ -79,22 +104,43 @@
</dict>
<dict>
<key>CLASS</key>
- <string>NSObject</string>
+ <string>NSCell</string>
<key>LANGUAGE</key>
<string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
</dict>
<dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>scalePopUpAction</key>
+ <string>id</string>
+ <key>zoomIn</key>
+ <string>id</string>
+ <key>zoomOut</key>
+ <string>id</string>
+ <key>zoomToActualSize</key>
+ <string>id</string>
+ </dict>
<key>CLASS</key>
- <string>BDSKContainerView</string>
+ <string>BDSKZoomableTextView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
- <key>OUTLETS</key>
+ <key>SUPERCLASS</key>
+ <string>NSTextView</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
<dict>
- <key>contentView</key>
+ <key>scalePopUpAction</key>
<string>id</string>
</dict>
+ <key>CLASS</key>
+ <string>BDSKZoomablePDFView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSView</string>
+ <string>PDFView</string>
</dict>
<dict>
<key>CLASS</key>
@@ -110,7 +156,7 @@
<key>progressIndicator</key>
<string>NSProgressIndicator</string>
<key>progressOverlay</key>
- <string>BDSKOverlay</string>
+ <string>BDSKOverlayPanel</string>
<key>rtfPreviewView</key>
<string>NSTextView</string>
<key>tabView</key>
@@ -125,44 +171,22 @@
</dict>
<dict>
<key>CLASS</key>
- <string>BDSKOverlay</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSPanel</string>
- </dict>
- <dict>
- <key>ACTIONS</key>
- <dict>
- <key>scalePopUpAction</key>
- <string>id</string>
- <key>zoomIn</key>
- <string>id</string>
- <key>zoomOut</key>
- <string>id</string>
- <key>zoomToActualSize</key>
- <string>id</string>
- </dict>
- <key>CLASS</key>
- <string>BDSKZoomableTextView</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
<string>NSTextView</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>NSWindow</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
- <string>NSResponder</string>
+ <string>NSText</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSScrollView</string>
+ <string>BDSKContainerView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>contentView</key>
+ <string>id</string>
+ </dict>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
Modified: trunk/bibdesk/French.lproj/Previewer.nib/info.nib
===================================================================
--- trunk/bibdesk/French.lproj/Previewer.nib/info.nib 2009-04-27 09:55:33 UTC
(rev 15206)
+++ trunk/bibdesk/French.lproj/Previewer.nib/info.nib 2009-04-27 10:31:39 UTC
(rev 15207)
@@ -3,13 +3,15 @@
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
- <string>670</string>
+ <string>677</string>
+ <key>IBLastKnownRelativeProjectPath</key>
+ <string>../Bibdesk.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array/>
<key>IBSystem Version</key>
- <string>9F33</string>
+ <string>9G55</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
Modified: trunk/bibdesk/French.lproj/Previewer.nib/keyedobjects.nib
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit