Diff for /chimera/BrowserWindowController.mm between versions 1.71 and 1.73

version 1.71, 2002/04/19 18:04:05 version 1.73, 2002/04/20 00:02:55
Line 511  static NSString *PrintToolbarItemIdentif Line 511  static NSString *PrintToolbarItemIdentif
 - (void)addBookmarkExtended: (BOOL)aIsFromMenu isFolder:(BOOL)aIsFolder  - (void)addBookmarkExtended: (BOOL)aIsFromMenu isFolder:(BOOL)aIsFolder
 {  {
   [mSidebarBookmarksDataSource ensureBookmarks];    [mSidebarBookmarksDataSource ensureBookmarks];
  [mSidebarBookmarksDataSource addBookmark: self useSelection: !aIsFromMenu isFolder: aIsFolder];  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 588  static NSString *PrintToolbarItemIdentif Line 598  static NSString *PrintToolbarItemIdentif
 -(void)newTab  -(void)newTab
 {  {
     NSTabViewItem* newTab = [[[NSTabViewItem alloc] initWithIdentifier: nil] autorelease];      NSTabViewItem* newTab = [[[NSTabViewItem alloc] initWithIdentifier: nil] autorelease];
    MyBrowserView* newView = [[[MyBrowserView alloc] initWithFrame: [mBrowserView frame]] autorelease];    MyBrowserView* newView = [[[MyBrowserView alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
    [newView setTab: newTab];    
 
     [newTab setLabel: @"Untitled"];      [newTab setLabel: @"Untitled"];
     [newTab setView: newView];      [newTab setView: newView];
   
     [mTabBrowser addTabViewItem: newTab];      [mTabBrowser addTabViewItem: newTab];
    
     [[newView getBrowserView] loadURI:[NSURL URLWithString:@"about:blank"] flags:NSLoadFlagsNone];      [[newView getBrowserView] loadURI:[NSURL URLWithString:@"about:blank"] flags:NSLoadFlagsNone];
   
     [mTabBrowser selectLastTabViewItem: self];      [mTabBrowser selectLastTabViewItem: self];
Line 681  static NSString *PrintToolbarItemIdentif Line 689  static NSString *PrintToolbarItemIdentif
     NSTabViewItem* selectedTab = [mTabBrowser selectedTabViewItem];      NSTabViewItem* selectedTab = [mTabBrowser selectedTabViewItem];
     int index = [mTabBrowser indexOfTabViewItem: selectedTab];      int index = [mTabBrowser indexOfTabViewItem: selectedTab];
     [mTabBrowser insertTabViewItem: newTab atIndex: index+1];      [mTabBrowser insertTabViewItem: newTab atIndex: index+1];
    
    MyBrowserView* newView = [[[MyBrowserView alloc] initWithFrame: [mBrowserView frame]] autorelease];    MyBrowserView* newView = [[[MyBrowserView alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
     [newView setTab: newTab];      [newView setTab: newTab];
           
     [newTab setLabel: @"Loading..."];      [newTab setLabel: @"Loading..."];
Line 797  static NSString *PrintToolbarItemIdentif Line 805  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
 {  {

Removed from v.1.71  
changed lines
  Added in v.1.73


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