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

version 1.33, 2002/03/20 07:34:07 version 1.36, 2002/04/08 22:30:20
Line 44 Line 44
 #include "nsCocoaBrowserService.h"  #include "nsCocoaBrowserService.h"
 #import "AboutBox.h"  #import "AboutBox.h"
   
   
 static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";  static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
   
 @implementation MainController  @implementation MainController
Line 51  static const char* ioServiceContractID = Line 52  static const char* ioServiceContractID =
 -(id)init  -(id)init
 {  {
     if ( (self = [super init]) ) {      if ( (self = [super init]) ) {
        mSplashScreen = [[SplashScreenWindow alloc] splash];        mSplashScreen = [[SplashScreenWindow alloc] splashImage:nil withFade:YES withStatusRect:NSMakeRect(0,0,0,0)];
     }      }
       mFindDialog = nil;
       mMenuBookmarks = nil;
     return self;      return self;
 }  }
   
 -(void)dealloc  -(void)dealloc
 {  {
     [super dealloc];      [super dealloc];
       [mFindDialog release];
     printf("Main controller died.\n");      printf("Main controller died.\n");
 }  }
   
 -(void)awakeFromNib  -(void)awakeFromNib
{{    
     [self newWindow: self];      [self newWindow: self];
   
     [mSplashScreen close];  
           
       [mSplashScreen close];
   
     [mBookmarksMenu setAutoenablesItems: NO];      [mBookmarksMenu setAutoenablesItems: NO];
       
     mMenuBookmarks = new BookmarksService(nil);      mMenuBookmarks = new BookmarksService(nil);
     mMenuBookmarks->AddObserver();      mMenuBookmarks->AddObserver();
     mMenuBookmarks->ConstructBookmarksMenu(mBookmarksMenu, nsnull);      mMenuBookmarks->ConstructBookmarksMenu(mBookmarksMenu, nsnull);
Line 214  static const char* ioServiceContractID = Line 217  static const char* ioServiceContractID =
 }  }
   
 // Edit menu actions.  // Edit menu actions.
   
   
   //
   // -findInPage
   //
   // Called in response to "Find" in edit menu. Opens the find dialog. We only keep
   // one around for the whole app to use, showing/hiding as we see fit.
   //
 -(IBAction) findInPage:(id)aSender  -(IBAction) findInPage:(id)aSender
 {  {
    NSWindow* keyWindow = [mApplication keyWindow];  if ( !mFindDialog )
    if (keyWindow)     mFindDialog = [[FindDlgController alloc] initWithWindowNibName: @"FindDialog"];
      [[keyWindow windowController] findInPage];  [mFindDialog showWindow:self];
 }  }
   
 -(IBAction) findAgain:(id)aSender  -(IBAction) findAgain:(id)aSender
Line 261  static const char* ioServiceContractID = Line 272  static const char* ioServiceContractID =
 -(BrowserWindowController*)openBrowserWindowWithURL: (NSURL*)aURL  -(BrowserWindowController*)openBrowserWindowWithURL: (NSURL*)aURL
 {  {
         BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];          BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];
    [browser loadURL: aURL];  [browser loadURL: aURL];
         [browser showWindow: self];          [browser showWindow: self];
    return browser;  return browser;
 }  }
   
 -(void)applicationWillTerminate: (NSNotification*)aNotification  -(void)applicationWillTerminate: (NSNotification*)aNotification

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


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