Diff for /chimera/BrowserWindowController.mm between versions 1.40 and 1.41

version 1.40, 2002/02/25 10:13:04 version 1.41, 2002/03/03 09:34:52
Line 43  static NSString *PrintToolbarItemIdentif Line 43  static NSString *PrintToolbarItemIdentif
     mMoveReentrant = NO;      mMoveReentrant = NO;
 }  }
   
- (id)init - (id)initWithWindowNibName:(NSString *)windowNibName
 {  {
    mInitialized = NO;    if ( (self = [super initWithWindowNibName:(NSString *)windowNibName]) ) {
    mMoveReentrant = NO;        mInitialized = NO;
    return [super init];        mMoveReentrant = NO;
     }
     return self;
 }  }
   
 - (void)windowWillClose:(NSNotification *)notification  - (void)windowWillClose:(NSNotification *)notification
Line 87  static NSString *PrintToolbarItemIdentif Line 89  static NSString *PrintToolbarItemIdentif
           
     [self setupToolbar];      [self setupToolbar];
   
    // Our initial view is our primary view.  Connect it up.//  03/03/2002 mlj Changing strategy a bit here.  The addTab: method was
    NSTabViewItem* tab = [mTabBrowser tabViewItemAtIndex: 0];//      duplicating a lot of the code found here.  I have moved it to that method.
    NSView* view = [tab view];//      We now remove the IB tab, then add one of our own.
    
    MyBrowserView* newView = [[[MyBrowserView alloc] initWithFrame: [view frame]] autorelease];    [mTabBrowser removeTabViewItem:[mTabBrowser tabViewItemAtIndex:0]];
    [tab setView: newView];    [self newTab];
    mBrowserView = newView; 
           
     if (mURL) {      if (mURL) {
       [self loadURL: mURL];        [self loadURL: mURL];
Line 102  static NSString *PrintToolbarItemIdentif Line 103  static NSString *PrintToolbarItemIdentif
           
     [mSidebarDrawer setDelegate: self];      [mSidebarDrawer setDelegate: self];
           
    [mBrowserView makePrimaryBrowserView: tab urlbar: mURLBar status: mStatus//    [mBrowserView makePrimaryBrowserView: tab urlbar: mURLBar status: mStatus
        progress: mProgress windowController: self];  //      progress: mProgress windowController: self];
 }  }
   
 - (void)drawerWillOpen: (NSNotification*)aNotification  - (void)drawerWillOpen: (NSNotification*)aNotification
Line 417  static NSString *PrintToolbarItemIdentif Line 418  static NSString *PrintToolbarItemIdentif
 -(void)newTab  -(void)newTab
 {  {
     NSTabViewItem* newTab = [[[NSTabViewItem alloc] initWithIdentifier: nil] autorelease];      NSTabViewItem* newTab = [[[NSTabViewItem alloc] initWithIdentifier: nil] autorelease];
    [mTabBrowser addTabViewItem: newTab];    MyBrowserView* newView = [[[MyBrowserView alloc] initWithFrame: [[newTab view] frame]] autorelease];
    //  MyBrowserView* newView = [[[MyBrowserView alloc] initWithFrame: [mBrowserView frame]] autorelease];
    MyBrowserView* newView = [[[MyBrowserView alloc] initWithFrame: [mBrowserView frame]] autorelease];
    [newTab setView: newView]; 
     [newTab setLabel: @"Untitled"];      [newTab setLabel: @"Untitled"];
       [newTab setView: newView];
   
       [mTabBrowser addTabViewItem: newTab];
           
     [[newView getBrowserView] loadURI:[NSURL URLWithString:@"about:blank"] flags:NSLoadFlagsNone];      [[newView getBrowserView] loadURI:[NSURL URLWithString:@"about:blank"] flags:NSLoadFlagsNone];
           
Line 433  static NSString *PrintToolbarItemIdentif Line 436  static NSString *PrintToolbarItemIdentif
             [self focusURLBar];              [self focusURLBar];
         }           } 
     }      }
       
     //XXXdwh Do this if we ever support auto-hide.  
     //if ([mTabBrowser numberOfTabViewItems] == 2)  
     //    [mTabBrowser setTabViewType: NSTopTabsBezelBorder];  
 }  }
   
 - (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)aTabViewItem  - (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)aTabViewItem
 {  {
    // Disconnect the old view.    // Disconnect the old view, if one has been designated.
    [mBrowserView disconnectView];    // If the window has just been opened, none has been.
        if ( mBrowserView ) {
         [mBrowserView disconnectView];
     }
     // Connect up the new view      // Connect up the new view
     mBrowserView = [aTabViewItem view];      mBrowserView = [aTabViewItem view];
                 

Removed from v.1.40  
changed lines
  Added in v.1.41


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