diff --git a/camino/BrowserWindowController.h b/camino/BrowserWindowController.h index c8b80df8d45..a0c4eab6041 100644 --- a/camino/BrowserWindowController.h +++ b/camino/BrowserWindowController.h @@ -61,7 +61,7 @@ class nsIDOMNode; { NSTimer* mTimer; NSArray* mImages; - int mFrame; + unsigned int mFrame; } // public @@ -75,45 +75,49 @@ class nsIDOMNode; @end +@class BookmarksDataSource; +@class CHHistoryDataSource; +@class CHExtendedTabView; + @interface BrowserWindowController : NSWindowController { - IBOutlet id mTabBrowser; - IBOutlet NSDrawer* mSidebarDrawer; - IBOutlet id mSidebarTabView; - IBOutlet id mSidebarSourceTabView; - IBOutlet id mLocationToolbarView; - IBOutlet NSTextField* mURLBar; - IBOutlet NSTextField* mStatus; + IBOutlet CHExtendedTabView* mTabBrowser; + IBOutlet NSDrawer* mSidebarDrawer; + IBOutlet NSTabView* mSidebarTabView; + IBOutlet NSTabView* mSidebarSourceTabView; + IBOutlet NSView* mLocationToolbarView; + IBOutlet NSTextField* mURLBar; + IBOutlet NSTextField* mStatus; IBOutlet NSProgressIndicator* mProgress; - IBOutlet NSImageView* mLock; - IBOutlet id mLocationSheetWindow; - IBOutlet id mLocationSheetURLField; - IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock + IBOutlet NSImageView* mLock; + IBOutlet NSWindow* mLocationSheetWindow; + IBOutlet NSTextField* mLocationSheetURLField; + IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock - IBOutlet id mSidebarBrowserView; - IBOutlet id mSidebarBookmarksDataSource; - IBOutlet id mHistoryDataSource; + IBOutlet id mSidebarBrowserView; // currently unused + IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource; + IBOutlet CHHistoryDataSource* mHistoryDataSource; - IBOutlet CHBookmarksToolbar* mPersonalToolbar; + IBOutlet CHBookmarksToolbar* mPersonalToolbar; - IBOutlet id mAddBookmarkSheetWindow; - IBOutlet id mAddBookmarkTitleField; - IBOutlet id mAddBookmarkFolderField; - IBOutlet id mAddBookmarkCheckbox; + IBOutlet NSWindow* mAddBookmarkSheetWindow; + IBOutlet NSTextField* mAddBookmarkTitleField; + IBOutlet NSPopUpButton* mAddBookmarkFolderField; + IBOutlet NSButton* mAddBookmarkCheckbox; // Context menu outlets. - IBOutlet id mPageMenu; - IBOutlet id mImageMenu; - IBOutlet id mInputMenu; - IBOutlet id mLinkMenu; - IBOutlet id mImageLinkMenu; + IBOutlet NSMenu* mPageMenu; + IBOutlet NSMenu* mImageMenu; + IBOutlet NSMenu* mInputMenu; + IBOutlet NSMenu* mLinkMenu; + IBOutlet NSMenu* mImageLinkMenu; // Context menu item outlets - IBOutlet id mBackItem; - IBOutlet id mForwardItem; + IBOutlet NSMenuItem* mBackItem; + IBOutlet NSMenuItem* mForwardItem; - NSToolbarItem *mLocationToolbarItem; - NSToolbarItem *mSidebarToolbarItem; + NSToolbarItem* mLocationToolbarItem; + NSToolbarItem* mSidebarToolbarItem; BOOL mInitialized; NSString* mURL; diff --git a/camino/BrowserWindowController.mm b/camino/BrowserWindowController.mm index a10f62632fc..a693d8e17fc 100644 --- a/camino/BrowserWindowController.mm +++ b/camino/BrowserWindowController.mm @@ -36,9 +36,13 @@ * ***** END LICENSE BLOCK ***** */ #import "BrowserWindowController.h" + #import "CHBrowserWrapper.h" #import "CHIconTabViewItem.h" #import "CHPreferenceManager.h" +#import "BookmarksDataSource.h" +#import "CHHistoryDataSource.h" +#import "CHExtendedTabView.h" #include "nsIWebNavigation.h" #include "nsIDOMElement.h" @@ -164,7 +168,9 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; NSTabViewItem* item = [mTabBrowser tabViewItemAtIndex: i]; [[item view] windowClosed]; } - [mSidebarBrowserView windowClosed]; + + //if (mSidebarBrowserView) + // [mSidebarBrowserView windowClosed]; [mProgress release]; @@ -584,9 +590,6 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; [newView setIsBookmarksImport: YES]; [[[self window] contentView] addSubview: newView]; [[newView getBrowserView] loadURI:aURLSpec flags:NSLoadFlagsNone]; - - // XXX force reload - //[mSidebarBookmarksDataSource reloadDataForItem: nil reloadChildren: YES]; } - (IBAction)goToLocationFromToolbarURLField:(id)sender diff --git a/camino/src/browser/BrowserWindowController.h b/camino/src/browser/BrowserWindowController.h index c8b80df8d45..a0c4eab6041 100644 --- a/camino/src/browser/BrowserWindowController.h +++ b/camino/src/browser/BrowserWindowController.h @@ -61,7 +61,7 @@ class nsIDOMNode; { NSTimer* mTimer; NSArray* mImages; - int mFrame; + unsigned int mFrame; } // public @@ -75,45 +75,49 @@ class nsIDOMNode; @end +@class BookmarksDataSource; +@class CHHistoryDataSource; +@class CHExtendedTabView; + @interface BrowserWindowController : NSWindowController { - IBOutlet id mTabBrowser; - IBOutlet NSDrawer* mSidebarDrawer; - IBOutlet id mSidebarTabView; - IBOutlet id mSidebarSourceTabView; - IBOutlet id mLocationToolbarView; - IBOutlet NSTextField* mURLBar; - IBOutlet NSTextField* mStatus; + IBOutlet CHExtendedTabView* mTabBrowser; + IBOutlet NSDrawer* mSidebarDrawer; + IBOutlet NSTabView* mSidebarTabView; + IBOutlet NSTabView* mSidebarSourceTabView; + IBOutlet NSView* mLocationToolbarView; + IBOutlet NSTextField* mURLBar; + IBOutlet NSTextField* mStatus; IBOutlet NSProgressIndicator* mProgress; - IBOutlet NSImageView* mLock; - IBOutlet id mLocationSheetWindow; - IBOutlet id mLocationSheetURLField; - IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock + IBOutlet NSImageView* mLock; + IBOutlet NSWindow* mLocationSheetWindow; + IBOutlet NSTextField* mLocationSheetURLField; + IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock - IBOutlet id mSidebarBrowserView; - IBOutlet id mSidebarBookmarksDataSource; - IBOutlet id mHistoryDataSource; + IBOutlet id mSidebarBrowserView; // currently unused + IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource; + IBOutlet CHHistoryDataSource* mHistoryDataSource; - IBOutlet CHBookmarksToolbar* mPersonalToolbar; + IBOutlet CHBookmarksToolbar* mPersonalToolbar; - IBOutlet id mAddBookmarkSheetWindow; - IBOutlet id mAddBookmarkTitleField; - IBOutlet id mAddBookmarkFolderField; - IBOutlet id mAddBookmarkCheckbox; + IBOutlet NSWindow* mAddBookmarkSheetWindow; + IBOutlet NSTextField* mAddBookmarkTitleField; + IBOutlet NSPopUpButton* mAddBookmarkFolderField; + IBOutlet NSButton* mAddBookmarkCheckbox; // Context menu outlets. - IBOutlet id mPageMenu; - IBOutlet id mImageMenu; - IBOutlet id mInputMenu; - IBOutlet id mLinkMenu; - IBOutlet id mImageLinkMenu; + IBOutlet NSMenu* mPageMenu; + IBOutlet NSMenu* mImageMenu; + IBOutlet NSMenu* mInputMenu; + IBOutlet NSMenu* mLinkMenu; + IBOutlet NSMenu* mImageLinkMenu; // Context menu item outlets - IBOutlet id mBackItem; - IBOutlet id mForwardItem; + IBOutlet NSMenuItem* mBackItem; + IBOutlet NSMenuItem* mForwardItem; - NSToolbarItem *mLocationToolbarItem; - NSToolbarItem *mSidebarToolbarItem; + NSToolbarItem* mLocationToolbarItem; + NSToolbarItem* mSidebarToolbarItem; BOOL mInitialized; NSString* mURL; diff --git a/camino/src/browser/BrowserWindowController.mm b/camino/src/browser/BrowserWindowController.mm index a10f62632fc..a693d8e17fc 100644 --- a/camino/src/browser/BrowserWindowController.mm +++ b/camino/src/browser/BrowserWindowController.mm @@ -36,9 +36,13 @@ * ***** END LICENSE BLOCK ***** */ #import "BrowserWindowController.h" + #import "CHBrowserWrapper.h" #import "CHIconTabViewItem.h" #import "CHPreferenceManager.h" +#import "BookmarksDataSource.h" +#import "CHHistoryDataSource.h" +#import "CHExtendedTabView.h" #include "nsIWebNavigation.h" #include "nsIDOMElement.h" @@ -164,7 +168,9 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; NSTabViewItem* item = [mTabBrowser tabViewItemAtIndex: i]; [[item view] windowClosed]; } - [mSidebarBrowserView windowClosed]; + + //if (mSidebarBrowserView) + // [mSidebarBrowserView windowClosed]; [mProgress release]; @@ -584,9 +590,6 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; [newView setIsBookmarksImport: YES]; [[[self window] contentView] addSubview: newView]; [[newView getBrowserView] loadURI:aURLSpec flags:NSLoadFlagsNone]; - - // XXX force reload - //[mSidebarBookmarksDataSource reloadDataForItem: nil reloadChildren: YES]; } - (IBAction)goToLocationFromToolbarURLField:(id)sender diff --git a/chimera/BrowserWindowController.h b/chimera/BrowserWindowController.h index c8b80df8d45..a0c4eab6041 100644 --- a/chimera/BrowserWindowController.h +++ b/chimera/BrowserWindowController.h @@ -61,7 +61,7 @@ class nsIDOMNode; { NSTimer* mTimer; NSArray* mImages; - int mFrame; + unsigned int mFrame; } // public @@ -75,45 +75,49 @@ class nsIDOMNode; @end +@class BookmarksDataSource; +@class CHHistoryDataSource; +@class CHExtendedTabView; + @interface BrowserWindowController : NSWindowController { - IBOutlet id mTabBrowser; - IBOutlet NSDrawer* mSidebarDrawer; - IBOutlet id mSidebarTabView; - IBOutlet id mSidebarSourceTabView; - IBOutlet id mLocationToolbarView; - IBOutlet NSTextField* mURLBar; - IBOutlet NSTextField* mStatus; + IBOutlet CHExtendedTabView* mTabBrowser; + IBOutlet NSDrawer* mSidebarDrawer; + IBOutlet NSTabView* mSidebarTabView; + IBOutlet NSTabView* mSidebarSourceTabView; + IBOutlet NSView* mLocationToolbarView; + IBOutlet NSTextField* mURLBar; + IBOutlet NSTextField* mStatus; IBOutlet NSProgressIndicator* mProgress; - IBOutlet NSImageView* mLock; - IBOutlet id mLocationSheetWindow; - IBOutlet id mLocationSheetURLField; - IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock + IBOutlet NSImageView* mLock; + IBOutlet NSWindow* mLocationSheetWindow; + IBOutlet NSTextField* mLocationSheetURLField; + IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock - IBOutlet id mSidebarBrowserView; - IBOutlet id mSidebarBookmarksDataSource; - IBOutlet id mHistoryDataSource; + IBOutlet id mSidebarBrowserView; // currently unused + IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource; + IBOutlet CHHistoryDataSource* mHistoryDataSource; - IBOutlet CHBookmarksToolbar* mPersonalToolbar; + IBOutlet CHBookmarksToolbar* mPersonalToolbar; - IBOutlet id mAddBookmarkSheetWindow; - IBOutlet id mAddBookmarkTitleField; - IBOutlet id mAddBookmarkFolderField; - IBOutlet id mAddBookmarkCheckbox; + IBOutlet NSWindow* mAddBookmarkSheetWindow; + IBOutlet NSTextField* mAddBookmarkTitleField; + IBOutlet NSPopUpButton* mAddBookmarkFolderField; + IBOutlet NSButton* mAddBookmarkCheckbox; // Context menu outlets. - IBOutlet id mPageMenu; - IBOutlet id mImageMenu; - IBOutlet id mInputMenu; - IBOutlet id mLinkMenu; - IBOutlet id mImageLinkMenu; + IBOutlet NSMenu* mPageMenu; + IBOutlet NSMenu* mImageMenu; + IBOutlet NSMenu* mInputMenu; + IBOutlet NSMenu* mLinkMenu; + IBOutlet NSMenu* mImageLinkMenu; // Context menu item outlets - IBOutlet id mBackItem; - IBOutlet id mForwardItem; + IBOutlet NSMenuItem* mBackItem; + IBOutlet NSMenuItem* mForwardItem; - NSToolbarItem *mLocationToolbarItem; - NSToolbarItem *mSidebarToolbarItem; + NSToolbarItem* mLocationToolbarItem; + NSToolbarItem* mSidebarToolbarItem; BOOL mInitialized; NSString* mURL; diff --git a/chimera/BrowserWindowController.mm b/chimera/BrowserWindowController.mm index a10f62632fc..a693d8e17fc 100644 --- a/chimera/BrowserWindowController.mm +++ b/chimera/BrowserWindowController.mm @@ -36,9 +36,13 @@ * ***** END LICENSE BLOCK ***** */ #import "BrowserWindowController.h" + #import "CHBrowserWrapper.h" #import "CHIconTabViewItem.h" #import "CHPreferenceManager.h" +#import "BookmarksDataSource.h" +#import "CHHistoryDataSource.h" +#import "CHExtendedTabView.h" #include "nsIWebNavigation.h" #include "nsIDOMElement.h" @@ -164,7 +168,9 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; NSTabViewItem* item = [mTabBrowser tabViewItemAtIndex: i]; [[item view] windowClosed]; } - [mSidebarBrowserView windowClosed]; + + //if (mSidebarBrowserView) + // [mSidebarBrowserView windowClosed]; [mProgress release]; @@ -584,9 +590,6 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; [newView setIsBookmarksImport: YES]; [[[self window] contentView] addSubview: newView]; [[newView getBrowserView] loadURI:aURLSpec flags:NSLoadFlagsNone]; - - // XXX force reload - //[mSidebarBookmarksDataSource reloadDataForItem: nil reloadChildren: YES]; } - (IBAction)goToLocationFromToolbarURLField:(id)sender diff --git a/chimera/src/browser/BrowserWindowController.h b/chimera/src/browser/BrowserWindowController.h index c8b80df8d45..a0c4eab6041 100644 --- a/chimera/src/browser/BrowserWindowController.h +++ b/chimera/src/browser/BrowserWindowController.h @@ -61,7 +61,7 @@ class nsIDOMNode; { NSTimer* mTimer; NSArray* mImages; - int mFrame; + unsigned int mFrame; } // public @@ -75,45 +75,49 @@ class nsIDOMNode; @end +@class BookmarksDataSource; +@class CHHistoryDataSource; +@class CHExtendedTabView; + @interface BrowserWindowController : NSWindowController { - IBOutlet id mTabBrowser; - IBOutlet NSDrawer* mSidebarDrawer; - IBOutlet id mSidebarTabView; - IBOutlet id mSidebarSourceTabView; - IBOutlet id mLocationToolbarView; - IBOutlet NSTextField* mURLBar; - IBOutlet NSTextField* mStatus; + IBOutlet CHExtendedTabView* mTabBrowser; + IBOutlet NSDrawer* mSidebarDrawer; + IBOutlet NSTabView* mSidebarTabView; + IBOutlet NSTabView* mSidebarSourceTabView; + IBOutlet NSView* mLocationToolbarView; + IBOutlet NSTextField* mURLBar; + IBOutlet NSTextField* mStatus; IBOutlet NSProgressIndicator* mProgress; - IBOutlet NSImageView* mLock; - IBOutlet id mLocationSheetWindow; - IBOutlet id mLocationSheetURLField; - IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock + IBOutlet NSImageView* mLock; + IBOutlet NSWindow* mLocationSheetWindow; + IBOutlet NSTextField* mLocationSheetURLField; + IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock - IBOutlet id mSidebarBrowserView; - IBOutlet id mSidebarBookmarksDataSource; - IBOutlet id mHistoryDataSource; + IBOutlet id mSidebarBrowserView; // currently unused + IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource; + IBOutlet CHHistoryDataSource* mHistoryDataSource; - IBOutlet CHBookmarksToolbar* mPersonalToolbar; + IBOutlet CHBookmarksToolbar* mPersonalToolbar; - IBOutlet id mAddBookmarkSheetWindow; - IBOutlet id mAddBookmarkTitleField; - IBOutlet id mAddBookmarkFolderField; - IBOutlet id mAddBookmarkCheckbox; + IBOutlet NSWindow* mAddBookmarkSheetWindow; + IBOutlet NSTextField* mAddBookmarkTitleField; + IBOutlet NSPopUpButton* mAddBookmarkFolderField; + IBOutlet NSButton* mAddBookmarkCheckbox; // Context menu outlets. - IBOutlet id mPageMenu; - IBOutlet id mImageMenu; - IBOutlet id mInputMenu; - IBOutlet id mLinkMenu; - IBOutlet id mImageLinkMenu; + IBOutlet NSMenu* mPageMenu; + IBOutlet NSMenu* mImageMenu; + IBOutlet NSMenu* mInputMenu; + IBOutlet NSMenu* mLinkMenu; + IBOutlet NSMenu* mImageLinkMenu; // Context menu item outlets - IBOutlet id mBackItem; - IBOutlet id mForwardItem; + IBOutlet NSMenuItem* mBackItem; + IBOutlet NSMenuItem* mForwardItem; - NSToolbarItem *mLocationToolbarItem; - NSToolbarItem *mSidebarToolbarItem; + NSToolbarItem* mLocationToolbarItem; + NSToolbarItem* mSidebarToolbarItem; BOOL mInitialized; NSString* mURL; diff --git a/chimera/src/browser/BrowserWindowController.mm b/chimera/src/browser/BrowserWindowController.mm index a10f62632fc..a693d8e17fc 100644 --- a/chimera/src/browser/BrowserWindowController.mm +++ b/chimera/src/browser/BrowserWindowController.mm @@ -36,9 +36,13 @@ * ***** END LICENSE BLOCK ***** */ #import "BrowserWindowController.h" + #import "CHBrowserWrapper.h" #import "CHIconTabViewItem.h" #import "CHPreferenceManager.h" +#import "BookmarksDataSource.h" +#import "CHHistoryDataSource.h" +#import "CHExtendedTabView.h" #include "nsIWebNavigation.h" #include "nsIDOMElement.h" @@ -164,7 +168,9 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; NSTabViewItem* item = [mTabBrowser tabViewItemAtIndex: i]; [[item view] windowClosed]; } - [mSidebarBrowserView windowClosed]; + + //if (mSidebarBrowserView) + // [mSidebarBrowserView windowClosed]; [mProgress release]; @@ -584,9 +590,6 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item"; [newView setIsBookmarksImport: YES]; [[[self window] contentView] addSubview: newView]; [[newView getBrowserView] loadURI:aURLSpec flags:NSLoadFlagsNone]; - - // XXX force reload - //[mSidebarBookmarksDataSource reloadDataForItem: nil reloadChildren: YES]; } - (IBAction)goToLocationFromToolbarURLField:(id)sender