Diff for /chimera/MyBrowserView.mm between versions 1.4 and 1.8

version 1.4, 2002/01/31 05:45:26 version 1.8, 2002/02/04 07:00:31
Line 9 Line 9
   
 @implementation MyBrowserView  @implementation MyBrowserView
   
   -(void)windowClosed
   {
       // Break the cycle.
       [browserView setContainer: nil];
       [browserView removeListener: self];
   }
   
 -(void)dealloc  -(void)dealloc
 {  {
         [browserView release];  
         [defaultStatus release];          [defaultStatus release];
     [loadingStatus release];      [loadingStatus release];
           
Line 25 Line 31
   
 - (void)awakeFromNib   - (void)awakeFromNib 
 {  {
  browserView = [[NSBrowserView alloc] initWithFrame:[self bounds]];  browserView = [[[NSBrowserView alloc] initWithFrame:[self bounds]] autorelease];
   [self addSubview:browserView];    [self addSubview:browserView];
   [browserView setContainer:self];    [browserView setContainer:self];
   [browserView addListener:self];    [browserView addListener:self];
Line 69 Line 75
   mIsBusy = YES;    mIsBusy = YES;
   if (mWindowController)    if (mWindowController)
     [mWindowController updateToolbarItems];      [mWindowController updateToolbarItems];
       
 #ifdef DEBUG_vidur  
   printf("Starting to load\n");  
 #endif  
 }  }
   
 - (void)onLoadingCompleted:(BOOL)succeeded  - (void)onLoadingCompleted:(BOOL)succeeded
Line 94 Line 96
       
   if (mWindowController)    if (mWindowController)
     [mWindowController updateToolbarItems];      [mWindowController updateToolbarItems];
     
 #ifdef DEBUG_vidur  
   printf("Loading completed\n");  
 #endif  
 }  }
   
 - (void)onProgressChange:(int)currentBytes outOf:(int)maxBytes   - (void)onProgressChange:(int)currentBytes outOf:(int)maxBytes 
Line 109 Line 107
     }      }
     double val = ((double)currentBytes / (double)maxBytes) * 100.0;      double val = ((double)currentBytes / (double)maxBytes) * 100.0;
     [progress setDoubleValue:val];      [progress setDoubleValue:val];
 #ifdef DEBUG_vidur  
     printf("Progress notification: %f%%\n", val);  
 #endif  
   }    }
 }  }
   
Line 119 Line 114
 {  {
   NSString* spec = [url absoluteString];    NSString* spec = [url absoluteString];
   [mWindowController updateLocationFields:spec];    [mWindowController updateLocationFields:spec];
     
 #ifdef DEBUG_vidur  
   const char* str = [spec cString];  
   printf("Location changed to: %s\n", str);  
 #endif  
 }  }
   
 - (void)setStatus:(NSString *)statusString ofType:(NSStatusType)type   - (void)setStatus:(NSString *)statusString ofType:(NSStatusType)type 
Line 157 Line 147
   
 - (void)setTitle:(NSString *)title  - (void)setTitle:(NSString *)title
 {  {
     NSLog(@"Title: %@",title);  
     if ( (title) && (! [title isEqualToString:@""]) ) {      if ( (title) && (! [title isEqualToString:@""]) ) {
        [[mWindowController window] setTitle:[NSString stringWithFormat:@"Chimera: %@",title]];        [[mWindowController window] setTitle:title];
     } else {      } else {
        [[mWindowController window] setTitle:@"Chimera"];        [[mWindowController window] setTitle:@"Untitled"];
     }      }
 }  }
   

Removed from v.1.4  
changed lines
  Added in v.1.8


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