зеркало из https://github.com/mozilla/pjs.git
Updating files for the new class names ('CH' for Gecko-embedding wrapper, all other classes have no prefix).
This commit is contained in:
Родитель
d74a370f77
Коммит
1c0afebfe4
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,162 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{CLASS = BookmarkItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
addBookmark = id;
|
||||
addFolder = id;
|
||||
deleteBookmarks = id;
|
||||
openBookmarkInNewTab = id;
|
||||
openBookmarkInNewWindow = id;
|
||||
showBookmarkInfo = id;
|
||||
};
|
||||
CLASS = BookmarksDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mBrowserWindowController = id;
|
||||
mDeleteBookmarkButton = id;
|
||||
mEditBookmarkButton = id;
|
||||
mOutlineView = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
||||
{
|
||||
CLASS = BrowserWindow;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mAutoCompleteTextField = id; };
|
||||
SUPERCLASS = NSWindow;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
back = id;
|
||||
bookmarkLink = id;
|
||||
bookmarkPage = id;
|
||||
cancelAddBookmarkSheet = id;
|
||||
cancelLocationSheet = id;
|
||||
copyLinkLocation = id;
|
||||
endAddBookmarkSheet = id;
|
||||
endLocationSheet = id;
|
||||
forward = id;
|
||||
goToLocationFromToolbarURLField = id;
|
||||
home = id;
|
||||
manageBookmarks = id;
|
||||
openLinkInNewTab = id;
|
||||
openLinkInNewWindow = id;
|
||||
performSearch = id;
|
||||
printDocument = id;
|
||||
reload = id;
|
||||
saveImageAs = id;
|
||||
saveLinkAs = id;
|
||||
savePageAs = id;
|
||||
stop = id;
|
||||
toggleSidebar = id;
|
||||
viewOnlyThisImage = id;
|
||||
viewSource = id;
|
||||
};
|
||||
CLASS = BrowserWindowController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mAddBookmarkCheckbox = NSButton;
|
||||
mAddBookmarkFolderField = NSPopUpButton;
|
||||
mAddBookmarkSheetWindow = NSWindow;
|
||||
mAddBookmarkTitleField = NSTextField;
|
||||
mBackItem = NSMenuItem;
|
||||
mCachedBMDS = id;
|
||||
mForwardItem = NSMenuItem;
|
||||
mHistoryDataSource = CHHistoryDataSource;
|
||||
mImageLinkMenu = NSMenu;
|
||||
mImageMenu = NSMenu;
|
||||
mInputMenu = NSMenu;
|
||||
mLinkMenu = NSMenu;
|
||||
mLocationSheetURLField = NSTextField;
|
||||
mLocationSheetWindow = NSWindow;
|
||||
mLocationToolbarView = NSView;
|
||||
mLock = NSImageView;
|
||||
mPageMenu = NSMenu;
|
||||
mPersonalToolbar = CHBookmarksToolbar;
|
||||
mProgress = NSProgressIndicator;
|
||||
mProxyIcon = NSImageView;
|
||||
mSidebarBookmarksDataSource = BookmarksDataSource;
|
||||
mSidebarBrowserView = id;
|
||||
mSidebarDrawer = NSDrawer;
|
||||
mSidebarSourceTabView = NSTabView;
|
||||
mSidebarTabView = NSTabView;
|
||||
mStatus = NSTextField;
|
||||
mStatusBar = NSView;
|
||||
mTabBrowser = CHExtendedTabView;
|
||||
mURLBar = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = CHAutoCompleteDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {onBlur = id; onResize = id; };
|
||||
CLASS = CHAutoCompleteTextField;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mProxyIcon = CHPageProxyIcon; };
|
||||
SUPERCLASS = NSTextField;
|
||||
},
|
||||
{
|
||||
CLASS = CHBookmarksOutlineView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = CHExtendedOutlineView;
|
||||
},
|
||||
{CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = CHBrowserWrapper;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mLockIcon = id;
|
||||
mWindowController = id;
|
||||
progress = id;
|
||||
progressSuper = id;
|
||||
status = id;
|
||||
urlbar = id;
|
||||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{
|
||||
CLASS = CHHistoryDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mBrowserWindowController = id; };
|
||||
SUPERCLASS = CHRDFOutlineViewDataSource;
|
||||
},
|
||||
{CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = CHPageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||
{
|
||||
CLASS = CHRDFOutlineViewDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mOutlineView = id; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = MyBrowserView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mImageLinkMenu = id;
|
||||
mImageMenu = id;
|
||||
mInputMenu = id;
|
||||
mLinkMenu = id;
|
||||
mPageMenu = id;
|
||||
mWindowController = id;
|
||||
progress = id;
|
||||
progressSuper = id;
|
||||
status = id;
|
||||
urlbar = id;
|
||||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>176 79 632 495 0 0 1280 1002 </string>
|
||||
<string>208 152 630 599 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
|
@ -39,11 +39,7 @@
|
|||
<string>4</string>
|
||||
<key>IBLockedObjects</key>
|
||||
<array/>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>10</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -1,80 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = BrowserToolbarController;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = ToolbarController;
|
||||
},
|
||||
{CLASS = CHGoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
addBookmark = id;
|
||||
addFolder = id;
|
||||
addSeparator = id;
|
||||
biggerTextSize = id;
|
||||
closeTab = id;
|
||||
displayPreferencesWindow = id;
|
||||
doReload = id;
|
||||
doSearch = id;
|
||||
doStop = id;
|
||||
feedbackLink = id;
|
||||
findAgain = id;
|
||||
findInPage = id;
|
||||
getInfo = id;
|
||||
goBack = id;
|
||||
goForward = id;
|
||||
goHome = id;
|
||||
importBookmarks = id;
|
||||
infoLink = id;
|
||||
manageBookmarks = id;
|
||||
newTab = id;
|
||||
newWindow = id;
|
||||
nextTab = id;
|
||||
openFile = id;
|
||||
openLocation = id;
|
||||
openMenuBookmark = id;
|
||||
previousTab = id;
|
||||
printPage = id;
|
||||
printPreview = id;
|
||||
savePage = id;
|
||||
showAboutBox = id;
|
||||
smallerTextSize = id;
|
||||
toggleBookmarksToolbar = id;
|
||||
toggleOfflineMode = id;
|
||||
toggleSidebar = id;
|
||||
viewSource = id;
|
||||
};
|
||||
CLASS = MainController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mAddBookmarkMenuItem = NSMenuItem;
|
||||
mApplication = NSApplication;
|
||||
mBookmarksMenu = NSMenu;
|
||||
mBookmarksToolbarMenuItem = NSMenuItem;
|
||||
mCloseTabMenuItem = NSMenuItem;
|
||||
mCloseWindowMenuItem = NSMenuItem;
|
||||
mCreateBookmarksFolderMenuItem = NSMenuItem;
|
||||
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
|
||||
mFilterList = NSPopUpButton;
|
||||
mFilterView = NSView;
|
||||
mToggleSidebarMenuItem = NSMenuItem;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = MyBrowserView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {progress = id; progressSuper = id; status = id; urlbar = id; };
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{
|
||||
CLASS = ToolbarController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mBrowserView = id; mWindow = id; };
|
||||
SUPERCLASS = NSObject;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
Двоичный файл не отображается.
|
@ -184,7 +184,7 @@ const int kDefaultExpireDays = 9;
|
|||
ICInstance icInstance = NULL;
|
||||
OSStatus error;
|
||||
|
||||
// it would be nice to use CHPreferenceManager, but I don't want to drag
|
||||
// it would be nice to use PreferenceManager, but I don't want to drag
|
||||
// all that code into the plugin
|
||||
error = ICStart(&icInstance, 'CHIM');
|
||||
if (error != noErr) {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
|
||||
// set such that "enable all" is 0 and "disable all" is 2. If mozilla has other prefs
|
||||
// that we don't quite know about, we assume they were remapped by the CHPreferenceManager
|
||||
// that we don't quite know about, we assume they were remapped by the PreferenceManager
|
||||
// at startup.
|
||||
PRInt32 acceptCookies = 0;
|
||||
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<key>AppleEventCode</key>
|
||||
<string>GURL</string>
|
||||
<key>CommandClass</key>
|
||||
<string>CHGetURLCommand</string>
|
||||
<string>GetURLCommand</string>
|
||||
</dict>
|
||||
<key>OpenURL</key>
|
||||
<dict>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<key>AppleEventCode</key>
|
||||
<string>OURL</string>
|
||||
<key>CommandClass</key>
|
||||
<string>CHGetURLCommand</string>
|
||||
<string>GetURLCommand</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Name</key>
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{CLASS = AutoCompleteDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {onBlur = id; onResize = id; };
|
||||
CLASS = AutoCompleteTextField;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mProxyIcon = PageProxyIcon; };
|
||||
SUPERCLASS = NSTextField;
|
||||
},
|
||||
{CLASS = BookmarkItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
|
@ -20,6 +28,11 @@
|
|||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = BookmarksOutlineView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = ExtendedOutlineView;
|
||||
},
|
||||
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
||||
{
|
||||
|
@ -65,7 +78,7 @@
|
|||
mBackItem = NSMenuItem;
|
||||
mCachedBMDS = id;
|
||||
mForwardItem = NSMenuItem;
|
||||
mHistoryDataSource = CHHistoryDataSource;
|
||||
mHistoryDataSource = HistoryDataSource;
|
||||
mImageLinkMenu = NSMenu;
|
||||
mImageMenu = NSMenu;
|
||||
mInputMenu = NSMenu;
|
||||
|
@ -75,7 +88,7 @@
|
|||
mLocationToolbarView = NSView;
|
||||
mLock = NSImageView;
|
||||
mPageMenu = NSMenu;
|
||||
mPersonalToolbar = CHBookmarksToolbar;
|
||||
mPersonalToolbar = BookmarksToolbar;
|
||||
mProgress = NSProgressIndicator;
|
||||
mProxyIcon = NSImageView;
|
||||
mSidebarBookmarksDataSource = BookmarksDataSource;
|
||||
|
@ -85,28 +98,14 @@
|
|||
mSidebarTabView = NSTabView;
|
||||
mStatus = NSTextField;
|
||||
mStatusBar = NSView;
|
||||
mTabBrowser = CHExtendedTabView;
|
||||
mTabBrowser = BrowserTabView;
|
||||
mURLBar = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = CHAutoCompleteDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {onBlur = id; onResize = id; };
|
||||
CLASS = CHAutoCompleteTextField;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mProxyIcon = CHPageProxyIcon; };
|
||||
SUPERCLASS = NSTextField;
|
||||
},
|
||||
{
|
||||
CLASS = CHBookmarksOutlineView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = CHExtendedOutlineView;
|
||||
},
|
||||
{CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = CHBrowserWrapper;
|
||||
CLASS = BrowserWrapper;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mLockIcon = id;
|
||||
|
@ -118,43 +117,23 @@
|
|||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = CHHistoryDataSource;
|
||||
CLASS = HistoryDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mBrowserWindowController = id; };
|
||||
SUPERCLASS = CHRDFOutlineViewDataSource;
|
||||
SUPERCLASS = RDFOutlineViewDataSource;
|
||||
},
|
||||
{CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = CHPageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = PageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||
{
|
||||
CLASS = CHRDFOutlineViewDataSource;
|
||||
CLASS = RDFOutlineViewDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mOutlineView = id; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = MyBrowserView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mImageLinkMenu = id;
|
||||
mImageMenu = id;
|
||||
mInputMenu = id;
|
||||
mLinkMenu = id;
|
||||
mPageMenu = id;
|
||||
mWindowController = id;
|
||||
progress = id;
|
||||
progressSuper = id;
|
||||
status = id;
|
||||
urlbar = id;
|
||||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>176 79 632 495 0 0 1280 1002 </string>
|
||||
<string>208 152 630 599 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
|
@ -39,11 +39,7 @@
|
|||
<string>4</string>
|
||||
<key>IBLockedObjects</key>
|
||||
<array/>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>10</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичные данные
camino/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -5,8 +5,8 @@
|
|||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = ToolbarController;
|
||||
},
|
||||
{CLASS = CHGoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = GoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||
{
|
||||
ACTIONS = {
|
||||
addBookmark = id;
|
||||
|
|
Двоичный файл не отображается.
|
@ -23,7 +23,7 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CHGetURLCommand : NSScriptCommand {}
|
||||
@interface GetURLCommand : NSScriptCommand {}
|
||||
|
||||
- (id)performDefaultImplementation;
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import "CHGetURLCommand.h"
|
||||
#import "GetURLCommand.h"
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import "MainController.h"
|
||||
|
||||
@implementation CHGetURLCommand
|
||||
@implementation GetURLCommand
|
||||
|
||||
- (id)performDefaultImplementation
|
||||
{
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <Appkit/Appkit.h>
|
||||
|
||||
@interface CHAboutBox : NSObject
|
||||
{
|
||||
IBOutlet NSTextView* creditsField;
|
||||
IBOutlet NSTextField* buildNumberField;
|
||||
IBOutlet NSWindow* window;
|
||||
NSTimer *scrollTimer;
|
||||
float currentPosition;
|
||||
float maxScrollHeight;
|
||||
NSTimeInterval startTime;
|
||||
BOOL restartAtTop;
|
||||
}
|
||||
|
||||
+ (CHAboutBox *)sharedInstance;
|
||||
- (IBAction)showPanel:(id)sender;
|
||||
|
||||
@end
|
|
@ -37,19 +37,19 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "CHAboutBox.h"
|
||||
#import "AboutBox.h"
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
@interface CHAboutBox(Private)
|
||||
@interface AboutBox(Private)
|
||||
- (void)loadWindow;
|
||||
@end
|
||||
|
||||
@implementation CHAboutBox
|
||||
@implementation AboutBox
|
||||
|
||||
static CHAboutBox *sharedInstance = nil;
|
||||
static AboutBox *sharedInstance = nil;
|
||||
|
||||
+ (CHAboutBox *)sharedInstance
|
||||
+ (AboutBox *)sharedInstance
|
||||
{
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
#import "BrowserWindowController.h"
|
||||
#import "MVPreferencesController.h"
|
||||
#import "CHSplashScreenWindow.h"
|
||||
#import "SplashScreenWindow.h"
|
||||
#import "FindDlgController.h"
|
||||
#import "CHPreferenceManager.h"
|
||||
#import "PreferenceManager.h"
|
||||
|
||||
class BookmarksService;
|
||||
|
||||
|
@ -67,9 +67,9 @@ class BookmarksService;
|
|||
|
||||
BOOL mOffline;
|
||||
|
||||
CHSplashScreenWindow* mSplashScreen;
|
||||
SplashScreenWindow* mSplashScreen;
|
||||
|
||||
CHPreferenceManager* mPreferenceManager;
|
||||
PreferenceManager* mPreferenceManager;
|
||||
|
||||
BookmarksService* mMenuBookmarks;
|
||||
|
||||
|
@ -142,7 +142,7 @@ class BookmarksService;
|
|||
|
||||
- (MVPreferencesController *)preferencesController;
|
||||
- (void)displayPreferencesWindow:sender;
|
||||
- (CHPreferenceManager *)preferenceManager;
|
||||
- (PreferenceManager *)preferenceManager;
|
||||
- (BOOL)isMainWindowABrowserWindow;
|
||||
|
||||
// if the main window is a browser window, return its controller, otherwise nil
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
#import "MainController.h"
|
||||
#import "BrowserWindowController.h"
|
||||
#import "BookmarksService.h"
|
||||
#import "nsCocoaBrowserService.h"
|
||||
#import "CHAboutBox.h"
|
||||
#import "CHUserDefaults.h"
|
||||
#import "CHBrowserService.h"
|
||||
#import "AboutBox.h"
|
||||
#import "UserDefaults.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsEmbedAPI.h"
|
||||
|
@ -94,7 +94,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
|
||||
NSString* url = [defaults stringForKey:USER_DEFAULTS_URL_KEY];
|
||||
mStartURL = url ? [url retain] : nil;
|
||||
mSplashScreen = [[CHSplashScreenWindow alloc] splashImage:nil withFade:NO withStatusRect:NSMakeRect(0,0,0,0)];
|
||||
mSplashScreen = [[SplashScreenWindow alloc] splashImage:nil withFade:NO withStatusRect:NSMakeRect(0,0,0,0)];
|
||||
mFindDialog = nil;
|
||||
mMenuBookmarks = nil;
|
||||
|
||||
|
@ -170,7 +170,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[mPreferencesController release];
|
||||
[mPreferenceManager release];
|
||||
|
||||
nsCocoaBrowserService::TermEmbedding();
|
||||
CHBrowserService::TermEmbedding();
|
||||
|
||||
[self autorelease];
|
||||
}
|
||||
|
@ -556,10 +556,10 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
[[browserWindow windowController] manageBookmarks: aSender];
|
||||
}
|
||||
|
||||
- (CHPreferenceManager *)preferenceManager
|
||||
- (PreferenceManager *)preferenceManager
|
||||
{
|
||||
if (!mPreferenceManager)
|
||||
mPreferenceManager = [[CHPreferenceManager sharedInstance] retain];
|
||||
mPreferenceManager = [[PreferenceManager sharedInstance] retain];
|
||||
return mPreferenceManager;
|
||||
}
|
||||
|
||||
|
@ -578,7 +578,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
|
||||
- (IBAction)showAboutBox:(id)sender
|
||||
{
|
||||
[[CHAboutBox sharedInstance] showPanel:sender];
|
||||
[[AboutBox sharedInstance] showPanel:sender];
|
||||
}
|
||||
|
||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface CHSplashScreenWindow : NSWindow {
|
||||
@interface SplashScreenWindow : NSWindow {
|
||||
BOOL _fades;
|
||||
BOOL __didFadeIn;
|
||||
int _fadeIndex;
|
||||
|
|
|
@ -1,186 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Matt Judy.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "CHSplashScreenWindow.h"
|
||||
|
||||
@interface CHSplashScreenWindow (Private)
|
||||
-(void)fadeIn;
|
||||
-(void)fadeInThread;
|
||||
-(void)fadeOut;
|
||||
-(void)fadeOutThread;
|
||||
@end
|
||||
|
||||
@implementation CHSplashScreenWindow
|
||||
|
||||
-(id)splashImage:(NSImage *)splashImage withFade:(BOOL)shouldFade withStatusRect:(NSRect)statusRect
|
||||
{
|
||||
NSRect splashRect;
|
||||
NSRect statusFieldRect;
|
||||
NSImageView *contentImageView;
|
||||
|
||||
_fadeDelay = (0.5 / 60.0);
|
||||
|
||||
if ( ! splashImage ) {
|
||||
if ( [NSImage imageNamed:@"splash"] ) {
|
||||
splashImage = [NSImage imageNamed:@"splash"];
|
||||
} else {
|
||||
splashImage = [NSImage imageNamed:@"NSApplicationIcon"];
|
||||
}
|
||||
}
|
||||
|
||||
splashRect = NSMakeRect(0.0, 0.0, [splashImage size].width, [splashImage size].height);
|
||||
contentImageView = [[[NSImageView alloc] initWithFrame:splashRect] autorelease];
|
||||
#if USE_STATUS_FIELD
|
||||
statusFieldRect = NSMakeRect(0.0, 170.0, (splashRect.size.width - 5.0), 16.0);
|
||||
_statusField = [[[NSTextField alloc] initWithFrame:statusFieldRect];
|
||||
#endif
|
||||
|
||||
if ( (self = [super initWithContentRect:splashRect
|
||||
styleMask:NSBorderlessWindowMask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO]) ) {
|
||||
|
||||
[contentImageView setImage:splashImage];
|
||||
_fadeThreadLock = nil;
|
||||
|
||||
#if USE_STATUS_FIELD
|
||||
[_statusField setDrawsBackground:NO];
|
||||
[_statusField setEditable:NO];
|
||||
[_statusField setSelectable:NO];
|
||||
[_statusField setBezeled:NO];
|
||||
[_statusField setBordered:NO];
|
||||
[_statusField setFont:[NSFont fontWithName:@"Monaco" size:10.0]];
|
||||
[_statusField setTextColor:[NSColor whiteColor]];
|
||||
[_statusField setAlignment:NSRightTextAlignment];
|
||||
[_statusField setStringValue:@"Loading..."];
|
||||
#endif
|
||||
|
||||
[[self contentView] addSubview:contentImageView];
|
||||
#if USE_STATUS_FIELD
|
||||
[[self contentView] addSubview:_statusField];
|
||||
#endif
|
||||
[self setOpaque:NO];
|
||||
[self setHasShadow:YES];
|
||||
[self setReleasedWhenClosed:YES];
|
||||
[self center];
|
||||
|
||||
if ( shouldFade ) {
|
||||
[self fadeIn];
|
||||
} else {
|
||||
[self makeKeyAndOrderFront:self];
|
||||
}
|
||||
__didFadeIn = shouldFade;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(NSString *)statusText
|
||||
{
|
||||
return [_statusField stringValue];
|
||||
}
|
||||
|
||||
-(void)setStatusText:(NSString *)newText
|
||||
{
|
||||
#if USE_STATUS_FIELD
|
||||
[_statusField setStringValue:newText];
|
||||
[_statusField display];
|
||||
#endif
|
||||
}
|
||||
|
||||
-(void)fadeIn
|
||||
{
|
||||
[self setAlphaValue:0.0];
|
||||
[self makeKeyAndOrderFront:self];
|
||||
|
||||
if (_fadeThreadLock == nil) {
|
||||
_fadeThreadLock = [[NSLock allocWithZone:[self zone]] init];
|
||||
}
|
||||
|
||||
[NSThread detachNewThreadSelector:@selector(fadeInThread) toTarget:self withObject:nil];
|
||||
}
|
||||
|
||||
-(void)fadeInThread
|
||||
{
|
||||
float fadeLevel = 0.0;
|
||||
NSAutoreleasePool *threadMainPool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
[_fadeThreadLock lock];
|
||||
|
||||
while ( fadeLevel < 1.0 ) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
fadeLevel += 0.20;
|
||||
[self setAlphaValue:fadeLevel];
|
||||
[self flushWindow];
|
||||
[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:_fadeDelay]];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
[_fadeThreadLock unlock];
|
||||
[threadMainPool release];
|
||||
}
|
||||
|
||||
-(void)fadeOut
|
||||
{
|
||||
if (_fadeThreadLock == nil) {
|
||||
_fadeThreadLock = [[NSLock allocWithZone:[self zone]] init];
|
||||
}
|
||||
|
||||
[NSThread detachNewThreadSelector:@selector(fadeOutThread) toTarget:self withObject:nil];
|
||||
}
|
||||
|
||||
-(void)fadeOutThread
|
||||
{
|
||||
float fadeLevel = 1.0;
|
||||
NSAutoreleasePool *threadMainPool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
[_fadeThreadLock lock];
|
||||
|
||||
while ( fadeLevel > 0.0 ) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
fadeLevel -= 0.1;
|
||||
[self setAlphaValue:fadeLevel];
|
||||
[self flushWindow];
|
||||
[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:_fadeDelay]];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
[_fadeThreadLock unlock];
|
||||
[threadMainPool release];
|
||||
}
|
||||
|
||||
-(void)close
|
||||
{
|
||||
#if USE_STATUS_FIELD
|
||||
[_statusField release];
|
||||
#endif
|
||||
|
||||
// if ( __didFadeIn ) {
|
||||
if ( NO ) { //Fade out is still problematic...
|
||||
[self fadeOut];
|
||||
}
|
||||
[super close];
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
[_fadeThreadLock release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
|
@ -29,7 +29,7 @@ class BookmarksService;
|
|||
|
||||
@class BookmarkItem;
|
||||
|
||||
@interface CHBookmarksButton : NSButton
|
||||
@interface BookmarksButton : NSButton
|
||||
{
|
||||
nsIDOMElement* mElement;
|
||||
BookmarkItem* mBookmarkItem;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
#import "NSString+Utils.h"
|
||||
#import "CHBookmarksButton.h"
|
||||
#import "BookmarksButton.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIContent.h"
|
||||
|
@ -37,7 +37,7 @@
|
|||
#import "BookmarksDataSource.h"
|
||||
#import "BookmarksService.h"
|
||||
|
||||
@implementation CHBookmarksButton
|
||||
@implementation BookmarksButton
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame
|
||||
{
|
||||
|
@ -163,7 +163,7 @@
|
|||
// Make a copy of the context menu but change it to target us
|
||||
// FIXME - this will stop to work as soon as we add items to the context menu
|
||||
// that have different targets. In that case, we probably should add code to
|
||||
// CHBookmarksToolbar that manages the context menu for the CHBookmarksButtons.
|
||||
// BookmarksToolbar that manages the context menu for the CHBookmarksButtons.
|
||||
|
||||
NSMenu* myMenu = [[[self superview] menu] copy];
|
||||
[[myMenu itemArray] makeObjectsPerformSelector:@selector(setTarget:) withObject: self];
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
#import <Appkit/Appkit.h>
|
||||
|
||||
#import "MainController.h"
|
||||
#import "CHBookmarksToolbar.h"
|
||||
#import "CHExtendedOutlineView.h"
|
||||
#import "BookmarksToolbar.h"
|
||||
#import "ExtendedOutlineView.h"
|
||||
|
||||
class nsIContent;
|
||||
class BookmarksService;
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHExtendedOutlineView.h"
|
||||
#import "ExtendedOutlineView.h"
|
||||
|
||||
@interface CHBookmarksOutlineView : CHExtendedOutlineView {
|
||||
@interface BookmarksOutlineView : ExtendedOutlineView {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* Joe Hewitt <hewitt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import "CHBookmarksOutlineView.h"
|
||||
#import "BookmarksOutlineView.h"
|
||||
#import "BookmarksService.h"
|
||||
#import "BookmarksDataSource.h"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
#include "nsIContent.h"
|
||||
#include "nsIDOMNode.h"
|
||||
|
||||
@implementation CHBookmarksOutlineView
|
||||
@implementation BookmarksOutlineView
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
#include "nsVoidArray.h"
|
||||
|
||||
#import "MainController.h"
|
||||
#import "CHBookmarksToolbar.h"
|
||||
#import "CHExtendedOutlineView.h"
|
||||
#import "BookmarksToolbar.h"
|
||||
#import "ExtendedOutlineView.h"
|
||||
|
||||
class nsIAtom;
|
||||
class nsIDOMHTMLDocument;
|
||||
|
@ -60,7 +60,7 @@ class BookmarksService
|
|||
{
|
||||
public:
|
||||
BookmarksService(BookmarksDataSource* aDataSource);
|
||||
BookmarksService(CHBookmarksToolbar* aToolbar);
|
||||
BookmarksService(BookmarksToolbar* aToolbar);
|
||||
virtual ~BookmarksService();
|
||||
|
||||
void AddObserver();
|
||||
|
@ -139,7 +139,7 @@ private:
|
|||
// There are three kinds of bookmarks data sources:
|
||||
// tree views (mDataSource), the personal toolbar (mToolbar)
|
||||
// and menus (gBookmarksMenu).
|
||||
CHBookmarksToolbar* mToolbar;
|
||||
BookmarksToolbar* mToolbar;
|
||||
BookmarksDataSource* mDataSource;
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "CHPreferenceManager.h"
|
||||
#import "PreferenceManager.h"
|
||||
#import "CHBrowserView.h"
|
||||
#import "BookmarksService.h"
|
||||
#import "BookmarksDataSource.h"
|
||||
|
@ -132,7 +132,7 @@ BookmarksService::BookmarksService(BookmarksDataSource* aDataSource)
|
|||
mToolbar = nil;
|
||||
}
|
||||
|
||||
BookmarksService::BookmarksService(CHBookmarksToolbar* aToolbar)
|
||||
BookmarksService::BookmarksService(BookmarksToolbar* aToolbar)
|
||||
{
|
||||
mDataSource = nil;
|
||||
mToolbar = aToolbar;
|
||||
|
@ -629,7 +629,7 @@ BookmarksService::CreateIconForBookmark(nsIDOMElement* aElement)
|
|||
return [NSImage imageNamed:@"folder"];
|
||||
|
||||
// fire off a proxy icon load
|
||||
if ([[CHPreferenceManager sharedInstance] getBooleanPref:"browser.chrome.site_icons" withSuccess:NULL])
|
||||
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.chrome.site_icons" withSuccess:NULL])
|
||||
{
|
||||
nsAutoString href;
|
||||
content->GetAttr(kNameSpaceID_None, gHrefAtom, href);
|
||||
|
@ -1109,7 +1109,7 @@ BookmarksService::OpenBookmarkGroup(id aTabView, nsIDOMElement* aFolder)
|
|||
// XXX this needs fixing to not max out the number of tabs in a browser window.
|
||||
// See [BrowserWindowController newTabsAllowed];
|
||||
tabViewItem = [BrowserTabView makeNewTabItem];
|
||||
CHBrowserWrapper* newView = [[[CHBrowserWrapper alloc] initWithTab: tabViewItem andWindow: [aTabView window]] autorelease];
|
||||
BrowserWrapper* newView = [[[BrowserWrapper alloc] initWithTab: tabViewItem andWindow: [aTabView window]] autorelease];
|
||||
[tabViewItem setLabel: NSLocalizedString(@"UntitledPageTitle", @"")];
|
||||
[tabViewItem setView: newView];
|
||||
[aTabView addTabViewItem: tabViewItem];
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
class nsIDOMElement;
|
||||
|
||||
class BookmarksService;
|
||||
class CHBookmarksButton;
|
||||
class BookmarksButton;
|
||||
|
||||
@interface CHBookmarksToolbar : NSView
|
||||
@interface BookmarksToolbar : NSView
|
||||
{
|
||||
BookmarksService* mBookmarks;
|
||||
NSMutableArray* mButtons;
|
||||
CHBookmarksButton* mDragInsertionButton;
|
||||
BookmarksButton* mDragInsertionButton;
|
||||
int mDragInsertionPosition;
|
||||
BOOL mIsShowing;
|
||||
}
|
||||
|
|
|
@ -23,19 +23,19 @@
|
|||
* David Haas <haasd@cae.wisc.edu>
|
||||
*/
|
||||
|
||||
#import "CHBookmarksButton.h"
|
||||
#import "CHBookmarksToolbar.h"
|
||||
#import "BookmarksButton.h"
|
||||
#import "BookmarksToolbar.h"
|
||||
#import "BookmarksService.h"
|
||||
#import "BookmarksDataSource.h"
|
||||
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
@interface CHBookmarksToolbar(Private)
|
||||
- (CHBookmarksButton*)makeNewButtonWithElement:(nsIDOMElement*)element;
|
||||
@interface BookmarksToolbar(Private)
|
||||
- (BookmarksButton*)makeNewButtonWithElement:(nsIDOMElement*)element;
|
||||
@end
|
||||
|
||||
@implementation CHBookmarksToolbar
|
||||
@implementation BookmarksToolbar
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame
|
||||
{
|
||||
|
@ -100,7 +100,7 @@
|
|||
while (child) {
|
||||
nsCOMPtr<nsIDOMElement> childElt(do_QueryInterface(child));
|
||||
if (childElt) {
|
||||
CHBookmarksButton* button = [self makeNewButtonWithElement:childElt];
|
||||
BookmarksButton* button = [self makeNewButtonWithElement:childElt];
|
||||
[self addSubview: button];
|
||||
[mButtons addObject: button];
|
||||
}
|
||||
|
@ -115,7 +115,7 @@
|
|||
|
||||
-(void)addButton: (nsIDOMElement*)aElt atIndex: (int)aIndex
|
||||
{
|
||||
CHBookmarksButton* button = [self makeNewButtonWithElement:aElt];
|
||||
BookmarksButton* button = [self makeNewButtonWithElement:aElt];
|
||||
[self addSubview: button];
|
||||
[mButtons insertObject: button atIndex: aIndex];
|
||||
if ([self isShown])
|
||||
|
@ -126,7 +126,7 @@
|
|||
{
|
||||
int count = [mButtons count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
CHBookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
BookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
if ([button element] == aElt) {
|
||||
[button setElement: aElt];
|
||||
if (count > i && [self isShown])
|
||||
|
@ -142,7 +142,7 @@
|
|||
{
|
||||
int count = [mButtons count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
CHBookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
BookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
if ([button element] == aElt) {
|
||||
[mButtons removeObjectAtIndex: i];
|
||||
[button removeFromSuperview];
|
||||
|
@ -168,12 +168,12 @@
|
|||
float currY = 1.0;
|
||||
float prevX = 2.0;
|
||||
if (aIndex > 0) {
|
||||
CHBookmarksButton* prevButton = [mButtons objectAtIndex: (aIndex-1)];
|
||||
BookmarksButton* prevButton = [mButtons objectAtIndex: (aIndex-1)];
|
||||
prevX += [prevButton frame].origin.x + [prevButton frame].size.width;
|
||||
currY = [prevButton frame].origin.y;
|
||||
}
|
||||
for (int i = aIndex; i < count; i++) {
|
||||
CHBookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
BookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
[button sizeToFit];
|
||||
float width = [button frame].size.width;
|
||||
float height = [button frame].size.height;
|
||||
|
@ -240,7 +240,7 @@
|
|||
else {
|
||||
// We got smaller. Just go to the last button and see if it is outside
|
||||
// our bounds.
|
||||
CHBookmarksButton* button = [mButtons objectAtIndex:(count-1)];
|
||||
BookmarksButton* button = [mButtons objectAtIndex:(count-1)];
|
||||
if ([button frame].origin.x + [button frame].size.width >
|
||||
[self bounds].size.width - 2) {
|
||||
// The button doesn't fit any more. Reflow starting at this index.
|
||||
|
@ -285,7 +285,7 @@
|
|||
mDragInsertionPosition = BookmarksService::CHInsertAfter;
|
||||
|
||||
for (int i = 0; i < count; ++i) {
|
||||
CHBookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
BookmarksButton* button = [mButtons objectAtIndex: i];
|
||||
//NSLog(@"check %d - %d,%d %d,%d\n", i, [button frame].origin.x, [button frame].origin.y, aPoint.x, aPoint.y);
|
||||
// XXX origin.y is coming up zero here! Need that to check the row we're dragging in :(
|
||||
|
||||
|
@ -456,9 +456,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (CHBookmarksButton*)makeNewButtonWithElement:(nsIDOMElement*)element
|
||||
- (BookmarksButton*)makeNewButtonWithElement:(nsIDOMElement*)element
|
||||
{
|
||||
return [[[CHBookmarksButton alloc] initWithFrame: NSMakeRect(2, 1, 100, 17) element:element bookmarksService:mBookmarks] autorelease];
|
||||
return [[[BookmarksButton alloc] initWithFrame: NSMakeRect(2, 1, 100, 17) element:element bookmarksService:mBookmarks] autorelease];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteTextField.h"
|
||||
#import "AutoCompleteTextField.h"
|
||||
#include "nsIAutoCompleteResults.h"
|
||||
|
||||
@class CHAutoCompleteTextField;
|
||||
@class AutoCompleteTextField;
|
||||
|
||||
@interface CHAutoCompleteDataSource : NSObject
|
||||
@interface AutoCompleteDataSource : NSObject
|
||||
{
|
||||
NSImage *mIconImage;
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
#import "NSString+Utils.h"
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteTextField.h"
|
||||
#import "AutoCompleteTextField.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
@implementation AutoCompleteDataSource
|
||||
|
||||
-(id)init
|
||||
{
|
||||
|
|
|
@ -23,20 +23,20 @@
|
|||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
#import "AutoCompleteDataSource.h"
|
||||
#include "nsIAutoCompleteSession.h"
|
||||
#include "nsIAutoCompleteResults.h"
|
||||
#include "nsIAutoCompleteListener.h"
|
||||
|
||||
@class CHAutoCompleteDataSource, CHPageProxyIcon;
|
||||
@class BookmarksOutlineView, PageProxyIcon;
|
||||
|
||||
@interface CHAutoCompleteTextField : NSTextField
|
||||
@interface AutoCompleteTextField : NSTextField
|
||||
{
|
||||
IBOutlet CHPageProxyIcon *mProxyIcon;
|
||||
IBOutlet PageProxyIcon *mProxyIcon;
|
||||
NSWindow *mPopupWin;
|
||||
NSTableView *mTableView;
|
||||
|
||||
CHAutoCompleteDataSource *mDataSource;
|
||||
AutoCompleteDataSource *mDataSource;
|
||||
|
||||
nsIAutoCompleteSession *mSession;
|
||||
nsIAutoCompleteResults *mResults;
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
* David Haas <haasd@cae.wisc.edu>
|
||||
*/
|
||||
|
||||
#import "CHAutoCompleteTextField.h"
|
||||
#import "AutoCompleteTextField.h"
|
||||
#import "BrowserWindowController.h"
|
||||
#import "CHPageProxyIcon.h"
|
||||
#import "PageProxyIcon.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsMemory.h"
|
||||
#include "nsString.h"
|
||||
#include "CHUserDefaults.h"
|
||||
#include "UserDefaults.h"
|
||||
|
||||
static const int kMaxRows = 6;
|
||||
static const int kFrameMargin = 1;
|
||||
|
@ -47,7 +47,7 @@ static const int kFrameMargin = 1;
|
|||
class AutoCompleteListener : public nsIAutoCompleteListener
|
||||
{
|
||||
public:
|
||||
AutoCompleteListener(CHAutoCompleteTextField* aTextField)
|
||||
AutoCompleteListener(AutoCompleteTextField* aTextField)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mTextField = aTextField;
|
||||
|
@ -66,14 +66,14 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
CHAutoCompleteTextField *mTextField;
|
||||
AutoCompleteTextField *mTextField;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@implementation CHAutoCompleteTextField
|
||||
@implementation AutoCompleteTextField
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener)
|
|||
[scrollView setDocumentView: mTableView];
|
||||
|
||||
// construct the datasource
|
||||
mDataSource = [[CHAutoCompleteDataSource alloc] init];
|
||||
mDataSource = [[AutoCompleteDataSource alloc] init];
|
||||
[mTableView setDataSource: mDataSource];
|
||||
|
||||
[mPopupWin setContentView:scrollView];
|
||||
|
|
|
@ -384,7 +384,7 @@
|
|||
{
|
||||
// We need to make a new tab.
|
||||
BrowserTabViewItem *tabViewItem= [BrowserTabView makeNewTabItem];
|
||||
CHBrowserWrapper *newView = [[[CHBrowserWrapper alloc] initWithTab: tabViewItem andWindow: [self window]] autorelease];
|
||||
BrowserWrapper *newView = [[[BrowserWrapper alloc] initWithTab: tabViewItem andWindow: [self window]] autorelease];
|
||||
[tabViewItem setLabel: NSLocalizedString(@"UntitledPageTitle", @"")];
|
||||
[tabViewItem setView: newView];
|
||||
[self addTabViewItem: tabViewItem];
|
||||
|
|
|
@ -38,12 +38,12 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "CHIconTabViewItem.h"
|
||||
#import "IconTabViewItem.h"
|
||||
|
||||
// a subclass of CHIconTabViewItem that handles dragging of site icons
|
||||
// a subclass of IconTabViewItem that handles dragging of site icons
|
||||
@class BrowserTabItemContainerView;
|
||||
|
||||
@interface BrowserTabViewItem : CHIconTabViewItem
|
||||
@interface BrowserTabViewItem : IconTabViewItem
|
||||
{
|
||||
NSRect mLastDrawRect; // cached draw rect, used for dragging location
|
||||
BrowserTabItemContainerView* mTabContentsView;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#import "BrowserWindow.h"
|
||||
#import "BrowserWindowController.h"
|
||||
#import "CHAutoCompleteTextField.h"
|
||||
#import "AutoCompleteTextField.h"
|
||||
|
||||
static const int kEscapeKeyCode = 53;
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "CHBrowserWrapper.h"
|
||||
#import "CHFind.h"
|
||||
#import "CHBookmarksToolbar.h"
|
||||
#import "BrowserWrapper.h"
|
||||
#import "Find.h"
|
||||
#import "BookmarksToolbar.h"
|
||||
|
||||
class nsIDOMEvent;
|
||||
class nsIDOMNode;
|
||||
|
@ -76,13 +76,13 @@ class nsIDOMNode;
|
|||
|
||||
|
||||
@class BookmarksDataSource;
|
||||
@class CHHistoryDataSource;
|
||||
@class HistoryDataSource;
|
||||
@class BrowserTabView;
|
||||
@class CHPageProxyIcon;
|
||||
@class PageProxyIcon;
|
||||
|
||||
@interface BrowserWindowController : NSWindowController<CHFind>
|
||||
@interface BrowserWindowController : NSWindowController<Find>
|
||||
{
|
||||
IBOutlet BrowserTabView* mTabBrowser;
|
||||
IBOutlet BrowserTabView* mTabBrowser;
|
||||
IBOutlet NSDrawer* mSidebarDrawer;
|
||||
IBOutlet NSTabView* mSidebarTabView;
|
||||
IBOutlet NSTabView* mSidebarSourceTabView;
|
||||
|
@ -94,13 +94,13 @@ class nsIDOMNode;
|
|||
IBOutlet NSWindow* mLocationSheetWindow;
|
||||
IBOutlet NSTextField* mLocationSheetURLField;
|
||||
IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock
|
||||
IBOutlet CHPageProxyIcon* mProxyIcon;
|
||||
IBOutlet PageProxyIcon* mProxyIcon;
|
||||
|
||||
IBOutlet id mSidebarBrowserView; // currently unused
|
||||
IBOutlet BookmarksDataSource* mSidebarBookmarksDataSource;
|
||||
IBOutlet CHHistoryDataSource* mHistoryDataSource;
|
||||
IBOutlet HistoryDataSource* mHistoryDataSource;
|
||||
|
||||
IBOutlet CHBookmarksToolbar* mPersonalToolbar;
|
||||
IBOutlet BookmarksToolbar* mPersonalToolbar;
|
||||
|
||||
IBOutlet NSWindow* mAddBookmarkSheetWindow;
|
||||
IBOutlet NSTextField* mAddBookmarkTitleField;
|
||||
|
@ -125,7 +125,7 @@ class nsIDOMNode;
|
|||
NSString* mPendingReferrer;
|
||||
BOOL mPendingActivate;
|
||||
|
||||
CHBrowserWrapper* mBrowserView;
|
||||
BrowserWrapper* mBrowserView;
|
||||
|
||||
BOOL mMoveReentrant;
|
||||
NSModalSession mModalSession;
|
||||
|
@ -160,7 +160,7 @@ class nsIDOMNode;
|
|||
|
||||
- (id)getTabBrowser;
|
||||
- (BOOL)newTabsAllowed;
|
||||
- (CHBrowserWrapper*)getBrowserWrapper;
|
||||
- (BrowserWrapper*)getBrowserWrapper;
|
||||
|
||||
- (void)loadURL:(NSString*)aURLSpec referrer:(NSString*)aReferrer activate:(BOOL)activate;
|
||||
- (void)updateLocationFields:(NSString *)locationString;
|
||||
|
@ -259,7 +259,7 @@ class nsIDOMNode;
|
|||
|
||||
- (IBAction)viewOnlyThisImage:(id)aSender;
|
||||
|
||||
- (CHBookmarksToolbar*) bookmarksToolbar;
|
||||
- (BookmarksToolbar*) bookmarksToolbar;
|
||||
|
||||
- (BOOL) isResponderGeckoView:(NSResponder*) responder;
|
||||
|
||||
|
@ -279,7 +279,7 @@ class nsIDOMNode;
|
|||
- (NSDrawer *)sidebarDrawer;
|
||||
|
||||
// Accessor to get the proxy icon view
|
||||
- (CHPageProxyIcon *)proxyIconView;
|
||||
- (PageProxyIcon *)proxyIconView;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -39,13 +39,13 @@
|
|||
|
||||
#import "BrowserWindowController.h"
|
||||
|
||||
#import "CHBrowserWrapper.h"
|
||||
#import "CHPreferenceManager.h"
|
||||
#import "BrowserWrapper.h"
|
||||
#import "PreferenceManager.h"
|
||||
#import "BookmarksDataSource.h"
|
||||
#import "CHHistoryDataSource.h"
|
||||
#import "HistoryDataSource.h"
|
||||
#import "BrowserTabView.h"
|
||||
#import "CHUserDefaults.h"
|
||||
#import "CHPageProxyIcon.h"
|
||||
#import "UserDefaults.h"
|
||||
#import "PageProxyIcon.h"
|
||||
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
@ -57,10 +57,10 @@
|
|||
#include "nsIDocShell.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsCocoaBrowserService.h"
|
||||
#include "CHBrowserService.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCRT.h"
|
||||
#include "CHGeckoUtils.h"
|
||||
#include "GeckoUtils.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
|
||||
|
@ -186,7 +186,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
if ( (self = [super initWithWindowNibName:(NSString *)windowNibName]) ) {
|
||||
// this won't correctly cascade windows on multiple monitors. RADAR bug 2972893
|
||||
// filed since it also happens in Terminal.app
|
||||
if ( nsCocoaBrowserService::sNumBrowsers == 0 )
|
||||
if ( CHBrowserService::sNumBrowsers == 0 )
|
||||
[self setShouldCascadeWindows:NO];
|
||||
else
|
||||
[self setShouldCascadeWindows:YES];
|
||||
|
@ -725,7 +725,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
[self manageBookmarks: self];
|
||||
|
||||
// Now do the importing.
|
||||
CHBrowserWrapper* newView = [[[CHBrowserWrapper alloc] initWithTab: nil andWindow: [self window]] autorelease];
|
||||
BrowserWrapper* newView = [[[BrowserWrapper alloc] initWithTab: nil andWindow: [self window]] autorelease];
|
||||
[newView setFrame: NSZeroRect];
|
||||
[newView setIsBookmarksImport: YES];
|
||||
[[[self window] contentView] addSubview: newView];
|
||||
|
@ -786,7 +786,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
|
||||
// Get the users preferred search engine from IC
|
||||
if (!searchEngine || [searchEngine isEqualToString:@"SearchPageDefault"]) {
|
||||
searchEngine = [[CHPreferenceManager sharedInstance] getICStringPref:kICWebSearchPagePrefs];
|
||||
searchEngine = [[PreferenceManager sharedInstance] getICStringPref:kICWebSearchPagePrefs];
|
||||
if (!searchEngine || ([searchEngine length] == 0))
|
||||
searchEngine = @"http://dmoz.org/";
|
||||
}
|
||||
|
@ -897,9 +897,9 @@ static NSArray* sToolbarDefaults = nil;
|
|||
{
|
||||
nsCOMPtr<nsIDOMElement> linkContent;
|
||||
nsAutoString href;
|
||||
CHGeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
||||
GeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
||||
nsAutoString linkText;
|
||||
CHGeckoUtils::GatherTextUnder(linkContent, linkText);
|
||||
GeckoUtils::GatherTextUnder(linkContent, linkText);
|
||||
NSString* urlStr = [NSString stringWith_nsAString:href];
|
||||
NSString* titleStr = [NSString stringWith_nsAString:linkText];
|
||||
[self addBookmarkExtended:YES isFolder:NO URL:urlStr title:titleStr];
|
||||
|
@ -927,7 +927,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
|
||||
- (IBAction)home:(id)aSender
|
||||
{
|
||||
[mBrowserView loadURI:[[CHPreferenceManager sharedInstance] homePage:NO] referrer: nil flags:NSLoadFlagsNone activate:NO];
|
||||
[mBrowserView loadURI:[[PreferenceManager sharedInstance] homePage:NO] referrer: nil flags:NSLoadFlagsNone activate:NO];
|
||||
}
|
||||
|
||||
- (IBAction)toggleSidebar:(id)aSender
|
||||
|
@ -979,7 +979,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
-(void)newTab:(BOOL)allowHomepage
|
||||
{
|
||||
BrowserTabViewItem* newTab = [BrowserTabView makeNewTabItem];
|
||||
CHBrowserWrapper* newView = [[[CHBrowserWrapper alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
|
||||
BrowserWrapper* newView = [[[BrowserWrapper alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
|
||||
|
||||
PRInt32 newTabPage = 0;
|
||||
if (allowHomepage) {
|
||||
|
@ -999,7 +999,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
newTabPage != 1 && allowHomepage);
|
||||
|
||||
if (allowHomepage)
|
||||
[newView loadURI: ((newTabPage == 1) ? [[CHPreferenceManager sharedInstance] homePage: NO] : @"about:blank") referrer:nil flags:NSLoadFlagsNone activate:!focusURLBar];
|
||||
[newView loadURI: ((newTabPage == 1) ? [[PreferenceManager sharedInstance] homePage: NO] : @"about:blank") referrer:nil flags:NSLoadFlagsNone activate:!focusURLBar];
|
||||
|
||||
[mTabBrowser selectLastTabViewItem: self];
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
return [mTabBrowser canMakeNewTabs];
|
||||
}
|
||||
|
||||
-(CHBrowserWrapper*)getBrowserWrapper
|
||||
-(BrowserWrapper*)getBrowserWrapper
|
||||
{
|
||||
return mBrowserView;
|
||||
}
|
||||
|
@ -1111,7 +1111,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
[mTabBrowser addTabViewItem: newTab];
|
||||
#endif
|
||||
|
||||
CHBrowserWrapper* newView = [[[CHBrowserWrapper alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
|
||||
BrowserWrapper* newView = [[[BrowserWrapper alloc] initWithTab: newTab andWindow: [mTabBrowser window]] autorelease];
|
||||
[newView setTab: newTab];
|
||||
|
||||
[newTab setLabel: NSLocalizedString(@"TabLoading", @"")];
|
||||
|
@ -1125,16 +1125,16 @@ static NSArray* sToolbarDefaults = nil;
|
|||
|
||||
-(void)setupSidebarTabs
|
||||
{
|
||||
CHIconTabViewItem *bookItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"bookmarkSidebarCHIconTabViewItem"
|
||||
IconTabViewItem *bookItem = [[IconTabViewItem alloc] initWithIdentifier:@"bookmarkSidebarCHIconTabViewItem"
|
||||
withTabIcon:[NSImage imageNamed:@"bookicon"]];
|
||||
CHIconTabViewItem *histItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"historySidebarCHIconTabViewItem"
|
||||
IconTabViewItem *histItem = [[IconTabViewItem alloc] initWithIdentifier:@"historySidebarCHIconTabViewItem"
|
||||
withTabIcon:[NSImage imageNamed:@"historyicon"]];
|
||||
#if USE_SEARCH_ITEM
|
||||
CHIconTabViewItem *searchItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"searchSidebarCHIconTabViewItem"
|
||||
IconTabViewItem *searchItem = [[IconTabViewItem alloc] initWithIdentifier:@"searchSidebarCHIconTabViewItem"
|
||||
withTabIcon:[NSImage imageNamed:@"searchicon"]];
|
||||
#endif
|
||||
#if USE_PANELS_ITEM
|
||||
CHIconTabViewItem *panelsItem = [[CHIconTabViewItem alloc] initWithIdentifier:@"myPanelsCHIconTabViewItem"
|
||||
IconTabViewItem *panelsItem = [[IconTabViewItem alloc] initWithIdentifier:@"myPanelsCHIconTabViewItem"
|
||||
withTabIcon:[NSImage imageNamed:@"panel_icon"]];
|
||||
#endif
|
||||
|
||||
|
@ -1327,7 +1327,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
{
|
||||
nsCOMPtr<nsIDOMElement> linkContent;
|
||||
nsAutoString href;
|
||||
CHGeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
||||
GeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
||||
|
||||
// XXXdwh Handle simple XLINKs if we want to be compatible with Mozilla, but who
|
||||
// really uses these anyway? :)
|
||||
|
@ -1360,7 +1360,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
{
|
||||
nsCOMPtr<nsIDOMElement> linkContent;
|
||||
nsAutoString href;
|
||||
CHGeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
||||
GeckoUtils::GetEnclosingLinkElementAndHref(mContextMenuNode, getter_AddRefs(linkContent), href);
|
||||
|
||||
// XXXdwh Handle simple XLINKs if we want to be compatible with Mozilla, but who
|
||||
// really uses these anyway? :)
|
||||
|
@ -1371,7 +1371,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
|
||||
// The user wants to save this link.
|
||||
nsAutoString text;
|
||||
CHGeckoUtils::GatherTextUnder(mContextMenuNode, text);
|
||||
GeckoUtils::GatherTextUnder(mContextMenuNode, text);
|
||||
|
||||
[self saveURL: nil filterList: nil
|
||||
url: hrefStr suggestedFilename: [NSString stringWith_nsAString: text]];
|
||||
|
@ -1422,7 +1422,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
}
|
||||
}
|
||||
|
||||
- (CHBookmarksToolbar*) bookmarksToolbar
|
||||
- (BookmarksToolbar*) bookmarksToolbar
|
||||
{
|
||||
return mPersonalToolbar;
|
||||
}
|
||||
|
@ -1486,7 +1486,7 @@ static NSArray* sToolbarDefaults = nil;
|
|||
return mSidebarDrawer;
|
||||
}
|
||||
|
||||
- (CHPageProxyIcon *)proxyIconView
|
||||
- (PageProxyIcon *)proxyIconView
|
||||
{
|
||||
return mProxyIcon;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
@class BrowserWindowController;
|
||||
@class ToolTip;
|
||||
|
||||
@interface CHBrowserWrapper : NSView <NSBrowserListener, NSBrowserContainer>
|
||||
@interface BrowserWrapper : NSView <NSBrowserListener, NSBrowserContainer>
|
||||
{
|
||||
NSTextField* mUrlbar;
|
||||
NSTextField* mStatus;
|
||||
|
|
|
@ -37,14 +37,14 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "CHPreferenceManager.h"
|
||||
#import "CHBrowserWrapper.h"
|
||||
#import "PreferenceManager.h"
|
||||
#import "BrowserWrapper.h"
|
||||
#import "BrowserWindowController.h"
|
||||
#import "BookmarksService.h"
|
||||
#import "SiteIconProvider.h"
|
||||
#import "BrowserTabViewItem.h"
|
||||
#import "ToolTip.h"
|
||||
#import "CHPageProxyIcon.h"
|
||||
#import "PageProxyIcon.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -59,7 +59,7 @@
|
|||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsCocoaBrowserService.h"
|
||||
#include "CHBrowserService.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
|
||||
#include <QuickDraw.h>
|
||||
|
@ -70,7 +70,7 @@ static const char* ioServiceContractID = "@mozilla.org/network/io-service;1";
|
|||
|
||||
const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||
|
||||
@interface CHBrowserWrapper(Private)
|
||||
@interface BrowserWrapper(Private)
|
||||
|
||||
- (void)setPendingActive:(BOOL)active;
|
||||
- (void)registerNotificationListener;
|
||||
|
@ -82,7 +82,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
|||
|
||||
@end
|
||||
|
||||
@implementation CHBrowserWrapper
|
||||
@implementation BrowserWrapper
|
||||
|
||||
- (id)initWithTab:(NSTabViewItem*)aTab andWindow:(NSWindow*)aWindow
|
||||
{
|
||||
|
@ -340,7 +340,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
|||
|
||||
- (void)onLocationChange:(NSString*)urlSpec
|
||||
{
|
||||
BOOL useSiteIcons = [[CHPreferenceManager sharedInstance] getBooleanPref:"browser.chrome.site_icons" withSuccess:NULL];
|
||||
BOOL useSiteIcons = [[PreferenceManager sharedInstance] getBooleanPref:"browser.chrome.site_icons" withSuccess:NULL];
|
||||
BOOL siteIconLoadInitiated = NO;
|
||||
|
||||
SiteIconProvider* faviconProvider = [SiteIconProvider sharedFavoriteIconProvider];
|
||||
|
@ -573,7 +573,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
|||
if (isUnrequested) {
|
||||
// A popup is being opened while the page is currently loading. Offer to block the
|
||||
// popup.
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
BOOL confirm = [controller confirm: [self window] title: @"Unrequested Popup Detected"
|
||||
text: [NSString stringWithFormat: NSLocalizedString(@"PopupBlockMsg", @""), NSLocalizedStringFromTable(@"CFBundleName", @"InfoPlist", nil)]];
|
||||
|
||||
|
@ -680,7 +680,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
|||
NSImage* iconImage = [userInfo objectForKey:SiteIconLoadImageKey];
|
||||
NSString* siteIconURI = [userInfo objectForKey:SiteIconLoadURIKey];
|
||||
|
||||
// NSLog(@"CHBrowserWrapper imageLoadedNotification got image %@ and uri %@", iconImage, proxyImageURI);
|
||||
// NSLog(@"BrowserWrapper imageLoadedNotification got image %@ and uri %@", iconImage, proxyImageURI);
|
||||
if (iconImage == nil)
|
||||
siteIconURI = @""; // go back to default image
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "nsCocoaBrowserService.h"
|
||||
#import "CHBrowserService.h"
|
||||
#import "CocoaPromptService.h"
|
||||
|
||||
#include "nsCRT.h"
|
||||
|
@ -65,7 +65,7 @@ CocoaPromptService::Alert(nsIDOMWindow *parent,
|
|||
const PRUnichar *dialogTitle,
|
||||
const PRUnichar *text)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ CocoaPromptService::AlertCheck(nsIDOMWindow *parent,
|
|||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ CocoaPromptService::Confirm(nsIDOMWindow *parent,
|
|||
const PRUnichar *text,
|
||||
PRBool *_retval)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ CocoaPromptService::ConfirmCheck(nsIDOMWindow *parent,
|
|||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue, PRBool *_retval)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ CocoaPromptService::ConfirmEx(nsIDOMWindow *parent,
|
|||
const PRUnichar *checkMsg,
|
||||
PRBool *checkValue, PRInt32 *buttonPressed)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ CocoaPromptService::Prompt(nsIDOMWindow *parent,
|
|||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ CocoaPromptService::PromptUsernameAndPassword(nsIDOMWindow *parent,
|
|||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ CocoaPromptService::PromptPassword(nsIDOMWindow *parent,
|
|||
PRBool *checkValue,
|
||||
PRBool *_retval)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
#include "nsNetUtil.h"
|
||||
|
||||
// Common helper routines (also used by the context menu code)
|
||||
#include "CHGeckoUtils.h"
|
||||
#include "GeckoUtils.h"
|
||||
|
||||
#import "CHBrowserView.h"
|
||||
|
||||
|
@ -261,7 +261,7 @@ ContentClickListener::MouseClick(nsIDOMEvent* aEvent)
|
|||
|
||||
nsCOMPtr<nsIDOMElement> linkContent;
|
||||
nsAutoString href;
|
||||
CHGeckoUtils::GetEnclosingLinkElementAndHref(content, getter_AddRefs(linkContent), href);
|
||||
GeckoUtils::GetEnclosingLinkElementAndHref(content, getter_AddRefs(linkContent), href);
|
||||
|
||||
// XXXdwh Handle simple XLINKs if we want to be compatible with Mozilla, but who
|
||||
// really uses these anyway? :)
|
||||
|
@ -301,7 +301,7 @@ ContentClickListener::MouseClick(nsIDOMEvent* aEvent)
|
|||
else if (altKey) {
|
||||
// The user wants to save this link.
|
||||
nsAutoString text;
|
||||
CHGeckoUtils::GatherTextUnder(content, text);
|
||||
GeckoUtils::GatherTextUnder(content, text);
|
||||
|
||||
[mBrowserController saveURL: nil filterList: nil
|
||||
url: hrefStr suggestedFilename: [NSString stringWith_nsAString: text]];
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#import <Appkit/Appkit.h>
|
||||
|
||||
@interface CHGoMenu : NSMenu {
|
||||
@interface GoMenu : NSMenu {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "CHGoMenu.h"
|
||||
#import "GoMenu.h"
|
||||
#import "MainController.h"
|
||||
#import "BrowserWindowController.h"
|
||||
#import "CHBrowserWrapper.h"
|
||||
#import "BrowserWrapper.h"
|
||||
#import "CHBrowserView.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
|
@ -43,7 +43,7 @@ static const int kMaxItems = 15;
|
|||
// the maximum number of characters in a menu title before cropping it
|
||||
static const unsigned int kMaxTitleLength = 80;
|
||||
|
||||
@implementation CHGoMenu
|
||||
@implementation GoMenu
|
||||
|
||||
- (void) update
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ static const unsigned int kMaxTitleLength = 80;
|
|||
if (!controller) return nsnull;
|
||||
|
||||
// get web navigation for current browser
|
||||
CHBrowserWrapper* wrapper = [controller getBrowserWrapper];
|
||||
BrowserWrapper* wrapper = [controller getBrowserWrapper];
|
||||
if (!wrapper) return nsnull;
|
||||
CHBrowserView* view = [wrapper getBrowserView];
|
||||
if (!view) return nsnull;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@interface CHLocationBar : NSView {
|
||||
@interface LocationBar : NSView {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "CHLocationBar.h"
|
||||
#import "LocationBar.h"
|
||||
|
||||
@implementation CHLocationBar
|
||||
@implementation LocationBar
|
||||
|
||||
- (void)drawRect:(NSRect)aRect {
|
||||
// Frame the border.
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface CHPageProxyIcon : NSImageView
|
||||
@interface PageProxyIcon : NSImageView
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "CHPageProxyIcon.h"
|
||||
#import "PageProxyIcon.h"
|
||||
|
||||
#import "BookmarksService.h"
|
||||
#import "MainController.h"
|
||||
|
@ -32,7 +32,7 @@
|
|||
#include "nsNetUtil.h"
|
||||
#include "nsString.h"
|
||||
|
||||
@implementation CHPageProxyIcon
|
||||
@implementation PageProxyIcon
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "nsAlertController.h"
|
||||
#import "nsCocoaBrowserService.h"
|
||||
#import "CHBrowserService.h"
|
||||
#import "SecurityDialogs.h"
|
||||
#import "MainController.h"
|
||||
|
||||
|
@ -71,7 +71,7 @@ SecurityDialogs::UnknownIssuer(nsITransportSecurityInfo *socketInfo,
|
|||
*_retval = PR_TRUE;
|
||||
*outAddType = ADD_TRUSTED_FOR_SESSION;
|
||||
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
@ -99,7 +99,7 @@ SecurityDialogs::MismatchDomain(nsITransportSecurityInfo *socketInfo,
|
|||
const PRUnichar *targetURL,
|
||||
nsIX509Cert *cert, PRBool *_retval)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
@ -118,7 +118,7 @@ NS_IMETHODIMP
|
|||
SecurityDialogs::CertExpired(nsITransportSecurityInfo *socketInfo,
|
||||
nsIX509Cert *cert, PRBool *_retval)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
@ -199,7 +199,7 @@ NS_IMETHODIMP
|
|||
SecurityDialogs::ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx,
|
||||
PRBool* _result)
|
||||
{
|
||||
nsAlertController* controller = nsCocoaBrowserService::GetAlertController();
|
||||
nsAlertController* controller = CHBrowserService::GetAlertController();
|
||||
if (!controller)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "nsAlertController.h"
|
||||
#import "nsCocoaBrowserService.h"
|
||||
#import "CHBrowserService.h"
|
||||
|
||||
#include "nsIBadCertListener.h"
|
||||
|
||||
|
@ -62,7 +62,7 @@ enum { kOKButton = 0, kCancelButton = 1, kOtherButton = 2 };
|
|||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
nsCocoaBrowserService::SetAlertController(self);
|
||||
CHBrowserService::SetAlertController(self);
|
||||
}
|
||||
|
||||
- (void)alert:(NSWindow*)parent title:(NSString*)title text:(NSString*)text
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import "DownloadProgressDisplay.h"
|
||||
#import "CHDownloadProgressDisplay.h"
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
|
@ -51,7 +51,7 @@ class nsDownloadListener;
|
|||
@end
|
||||
|
||||
|
||||
@interface ProgressDlgController : NSWindowController <DownloadProgressDisplay>
|
||||
@interface ProgressDlgController : NSWindowController <CHDownloadProgressDisplay>
|
||||
{
|
||||
IBOutlet NSTextField *mElapsedTimeLabel;
|
||||
IBOutlet NSTextField *mFromField;
|
||||
|
|
|
@ -60,11 +60,11 @@ static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
|||
|
||||
@implementation ChimeraDownloadControllerFactory : DownloadControllerFactory
|
||||
|
||||
- (NSWindowController<DownloadProgressDisplay> *)createDownloadController
|
||||
- (NSWindowController<CHDownloadProgressDisplay> *)createDownloadController
|
||||
{
|
||||
NSWindowController* progressController = [[ProgressDlgController alloc] initWithWindowNibName: @"ProgressDialog"];
|
||||
NSAssert([progressController conformsToProtocol:@protocol(DownloadProgressDisplay)],
|
||||
@"progressController should conform to DownloadProgressDisplay protocol");
|
||||
NSAssert([progressController conformsToProtocol:@protocol(CHDownloadProgressDisplay)],
|
||||
@"progressController should conform to CHDownloadProgressDisplay protocol");
|
||||
return progressController;
|
||||
}
|
||||
|
||||
|
@ -434,7 +434,7 @@ static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
|||
|
||||
#pragma mark -
|
||||
|
||||
// DownloadProgressDisplay protocol methods
|
||||
// CHDownloadProgressDisplay protocol methods
|
||||
|
||||
- (void)onStartDownload:(BOOL)isFileSave;
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import <Appkit/Appkit.h>
|
||||
|
||||
#import "DownloadProgressDisplay.h"
|
||||
#import "CHDownloadProgressDisplay.h"
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsIDownload.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// nsCocoaBrowserListener.h
|
||||
// CHBrowserListener.h
|
||||
// Chimera
|
||||
//
|
||||
// Created by Simon Fraser on Sat Aug 17 2002.
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
@class CHBrowserView;
|
||||
|
||||
class nsCocoaBrowserListener : public nsSupportsWeakReference,
|
||||
class CHBrowserListener : public nsSupportsWeakReference,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIWebBrowserChrome,
|
||||
public nsIWindowCreator,
|
||||
|
@ -33,8 +33,8 @@ class nsCocoaBrowserListener : public nsSupportsWeakReference,
|
|||
public nsITooltipListener
|
||||
{
|
||||
public:
|
||||
nsCocoaBrowserListener(CHBrowserView* aView);
|
||||
virtual ~nsCocoaBrowserListener();
|
||||
CHBrowserListener(CHBrowserView* aView);
|
||||
virtual ~CHBrowserListener();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
|
|
|
@ -53,17 +53,17 @@
|
|||
|
||||
#import "CHBrowserView.h"
|
||||
|
||||
#include "nsCocoaBrowserListener.h"
|
||||
#include "CHBrowserListener.h"
|
||||
|
||||
|
||||
nsCocoaBrowserListener::nsCocoaBrowserListener(CHBrowserView* aView)
|
||||
CHBrowserListener::CHBrowserListener(CHBrowserView* aView)
|
||||
: mView(aView), mContainer(nsnull), mIsModal(PR_FALSE), mChromeFlags(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mListeners = [[NSMutableArray alloc] init];
|
||||
}
|
||||
|
||||
nsCocoaBrowserListener::~nsCocoaBrowserListener()
|
||||
CHBrowserListener::~CHBrowserListener()
|
||||
{
|
||||
[mListeners release];
|
||||
mView = nsnull;
|
||||
|
@ -72,7 +72,7 @@ nsCocoaBrowserListener::~nsCocoaBrowserListener()
|
|||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS9(nsCocoaBrowserListener,
|
||||
NS_IMPL_ISUPPORTS9(CHBrowserListener,
|
||||
nsIInterfaceRequestor,
|
||||
nsIWebBrowserChrome,
|
||||
nsIWindowCreator,
|
||||
|
@ -85,7 +85,7 @@ NS_IMPL_ISUPPORTS9(nsCocoaBrowserListener,
|
|||
|
||||
// Implementation of nsIInterfaceRequestor
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::GetInterface(const nsIID &aIID, void** aInstancePtr)
|
||||
CHBrowserListener::GetInterface(const nsIID &aIID, void** aInstancePtr)
|
||||
{
|
||||
if (aIID.Equals(NS_GET_IID(nsIDOMWindow))) {
|
||||
nsCOMPtr<nsIWebBrowser> browser = dont_AddRef([mView getWebBrowser]);
|
||||
|
@ -100,13 +100,13 @@ nsCocoaBrowserListener::GetInterface(const nsIID &aIID, void** aInstancePtr)
|
|||
// for a new window that have a parent to us, and we take over from there.
|
||||
/* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||
CHBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||
PRUint32 chromeFlags,
|
||||
nsIWebBrowserChrome **_retval)
|
||||
{
|
||||
if (parent != this) {
|
||||
#if DEBUG
|
||||
NSLog(@"Mismatch in nsCocoaBrowserListener::CreateChromeWindow. We should be the owning parent.");
|
||||
NSLog(@"Mismatch in CHBrowserListener::CreateChromeWindow. We should be the owning parent.");
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ nsCocoaBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCocoaBrowserListener* listener = [childView getCocoaBrowserListener];
|
||||
CHBrowserListener* listener = [childView getCocoaBrowserListener];
|
||||
if (!listener) {
|
||||
#if DEBUG
|
||||
NSLog(@"Uh-oh! No listener yet for a newly created window (nsCocoaBrowserlistener)");
|
||||
|
@ -138,7 +138,7 @@ nsCocoaBrowserListener::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
|||
|
||||
// Implementation of nsIContextMenuListener
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent* aEvent, nsIDOMNode* aNode)
|
||||
CHBrowserListener::OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent* aEvent, nsIDOMNode* aNode)
|
||||
{
|
||||
[mContainer onShowContextMenu: aContextFlags domEvent: aEvent domNode: aNode];
|
||||
return NS_OK;
|
||||
|
@ -146,7 +146,7 @@ nsCocoaBrowserListener::OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent* a
|
|||
|
||||
// Implementation of nsITooltipListener
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
|
||||
CHBrowserListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
|
||||
{
|
||||
NSPoint where;
|
||||
where.x = aXCoords; where.y = aYCoords;
|
||||
|
@ -155,7 +155,7 @@ nsCocoaBrowserListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnHideTooltip()
|
||||
CHBrowserListener::OnHideTooltip()
|
||||
{
|
||||
[mContainer onHideTooltip];
|
||||
return NS_OK;
|
||||
|
@ -164,7 +164,7 @@ nsCocoaBrowserListener::OnHideTooltip()
|
|||
// Implementation of nsIWebBrowserChrome
|
||||
/* void setStatus (in unsigned long statusType, in wstring status); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SetStatus(PRUint32 statusType, const PRUnichar *status)
|
||||
CHBrowserListener::SetStatus(PRUint32 statusType, const PRUnichar *status)
|
||||
{
|
||||
if (!mContainer) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -182,7 +182,7 @@ nsCocoaBrowserListener::SetStatus(PRUint32 statusType, const PRUnichar *status)
|
|||
|
||||
/* attribute nsIWebBrowser webBrowser; */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
|
||||
CHBrowserListener::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aWebBrowser);
|
||||
if (!mView) {
|
||||
|
@ -193,7 +193,7 @@ nsCocoaBrowserListener::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
|
|||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SetWebBrowser(nsIWebBrowser * aWebBrowser)
|
||||
CHBrowserListener::SetWebBrowser(nsIWebBrowser * aWebBrowser)
|
||||
{
|
||||
if (!mView) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -206,14 +206,14 @@ nsCocoaBrowserListener::SetWebBrowser(nsIWebBrowser * aWebBrowser)
|
|||
|
||||
/* attribute unsigned long chromeFlags; */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::GetChromeFlags(PRUint32 *aChromeFlags)
|
||||
CHBrowserListener::GetChromeFlags(PRUint32 *aChromeFlags)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aChromeFlags);
|
||||
*aChromeFlags = mChromeFlags;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SetChromeFlags(PRUint32 aChromeFlags)
|
||||
CHBrowserListener::SetChromeFlags(PRUint32 aChromeFlags)
|
||||
{
|
||||
// XXX Do nothing with them for now
|
||||
mChromeFlags = aChromeFlags;
|
||||
|
@ -222,7 +222,7 @@ nsCocoaBrowserListener::SetChromeFlags(PRUint32 aChromeFlags)
|
|||
|
||||
/* void destroyBrowserWindow (); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::DestroyBrowserWindow()
|
||||
CHBrowserListener::DestroyBrowserWindow()
|
||||
{
|
||||
// XXX Could send this up to the container, but for now,
|
||||
// we just destroy the enclosing window.
|
||||
|
@ -237,7 +237,7 @@ nsCocoaBrowserListener::DestroyBrowserWindow()
|
|||
|
||||
/* void sizeBrowserTo (in long aCX, in long aCY); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
|
||||
CHBrowserListener::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
|
||||
{
|
||||
if (mContainer) {
|
||||
NSSize size;
|
||||
|
@ -253,7 +253,7 @@ nsCocoaBrowserListener::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
|
|||
|
||||
/* void showAsModal (); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::ShowAsModal()
|
||||
CHBrowserListener::ShowAsModal()
|
||||
{
|
||||
if (!mView) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -274,7 +274,7 @@ nsCocoaBrowserListener::ShowAsModal()
|
|||
|
||||
/* boolean isWindowModal (); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::IsWindowModal(PRBool *_retval)
|
||||
CHBrowserListener::IsWindowModal(PRBool *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
|
@ -285,7 +285,7 @@ nsCocoaBrowserListener::IsWindowModal(PRBool *_retval)
|
|||
|
||||
/* void exitModalEventLoop (in nsresult aStatus); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::ExitModalEventLoop(nsresult aStatus)
|
||||
CHBrowserListener::ExitModalEventLoop(nsresult aStatus)
|
||||
{
|
||||
// [NSApp stopModalWithCode:(int)aStatus];
|
||||
|
||||
|
@ -294,7 +294,7 @@ nsCocoaBrowserListener::ExitModalEventLoop(nsresult aStatus)
|
|||
|
||||
// Implementation of nsIEmbeddingSiteWindow2
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::Blur()
|
||||
CHBrowserListener::Blur()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ nsCocoaBrowserListener::Blur()
|
|||
// Implementation of nsIEmbeddingSiteWindow
|
||||
/* void setDimensions (in unsigned long flags, in long x, in long y, in long cx, in long cy); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)
|
||||
CHBrowserListener::SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)
|
||||
{
|
||||
if (!mView)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -344,7 +344,7 @@ nsCocoaBrowserListener::SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRIn
|
|||
|
||||
/* void getDimensions (in unsigned long flags, out long x, out long y, out long cx, out long cy); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy)
|
||||
CHBrowserListener::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy)
|
||||
{
|
||||
if (!mView)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -380,7 +380,7 @@ nsCocoaBrowserListener::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y,
|
|||
|
||||
/* void setFocus (); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SetFocus()
|
||||
CHBrowserListener::SetFocus()
|
||||
{
|
||||
if (!mView) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -398,7 +398,7 @@ nsCocoaBrowserListener::SetFocus()
|
|||
|
||||
/* attribute boolean visibility; */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::GetVisibility(PRBool *aVisibility)
|
||||
CHBrowserListener::GetVisibility(PRBool *aVisibility)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aVisibility);
|
||||
|
||||
|
@ -416,7 +416,7 @@ nsCocoaBrowserListener::GetVisibility(PRBool *aVisibility)
|
|||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SetVisibility(PRBool aVisibility)
|
||||
CHBrowserListener::SetVisibility(PRBool aVisibility)
|
||||
{
|
||||
if (!mView) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -439,7 +439,7 @@ nsCocoaBrowserListener::SetVisibility(PRBool aVisibility)
|
|||
|
||||
/* attribute wstring title; */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::GetTitle(PRUnichar * *aTitle)
|
||||
CHBrowserListener::GetTitle(PRUnichar * *aTitle)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aTitle);
|
||||
|
||||
|
@ -463,7 +463,7 @@ nsCocoaBrowserListener::GetTitle(PRUnichar * *aTitle)
|
|||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::SetTitle(const PRUnichar * aTitle)
|
||||
CHBrowserListener::SetTitle(const PRUnichar * aTitle)
|
||||
{
|
||||
NS_ENSURE_ARG(aTitle);
|
||||
|
||||
|
@ -479,7 +479,7 @@ nsCocoaBrowserListener::SetTitle(const PRUnichar * aTitle)
|
|||
|
||||
/* [noscript] readonly attribute voidPtr siteWindow; */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::GetSiteWindow(void * *aSiteWindow)
|
||||
CHBrowserListener::GetSiteWindow(void * *aSiteWindow)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aSiteWindow);
|
||||
*aSiteWindow = nsnull;
|
||||
|
@ -504,7 +504,7 @@ nsCocoaBrowserListener::GetSiteWindow(void * *aSiteWindow)
|
|||
|
||||
/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in unsigned long aStatus); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||
CHBrowserListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||
PRUint32 aStateFlags, PRUint32 aStatus)
|
||||
{
|
||||
NSEnumerator* enumerator = [mListeners objectEnumerator];
|
||||
|
@ -526,7 +526,7 @@ nsCocoaBrowserListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *
|
|||
|
||||
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||
CHBrowserListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||
PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress,
|
||||
PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress)
|
||||
{
|
||||
|
@ -540,7 +540,7 @@ nsCocoaBrowserListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIReques
|
|||
|
||||
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||
CHBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
|
||||
nsIURI *location)
|
||||
{
|
||||
if (!location)
|
||||
|
@ -560,7 +560,7 @@ nsCocoaBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIReques
|
|||
|
||||
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus,
|
||||
CHBrowserListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus,
|
||||
const PRUnichar *aMessage)
|
||||
{
|
||||
NSString* str = [NSString stringWithPRUnichars:aMessage];
|
||||
|
@ -575,7 +575,7 @@ nsCocoaBrowserListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest
|
|||
|
||||
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 state)
|
||||
CHBrowserListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 state)
|
||||
{
|
||||
NSEnumerator* enumerator = [mListeners objectEnumerator];
|
||||
id<NSBrowserListener> obj;
|
||||
|
@ -586,19 +586,19 @@ nsCocoaBrowserListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIReques
|
|||
}
|
||||
|
||||
void
|
||||
nsCocoaBrowserListener::AddListener(id <NSBrowserListener> aListener)
|
||||
CHBrowserListener::AddListener(id <NSBrowserListener> aListener)
|
||||
{
|
||||
[mListeners addObject:aListener];
|
||||
}
|
||||
|
||||
void
|
||||
nsCocoaBrowserListener::RemoveListener(id <NSBrowserListener> aListener)
|
||||
CHBrowserListener::RemoveListener(id <NSBrowserListener> aListener)
|
||||
{
|
||||
[mListeners removeObject:aListener];
|
||||
}
|
||||
|
||||
void
|
||||
nsCocoaBrowserListener::SetContainer(id <NSBrowserContainer> aContainer)
|
||||
CHBrowserListener::SetContainer(id <NSBrowserContainer> aContainer)
|
||||
{
|
||||
[mContainer autorelease];
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@
|
|||
#include "nsIHelperAppLauncherDialog.h"
|
||||
#include "nsIFactory.h"
|
||||
|
||||
class nsCocoaBrowserService : public nsIWindowCreator,
|
||||
class CHBrowserService : public nsIWindowCreator,
|
||||
public nsIFactory,
|
||||
public nsIHelperAppLauncherDialog
|
||||
{
|
||||
public:
|
||||
nsCocoaBrowserService();
|
||||
virtual ~nsCocoaBrowserService();
|
||||
CHBrowserService();
|
||||
virtual ~CHBrowserService();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIWINDOWCREATOR
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
static PRUint32 sNumBrowsers;
|
||||
|
||||
private:
|
||||
static nsCocoaBrowserService* sSingleton;
|
||||
static CHBrowserService* sSingleton;
|
||||
static nsAlertController* sController;
|
||||
static PRBool sCanTerminate;
|
||||
};
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "nsCocoaBrowserService.h"
|
||||
#import "DownloadFactories.h"
|
||||
#import "CHBrowserService.h"
|
||||
#import "CHDownloadFactories.h"
|
||||
#import "CHBrowserView.h"
|
||||
|
||||
#include "nsIWindowWatcher.h"
|
||||
|
@ -51,41 +51,41 @@
|
|||
#include "nsIDownload.h"
|
||||
#include "nsIExternalHelperAppService.h"
|
||||
|
||||
nsAlertController* nsCocoaBrowserService::sController = nsnull;
|
||||
nsCocoaBrowserService* nsCocoaBrowserService::sSingleton = nsnull;
|
||||
PRUint32 nsCocoaBrowserService::sNumBrowsers = 0;
|
||||
PRBool nsCocoaBrowserService::sCanTerminate = PR_FALSE;
|
||||
nsAlertController* CHBrowserService::sController = nsnull;
|
||||
CHBrowserService* CHBrowserService::sSingleton = nsnull;
|
||||
PRUint32 CHBrowserService::sNumBrowsers = 0;
|
||||
PRBool CHBrowserService::sCanTerminate = PR_FALSE;
|
||||
|
||||
// This method should return a nsModuleComponentInfo array of
|
||||
// application-provided XPCOM components to register. The implementation
|
||||
// is in AppComponents.mm.
|
||||
extern const nsModuleComponentInfo* GetAppModuleComponentInfo(int* outNumComponents);
|
||||
|
||||
// nsCocoaBrowserService implementation
|
||||
nsCocoaBrowserService::nsCocoaBrowserService()
|
||||
// CHBrowserService implementation
|
||||
CHBrowserService::CHBrowserService()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsCocoaBrowserService::~nsCocoaBrowserService()
|
||||
CHBrowserService::~CHBrowserService()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS3(nsCocoaBrowserService,
|
||||
NS_IMPL_ISUPPORTS3(CHBrowserService,
|
||||
nsIWindowCreator,
|
||||
nsIFactory,
|
||||
nsIHelperAppLauncherDialog)
|
||||
|
||||
/* static */
|
||||
nsresult
|
||||
nsCocoaBrowserService::InitEmbedding()
|
||||
CHBrowserService::InitEmbedding()
|
||||
{
|
||||
sNumBrowsers++;
|
||||
|
||||
if (sSingleton)
|
||||
return NS_OK;
|
||||
|
||||
sSingleton = new nsCocoaBrowserService();
|
||||
sSingleton = new CHBrowserService();
|
||||
if (!sSingleton)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(sSingleton);
|
||||
|
@ -141,7 +141,7 @@ nsCocoaBrowserService::InitEmbedding()
|
|||
|
||||
/* static */
|
||||
void
|
||||
nsCocoaBrowserService::BrowserClosed()
|
||||
CHBrowserService::BrowserClosed()
|
||||
{
|
||||
sNumBrowsers--;
|
||||
if (sCanTerminate && sNumBrowsers == 0) {
|
||||
|
@ -156,7 +156,7 @@ nsCocoaBrowserService::BrowserClosed()
|
|||
|
||||
/* static */
|
||||
void
|
||||
nsCocoaBrowserService::TermEmbedding()
|
||||
CHBrowserService::TermEmbedding()
|
||||
{
|
||||
sCanTerminate = PR_TRUE;
|
||||
if (sNumBrowsers == 0) {
|
||||
|
@ -178,7 +178,7 @@ nsCocoaBrowserService::TermEmbedding()
|
|||
#define NS_ALERT_NIB_NAME "alert"
|
||||
|
||||
nsAlertController*
|
||||
nsCocoaBrowserService::GetAlertController()
|
||||
CHBrowserService::GetAlertController()
|
||||
{
|
||||
if (!sController) {
|
||||
NSBundle* bundle = [NSBundle bundleForClass:[CHBrowserView class]];
|
||||
|
@ -188,7 +188,7 @@ nsCocoaBrowserService::GetAlertController()
|
|||
}
|
||||
|
||||
void
|
||||
nsCocoaBrowserService::SetAlertController(nsAlertController* aController)
|
||||
CHBrowserService::SetAlertController(nsAlertController* aController)
|
||||
{
|
||||
// XXX When should the controller be released?
|
||||
sController = aController;
|
||||
|
@ -197,7 +197,7 @@ nsCocoaBrowserService::SetAlertController(nsAlertController* aController)
|
|||
|
||||
// nsIFactory implementation
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserService::CreateInstance(nsISupports *aOuter,
|
||||
CHBrowserService::CreateInstance(nsISupports *aOuter,
|
||||
const nsIID & aIID,
|
||||
void **aResult)
|
||||
{
|
||||
|
@ -214,7 +214,7 @@ nsCocoaBrowserService::CreateInstance(nsISupports *aOuter,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserService::LockFactory(PRBool lock)
|
||||
CHBrowserService::LockFactory(PRBool lock)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ nsCocoaBrowserService::LockFactory(PRBool lock)
|
|||
// Implementation of nsIWindowCreator
|
||||
/* nsIWebBrowserChrome createChromeWindow (in nsIWebBrowserChrome parent, in PRUint32 chromeFlags); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserService::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||
CHBrowserService::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
||||
PRUint32 chromeFlags,
|
||||
nsIWebBrowserChrome **_retval)
|
||||
{
|
||||
|
@ -241,13 +241,13 @@ nsCocoaBrowserService::CreateChromeWindow(nsIWebBrowserChrome *parent,
|
|||
|
||||
// void show( in nsIHelperAppLauncher aLauncher, in nsISupports aContext );
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserService::Show(nsIHelperAppLauncher* inLauncher, nsISupports* inContext)
|
||||
CHBrowserService::Show(nsIHelperAppLauncher* inLauncher, nsISupports* inContext)
|
||||
{
|
||||
return inLauncher->SaveToDisk(nsnull, PR_FALSE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserService::PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval)
|
||||
CHBrowserService::PromptForSaveToFile(nsISupports *aWindowContext, const PRUnichar *aDefaultFile, const PRUnichar *aSuggestedFileExtension, nsILocalFile **_retval)
|
||||
{
|
||||
NSString* filename = [NSString stringWithPRUnichars:aDefaultFile];
|
||||
NSSavePanel *thePanel = [NSSavePanel savePanel];
|
||||
|
@ -267,8 +267,8 @@ nsCocoaBrowserService::PromptForSaveToFile(nsISupports *aWindowContext, const PR
|
|||
|
||||
/* void showProgressDialog (in nsIHelperAppLauncher aLauncher, in nsISupports aContext); */
|
||||
NS_IMETHODIMP
|
||||
nsCocoaBrowserService::ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext)
|
||||
CHBrowserService::ShowProgressDialog(nsIHelperAppLauncher *aLauncher, nsISupports *aContext)
|
||||
{
|
||||
NSLog(@"nsCocoaBrowserService::ShowProgressDialog");
|
||||
NSLog(@"CHBrowserService::ShowProgressDialog");
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@class CHBrowserView;
|
||||
class nsCocoaBrowserListener;
|
||||
class CHBrowserListener;
|
||||
class nsIDOMWindow;
|
||||
class nsIWebBrowser;
|
||||
class nsIDOMNode;
|
||||
|
@ -118,7 +118,7 @@ enum {
|
|||
@interface CHBrowserView : NSView
|
||||
{
|
||||
nsIWebBrowser* _webBrowser;
|
||||
nsCocoaBrowserListener* _listener;
|
||||
CHBrowserListener* _listener;
|
||||
NSWindow* mWindow;
|
||||
|
||||
nsIDragHelperService* mDragHelper;
|
||||
|
@ -186,7 +186,7 @@ enum {
|
|||
|
||||
- (void)destroyWebBrowser;
|
||||
- (nsIWebBrowser*)getWebBrowser;
|
||||
- (nsCocoaBrowserListener*)getCocoaBrowserListener;
|
||||
- (CHBrowserListener*)getCocoaBrowserListener;
|
||||
- (void)setWebBrowser:(nsIWebBrowser*)browser;
|
||||
|
||||
- (NSString*)getFocusedURLString;
|
||||
|
|
|
@ -64,12 +64,12 @@
|
|||
#include "nsNetUtil.h"
|
||||
#include "SaveHeaderSniffer.h"
|
||||
|
||||
#import "CHBrowserWrapper.h"
|
||||
#import "BrowserWrapper.h"
|
||||
#import "CHBrowserView.h"
|
||||
|
||||
#import "FindDlgController.h"
|
||||
#import "nsCocoaBrowserService.h"
|
||||
#import "nsCocoaBrowserListener.h"
|
||||
#import "CHBrowserService.h"
|
||||
#import "CHBrowserListener.h"
|
||||
|
||||
#import "mozView.h"
|
||||
|
||||
|
@ -100,12 +100,12 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1";
|
|||
{
|
||||
if ( (self = [super initWithFrame:frame]) )
|
||||
{
|
||||
nsresult rv = nsCocoaBrowserService::InitEmbedding();
|
||||
nsresult rv = CHBrowserService::InitEmbedding();
|
||||
if (NS_FAILED(rv)) {
|
||||
// XXX need to throw
|
||||
}
|
||||
|
||||
_listener = new nsCocoaBrowserListener(self);
|
||||
_listener = new CHBrowserListener(self);
|
||||
NS_ADDREF(_listener);
|
||||
|
||||
// Create the web browser instance
|
||||
|
@ -148,7 +148,7 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1";
|
|||
NS_RELEASE(_listener);
|
||||
NS_IF_RELEASE(_webBrowser);
|
||||
|
||||
nsCocoaBrowserService::BrowserClosed();
|
||||
CHBrowserService::BrowserClosed();
|
||||
|
||||
#if DEBUG
|
||||
NSLog(@"CHBrowserView died.");
|
||||
|
@ -321,7 +321,7 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1";
|
|||
return str;
|
||||
}
|
||||
|
||||
- (nsCocoaBrowserListener*)getCocoaBrowserListener
|
||||
- (CHBrowserListener*)getCocoaBrowserListener
|
||||
{
|
||||
return _listener;
|
||||
}
|
||||
|
|
|
@ -38,14 +38,14 @@
|
|||
// This file contains implementations of factories for various
|
||||
// downloading-related interfaces.
|
||||
|
||||
#import "DownloadProgressDisplay.h"
|
||||
#import "CHDownloadProgressDisplay.h"
|
||||
#import "ProgressDlgController.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIFactory.h"
|
||||
|
||||
#include "nsDownloadListener.h"
|
||||
#include "DownloadFactories.h"
|
||||
#include "CHDownloadFactories.h"
|
||||
|
||||
// factory for nsIDownload objects
|
||||
// XXX replace with generic factory stuff
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
There are three things here:
|
||||
|
||||
1. The DownloadProgressDisplay protocol.
|
||||
1. The CHDownloadProgressDisplay protocol.
|
||||
|
||||
This is a formal protocol that needs to be implemented by
|
||||
a window controller for your progress window. Its methods
|
||||
|
@ -53,7 +53,7 @@
|
|||
This class should be subclassed by an embedder, with an
|
||||
implementation of 'createDownloadController' that hands back
|
||||
a new instance of an NSWindowController that implements the
|
||||
<DownloadProgressDisplay> protocol.
|
||||
<CHDownloadProgressDisplay> protocol.
|
||||
|
||||
The underlying C++ classes use this factory to create the
|
||||
progress window controller.
|
||||
|
@ -108,7 +108,7 @@ class CHDownloader;
|
|||
// a formal protocol for something that implements progress display
|
||||
// Embedders can make a window controller that conforms to this
|
||||
// protocol, and reuse nsDownloadListener to get download UI.
|
||||
@protocol DownloadProgressDisplay
|
||||
@protocol CHDownloadProgressDisplay
|
||||
|
||||
- (void)onStartDownload:(BOOL)isFileSave;
|
||||
- (void)onEndDownload;
|
||||
|
@ -127,7 +127,7 @@ class CHDownloader;
|
|||
{
|
||||
}
|
||||
|
||||
- (NSWindowController<DownloadProgressDisplay> *)createDownloadController;
|
||||
- (NSWindowController<CHDownloadProgressDisplay> *)createDownloadController;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -161,7 +161,7 @@ protected:
|
|||
protected:
|
||||
|
||||
DownloadControllerFactory* mControllerFactory;
|
||||
id <DownloadProgressDisplay> mDownloadDisplay; // something that implements the DownloadProgressDisplay protocol
|
||||
id <CHDownloadProgressDisplay> mDownloadDisplay; // something that implements the CHDownloadProgressDisplay protocol
|
||||
PRBool mIsFileSave; // true if we're doing a save, rather than a download
|
||||
};
|
||||
|
||||
|
|
|
@ -35,12 +35,12 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "DownloadProgressDisplay.h"
|
||||
#import "CHDownloadProgressDisplay.h"
|
||||
|
||||
|
||||
@implementation DownloadControllerFactory
|
||||
|
||||
- (NSWindowController<DownloadProgressDisplay> *)createDownloadController
|
||||
- (NSWindowController<CHDownloadProgressDisplay> *)createDownloadController
|
||||
{
|
||||
// a dummy implementation. You should provide a subclass that
|
||||
// returns an instance of your progress dialog controller.
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@interface CHExtendedOutlineView : NSOutlineView {
|
||||
@interface ExtendedOutlineView : NSOutlineView {
|
||||
SEL mDeleteAction;
|
||||
|
||||
NSRect mOldFrameRect;
|
||||
|
|
|
@ -22,13 +22,13 @@
|
|||
* Max Horn <max@quendi.de> (Context menu & tooltip code)
|
||||
*/
|
||||
|
||||
#import "CHExtendedOutlineView.h"
|
||||
#import "ExtendedOutlineView.h"
|
||||
|
||||
@interface CHExtendedOutlineView (Private)
|
||||
@interface ExtendedOutlineView (Private)
|
||||
- (void)_updateToolTipRect;
|
||||
@end
|
||||
|
||||
@implementation CHExtendedOutlineView
|
||||
@implementation ExtendedOutlineView
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame
|
||||
{
|
||||
|
@ -191,7 +191,7 @@
|
|||
@end
|
||||
|
||||
|
||||
@implementation CHExtendedOutlineView (Private)
|
||||
@implementation ExtendedOutlineView (Private)
|
||||
|
||||
/*
|
||||
* Set up tooltip rects for every row, but only if the frame size or
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "nsIDOMHTMLImageElement.h"
|
||||
#include "nsIDOMCharacterData.h"
|
||||
|
||||
class CHGeckoUtils
|
||||
class GeckoUtils
|
||||
{
|
||||
public:
|
||||
static void GatherTextUnder(nsIDOMNode* aNode, nsString& aResult) {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface CHIconTabViewItem : NSTabViewItem
|
||||
@interface IconTabViewItem : NSTabViewItem
|
||||
{
|
||||
NSImage *mTabIcon;
|
||||
NSDictionary *mLabelAttributes;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "CHIconTabViewItem.h"
|
||||
#import "IconTabViewItem.h"
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
//
|
||||
|
@ -53,11 +53,11 @@
|
|||
|
||||
static const int kMinTabsForSpacing = 4; // with 1-4 tabs, each tab is 1/4 the tab view width
|
||||
|
||||
@interface CHIconTabViewItem(Private)
|
||||
@interface IconTabViewItem(Private)
|
||||
- (void)setupLabelAttributes;
|
||||
@end;
|
||||
|
||||
@implementation CHIconTabViewItem
|
||||
@implementation IconTabViewItem
|
||||
|
||||
-(id)initWithIdentifier:(id)identifier withTabIcon:(NSImage *)tabIcon
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#import <AppKit/NSImage.h>
|
||||
|
||||
@interface NSImage (CHImageAdditions)
|
||||
@interface NSImage (ImageAdditions)
|
||||
- (void) drawFlippedInRect:(NSRect) rect operation:(NSCompositingOperation) op fraction:(float) delta;
|
||||
- (void) drawFlippedInRect:(NSRect) rect operation:(NSCompositingOperation) op;
|
||||
- (void)applyBadge:(NSImage*)badge withAlpha:(float)alpha scale:(float)scale;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#import "CHImageAdditions.h"
|
||||
#import "ImageAdditions.h"
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@implementation NSImage (CHImageAdditions)
|
||||
@implementation NSImage (ImageAdditions)
|
||||
- (void) drawFlippedInRect:(NSRect) rect operation:(NSCompositingOperation) op fraction:(float) delta {
|
||||
CGContextRef context;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class nsIRDFContainerUtils;
|
|||
class nsIRDFResource;
|
||||
class nsIRDFService;
|
||||
|
||||
@interface CHRDFOutlineViewDataSource : NSObject {
|
||||
@interface RDFOutlineViewDataSource : NSObject {
|
||||
nsIRDFDataSource* mDataSource;
|
||||
nsIRDFContainer* mContainer;
|
||||
nsIRDFContainerUtils* mContainerUtils;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#import "NSString+Utils.h"
|
||||
|
||||
#import "CHRDFOutlineViewDataSource.h"
|
||||
#import "RDFOutlineViewDataSource.h"
|
||||
|
||||
#include "nsIRDFDataSource.h"
|
||||
#include "nsIRDFService.h"
|
||||
|
@ -56,7 +56,7 @@
|
|||
|
||||
|
||||
|
||||
@implementation CHRDFOutlineViewDataSource
|
||||
@implementation RDFOutlineViewDataSource
|
||||
|
||||
- (void) ensureDataSourceLoaded
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#import "CHToolbarAdditions.h"
|
||||
#import "ToolbarAdditions.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@implementation NSToolbar (CHToolbarCustomizableAdditions)
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
//
|
||||
// protocol CHFind
|
||||
// protocol Find
|
||||
//
|
||||
// Any window who wants to be able to work with the Find dialog should implement
|
||||
// this protocol.
|
||||
//
|
||||
|
||||
@protocol CHFind
|
||||
@protocol Find
|
||||
|
||||
- (BOOL)findInPageWithPattern:(NSString*)text caseSensitive:(BOOL)inCaseSensitive
|
||||
wrap:(BOOL)inWrap backwards:(BOOL)inBackwards;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#import "FindDlgController.h"
|
||||
#import "BrowserWindowController.h"
|
||||
#import "CHFind.h"
|
||||
#import "Find.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
|
||||
|
@ -70,8 +70,8 @@
|
|||
-(IBAction) find: (id)aSender
|
||||
{
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
if ( [controller conformsToProtocol:@protocol(Find)] ) {
|
||||
id<Find> browserController = controller;
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
@ -99,8 +99,8 @@
|
|||
-(IBAction) findAgain: (id)aSender
|
||||
{
|
||||
NSWindowController* controller = [[NSApp mainWindow] windowController];
|
||||
if ( [controller conformsToProtocol:@protocol(CHFind)] ) {
|
||||
id<CHFind> browserController = controller;
|
||||
if ( [controller conformsToProtocol:@protocol(Find)] ) {
|
||||
id<Find> browserController = controller;
|
||||
BOOL ignoreCase = [mIgnoreCaseBox state];
|
||||
BOOL wrapSearch = [mWrapAroundBox state];
|
||||
BOOL searchBack = [mSearchBackwardsBox state];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// CHHistoryDataSource.h
|
||||
// HistoryDataSource.h
|
||||
// Chimera
|
||||
//
|
||||
// Created by Ben Goodger on Sun Apr 28 2002.
|
||||
|
@ -8,11 +8,11 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "CHRDFOutlineViewDataSource.h"
|
||||
#import "RDFOutlineViewDataSource.h"
|
||||
|
||||
@class BrowserWindowController;
|
||||
|
||||
@interface CHHistoryDataSource : CHRDFOutlineViewDataSource
|
||||
@interface HistoryDataSource : RDFOutlineViewDataSource
|
||||
{
|
||||
|
||||
IBOutlet BrowserWindowController* mBrowserWindowController;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// CHHistoryDataSource.mm
|
||||
// HistoryDataSource.mm
|
||||
// Chimera
|
||||
//
|
||||
// Created by Ben Goodger on Sun Apr 28 2002.
|
||||
|
@ -9,7 +9,7 @@
|
|||
#import "NSString+Utils.h"
|
||||
|
||||
#import "BrowserWindowController.h"
|
||||
#import "CHHistoryDataSource.h"
|
||||
#import "HistoryDataSource.h"
|
||||
#import "CHBrowserView.h"
|
||||
|
||||
#include "nsIRDFService.h"
|
||||
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
@implementation CHHistoryDataSource
|
||||
@implementation HistoryDataSource
|
||||
|
||||
- (void) ensureDataSourceLoaded
|
||||
{
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
#import "MVPreferencesController.h"
|
||||
#import "MVPreferencesMultipleIconView.h"
|
||||
#import "MVPreferencesGroupedIconView.h"
|
||||
#import "CHToolbarAdditions.h"
|
||||
#import "ToolbarAdditions.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsCocoaBrowserService.h"
|
||||
#include "CHBrowserService.h"
|
||||
|
||||
// #import "Defines.h"
|
||||
|
||||
|
@ -114,7 +114,7 @@ NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotification";
|
|||
// with it in |windowDidClose()|. Need to ensure this is exactly balanced with |BrowserClosed()|
|
||||
// calls as it increments a refcount. As a result, we can only call it when we're making
|
||||
// the window visible. Too bad cocoa doesn't give us any notifications of this.
|
||||
nsCocoaBrowserService::InitEmbedding();
|
||||
CHBrowserService::InitEmbedding();
|
||||
}
|
||||
[self showAll:nil];
|
||||
[window makeKeyAndOrderFront:nil];
|
||||
|
@ -236,7 +236,7 @@ NSString *MVPreferencesWindowNotification = @"MVPreferencesWindowNotification";
|
|||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
// tell gecko that this window no longer needs it around.
|
||||
nsCocoaBrowserService::BrowserClosed();
|
||||
CHBrowserService::BrowserClosed();
|
||||
}
|
||||
|
||||
- (NSToolbarItem *) toolbar:(NSToolbar *) toolbar
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
#import "MVPreferencesMultipleIconView.h"
|
||||
#import "MVPreferencesController.h"
|
||||
#import "CHImageAdditions.h"
|
||||
#import "ImageAdditions.h"
|
||||
|
||||
@interface MVPreferencesMultipleIconView (MVPreferencesMultipleIconViewPrivate)
|
||||
- (void) _focusFirst;
|
||||
|
|
|
@ -40,14 +40,14 @@
|
|||
|
||||
class nsIPref;
|
||||
|
||||
@interface CHPreferenceManager : NSObject
|
||||
@interface PreferenceManager : NSObject
|
||||
{
|
||||
NSUserDefaults* mDefaults;
|
||||
ICInstance mInternetConfig;
|
||||
nsIPref* mPrefs;
|
||||
}
|
||||
|
||||
+ (CHPreferenceManager *)sharedInstance;
|
||||
+ (PreferenceManager *)sharedInstance;
|
||||
|
||||
- (id) init;
|
||||
- (void) dealloc;
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import <SystemConfiguration/SystemConfiguration.h>
|
||||
#import "CHPreferenceManager.h"
|
||||
#import "CHUserDefaults.h"
|
||||
#import "PreferenceManager.h"
|
||||
#import "UserDefaults.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIProfile.h"
|
||||
|
@ -58,12 +58,12 @@ nsresult PR_CALLBACK
|
|||
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
||||
#endif
|
||||
|
||||
@implementation CHPreferenceManager
|
||||
@implementation PreferenceManager
|
||||
|
||||
|
||||
+ (CHPreferenceManager *) sharedInstance {
|
||||
static CHPreferenceManager *sSharedInstance = nil;
|
||||
return ( sSharedInstance ? sSharedInstance : (sSharedInstance = [[[CHPreferenceManager alloc] init] autorelease] ));
|
||||
+ (PreferenceManager *) sharedInstance {
|
||||
static PreferenceManager *sSharedInstance = nil;
|
||||
return ( sSharedInstance ? sSharedInstance : (sSharedInstance = [[[PreferenceManager alloc] init] autorelease] ));
|
||||
}
|
||||
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,162 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{CLASS = BookmarkItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
addBookmark = id;
|
||||
addFolder = id;
|
||||
deleteBookmarks = id;
|
||||
openBookmarkInNewTab = id;
|
||||
openBookmarkInNewWindow = id;
|
||||
showBookmarkInfo = id;
|
||||
};
|
||||
CLASS = BookmarksDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mBrowserWindowController = id;
|
||||
mDeleteBookmarkButton = id;
|
||||
mEditBookmarkButton = id;
|
||||
mOutlineView = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
||||
{
|
||||
CLASS = BrowserWindow;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mAutoCompleteTextField = id; };
|
||||
SUPERCLASS = NSWindow;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
back = id;
|
||||
bookmarkLink = id;
|
||||
bookmarkPage = id;
|
||||
cancelAddBookmarkSheet = id;
|
||||
cancelLocationSheet = id;
|
||||
copyLinkLocation = id;
|
||||
endAddBookmarkSheet = id;
|
||||
endLocationSheet = id;
|
||||
forward = id;
|
||||
goToLocationFromToolbarURLField = id;
|
||||
home = id;
|
||||
manageBookmarks = id;
|
||||
openLinkInNewTab = id;
|
||||
openLinkInNewWindow = id;
|
||||
performSearch = id;
|
||||
printDocument = id;
|
||||
reload = id;
|
||||
saveImageAs = id;
|
||||
saveLinkAs = id;
|
||||
savePageAs = id;
|
||||
stop = id;
|
||||
toggleSidebar = id;
|
||||
viewOnlyThisImage = id;
|
||||
viewSource = id;
|
||||
};
|
||||
CLASS = BrowserWindowController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mAddBookmarkCheckbox = NSButton;
|
||||
mAddBookmarkFolderField = NSPopUpButton;
|
||||
mAddBookmarkSheetWindow = NSWindow;
|
||||
mAddBookmarkTitleField = NSTextField;
|
||||
mBackItem = NSMenuItem;
|
||||
mCachedBMDS = id;
|
||||
mForwardItem = NSMenuItem;
|
||||
mHistoryDataSource = CHHistoryDataSource;
|
||||
mImageLinkMenu = NSMenu;
|
||||
mImageMenu = NSMenu;
|
||||
mInputMenu = NSMenu;
|
||||
mLinkMenu = NSMenu;
|
||||
mLocationSheetURLField = NSTextField;
|
||||
mLocationSheetWindow = NSWindow;
|
||||
mLocationToolbarView = NSView;
|
||||
mLock = NSImageView;
|
||||
mPageMenu = NSMenu;
|
||||
mPersonalToolbar = CHBookmarksToolbar;
|
||||
mProgress = NSProgressIndicator;
|
||||
mProxyIcon = NSImageView;
|
||||
mSidebarBookmarksDataSource = BookmarksDataSource;
|
||||
mSidebarBrowserView = id;
|
||||
mSidebarDrawer = NSDrawer;
|
||||
mSidebarSourceTabView = NSTabView;
|
||||
mSidebarTabView = NSTabView;
|
||||
mStatus = NSTextField;
|
||||
mStatusBar = NSView;
|
||||
mTabBrowser = CHExtendedTabView;
|
||||
mURLBar = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = CHAutoCompleteDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {onBlur = id; onResize = id; };
|
||||
CLASS = CHAutoCompleteTextField;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mProxyIcon = CHPageProxyIcon; };
|
||||
SUPERCLASS = NSTextField;
|
||||
},
|
||||
{
|
||||
CLASS = CHBookmarksOutlineView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = CHExtendedOutlineView;
|
||||
},
|
||||
{CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = CHBrowserWrapper;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mLockIcon = id;
|
||||
mWindowController = id;
|
||||
progress = id;
|
||||
progressSuper = id;
|
||||
status = id;
|
||||
urlbar = id;
|
||||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{
|
||||
CLASS = CHHistoryDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mBrowserWindowController = id; };
|
||||
SUPERCLASS = CHRDFOutlineViewDataSource;
|
||||
},
|
||||
{CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = CHPageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||
{
|
||||
CLASS = CHRDFOutlineViewDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mOutlineView = id; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = MyBrowserView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mImageLinkMenu = id;
|
||||
mImageMenu = id;
|
||||
mInputMenu = id;
|
||||
mLinkMenu = id;
|
||||
mPageMenu = id;
|
||||
mWindowController = id;
|
||||
progress = id;
|
||||
progressSuper = id;
|
||||
status = id;
|
||||
urlbar = id;
|
||||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>176 79 632 495 0 0 1280 1002 </string>
|
||||
<string>208 152 630 599 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
|
@ -39,11 +39,7 @@
|
|||
<string>4</string>
|
||||
<key>IBLockedObjects</key>
|
||||
<array/>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>10</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичный файл не отображается.
|
@ -1,80 +0,0 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{
|
||||
CLASS = BrowserToolbarController;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = ToolbarController;
|
||||
},
|
||||
{CLASS = CHGoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
addBookmark = id;
|
||||
addFolder = id;
|
||||
addSeparator = id;
|
||||
biggerTextSize = id;
|
||||
closeTab = id;
|
||||
displayPreferencesWindow = id;
|
||||
doReload = id;
|
||||
doSearch = id;
|
||||
doStop = id;
|
||||
feedbackLink = id;
|
||||
findAgain = id;
|
||||
findInPage = id;
|
||||
getInfo = id;
|
||||
goBack = id;
|
||||
goForward = id;
|
||||
goHome = id;
|
||||
importBookmarks = id;
|
||||
infoLink = id;
|
||||
manageBookmarks = id;
|
||||
newTab = id;
|
||||
newWindow = id;
|
||||
nextTab = id;
|
||||
openFile = id;
|
||||
openLocation = id;
|
||||
openMenuBookmark = id;
|
||||
previousTab = id;
|
||||
printPage = id;
|
||||
printPreview = id;
|
||||
savePage = id;
|
||||
showAboutBox = id;
|
||||
smallerTextSize = id;
|
||||
toggleBookmarksToolbar = id;
|
||||
toggleOfflineMode = id;
|
||||
toggleSidebar = id;
|
||||
viewSource = id;
|
||||
};
|
||||
CLASS = MainController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mAddBookmarkMenuItem = NSMenuItem;
|
||||
mApplication = NSApplication;
|
||||
mBookmarksMenu = NSMenu;
|
||||
mBookmarksToolbarMenuItem = NSMenuItem;
|
||||
mCloseTabMenuItem = NSMenuItem;
|
||||
mCloseWindowMenuItem = NSMenuItem;
|
||||
mCreateBookmarksFolderMenuItem = NSMenuItem;
|
||||
mCreateBookmarksSeparatorMenuItem = NSMenuItem;
|
||||
mFilterList = NSPopUpButton;
|
||||
mFilterView = NSView;
|
||||
mToggleSidebarMenuItem = NSMenuItem;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = MyBrowserView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {progress = id; progressSuper = id; status = id; urlbar = id; };
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{
|
||||
CLASS = ToolbarController;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mBrowserView = id; mWindow = id; };
|
||||
SUPERCLASS = NSObject;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
Двоичный файл не отображается.
|
@ -184,7 +184,7 @@ const int kDefaultExpireDays = 9;
|
|||
ICInstance icInstance = NULL;
|
||||
OSStatus error;
|
||||
|
||||
// it would be nice to use CHPreferenceManager, but I don't want to drag
|
||||
// it would be nice to use PreferenceManager, but I don't want to drag
|
||||
// all that code into the plugin
|
||||
error = ICStart(&icInstance, 'CHIM');
|
||||
if (error != noErr) {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
|
||||
// set such that "enable all" is 0 and "disable all" is 2. If mozilla has other prefs
|
||||
// that we don't quite know about, we assume they were remapped by the CHPreferenceManager
|
||||
// that we don't quite know about, we assume they were remapped by the PreferenceManager
|
||||
// at startup.
|
||||
PRInt32 acceptCookies = 0;
|
||||
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<key>AppleEventCode</key>
|
||||
<string>GURL</string>
|
||||
<key>CommandClass</key>
|
||||
<string>CHGetURLCommand</string>
|
||||
<string>GetURLCommand</string>
|
||||
</dict>
|
||||
<key>OpenURL</key>
|
||||
<dict>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<key>AppleEventCode</key>
|
||||
<string>OURL</string>
|
||||
<key>CommandClass</key>
|
||||
<string>CHGetURLCommand</string>
|
||||
<string>GetURLCommand</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>Name</key>
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
{
|
||||
IBClasses = (
|
||||
{CLASS = AutoCompleteDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {onBlur = id; onResize = id; };
|
||||
CLASS = AutoCompleteTextField;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mProxyIcon = PageProxyIcon; };
|
||||
SUPERCLASS = NSTextField;
|
||||
},
|
||||
{CLASS = BookmarkItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
|
@ -20,6 +28,11 @@
|
|||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
CLASS = BookmarksOutlineView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = ExtendedOutlineView;
|
||||
},
|
||||
{CLASS = BookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = BrowserTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
|
||||
{
|
||||
|
@ -65,7 +78,7 @@
|
|||
mBackItem = NSMenuItem;
|
||||
mCachedBMDS = id;
|
||||
mForwardItem = NSMenuItem;
|
||||
mHistoryDataSource = CHHistoryDataSource;
|
||||
mHistoryDataSource = HistoryDataSource;
|
||||
mImageLinkMenu = NSMenu;
|
||||
mImageMenu = NSMenu;
|
||||
mInputMenu = NSMenu;
|
||||
|
@ -75,7 +88,7 @@
|
|||
mLocationToolbarView = NSView;
|
||||
mLock = NSImageView;
|
||||
mPageMenu = NSMenu;
|
||||
mPersonalToolbar = CHBookmarksToolbar;
|
||||
mPersonalToolbar = BookmarksToolbar;
|
||||
mProgress = NSProgressIndicator;
|
||||
mProxyIcon = NSImageView;
|
||||
mSidebarBookmarksDataSource = BookmarksDataSource;
|
||||
|
@ -85,28 +98,14 @@
|
|||
mSidebarTabView = NSTabView;
|
||||
mStatus = NSTextField;
|
||||
mStatusBar = NSView;
|
||||
mTabBrowser = CHExtendedTabView;
|
||||
mTabBrowser = BrowserTabView;
|
||||
mURLBar = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSWindowController;
|
||||
},
|
||||
{CLASS = CHAutoCompleteDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {onBlur = id; onResize = id; };
|
||||
CLASS = CHAutoCompleteTextField;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mProxyIcon = CHPageProxyIcon; };
|
||||
SUPERCLASS = NSTextField;
|
||||
},
|
||||
{
|
||||
CLASS = CHBookmarksOutlineView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = CHExtendedOutlineView;
|
||||
},
|
||||
{CLASS = CHBookmarksToolbar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = CHBrowserWrapper;
|
||||
CLASS = BrowserWrapper;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mLockIcon = id;
|
||||
|
@ -118,43 +117,23 @@
|
|||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = CHExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = CHHistoryDataSource;
|
||||
CLASS = HistoryDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mBrowserWindowController = id; };
|
||||
SUPERCLASS = CHRDFOutlineViewDataSource;
|
||||
SUPERCLASS = RDFOutlineViewDataSource;
|
||||
},
|
||||
{CLASS = CHLocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = CHPageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = PageProxyIcon; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
|
||||
{
|
||||
CLASS = CHRDFOutlineViewDataSource;
|
||||
CLASS = RDFOutlineViewDataSource;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {mOutlineView = id; };
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = ExtendedOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = LocationBar; LANGUAGE = ObjC; SUPERCLASS = NSView; },
|
||||
{CLASS = MainController; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {load = id; };
|
||||
CLASS = MyBrowserView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
mImageLinkMenu = id;
|
||||
mImageMenu = id;
|
||||
mInputMenu = id;
|
||||
mLinkMenu = id;
|
||||
mPageMenu = id;
|
||||
mWindowController = id;
|
||||
progress = id;
|
||||
progressSuper = id;
|
||||
status = id;
|
||||
urlbar = id;
|
||||
};
|
||||
SUPERCLASS = NSView;
|
||||
},
|
||||
{CLASS = RDFOutlineViewItem; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = ThrobberHandler; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
|
||||
);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>176 79 632 495 0 0 1280 1002 </string>
|
||||
<string>208 152 630 599 0 0 1280 1002 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>124</key>
|
||||
|
@ -39,11 +39,7 @@
|
|||
<string>4</string>
|
||||
<key>IBLockedObjects</key>
|
||||
<array/>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>10</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S60</string>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Двоичные данные
chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичные данные
chimera/resources/localized/English.lproj/BrowserWindow.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -5,8 +5,8 @@
|
|||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = ToolbarController;
|
||||
},
|
||||
{CLASS = CHGoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{CLASS = GoMenu; LANGUAGE = ObjC; SUPERCLASS = NSMenu; },
|
||||
{
|
||||
ACTIONS = {
|
||||
addBookmark = id;
|
||||
|
|
Двоичный файл не отображается.
|
@ -1,30 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 2002 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CHGetURLCommand : NSScriptCommand {}
|
||||
|
||||
- (id)performDefaultImplementation;
|
||||
|
||||
@end
|
|
@ -1,37 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import "CHGetURLCommand.h"
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
#import "MainController.h"
|
||||
|
||||
@implementation CHGetURLCommand
|
||||
|
||||
- (id)performDefaultImplementation
|
||||
{
|
||||
[(MainController*)[NSApp delegate] openNewWindowOrTabWithURL:[self directParameter] andReferrer:nil];
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,56 +0,0 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Chimera code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Judy
|
||||
* Simon Fraser <sfraser@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <Appkit/Appkit.h>
|
||||
|
||||
@interface CHAboutBox : NSObject
|
||||
{
|
||||
IBOutlet NSTextView* creditsField;
|
||||
IBOutlet NSTextField* buildNumberField;
|
||||
IBOutlet NSWindow* window;
|
||||
NSTimer *scrollTimer;
|
||||
float currentPosition;
|
||||
float maxScrollHeight;
|
||||
NSTimeInterval startTime;
|
||||
BOOL restartAtTop;
|
||||
}
|
||||
|
||||
+ (CHAboutBox *)sharedInstance;
|
||||
- (IBAction)showPanel:(id)sender;
|
||||
|
||||
@end
|
|
@ -37,19 +37,19 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "CHAboutBox.h"
|
||||
#import "AboutBox.h"
|
||||
|
||||
#include "nsBuildID.h"
|
||||
|
||||
@interface CHAboutBox(Private)
|
||||
@interface AboutBox(Private)
|
||||
- (void)loadWindow;
|
||||
@end
|
||||
|
||||
@implementation CHAboutBox
|
||||
@implementation AboutBox
|
||||
|
||||
static CHAboutBox *sharedInstance = nil;
|
||||
static AboutBox *sharedInstance = nil;
|
||||
|
||||
+ (CHAboutBox *)sharedInstance
|
||||
+ (AboutBox *)sharedInstance
|
||||
{
|
||||
return sharedInstance ? sharedInstance : [[self alloc] init];
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче