Diff for /chimera/BrowserWindowController.mm between versions 1.34 and 1.39

version 1.34, 2002/02/21 08:59:58 version 1.39, 2002/02/25 08:44:17
Line 5 Line 5
 #import "BrowserWindowController.h"  #import "BrowserWindowController.h"
 #import "MyBrowserView.h"  #import "MyBrowserView.h"
   
   #include "nsIWebNavigation.h"
   
 static NSString *BrowserToolbarIdentifier       = @"Browser Window Toolbar";  static NSString *BrowserToolbarIdentifier       = @"Browser Window Toolbar";
 static NSString *BackToolbarItemIdentifier      = @"Back Toolbar Item";  static NSString *BackToolbarItemIdentifier      = @"Back Toolbar Item";
 static NSString *ForwardToolbarItemIdentifier   = @"Forward Toolbar Item";  static NSString *ForwardToolbarItemIdentifier   = @"Forward Toolbar Item";
Line 21  static NSString *PrintToolbarItemIdentif Line 23  static NSString *PrintToolbarItemIdentif
   
 @implementation BrowserWindowController  @implementation BrowserWindowController
   
   -(void)enterModalSession
   {
       mModalSession = [NSApp beginModalSessionForWindow: [self window]];
       [NSApp runModalSession: mModalSession];
       [NSApp endModalSession: mModalSession];
       mModalSession = nil;
   }
   
   -(void)mouseMoved:(NSEvent*)aEvent
   {
       if (mMoveReentrant)
           return;
           
       mMoveReentrant = YES;
       NSView* view = [[[self window] contentView] hitTest: [aEvent locationInWindow]];
       [view mouseMoved: aEvent];
       [super mouseMoved: aEvent];
       mMoveReentrant = NO;
   }
   
 - (id)init   - (id)init 
 {  {
     mInitialized = NO;      mInitialized = NO;
       mMoveReentrant = NO;
     return [super init];      return [super init];
 }  }
   
Line 40  static NSString *PrintToolbarItemIdentif Line 63  static NSString *PrintToolbarItemIdentif
     [mBrowserView windowClosed];      [mBrowserView windowClosed];
     [mSidebarBrowserView windowClosed];      [mSidebarBrowserView windowClosed];
           
       [mProgress release];
       
     [super dealloc];      [super dealloc];
 }  }
   
 - (void)windowDidLoad  - (void)windowDidLoad
 {  {
       [super windowDidLoad];
       
       if (mModalSession)
         [NSApp stopModal: mModalSession];
         
     mInitialized = YES;      mInitialized = YES;
       
       // Retain with a single extra refcount.  This allows the MyBrowserViews
       // to remove the progress meter from its superview without having to 
       // worry about retaining and releasing it.
       [mProgress retain];
       
     [[self window] setAcceptsMouseMovedEvents: YES];      [[self window] setAcceptsMouseMovedEvents: YES];
           
     [self setupToolbar];      [self setupToolbar];
Line 324  static NSString *PrintToolbarItemIdentif Line 360  static NSString *PrintToolbarItemIdentif
   
 - (IBAction)stop:(id)aSender  - (IBAction)stop:(id)aSender
 {  {
  [[mBrowserView getBrowserView] stop: 0];  [[mBrowserView getBrowserView] stop: nsIWebNavigation::STOP_ALL];
 }  }
   
 - (IBAction)home:(id)aSender  - (IBAction)home:(id)aSender
Line 334  static NSString *PrintToolbarItemIdentif Line 370  static NSString *PrintToolbarItemIdentif
   
 - (IBAction)toggleSidebar:(id)aSender  - (IBAction)toggleSidebar:(id)aSender
 {  {
       NSResponder* resp = [[self window] firstResponder];
       [[self window] makeFirstResponder: nil];
       
     if ( ([mSidebarDrawer state] == NSDrawerClosedState) || ([mSidebarDrawer state] == NSDrawerClosingState) )  {      if ( ([mSidebarDrawer state] == NSDrawerClosedState) || ([mSidebarDrawer state] == NSDrawerClosingState) )  {
         // XXXHack to bypass sidebar crashes.          // XXXHack to bypass sidebar crashes.
         [[self window] makeFirstResponder: nil];  
         [mSidebarDrawer open];          [mSidebarDrawer open];
     } else {      } else {
         [mSidebarDrawer close];          [mSidebarDrawer close];
     }      }
       
       [[self window] makeFirstResponder: resp];
 }  }
   
 -(void)loadURL:(NSURL*)aURL  -(void)loadURL:(NSURL*)aURL

Removed from v.1.34  
changed lines
  Added in v.1.39


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>