Diff for /chimera/BrowserWindowController.mm between versions 1.67 and 1.72

version 1.67, 2002/04/17 10:30:13 version 1.72, 2002/04/19 19:28:43
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 508  static NSString *PrintToolbarItemIdentif Line 508  static NSString *PrintToolbarItemIdentif
     return [[mBrowserView getBrowserView] findInPage:text];      return [[mBrowserView getBrowserView] findInPage:text];
 }  }
   
- (void)addBookmarkExtended: (BOOL)aIsFromMenu- (void)addBookmarkExtended: (BOOL)aIsFromMenu isFolder:(BOOL)aIsFolder
 {  {
   [mSidebarBookmarksDataSource ensureBookmarks];    [mSidebarBookmarksDataSource ensureBookmarks];
  [mSidebarBookmarksDataSource addBookmark: self useSelection: !aIsFromMenu];  BOOL useSel = aIsFromMenu;
   if (aIsFromMenu) {
     // Use selection only if the sidebar is open and the bookmarks panel is displaying.
     if ([mSidebarDrawer state] == NSDrawerClosedState)
       useSel = NO;
     else
       if ([mSidebarTabView tabViewItemAtIndex: 0] != [mSidebarTabView selectedTabViewItem])
         useSel = NO;
   }
   
   [mSidebarBookmarksDataSource addBookmark: self useSelection: useSel isFolder: aIsFolder];
 }  }
   
 - (IBAction)back:(id)aSender  - (IBAction)back:(id)aSender
Line 648  static NSString *PrintToolbarItemIdentif Line 658  static NSString *PrintToolbarItemIdentif
         progress: mProgress windowController: self];          progress: mProgress windowController: self];
 }  }
   
   -(id)getTabBrowser
   {
     return mTabBrowser;
   }
   
 -(MyBrowserView*)getMyBrowserView  -(MyBrowserView*)getMyBrowserView
 {  {
    return mBrowserView;  return mBrowserView;
 }  }
   
 -(void)openNewWindowWithURL: (NSURL*)aURL loadInBackground: (BOOL)aLoadInBG  -(void)openNewWindowWithURL: (NSURL*)aURL loadInBackground: (BOOL)aLoadInBG
Line 792  static NSString *PrintToolbarItemIdentif Line 807  static NSString *PrintToolbarItemIdentif
   return mAddBookmarkFolderField;    return mAddBookmarkFolderField;
 }  }
   
   -(id)getAddBookmarkCheckbox
   {
     return mAddBookmarkCheckbox;
   }
   
 // Called when a context menu should be shown.  // Called when a context menu should be shown.
 - (void)onShowContextMenu:(int)flags domEvent:(nsIDOMEvent*)aEvent domNode:(nsIDOMNode*)aNode  - (void)onShowContextMenu:(int)flags domEvent:(nsIDOMEvent*)aEvent domNode:(nsIDOMNode*)aNode
 {  {
Line 925  static NSString *PrintToolbarItemIdentif Line 945  static NSString *PrintToolbarItemIdentif
   }      }  
 }  }
   
   - (NSView*) bookmarksToolbar
   {
     return mPersonalToolbar;
   }
   
 @end  @end
   

Removed from v.1.67  
changed lines
  Added in v.1.72


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