Diff for /chimera/BrowserWindowController.mm between versions 1.4 and 1.5

version 1.4, 2002/01/31 03:13:19 version 1.5, 2002/01/31 05:45:26
Line 136  static NSString *SidebarToolbarItemIdent Line 136  static NSString *SidebarToolbarItemIdent
         [toolbarItem setMaxSize:NSMakeSize(2560,32)];          [toolbarItem setMaxSize:NSMakeSize(2560,32)];
                   
         [menuFormRep setTarget:self];          [menuFormRep setTarget:self];
        [menuFormRep setAction:@selector(displayLocationSheet:)];        [menuFormRep setAction:@selector(performAppropriateLocationAction)];
         [menuFormRep setTitle:[toolbarItem label]];          [menuFormRep setTitle:[toolbarItem label]];
                   
         [toolbarItem setMenuFormRepresentation:menuFormRep];          [toolbarItem setMenuFormRepresentation:menuFormRep];
           mLocationToolbarItem = toolbarItem;
                   
     } else {      } else {
         toolbarItem = nil;          toolbarItem = nil;
Line 165  static NSString *SidebarToolbarItemIdent Line 166  static NSString *SidebarToolbarItemIdent
     return YES;      return YES;
 }  }
         
-(void)updateToolbarItems- (void)updateToolbarItems
 {  {
   [[[self window] toolbar] validateVisibleItems];    [[[self window] toolbar] validateVisibleItems];
 }  }
   
-(void) focusURLBar- (void)performAppropriateLocationAction
 {
     if ( [[[self window] toolbar] isVisible] ) {
         if ( ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconAndLabel) ||
              ([[[self window] toolbar] displayMode] == NSToolbarDisplayModeIconOnly) ) {
             [self focusURLBar];
         } else {
             [self beginLocationSheet];
         }
     } else {
         [self beginLocationSheet];
     }
 }
 
 - (void)focusURLBar
 {  {
     [mURLBar selectText: self];      [mURLBar selectText: self];
 }  }
   
-(IBAction) back:(id)aSender- (void)beginLocationSheet
 {
     [NSApp beginSheet:  mLocationSheetWindow
        modalForWindow:  [self window]
         modalDelegate:  nil
        didEndSelector:  nil
           contextInfo:  nil];
 }
 
 - (IBAction)endLocationSheet:(id)sender
 {
     [mLocationSheetWindow orderOut:self];
     [NSApp endSheet:mLocationSheetWindow returnCode:1];
     [self loadURL:[NSURL URLWithString:[mLocationSheetURLField stringValue]]];
 }
 
 - (IBAction)goToLocationFromToolbarURLField:(id)sender
 {
     [self loadURL:[NSURL URLWithString:[sender stringValue]]];
 }
 
 - (IBAction)back:(id)aSender
 {  {
   [[mBrowserView getBrowserView] goBack];    [[mBrowserView getBrowserView] goBack];
 }  }
   
-(IBAction) forward:(id)aSender- (IBAction)forward:(id)aSender
 {  {
   [[mBrowserView getBrowserView] goForward];    [[mBrowserView getBrowserView] goForward];
 }  }
   
-(IBAction) reload:(id)aSender- (IBAction)reload:(id)aSender
 {  {
   [[mBrowserView getBrowserView] reload: 0];    [[mBrowserView getBrowserView] reload: 0];
 }  }
   
-(IBAction) stop:(id)aSender- (IBAction)stop:(id)aSender
 {  {
   [[mBrowserView getBrowserView] stop: 0];    [[mBrowserView getBrowserView] stop: 0];
 }  }
   
-(IBAction) home:(id)aSender- (IBAction)home:(id)aSender
 {  {
  NSURL* url = [NSURL URLWithString:@"about:blank"];  [[mBrowserView getBrowserView] loadURI:[NSURL URLWithString:@"about:blank"] flags:NSLoadFlagsNone];
  [[mBrowserView getBrowserView] loadURI:url flags:NSLoadFlagsNone]; 
 }  }
   
-(IBAction) toggleSidebar:(id)aSender- (IBAction)toggleSidebar:(id)aSender
 {  {
     if ( ([mSidebarDrawer state] == NSDrawerClosedState) || ([mSidebarDrawer state] == NSDrawerClosingState) ) {      if ( ([mSidebarDrawer state] == NSDrawerClosedState) || ([mSidebarDrawer state] == NSDrawerClosingState) ) {
         [mSidebarDrawer open];          [mSidebarDrawer open];
Line 219  static NSString *SidebarToolbarItemIdent Line 254  static NSString *SidebarToolbarItemIdent
         [mURL retain];          [mURL retain];
     }      }
 }  }
   
   - (void)updateLocationFields:(NSString *)locationString
   {
   /* //commenting this out because it doesn't work right yet.
       if ( [locationString length] > 30 ) {
           [[mLocationToolbarItem menuFormRepresentation] setTitle:
               [NSString stringWithFormat:@"Location: %@...", [locationString substringToIndex:31]]];
       } else {
           [[mLocationToolbarItem menuFormRepresentation] setTitle:
               [NSString stringWithFormat:@"Location: %@", locationString]];
       }
   */
   
       [mURLBar setStringValue:locationString];
       [mLocationSheetURLField setStringValue:locationString];
   
       [[self window] update];
       [[self window] display];
   }
   
 @end  @end
   

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


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