Diff for /chimera/BrowserWindowController.mm between versions 1.68 and 1.69

version 1.68, 2002/04/17 23:55:25 version 1.69, 2002/04/18 15:42:03
Line 166  static NSString *PrintToolbarItemIdentif Line 166  static NSString *PrintToolbarItemIdentif
     [[self window] setFrameUsingName: @"NavigatorWindow"];      [[self window] setFrameUsingName: @"NavigatorWindow"];
           
     if (mModalSession)      if (mModalSession)
      [NSApp stopModal: mModalSession];      [NSApp stopModal];
               
     mInitialized = YES;      mInitialized = YES;
   
Line 213  static NSString *PrintToolbarItemIdentif Line 213  static NSString *PrintToolbarItemIdentif
   if (windowFrame.origin.x + windowFrame.size.width + drawerSize.width >    if (windowFrame.origin.x + windowFrame.size.width + drawerSize.width >
       screenFrame.size.width) {        screenFrame.size.width) {
     // We need to adjust the window so that it can fit.      // We need to adjust the window so that it can fit.
    int shrinkDelta = (windowFrame.size.width + drawerSize.width) - screenFrame.size.width;    float shrinkDelta = (windowFrame.size.width + drawerSize.width) - screenFrame.size.width;
     if (shrinkDelta < 0) shrinkDelta = 0;      if (shrinkDelta < 0) shrinkDelta = 0;
    int newWidth = (windowFrame.size.width - shrinkDelta);    float newWidth = (windowFrame.size.width - shrinkDelta);
    int newPosition = screenFrame.size.width - newWidth - drawerSize.width;    float newPosition = screenFrame.size.width - newWidth - drawerSize.width;
     if (newPosition < 0) newPosition = 0;      if (newPosition < 0) newPosition = 0;
     mCachedFrameBeforeDrawerOpen = windowFrame;      mCachedFrameBeforeDrawerOpen = windowFrame;
     windowFrame.origin.x = newPosition;      windowFrame.origin.x = newPosition;
Line 253  static NSString *PrintToolbarItemIdentif Line 253  static NSString *PrintToolbarItemIdentif
         frame.size.width == mCachedFrameAfterDrawerOpen.size.width &&          frame.size.width == mCachedFrameAfterDrawerOpen.size.width &&
         frame.size.height == mCachedFrameAfterDrawerOpen.size.height) {          frame.size.height == mCachedFrameAfterDrawerOpen.size.height) {
       printf("Got here too.\n");        printf("Got here too.\n");
      printf("Xes are %d %d\n", frame.origin.x, mCachedFrameAfterDrawerOpen.origin.x);      printf("Xes are %f %f\n", frame.origin.x, mCachedFrameAfterDrawerOpen.origin.x);
      printf("Widths are %d %d\n", frame.size.width, mCachedFrameAfterDrawerOpen.size.width);      printf("Widths are %f %f\n", frame.size.width, mCachedFrameAfterDrawerOpen.size.width);
       // Restore the original frame.        // Restore the original frame.
       [[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES];        [[self window] setFrame: mCachedFrameBeforeDrawerOpen display: YES];
     }      }
Line 467  static NSString *PrintToolbarItemIdentif Line 467  static NSString *PrintToolbarItemIdentif
   
 -(IBAction)manageBookmarks: (id)aSender  -(IBAction)manageBookmarks: (id)aSender
 {  {
  if (![mSidebarDrawer isOpen])  if ([mSidebarDrawer state] == NSDrawerClosedState)
     [self toggleSidebar: self];      [self toggleSidebar: self];
   
   [mSidebarTabView selectFirstTabViewItem:self];    [mSidebarTabView selectFirstTabViewItem:self];
Line 925  static NSString *PrintToolbarItemIdentif Line 925  static NSString *PrintToolbarItemIdentif
   }      }  
 }  }
   
   - (NSView*) bookmarksToolbar
   {
     return mPersonalToolbar;
   }
   
   @end
   
   
   @implementation BrowserWindow
   
   - (void)toggleToolbarShown:(id)sender
   {
     NSRect oldFrame = [self frame];
     NSToolbar* tbar = [self toolbar];
     BOOL newVisibility = ![tbar isVisible];
     [tbar setVisible:newVisibility];
     //[[[self windowController] bookmarksToolbar] setVisible:newVisibility];
     
     //[super toggleToolbarShown:sender];
     NSLog(@"Fooooooooopy");
   }
   
 @end  @end
   

Removed from v.1.68  
changed lines
  Added in v.1.69


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