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

version 1.2, 2002/01/30 04:52:38 version 1.4, 2002/01/31 05:45:26
Line 11 Line 11
   
 -(void)dealloc  -(void)dealloc
 {  {
  // May need to override in the future.        [browserView release];
  [super dealloc];        [defaultStatus release];
     [loadingStatus release];
     
         [super dealloc];
 }  }
   
 - (IBAction)load:(id)sender  - (IBAction)load:(id)sender
 {  {
  NSString* str = [urlbar stringValue];  [browserView loadURI:[NSURL URLWithString:[urlbar stringValue]] flags:NSLoadFlagsNone];
  NSURL* url = [NSURL URLWithString:str]; 
  [browserView loadURI:url flags:NSLoadFlagsNone]; 
 }  }
   
 - (void)awakeFromNib   - (void)awakeFromNib 
 {  {
  NSRect bounds = [self bounds];  browserView = [[NSBrowserView alloc] initWithFrame:[self bounds]];
  browserView = [[NSBrowserView alloc] initWithFrame:bounds]; 
   [self addSubview:browserView];    [self addSubview:browserView];
   [browserView setContainer:self];    [browserView setContainer:self];
   [browserView addListener:self];    [browserView addListener:self];
Line 118 Line 118
 - (void)onLocationChange:(NSURL*)url   - (void)onLocationChange:(NSURL*)url 
 {  {
   NSString* spec = [url absoluteString];    NSString* spec = [url absoluteString];
  [urlbar setStringValue:spec];  [mWindowController updateLocationFields:spec];
       
 #ifdef DEBUG_vidur  #ifdef DEBUG_vidur
   const char* str = [spec cString];    const char* str = [spec cString];
Line 152 Line 152
   
 - (NSString *)title   - (NSString *)title 
 {  {
  NSWindow* window = [self window];  return [[mWindowController window] title];
  NSString* str = [window title]; 
  return str; 
 }  }
   
 - (void)setTitle:(NSString *)title  - (void)setTitle:(NSString *)title
 {  {
  NSWindow* window = [self window];    NSLog(@"Title: %@",title);
  [window setTitle:title];    if ( (title) && (! [title isEqualToString:@""]) ) {
         [[mWindowController window] setTitle:[NSString stringWithFormat:@"Chimera: %@",title]];
     } else {
         [[mWindowController window] setTitle:@"Chimera"];
     }
 }  }
   
 - (void)sizeBrowserTo:(NSSize)dimensions  - (void)sizeBrowserTo:(NSSize)dimensions
Line 169 Line 171
   float dx = dimensions.width - bounds.size.width;    float dx = dimensions.width - bounds.size.width;
   float dy = dimensions.height - bounds.size.height;    float dy = dimensions.height - bounds.size.height;
   
  NSWindow* window = [self window];  NSRect frame = [[self window] frame];
  NSRect frame = [window frame]; 
   frame.size.width += dx;    frame.size.width += dx;
   frame.size.height += dy;    frame.size.height += dy;
   
  [window setFrame:frame display:YES];  [[self window] setFrame:frame display:YES];
 }  }
   
 - (NSBrowserView*)createBrowserWindow:(unsigned int)mask  - (NSBrowserView*)createBrowserWindow:(unsigned int)mask

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


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