Diff for /chimera/BrowserWindowController.mm between versions 1.47 and 1.49

version 1.47, 2002/03/08 03:18:00 version 1.49, 2002/03/11 03:41:42
Line 81  static NSString *PrintToolbarItemIdentif Line 81  static NSString *PrintToolbarItemIdentif
     if ( (self = [super initWithWindowNibName:(NSString *)windowNibName]) ) {      if ( (self = [super initWithWindowNibName:(NSString *)windowNibName]) ) {
         mInitialized = NO;          mInitialized = NO;
         mMoveReentrant = NO;          mMoveReentrant = NO;
           mShouldAutosave = YES;
     }      }
     return self;      return self;
 }  }
   
   -(void)autosaveWindowFrame
   {
     if (mShouldAutosave)
       [[self window] saveFrameUsingName: @"NavigatorWindow"];
   }
   
   -(void)disableAutosave
   {
     mShouldAutosave = NO;
   }
   
 - (void)windowWillClose:(NSNotification *)notification  - (void)windowWillClose:(NSNotification *)notification
 {  {
    printf("Window will close notification.\n");  printf("Window will close notification.\n");
    [self autorelease];  [mSidebarBookmarksDataSource windowClosing];
    [mSidebarBookmarksDataSource windowClosing];
   [self autosaveWindowFrame];
   [self autorelease];
 }  }
   
 - (void)dealloc  - (void)dealloc
 {  {
    printf("Browser controller died.\n");  printf("Browser controller died.\n");
   
    [mBrowserView windowClosed];  // Loop over all tabs, and tell them that the window is closed.
    [mSidebarBrowserView windowClosed];  int numTabs = [mTabBrowser numberOfTabViewItems];
      for (int i = 0; i < numTabs; i++) {
    [mProgress release];    NSTabViewItem* item = [mTabBrowser tabViewItemAtIndex: i];
          [[item view] windowClosed];
    [super dealloc];  }
   [mSidebarBrowserView windowClosed];
 
   [mProgress release];
   
   [super dealloc];
 }  }
   
 - (void)windowDidLoad  - (void)windowDidLoad
 {  {
     [super windowDidLoad];      [super windowDidLoad];
   
       // Get our saved dimensions.
       [[self window] setFrameUsingName: @"NavigatorWindow"];
           
     if (mModalSession)      if (mModalSession)
       [NSApp stopModal: mModalSession];        [NSApp stopModal: mModalSession];
Line 470  static NSString *PrintToolbarItemIdentif Line 492  static NSString *PrintToolbarItemIdentif
   
 -(void)closeTab  -(void)closeTab
 {  {
    if ( [mTabBrowser numberOfTabViewItems] > 1 ) {  if ( [mTabBrowser numberOfTabViewItems] > 1 ) {
        [mTabBrowser removeTabViewItem:[mTabBrowser selectedTabViewItem]];    [[[mTabBrowser selectedTabViewItem] view] windowClosed];
    }    [mTabBrowser removeTabViewItem:[mTabBrowser selectedTabViewItem]];
   }
 }  }
   
 - (void)previousTab  - (void)previousTab
Line 507  static NSString *PrintToolbarItemIdentif Line 530  static NSString *PrintToolbarItemIdentif
   
 -(void)openNewWindowWithURL: (NSURL*)aURL loadInBackground: (BOOL)aLoadInBG  -(void)openNewWindowWithURL: (NSURL*)aURL loadInBackground: (BOOL)aLoadInBG
 {  {
    BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];  // Autosave our dimensions before we open a new window.  That ensures the size ends up matching.
    [browser loadURL: aURL];  [self autosaveWindowFrame];
    if (aLoadInBG)
      [[browser window] orderWindow: NSWindowBelow relativeTo: [[self window] windowNumber]];  BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];
        else  [browser loadURL: aURL];
      [browser showWindow: self];  if (aLoadInBG)
          [[browser window] orderWindow: NSWindowBelow relativeTo: [[self window] windowNumber]];
    // XXXdwh Focus the content area.  else
     [browser showWindow: self];
 
   // XXXdwh Focus the content area.
 }  }
   
 -(void)openNewTabWithURL: (NSURL*)aURL loadInBackground: (BOOL)aLoadInBG  -(void)openNewTabWithURL: (NSURL*)aURL loadInBackground: (BOOL)aLoadInBG

Removed from v.1.47  
changed lines
  Added in v.1.49


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