Revision: 3303
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3303&view=rev
Author:   hofman
Date:     2007-12-03 02:57:20 -0800 (Mon, 03 Dec 2007)

Log Message:
-----------
Make fullscreen and side windows inherit hiding hover window from main window 
class. Also hide hover window on keydown as normal tooltips do.

Modified Paths:
--------------
    trunk/SKFullScreenWindow.h
    trunk/SKFullScreenWindow.m
    trunk/SKMainWindow.m
    trunk/SKSideWindow.h
    trunk/SKSideWindow.m

Modified: trunk/SKFullScreenWindow.h
===================================================================
--- trunk/SKFullScreenWindow.h  2007-12-03 10:22:35 UTC (rev 3302)
+++ trunk/SKFullScreenWindow.h  2007-12-03 10:57:20 UTC (rev 3303)
@@ -37,10 +37,10 @@
  */
 
 #import <Cocoa/Cocoa.h>
+#import "SKMainWindow.h"
 
 
[EMAIL PROTECTED] SKFullScreenWindow : NSWindow{
-}
[EMAIL PROTECTED] SKFullScreenWindow : SKMainWindow
 
 - (id)initWithScreen:(NSScreen *)screen;
 

Modified: trunk/SKFullScreenWindow.m
===================================================================
--- trunk/SKFullScreenWindow.m  2007-12-03 10:22:35 UTC (rev 3302)
+++ trunk/SKFullScreenWindow.m  2007-12-03 10:57:20 UTC (rev 3303)
@@ -38,7 +38,6 @@
 
 #import "SKFullScreenWindow.h"
 #import "SKMainWindowController.h"
-#import "SKPDFHoverWindow.h"
 
 
 @implementation SKFullScreenWindow
@@ -87,8 +86,6 @@
 
 - (void)sendEvent:(NSEvent *)theEvent {
     if ([theEvent type] == NSLeftMouseDown || [theEvent type] == 
NSRightMouseDown) {
-        [[SKPDFHoverWindow sharedHoverWindow] orderOut:nil];
-        
         SKMainWindowController *wc = (SKMainWindowController *)[self 
windowController];
         if ([wc isPresentation] && ([theEvent type] == NSRightMouseDown || 
([theEvent modifierFlags] & NSControlKeyMask))) {
             [wc doGoToPreviousPage:self];
@@ -98,14 +95,4 @@
     [super sendEvent:theEvent];
 }
 
-- (void)resignMainWindow {
-    [[SKPDFHoverWindow sharedHoverWindow] orderOut:nil];
-    [super resignMainWindow];
-}
-
-- (void)resignKeyWindow {
-    [[SKPDFHoverWindow sharedHoverWindow] orderOut:nil];
-    [super resignKeyWindow];
-}
-
 @end

Modified: trunk/SKMainWindow.m
===================================================================
--- trunk/SKMainWindow.m        2007-12-03 10:22:35 UTC (rev 3302)
+++ trunk/SKMainWindow.m        2007-12-03 10:57:20 UTC (rev 3303)
@@ -43,7 +43,7 @@
 @implementation SKMainWindow
 
 - (void)sendEvent:(NSEvent *)theEvent {
-    if ([theEvent type] == NSLeftMouseDown || [theEvent type] == 
NSRightMouseDown)
+    if ([theEvent type] == NSLeftMouseDown || [theEvent type] == 
NSRightMouseDown || [theEvent type] == NSKeyDown)
         [[SKPDFHoverWindow sharedHoverWindow] orderOut:nil];
     [super sendEvent:theEvent];
 }

Modified: trunk/SKSideWindow.h
===================================================================
--- trunk/SKSideWindow.h        2007-12-03 10:22:35 UTC (rev 3302)
+++ trunk/SKSideWindow.h        2007-12-03 10:57:20 UTC (rev 3303)
@@ -37,11 +37,12 @@
  */
 
 #import <Cocoa/Cocoa.h>
+#import "SKMainWindow.h"
 
 
 @class SKMainWindowController;
 
[EMAIL PROTECTED] SKSideWindow : NSWindow {
[EMAIL PROTECTED] SKSideWindow : SKMainWindow {
     SKMainWindowController *controller;
     NSDrawerState state;
     NSRectEdge edge;

Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m        2007-12-03 10:22:35 UTC (rev 3302)
+++ trunk/SKSideWindow.m        2007-12-03 10:57:20 UTC (rev 3303)
@@ -39,7 +39,6 @@
 #import "SKSideWindow.h"
 #import "SKMainWindowController.h"
 #import "NSBezierPath_BDSKExtensions.h"
-#import "SKPDFHoverWindow.h"
 
 #define DEFAULT_WINDOW_WIDTH    300.0
 #define WINDOW_INSET            1.0
@@ -177,12 +176,6 @@
     [(SKSideWindowContentView *)[self contentView] setEnabled:flag];
 }
 
-- (void)sendEvent:(NSEvent *)theEvent {
-    if ([theEvent type] == NSLeftMouseDown || [theEvent type] == 
NSRightMouseDown)
-        [[SKPDFHoverWindow sharedHoverWindow] orderOut:nil];
-    [super sendEvent:theEvent];
-}
-
 - (void)keyDown:(NSEvent *)theEvent {
     NSString *characters = [theEvent charactersIgnoringModifiers];
     unichar ch = [characters length] > 0 ? [characters characterAtIndex:0] : 0;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to