Diff for /chimera/MainController.mm between versions 1.28 and 1.33

version 1.28, 2002/03/09 08:39:35 version 1.33, 2002/03/20 07:34:07
Line 42 Line 42
 #include "nsIServiceManager.h"  #include "nsIServiceManager.h"
 #include "nsIIOService.h"  #include "nsIIOService.h"
 #include "nsCocoaBrowserService.h"  #include "nsCocoaBrowserService.h"
   #import "AboutBox.h"
   
 static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";  static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
   
Line 49  static const char* ioServiceContractID = Line 50  static const char* ioServiceContractID =
   
 -(id)init  -(id)init
 {  {
    if ( self = [super init] ) {    if ( (self = [super init]) ) {
        mSplashScreen = [NSWindow alloc] initWithSize        mSplashScreen = [[SplashScreenWindow alloc] splash];
     }      }
       return self;
 }  }
   
 -(void)dealloc  -(void)dealloc
Line 63  static const char* ioServiceContractID = Line 65  static const char* ioServiceContractID =
 -(void)awakeFromNib  -(void)awakeFromNib
 {  {
     [self newWindow: self];      [self newWindow: self];
   
       [mSplashScreen close];
           
     [mBookmarksMenu setAutoenablesItems: NO];      [mBookmarksMenu setAutoenablesItems: NO];
           
Line 84  static const char* ioServiceContractID = Line 88  static const char* ioServiceContractID =
     // offline.      // offline.
     if (mOffline)      if (mOffline)
         [mOfflineMenuItem setTitle: @"Go Online"];          [mOfflineMenuItem setTitle: @"Go Online"];
   
 }  }
   
 -(IBAction)newWindow:(id)aSender  -(IBAction)newWindow:(id)aSender
 {  {
    BrowserWindowController* controller = [self openBrowserWindowWithURLString:@"about:blank"];  // If we have a key window, have it autosave its dimensions before
    [controller focusURLBar];  // we open a new window.  That ensures the size ends up matching.
}  NSWindow* keyWindow = [mApplication keyWindow];
   if (keyWindow)
     [[keyWindow windowController] autosaveWindowFrame];
 
   // Now open the new window.
   BrowserWindowController* controller = [self openBrowserWindowWithURLString:@"about:blank"];
   [controller focusURLBar];
 }       
   
 -(IBAction)newTab:(id)aSender  -(IBAction)newTab:(id)aSender
 {  {
Line 136  static const char* ioServiceContractID = Line 148  static const char* ioServiceContractID =
         if ([urlArray count] == 0)          if ([urlArray count] == 0)
             return;              return;
         NSURL* url = [urlArray objectAtIndex: 0];          NSURL* url = [urlArray objectAtIndex: 0];
           // ----------------------
           [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:url];
           // ----------------------
         NSWindow* keyWindow = [mApplication keyWindow];          NSWindow* keyWindow = [mApplication keyWindow];
         if (keyWindow)          if (keyWindow)
             return [[keyWindow windowController] loadURL: url];              return [[keyWindow windowController] loadURL: url];
Line 292  static const char* ioServiceContractID = Line 307  static const char* ioServiceContractID =
     [[self preferencesController] showPreferences:nil] ;      [[self preferencesController] showPreferences:nil] ;
 }  }
   
   - (IBAction)showAboutBox:(id)sender
   {
       [[AboutBox sharedInstance] showPanel:sender];
   }
   
   - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
   {
       NSWindow* keyWindow = [mApplication keyWindow];
   
       if (keyWindow) {
           [[keyWindow windowController] loadURL:[NSURL fileURLWithPath:filename]];
       } else {
           [self openBrowserWindowWithURL:[NSURL fileURLWithPath:filename]];
       }
       
       return YES;
       
   }
   
   
 @end  @end

Removed from v.1.28  
changed lines
  Added in v.1.33


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