Diff for /chimera/MyBrowserView.mm between versions 1.13 and 1.18

version 1.13, 2002/02/10 01:12:05 version 1.18, 2002/02/13 01:58:55
Line 40  static const char* ioServiceContractID = Line 40  static const char* ioServiceContractID =
   [browserView loadURI:[NSURL URLWithString:[urlbar stringValue]] flags:NSLoadFlagsNone];    [browserView loadURI:[NSURL URLWithString:[urlbar stringValue]] flags:NSLoadFlagsNone];
 }  }
   
- (void)awakeFromNib -(void)disconnectView
 {
     urlbar = nil;
     status = nil;
     progress = nil;
     progressSuper = nil;
     mIsPrimary = NO;
     [[NSNotificationCenter defaultCenter] removeObserver:self];
     
     //[browserView setActive: NO];
 }
 
 - (id)initWithFrame:(NSRect)frameRect
 {  {
  browserView = [[[NSBrowserView alloc] initWithFrame:[self bounds]] autorelease];    [super initWithFrame: frameRect];
  [self addSubview:browserView];     browserView = [[[NSBrowserView alloc] initWithFrame:[self bounds]] autorelease];
  [browserView setContainer:self];    [self addSubview:browserView];
  [browserView addListener:self];    [browserView setContainer:self];
     [browserView addListener:self];
     mIsBusy = NO;
     return self;
 }
   
   -(void)makePrimaryBrowserView: (NSTabViewItem*)tab urlbar: (id)aUrlbar status: (id)aStatus
       progress: (id)aProgress windowController: aWindowController
   {
     mTab = tab;
     urlbar = aUrlbar;
     status = aStatus;
     progress = aProgress;
     progressSuper = [aProgress superview];
     mWindowController = aWindowController;
     
     if (!mIsBusy) {
       [progress retain];
       [progress removeFromSuperview];
     }
     
   defaultStatus = NULL;    defaultStatus = NULL;
   loadingStatus = DOCUMENT_DONE_STRING;    loadingStatus = DOCUMENT_DONE_STRING;
   [status setStringValue:loadingStatus];    [status setStringValue:loadingStatus];
   mIsBusy = NO;  
     
   [progress retain];  
   [progress removeFromSuperview];  
       
     mIsPrimary = YES;
    
   nsCOMPtr<nsIIOService> ioService(do_GetService(ioServiceContractID));    nsCOMPtr<nsIIOService> ioService(do_GetService(ioServiceContractID));
   if (!ioService)    if (!ioService)
     return;      return;
Line 67  static const char* ioServiceContractID = Line 96  static const char* ioServiceContractID =
         selector:@selector(offlineModeChanged:)          selector:@selector(offlineModeChanged:)
         name:@"offlineModeChanged"          name:@"offlineModeChanged"
         object:nil];          object:nil];
           
     // Update the URL bar.
     [mWindowController updateLocationFields:[self getCurrentURLSpec]];
     
     //[browserView setActive: YES];
   }
   
   -(NSString*)getCurrentURLSpec
   {
     return [browserView getCurrentURLSpec];
   }
   
   - (void)awakeFromNib 
   {
 }  }
   
 - (void)setFrame:(NSRect)frameRect  - (void)setFrame:(NSRect)frameRect
Line 97  static const char* ioServiceContractID = Line 140  static const char* ioServiceContractID =
   [status setStringValue:loadingStatus];    [status setStringValue:loadingStatus];
   
   mIsBusy = YES;    mIsBusy = YES;
     [mTab setLabel: LOADING_STRING];
     
   if (mWindowController)    if (mWindowController)
     [mWindowController updateToolbarItems];      [mWindowController updateToolbarItems];
 }  }
Line 178  static const char* ioServiceContractID = Line 223  static const char* ioServiceContractID =
 {  {
     if (!mWindowController)      if (!mWindowController)
         return; // Sidebar panels can't affect the window title.          return; // Sidebar panels can't affect the window title.
            
    if (mOffline) {    // We must be the primary content area.
        NSString* newTitle;    if (mIsPrimary) {
        if (title && ![title isEqualToString:@""])        if (mOffline) {
            newTitle = [title stringByAppendingString: @" [Working Offline]"];            NSString* newTitle;
        else            if (title && ![title isEqualToString:@""])
            newTitle = @"Untitled [Working Offline]";                newTitle = [title stringByAppendingString: @" [Working Offline]"];
        [[mWindowController window] setTitle: newTitle];            else
    }                newTitle = @"Untitled [Working Offline]";
    else {            [[mWindowController window] setTitle: newTitle];
        if (title && ![title isEqualToString:@""])        }
            [[mWindowController window] setTitle:title];        else {
        else            if (title && ![title isEqualToString:@""])
            [[mWindowController window] setTitle:@"Untitled"];                [[mWindowController window] setTitle:title];
             else
                 [[mWindowController window] setTitle:@"Untitled"];
         }
     }      }
       
       // Always set the tab.
       if (title && ![title isEqualToString:@""])
           [mTab setLabel:title];
       else
           [mTab setLabel:@"Untitled"];
 }  }
   
 - (void)offlineModeChanged: (NSNotification*)aNotification  - (void)offlineModeChanged: (NSNotification*)aNotification

Removed from v.1.13  
changed lines
  Added in v.1.18


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